/**
 * Cadde İşitme Merkezi Randevu Sistemi - Styles
 */

/* ========================================
   Icons & Fonts
   ======================================== */
@font-face {
    font-family: 'LucideIcons';
    src: url(https://cdn.jsdelivr.net/npm/lucide-static@latest/font/Lucide.ttf) format('truetype');
}

.lucide {
    font-family: 'LucideIcons';
    font-size: 1.1rem;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

/* ========================================
   Scrollbar Styles
   ======================================== */
.calendar-scroll::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.calendar-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.calendar-scroll::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.calendar-scroll::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ========================================
   Modal Styles
   ======================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 2rem;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 0.5rem;
    position: relative;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* ========================================
   Calendar Blocks
   ======================================== */
#appointmentServicesChecklist {
    max-height: 120px;
    overflow-y: auto;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.5rem;
    background-color: #ffffff;
}

.appointment-block {
    position: absolute;
    left: 0;
    margin: 0;
    padding: 4px;
    border-radius: 4px;
    overflow: hidden;
    font-size: 0.75rem;
    line-height: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 30;
    box-sizing: border-box;
    width: 100%;
}

.appointment-block:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    opacity: 1;
}

.event-block {
    position: absolute;
    left: 0;
    margin: 0;
    padding: 4px;
    border-radius: 4px;
    overflow: hidden;
    font-size: 0.75rem;
    line-height: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 20;
    box-sizing: border-box;
    width: 100%;
}

.event-block:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
    opacity: 1;
}

/* ========================================
   Audiologist Colors
   ======================================== */
.audiologist-1 {
    background-color: #fef3c7;
    border-left: 3px solid #f59e0b;
    color: #92400e;
}

.audiologist-2 {
    background-color: #bbf7d0;
    border-left: 3px solid #4ade80;
    color: #15803d;
}

.audiologist-3 {
    background-color: #bfdbfe;
    border-left: 3px solid #60a5fa;
    color: #1e3a8a;
}

/* ========================================
   Calendar Layout
   ======================================== */
.time-slot-line {
    position: absolute;
    border-bottom: 1px dashed #e5e7eb;
    width: 100%;
    z-index: 2;
    transition: background-color 0.2s ease;
}

.time-slot-line:hover {
    background-color: rgba(245, 158, 11, 0.08);
}

#daily-day-column {
    cursor: pointer;
}

.lunch-break-overlay {
    position: absolute;
    left: 0;
    right: 0;
    background-color: rgba(229, 231, 235, 0.5);
    border-top: 1px dashed #9ca3af;
    border-bottom: 1px dashed #9ca3af;
    z-index: 5;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lunch-break-overlay span {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 2px 8px;
    border-radius: 4px;
}

.view-btn-inactive {
    border-color: transparent;
    color: #6b7280;
}

.view-btn-inactive:hover {
    color: #374151;
    border-color: #d1d5db;
}

.view-btn-active {
    border-color: #f59e0b;
    color: #d97706;
}

.day-header {
    text-align: center;
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.5rem 0;
    height: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f9fafb;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.day-header:hover {
    background-color: #fef3c7;
    color: #92400e;
}

.day-column {
    position: relative;
    height: 100%;
    cursor: pointer;
    border-right: 1px solid #e5e7eb;
}

.day-column:last-child {
    border-right: none;
}

.today-column {
    background-color: #fefce8;
}

.nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#currentDateDisplay {
    min-width: 270px;
    text-align: center;
    display: inline-block;
}

.appointment-note {
    font-style: italic;
    color: #4b5563;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
    margin-top: 2px;
}

.event-note {
    font-style: italic;
    color: inherit;
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
    margin-top: 2px;
    font-size: 0.7rem;
}

/* ========================================
   Date Input Styles
   ======================================== */
input[type="date"] {
    color: transparent;
    background: transparent;
}

input[type="date"]:focus {
    color: #000;
    background: white;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
}

input[type="date"]::-webkit-datetime-edit-text {
    padding: 0 2px;
}

input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field {
    padding: 0;
}

/* ========================================
   Color Picker Styles
   ======================================== */
input[type="color"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: transparent;
    border: none;
    cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: 2px solid #d1d5db;
    border-radius: 0.375rem;
}

/* ========================================
   Time Input Styles
   ======================================== */
input[type="time"] {
    font-family: inherit;
    font-size: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

input[type="time"]::-webkit-datetime-edit-ampm-field {
    display: inline;
    color: #374151;
    font-weight: 500;
}

input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(0.5);
    cursor: pointer;
}

input[type="time"]::-moz-datetime-edit-ampm-field {
    display: inline;
    color: #374151;
    font-weight: 500;
}

input[type="time"]::-webkit-datetime-edit {
    padding: 0;
}

input[type="time"]::-webkit-datetime-edit-hour-field,
input[type="time"]::-webkit-datetime-edit-minute-field {
    padding: 0 2px;
}

input[type="time"]:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

input[type="time"].opacity-50 {
    opacity: 0.5;
}

input[type="time"].cursor-not-allowed {
    cursor: not-allowed;
}

/* ========================================
   All-Day Event Styles
   ======================================== */
.all-day-event {
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    border-left-width: 4px;
    border-left-style: solid;
}

.all-day-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#weekly-all-day-row .all-day-event {
    z-index: 10;
    position: relative;
}

/* Dynamic color classes */
.bg-red-500,
.bg-blue-500,
.bg-green-500,
.bg-purple-500,
.bg-gray-500,
.bg-yellow-500,
.bg-pink-500,
.bg-indigo-500,
.bg-teal-500,
.bg-orange-500 {
    border-left-width: 4px;
    border-left-style: solid;
}

/* All-day event color variants */
.all-day-event.bg-red-500 {
    background-color: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

.all-day-event.bg-blue-500 {
    background-color: #eff6ff;
    border-color: #3b82f6;
    color: #1e40af;
}

.all-day-event.bg-green-500 {
    background-color: #f0fdf4;
    border-color: #10b981;
    color: #166534;
}

.all-day-event.bg-purple-500 {
    background-color: #faf5ff;
    border-color: #8b5cf6;
    color: #7c3aed;
}

.all-day-event.bg-gray-500 {
    background-color: #f9fafb;
    border-color: #6b7280;
    color: #374151;
}

.all-day-event.bg-yellow-500 {
    background-color: #fffbeb;
    border-color: #eab308;
    color: #92400e;
}

.all-day-event.bg-pink-500 {
    background-color: #fdf2f8;
    border-color: #ec4899;
    color: #be185d;
}

.all-day-event.bg-indigo-500 {
    background-color: #eef2ff;
    border-color: #6366f1;
    color: #3730a3;
}

.all-day-event.bg-teal-500 {
    background-color: #f0fdfa;
    border-color: #14b8a6;
    color: #134e4a;
}

.all-day-event.bg-orange-500 {
    background-color: #fff7ed;
    border-color: #f97316;
    color: #c2410c;
}

/* Weekly all-day row text color override */
.all-day-event.border-l-4.mb-1.p-1.rounded.text-xs,
.all-day-event.border-l-4.mb-1.p-1.rounded.text-xs * {
    color: #ffffff !important;
}

/* ========================================
   Walk-in Patients Sidebar
   ======================================== */

/* Wrapper: calendar + sidebar side by side */
.daily-view-wrapper {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

/* Sidebar container */
.walk-in-sidebar {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    max-height: 700px;
    overflow: hidden;
    position: sticky;
    top: 0;
}

/* Sidebar header */
.walk-in-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff7ed;
    border-bottom: 1px solid #fed7aa;
}

.walk-in-sidebar-title {
    font-weight: 600;
    font-size: 15px;
    color: #c2410c;
}

.walk-in-badge {
    background: #ea580c;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    min-width: 20px;
    text-align: center;
}

/* Scrollable card list */
.walk-in-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.walk-in-empty {
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
    padding: 24px 8px;
}

/* Walk-in card */
.walk-in-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #ea580c;
    border-radius: 6px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
}

.walk-in-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.walk-in-patient-name {
    font-weight: 700;
    color: #111827;
}

.walk-in-arrival-time {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.walk-in-card-audiologist {
    font-size: 13px;
    color: #4b5563;
}

.walk-in-card-services {
    font-size: 13px;
    color: #374151;
    font-style: italic;
}

.walk-in-card-notes {
    font-size: 13px;
    color: #6b7280;
    border-top: 1px solid #f3f4f6;
    padding-top: 4px;
    margin-top: 2px;
}

.walk-in-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.walk-in-edit-btn,
.walk-in-delete-btn {
    font-size: 13px;
    padding: 2px 10px;
    border-radius: 4px;
    border: 1px solid;
    cursor: pointer;
    transition: background 0.2s ease;
}

.walk-in-edit-btn {
    border-color: #6b7280;
    background: #fff;
    color: #374151;
}

.walk-in-edit-btn:hover {
    background: #f9fafb;
}

.walk-in-delete-btn {
    border-color: #fca5a5;
    background: #fff;
    color: #dc2626;
}

.walk-in-delete-btn:hover {
    background: #fef2f2;
}

/* Footer: Add button */
.walk-in-sidebar-footer {
    padding: 10px 8px;
    border-top: 1px solid #e5e7eb;
}

.walk-in-add-btn {
    width: 100%;
    padding: 8px;
    background: #ea580c;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.walk-in-add-btn:hover {
    background: #c2410c;
}

/* Info box */
.walk-in-info-box {
    padding: 10px 12px;
    background: #eff6ff;
    border-top: 1px solid #bfdbfe;
    font-size: 12px;
    color: #1d4ed8;
    line-height: 1.5;
}

/* Walk-in services checklist */
#walkInServicesChecklist {
    max-height: 120px;
    overflow-y: auto;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.5rem;
    background-color: #ffffff;
}

/* ========================================
   Toast Notifications
   ======================================== */
#toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
    padding: 12px 14px;
    min-width: 260px;
    max-width: 380px;
    border-left: 4px solid;
    pointer-events: all;
    animation: toastIn 0.3s ease;
}

.toast-success { border-left-color: #22c55e; }
.toast-error   { border-left-color: #ef4444; }
.toast-warning { border-left-color: #f59e0b; }
.toast-info    { border-left-color: #3b82f6; }

.toast-icon {
    font-size: 1rem;
    line-height: 1.4;
    flex-shrink: 0;
    font-weight: 700;
}
.toast-success .toast-icon { color: #22c55e; }
.toast-error   .toast-icon { color: #ef4444; }
.toast-warning .toast-icon { color: #f59e0b; }
.toast-info    .toast-icon { color: #3b82f6; }

.toast-message {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #1f2937;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.toast-close:hover { color: #374151; }

@keyframes toastIn {
    from { transform: translateX(110%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(10px); }
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
    .daily-view-wrapper {
        flex-direction: column;
    }
    .walk-in-sidebar {
        width: 100%;
        max-height: 400px;
    }
}

/* ========================================
   LOGS PAGE
   ======================================== */

.logs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.logs-table th {
    background: #f9fafb;
    text-align: left;
    padding: 10px 14px;
    border-bottom: 2px solid #e5e7eb;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}
.logs-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
    color: #374151;
}
.logs-table tr:hover td { background: #fafafa; }
.logs-table .log-time {
    font-size: 0.75rem;
    color: #6b7280;
    display: block;
    margin-top: 2px;
}

/* Action badges */
.log-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.log-badge-add     { background: #dcfce7; color: #166534; }
.log-badge-update  { background: #dbeafe; color: #1e40af; }
.log-badge-delete  { background: #fee2e2; color: #991b1b; }
.log-badge-session { background: #f3f4f6; color: #374151; }

/* Filter bar */
.logs-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 1rem;
}
.logs-filter-bar input[type="date"],
.logs-filter-bar select {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #374151;
    background: #fff;
}
.logs-filter-bar select { cursor: pointer; }
.logs-filter-btn {
    padding: 6px 16px;
    background: #f59e0b;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.2s ease;
}
.logs-filter-btn:hover { background: #d97706; }

/* Logs page header */
.logs-page-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 10;
}
.logs-page-header .brand {
    font-size: 1.125rem;
    font-weight: 700;
    color: #f59e0b;
}
.logs-page-header nav {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.875rem;
}
.logs-page-header nav a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease;
}
.logs-page-header nav a:hover { color: #f59e0b; }
.logs-page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 24px;
}

/* Filter pill buttons (multi-select) */
.filter-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 9999px;
    font-size: 0.8125rem;
    color: #6b7280;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
    user-select: none;
    white-space: nowrap;
}
.filter-pill:hover {
    border-color: #f59e0b;
    color: #d97706;
}
.filter-pill.active {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
    font-weight: 600;
}

/* Flatpickr date inputs for logs page */
.logs-date-input + input.flatpickr-input {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.875rem;
    color: #374151;
    background: #fff;
    height: 36px;
    cursor: pointer;
    min-width: 140px;
    box-sizing: border-box;
}
.logs-date-input + input.flatpickr-input:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245,158,11,0.15);
}

/* ===== Log Detail Drawer ===== */

/* Clickable table rows */
.logs-table-row { cursor: pointer; }
.logs-table-row:hover td { background: #f9fafb; }
.log-row-selected td { background: #fffbeb !important; }
.log-desc-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Overlay */
.log-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 40;
}
.log-drawer-overlay.open { opacity: 1; pointer-events: auto; }

/* Drawer panel */
.log-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 440px;
    max-width: 92vw;
    background: #fff;
    border-left: 1px solid #e5e7eb;
    box-shadow: -6px 0 30px rgba(0, 0, 0, 0.08);
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.log-drawer.open { transform: translateX(0); }

/* Drawer header */
.log-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    gap: 10px;
    flex-shrink: 0;
}
.log-drawer-entity {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
}
.log-drawer-close {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1rem;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}
.log-drawer-close:hover { background: #f3f4f6; color: #374151; }

/* Meta row */
.log-drawer-meta {
    padding: 9px 18px;
    font-size: 0.8125rem;
    color: #6b7280;
    background: #f9fafb;
    border-bottom: 1px solid #f3f4f6;
    flex-shrink: 0;
}

/* Scrollable body */
.log-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 18px;
}

/* Section title */
.drawer-section-title {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding-bottom: 8px;
    margin-bottom: 12px;
    border-bottom: 2px solid;
}
.drawer-section-add    { color: #15803d; border-color: #bbf7d0; }
.drawer-section-delete { color: #b91c1c; border-color: #fecaca; }
.drawer-section-update { color: #1d4ed8; border-color: #bfdbfe; }

/* Drawer table */
.drawer-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}
.drawer-table thead th {
    text-align: left;
    padding: 7px 10px;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1.5px solid #e5e7eb;
    background: #f9fafb;
}
.drawer-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    vertical-align: top;
    line-height: 1.45;
}
.drawer-table-single td:first-child,
.drawer-table .drawer-field-label {
    font-weight: 600;
    color: #6b7280;
    white-space: nowrap;
    padding-right: 14px;
    min-width: 110px;
}

/* Changed row / cell highlighting */
.drawer-row-changed { background: #fffbeb; }
.drawer-cell-changed {
    background: #fef08a;
    border-radius: 4px;
    font-weight: 500;
    color: #78350f;
}

/* Empty / null value */
.drawer-empty-val { color: #d1d5db; font-style: italic; }

/* Color swatch */
.drawer-color-swatch {
    display: inline-block;
    width: 13px;
    height: 13px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,0.12);
    vertical-align: middle;
    margin-right: 6px;
    flex-shrink: 0;
}

/* Description fallback (session / no-details logs) */
.drawer-fallback {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.55;
}

@media (max-width: 768px) {
    .log-drawer { width: 100vw; max-width: 100vw; }
    .logs-filter-bar { flex-direction: column; align-items: stretch; }
    .logs-table th:nth-child(2),
    .logs-table td:nth-child(2) { display: none; }
}

/* ===== Daily Notes Checklist ===== */

.daily-notes-section {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #fffbeb;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.daily-notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    user-select: none;
    background: #fef3c7;
    border-bottom: 1px solid #fde68a;
    transition: background 0.15s;
}

.daily-notes-header:hover {
    background: #fde68a;
}

.daily-notes-badge {
    background: #f59e0b;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.1rem 0.45rem;
    border-radius: 9999px;
    min-width: 1.2rem;
    text-align: center;
}

.daily-notes-body {
    padding: 0.5rem 0.75rem;
    max-height: 280px;
    overflow-y: auto;
}

.daily-notes-body.collapsed {
    display: none;
}

.daily-notes-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.daily-note-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    border-radius: 0.375rem;
    background: white;
    border: 1px solid #e5e7eb;
    transition: opacity 0.2s, order 0.2s;
}

.daily-note-item.completed {
    opacity: 0.5;
    order: 1;
}

.daily-note-item.completed .daily-note-title {
    text-decoration: line-through;
    color: #9ca3af;
}

.daily-note-item.completed .daily-note-desc {
    text-decoration: line-through;
    color: #d1d5db;
}

.daily-note-checkbox {
    margin-top: 0.2rem;
    width: 1rem;
    height: 1rem;
    accent-color: #f59e0b;
    cursor: pointer;
    flex-shrink: 0;
}

.daily-note-content {
    flex: 1;
    min-width: 0;
}

.daily-note-title {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
    color: #1f2937;
}

.daily-note-desc {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.3;
    margin-top: 0.1rem;
}

.daily-note-audiologists {
    font-size: 0.7rem;
    color: #92400e;
    margin-top: 0.15rem;
}

.daily-note-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.daily-note-actions button {
    padding: 0.2rem 0.35rem;
    border-radius: 0.25rem;
    border: none;
    cursor: pointer;
    font-size: 0.7rem;
    background: transparent;
    color: #9ca3af;
    transition: background 0.15s, color 0.15s;
}

.daily-note-actions button:hover {
    background: #f3f4f6;
    color: #374151;
}

.daily-note-actions button.note-delete-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

.daily-notes-add-btn {
    width: 100%;
    padding: 0.4rem;
    margin-top: 0.4rem;
    border: 1px dashed #d1d5db;
    border-radius: 0.375rem;
    background: transparent;
    color: #6b7280;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
}

.daily-notes-add-btn:hover {
    border-color: #f59e0b;
    color: #f59e0b;
    background: #fffbeb;
}

.daily-notes-empty {
    text-align: center;
    color: #9ca3af;
    font-size: 0.8rem;
    padding: 0.5rem 0;
}

.daily-notes-date-group {
    font-size: 0.75rem;
    font-weight: 600;
    color: #92400e;
    padding: 0.3rem 0 0.15rem;
    margin-top: 0.4rem;
    border-bottom: 1px solid #fde68a;
}

.daily-notes-date-group:first-child {
    margin-top: 0;
}

.daily-notes-chevron-up {
    transform: rotate(180deg);
}

/* Weekly notes row (7 columns above weekly calendar) */
.weekly-notes-row {
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.weekly-notes-cell {
    padding: 0.35rem;
    border-right: 1px solid #fde68a;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-height: 2rem;
}

.weekly-notes-cell:last-child {
    border-right: none;
}

.weekly-notes-cell-header {
    font-size: 0.65rem;
    font-weight: 600;
    color: #92400e;
    padding-bottom: 0.15rem;
    border-bottom: 1px solid #fde68a;
    margin-bottom: 0.1rem;
    text-align: center;
}

.weekly-note-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.25rem;
    border-radius: 0.25rem;
    background: white;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background 0.15s;
}

.weekly-note-item:hover {
    background: #fef3c7;
}

.weekly-note-item.completed {
    opacity: 0.45;
}

.weekly-note-item.completed .weekly-note-title {
    text-decoration: line-through;
    color: #9ca3af;
}

.weekly-note-checkbox {
    width: 0.75rem;
    height: 0.75rem;
    accent-color: #f59e0b;
    cursor: pointer;
    flex-shrink: 0;
}

.weekly-note-title {
    font-size: 0.7rem;
    line-height: 1.2;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

