        :root {
            --primary: #0d9488;
            --primary-dark: #0f766e;
            --primary-light: #5eead4;
            --secondary: #f59e0b;
            --accent: #ec4899;
            --bg-dark: #0f172a;
            --bg-card: #1e293b;
            --bg-hover: #334155;
            --text-primary: #f1f5f9;
            --text-secondary: #94a3b8;
            --text-muted: #64748b;
            --border: #334155;
            --success: #22c55e;
            --warning: #f59e0b;
            --danger: #ef4444;
            --info: #3b82f6;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Outfit', sans-serif;
            background: var(--bg-dark);
            color: var(--text-primary);
            min-height: 100vh;
            overflow-x: hidden;
            background-image:
                radial-gradient(ellipse at 20% 0%, rgba(13, 148, 136, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 100%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
        }

        /* Sidebar */
        .sidebar {
            position: fixed;
            left: 0;
            top: 0;
            width: 280px;
            height: 100vh;
            background: var(--bg-card);
            border-right: 1px solid var(--border);
            padding: 24px;
            display: flex;
            flex-direction: column;
            z-index: 1100;
        }

        /* Mobile sidebar overlay */
        .sidebar-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1050;
            opacity: 0;
            transition: opacity 0.3s ease;
            -webkit-tap-highlight-color: transparent;
        }
        .sidebar-overlay.active {
            display: block;
            opacity: 1;
        }

        /* Mobile Bottom Sheet Menu */
        .bottom-sheet-overlay {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1400;
            opacity: 0;
            transition: opacity 0.3s ease;
            -webkit-tap-highlight-color: transparent;
        }
        .bottom-sheet-overlay.active {
            display: block;
            opacity: 1;
        }
        .bottom-sheet-wrapper {
            display: none;
            position: fixed;
            bottom: 0; left: 0; right: 0;
            z-index: 1450;
            transform: translateY(100%);
            transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
        }
        .bottom-sheet {
            background: var(--bg-card);
            border-radius: 20px 20px 0 0;
            padding: 8px 16px max(16px, env(safe-area-inset-bottom));
            max-height: 70vh;
            overflow-y: auto;
        }
        .bottom-sheet-wrapper.active {
            display: block;
            transform: translateY(0);
        }
        .bottom-sheet-handle {
            width: 40px;
            height: 4px;
            background: var(--border);
            border-radius: 2px;
            margin: 4px auto 12px;
        }
        .bottom-sheet-close {
            position: absolute;
            top: -6px;
            right: 12px;
            z-index: 10;
            width: 32px;
            height: 32px;
            border: none;
            background: var(--bg-hover);
            border-radius: 50%;
            color: var(--text-muted);
            font-size: 16px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s;
            -webkit-tap-highlight-color: transparent;
        }
        .bottom-sheet-close:active {
            transform: scale(0.9);
            background: var(--border);
        }
        .bottom-sheet-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 8px;
        }
        .bottom-sheet-actions {
            display: flex;
            gap: 12px;
            margin-top: 8px;
        }
        .bottom-sheet-actions .bottom-sheet-action-btn {
            flex: 1;
            min-width: 0;
        }
        .bottom-sheet-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            padding: 14px 6px;
            border-radius: 14px;
            background: var(--bg-hover);
            text-decoration: none;
            color: var(--text-primary);
            transition: all 0.15s ease;
            -webkit-tap-highlight-color: transparent;
            border: 1px solid transparent;
        }
        .bottom-sheet-item:active {
            transform: scale(0.95);
            border-color: var(--primary);
        }
        .bottom-sheet-item-icon {
            font-size: 24px;
            line-height: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 44px;
            height: 44px;
            border-radius: 12px;
            background: rgba(45, 212, 191, 0.1);
            color: #2dd4bf;
        }
        .bottom-sheet-item-label {
            font-size: 11px;
            font-weight: 500;
            text-align: center;
            color: var(--text-secondary);
            line-height: 1.2;
        }
        .bottom-sheet-divider {
            height: 1px;
            background: var(--border);
            margin: 14px 0;
        }
        .bottom-sheet-user {
            padding: 0 2px;
        }
        .bottom-sheet-user-info {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 12px;
        }
        .bottom-sheet-user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--primary), var(--primary-light));
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-weight: 700;
            font-size: 14px;
            flex-shrink: 0;
        }
        .bottom-sheet-user-name {
            font-weight: 600;
            font-size: 14px;
            color: var(--text-primary);
        }
        .bottom-sheet-user-role {
            font-size: 12px;
            color: var(--text-muted);
        }
        .bottom-sheet-user-actions {
            display: flex;
            gap: 8px;
        }
        .bottom-sheet-user-actions button {
            flex: 1;
            padding: 10px 8px;
            border-radius: 10px;
            border: 1px solid var(--border);
            background: var(--bg-hover);
            color: var(--text-secondary);
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s;
            -webkit-tap-highlight-color: transparent;
        }
        .bottom-sheet-user-actions button:active {
            transform: scale(0.96);
        }
        .bottom-sheet-user-actions button.logout {
            background: rgba(239, 68, 68, 0.1);
            color: #ef4444;
            border-color: rgba(239, 68, 68, 0.2);
        }

        /* Expandable box buttons (Ayarlar / Profil) */
        .bs-expandable-box {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 12px 14px;
            background: var(--bg-hover);
            border: 1px solid var(--border);
            border-radius: 14px;
            cursor: pointer;
            transition: all 0.15s ease;
            -webkit-tap-highlight-color: transparent;
        }
        .bs-expandable-box:active {
            transform: scale(0.97);
        }
        .bs-expandable-box.active {
            border-color: var(--primary);
            background: rgba(13, 148, 136, 0.08);
        }
        .bs-expandable-box-icon {
            font-size: 20px;
            line-height: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-secondary);
        }
        .bs-expandable-box.active .bs-expandable-box-icon {
            color: var(--primary-light);
        }
        .bs-expandable-box-label {
            flex: 1;
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
        }
        .bs-expandable-box-chevron {
            font-size: 18px;
            color: var(--text-muted);
            transition: transform 0.25s ease;
            flex-shrink: 0;
        }
        .bs-expandable-box-chevron.open {
            transform: rotate(90deg);
            color: var(--primary-light);
        }

        /* Expand panels */
        .bs-expand-panel {
            display: none;
            flex-direction: column;
            gap: 3px;
            margin-top: 8px;
            padding: 6px;
            background: var(--bg-hover);
            border-radius: 12px;
            border: 1px solid var(--border);
            animation: bsPanelSlide 0.25s ease;
            max-height: 70vh;
            overflow-y: auto;
            overflow-x: hidden;
        }
        .bs-expand-panel.open {
            display: flex;
        }
        @keyframes bsPanelSlide {
            from { opacity: 0; transform: translateY(-8px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .bs-expand-panel-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 11px 14px;
            border: none;
            background: transparent;
            border-radius: 10px;
            color: var(--text-primary);
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
            text-decoration: none;
            -webkit-tap-highlight-color: transparent;
            text-decoration: none;
            width: 100%;
            text-align: left;
        }
        .bs-expand-panel-item:active,
        .bs-expand-panel-item:hover {
            background: var(--bg-card);
        }
        .bs-expand-panel-item svg {
            color: var(--text-muted);
            flex-shrink: 0;
        }
        .bs-expand-panel-item.bs-logout {
            color: #ef4444;
        }
        .bs-expand-panel-item.bs-logout svg {
            color: #ef4444;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 40px;
        }

        .logo-icon {
            width: 48px;
            height: 48px;
            background: linear-gradient(135deg, var(--primary), var(--primary-light));
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
        }

        .logo-text {
            font-family: 'Playfair Display', serif;
            font-size: 24px;
            font-weight: 600;
            background: linear-gradient(135deg, var(--primary-light), var(--text-primary));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .nav-menu {
            list-style: none;
            flex: 1;
        }

        .nav-item {
            margin-bottom: 8px;
        }
        /* Collapsible nav group */
        .nav-group-toggle {
            position: relative;
            justify-content: flex-start;
        }

        .nav-chevron {
            margin-left: auto;
            font-size: 18px;
            font-weight: 600;
            transition: transform 0.3s ease;
            color: var(--text-muted);
            display: inline-block;
        }

        .nav-group.open > .nav-group-toggle .nav-chevron {
            transform: rotate(90deg);
        }

        .nav-group .nav-submenu {
            list-style: none;
            padding: 0 0 0 16px;
            margin: 0;
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.35s ease, opacity 0.3s ease;
            opacity: 0;
        }

        .nav-group.open .nav-submenu {
            max-height: 200px;
            opacity: 1;
        }

        .nav-submenu .nav-item {
            margin-bottom: 2px;
        }

        .nav-submenu .nav-item a {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 14px;
            border-radius: 10px;
            color: var(--text-secondary);
            text-decoration: none;
            font-size: 14px;
            transition: all 0.2s ease;
            border-left: 2px solid transparent;
        }

        .nav-submenu .nav-item a .nav-icon {
            font-size: 16px;
            width: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .nav-submenu .nav-item a:hover {
            background: var(--bg-hover);
            color: var(--text-primary);
            border-left-color: var(--primary);
        }

        .nav-submenu .nav-item a.active {
            background: rgba(13, 148, 136, 0.12);
            color: var(--primary);
            border-left-color: var(--primary);
            font-weight: 600;
        }

        .nav-link {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 14px 16px;
            border-radius: 12px;
            color: var(--text-secondary);
            text-decoration: none;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .nav-link:hover,
        .nav-link.active {
            background: var(--bg-hover);
            color: var(--text-primary);
        }

        .nav-link.active {
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3);
            color: #fff;
        }
        .nav-link.active .nav-icon svg {
            stroke: #fff;
        }

        .nav-icon {
            font-size: 20px;
            width: 24px;
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .nav-icon svg {
            flex-shrink: 0;
        }

        .user-info {
            padding: 14px 16px;
            background: var(--bg-hover);
            border-radius: 12px;
            display: flex;
            align-items: center;
            gap: 12px;
            transition: all 0.2s ease;
            position: relative;
        }

        .user-info:hover {
            background: rgba(255,255,255,0.08);
            transform: translateY(-1px);
        }

        .user-info::after {
            content: '⋮';
            position: absolute;
            right: 14px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 16px;
            color: var(--text-muted);
            opacity: 0;
            transition: opacity 0.2s;
        }

        .user-info:hover::after {
            opacity: 1;
        }

        .user-avatar {
            width: 40px;
            height: 40px;
            background: linear-gradient(135deg, var(--secondary), var(--accent));
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 15px;
            flex-shrink: 0;
        }

        .user-details h4 {
            font-size: 14px;
            font-weight: 600;
            margin: 0;
            line-height: 1.3;
        }

        .user-details span {
            font-size: 12px;
            color: var(--text-muted);
            text-transform: capitalize;
        }

        /* User Context Menu */
        .user-context-menu {
            position: fixed;
            left: 16px;
            bottom: 80px;
            display: none;
            z-index: 1200;
            animation: userMenuSlideUp 0.2s ease;
        }

        @keyframes userMenuSlideUp {
            from { opacity: 0; transform: translateY(8px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .user-context-menu-inner {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 14px;
            padding: 6px;
            box-shadow: 0 12px 40px rgba(0,0,0,0.25), 0 4px 12px rgba(0,0,0,0.15);
            min-width: 240px;
            backdrop-filter: blur(20px);
        }

        .user-context-header {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 12px 8px;
        }

        .user-context-avatar {
            width: 42px;
            height: 42px;
            background: linear-gradient(135deg, var(--secondary), var(--accent));
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 16px;
            color: #fff;
            flex-shrink: 0;
        }

        .user-context-info {
            flex: 1;
            min-width: 0;
        }

        .user-context-name {
            font-weight: 600;
            font-size: 14px;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .user-context-email {
            font-size: 12px;
            color: var(--text-muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-top: 2px;
        }

        .user-context-divider {
            height: 1px;
            background: var(--border);
            margin: 4px 8px;
        }

        .user-context-item {
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
            padding: 10px 12px;
            border: none;
            background: none;
            border-radius: 10px;
            cursor: pointer;
            font-size: 14px;
            color: var(--text-primary);
            font-family: inherit;
            transition: background 0.15s ease;
            text-align: left;
        }

        .user-context-item:hover {
            background: var(--bg-hover);
        }

        .user-context-item-icon {
            font-size: 16px;
            width: 22px;
            text-align: center;
            flex-shrink: 0;
        }

        .user-context-logout {
            color: var(--danger);
        }

        .user-context-logout:hover {
            background: rgba(239, 68, 68, 0.1);
        }

        /* Main Content */
        .main-content {
            margin-left: 280px;
            padding: 32px;
            min-height: 100vh;
            padding-bottom: 100px;
            overflow-x: hidden;
            max-width: 100vw;
        }

        /* Bottom Navigation - Mobile */
        .bottom-nav {
            display: none;
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: rgba(15, 23, 42, 0.88);
            border-top: 1px solid rgba(255, 255, 255, 0.06);
            padding: 4px 8px max(4px, env(safe-area-inset-bottom));
            z-index: 200;
            box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35), 0 -1px 6px rgba(0, 0, 0, 0.2);
            backdrop-filter: blur(24px) saturate(1.8);
            -webkit-backdrop-filter: blur(24px) saturate(1.8);
        }

        .bottom-nav-items {
            display: flex;
            justify-content: space-around;
            align-items: center;
            width: 100%;
            max-width: 100%;
            padding: 0;
        }

        .bottom-nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 3px;
            padding: 6px 0 4px;
            cursor: pointer;
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            color: rgba(148, 163, 184, 0.7);
            text-decoration: none;
            flex: 1;
            min-width: 0;
            position: relative;
            -webkit-tap-highlight-color: transparent;
        }

        .bottom-nav-item:active {
            transform: scale(0.90);
        }

        .bottom-nav-item.active {
            color: #2dd4bf;
        }

        .bottom-nav-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 48px;
            height: 32px;
            border-radius: 16px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
        }

        .bottom-nav-icon svg {
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .bottom-nav-item.active .bottom-nav-icon {
            background: rgba(45, 212, 191, 0.15);
            transform: translateY(-1px);
        }

        .bottom-nav-item.active .bottom-nav-icon svg {
            stroke-width: 2.2;
            filter: drop-shadow(0 0 6px rgba(45, 212, 191, 0.3));
        }

        .bottom-nav-label {
            font-size: 10px;
            font-weight: 500;
            text-align: center;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            width: 100%;
            line-height: 1;
            letter-spacing: 0.3px;
            transition: all 0.25s ease;
            opacity: 0.7;
        }

        .bottom-nav-item.active .bottom-nav-label {
            color: #2dd4bf;
            font-weight: 600;
            opacity: 1;
        }

        /* Upcoming Events Widget - Desktop: compact panel, Mobile: FAB button */
        .upcoming-widget {
            position: fixed;
            bottom: 20px;
            right: 20px;
            width: 360px; /* increased 20% */
            max-height: 360px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 14px;
            box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
            z-index: 190;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            transform-origin: right center;
        }
        .upcoming-widget.collapsed {
            max-height: 44px;
            width: 150px; /* slightly reduced so it shrinks from right to left */
            border-radius: 22px;
        }
        .upcoming-widget.hidden { display: none; }
        .upcoming-widget-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 14px;
            cursor: pointer;
            background: rgba(13, 148, 136, 0.08);
            border-bottom: 1px solid var(--border);
            flex-shrink: 0;
            -webkit-tap-highlight-color: transparent;
            user-select: none;
        }
        .upcoming-widget.collapsed .upcoming-widget-header {
            border-bottom: none;
        }
        .upcoming-widget-header:hover { background: rgba(13, 148, 136, 0.14); }
        .upcoming-widget-title {
            display: flex;
            align-items: center;
            gap: 7px;
            font-size: 14px; /* ~20% larger */
            font-weight: 600;
            color: var(--text-primary);
        }
        .upcoming-widget-title svg { color: var(--primary-light); flex-shrink: 0; }
        .upcoming-widget-count {
            background: var(--primary);
            color: #fff;
            font-size: 11px;
            font-weight: 700;
            padding: 2px 7px;
            border-radius: 9px;
            min-width: 22px;
            text-align: center;
            line-height: 18px;
        }
        .upcoming-widget-chevron {
            color: var(--text-muted);
            transition: transform 0.3s ease;
            flex-shrink: 0;
        }
        .upcoming-widget.collapsed .upcoming-widget-chevron { transform: rotate(180deg); }
        .upcoming-widget-body {
            flex: 1;
            overflow-y: auto;
            padding: 6px;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        .upcoming-widget.collapsed .upcoming-widget-body { display: none; }
        .upcoming-widget-body::-webkit-scrollbar { width: 3px; }
        .upcoming-widget-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
        .upcoming-widget-empty {
            text-align: center;
            padding: 16px 12px;
            color: var(--text-muted);
            font-size: 12px;
        }
        .upcoming-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 10px;
            border-radius: 8px;
            background: var(--bg-hover);
            cursor: pointer;
            transition: all 0.15s ease;
            border: 1px solid transparent;
        }
        .upcoming-item:hover {
            border-color: var(--primary);
            background: rgba(13, 148, 136, 0.06);
        }
        .upcoming-item-icon {
            width: 36px;
            height: 36px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .upcoming-item-icon svg { width: 15px; height: 15px; }
        .upcoming-item-icon.appointment {
            background: rgba(251, 191, 36, 0.15);
            color: #fbbf24;
        }
        .upcoming-item-icon.flight,
        .upcoming-item-icon.arrival,
        .upcoming-item-icon.departure {
            background: rgba(96, 165, 250, 0.15);
            color: #60a5fa;
        }
        .upcoming-item-info { flex: 1; min-width: 0; }
        .upcoming-item-name {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .upcoming-item-detail {
            font-size: 10px;
            color: var(--text-muted);
            margin-top: 1px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .upcoming-item-time {
            font-size: 10px;
            font-weight: 600;
            color: var(--primary-light);
            white-space: nowrap;
            flex-shrink: 0;
        }
        .upcoming-item-time.urgent { color: #f59e0b; }
        .upcoming-item-time.very-urgent { color: #ef4444; animation: urgentPulse 2s infinite; }
        @keyframes urgentPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

        /* Mobile: FAB button style in bottom-left */
        .upcoming-fab {
            display: none;
            position: fixed;
            bottom: 75px;
            left: 16px;
            width: 62px; /* increased ~20% */
            height: 62px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            color: #fff;
            border: none;
            cursor: pointer;
            z-index: 199;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 16px rgba(13, 148, 136, 0.4);
            transition: all 0.2s ease;
            -webkit-tap-highlight-color: transparent;
        }
        .upcoming-fab:active { transform: scale(0.92); }
        .upcoming-fab-badge {
            position: absolute;
            top: -2px;
            right: -2px;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #ef4444;
            color: #fff;
            font-size: 10px;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 2px solid var(--bg-dark);
        }
        /* Mobile upcoming popup */
        .upcoming-mobile-popup {
            display: none;
            position: fixed;
            bottom: 136px;
            left: 16px;
            right: 16px;
            max-height: 320px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 16px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
            z-index: 198;
            flex-direction: column;
            overflow: hidden;
            animation: upcomingPopupIn 0.2s ease;
        }
        .upcoming-mobile-popup.open { display: flex; }
        @keyframes upcomingPopupIn {
            from { opacity: 0; transform: translateY(12px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .upcoming-mobile-popup-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 16px;
            border-bottom: 1px solid var(--border);
        }
        .upcoming-mobile-popup-header span {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
        }
        .upcoming-mobile-popup-close {
            background: none;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 4px;
            font-size: 18px;
            line-height: 1;
        }
        .upcoming-mobile-popup-body {
            flex: 1;
            overflow-y: auto;
            padding: 8px;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        /* Quick Add Button */
        .quick-add-btn {
            position: fixed;
            bottom: 80px;
            right: 20px;
            width: 56px;
            height: 56px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            color: white;
            border: none;
            font-size: 28px;
            cursor: pointer;
            box-shadow: 0 8px 24px rgba(13, 148, 136, 0.4);
            z-index: 199;
            display: none;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            -webkit-tap-highlight-color: transparent;
        }

        .quick-add-btn:active {
            transform: scale(0.95);
        }

        @media (hover: hover) {
            .quick-add-btn:hover {
                transform: scale(1.1);
                box-shadow: 0 12px 32px rgba(13, 148, 136, 0.5);
            }
        }

        /* Simplified Card */
        .simple-card {
            background: var(--bg-card);
            border-radius: 16px;
            padding: 20px;
            border: 1px solid var(--border);
            margin-bottom: 16px;
        }

        .simple-card-title {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 12px;
            color: var(--primary-light);
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .simple-card-title svg {
            flex-shrink: 0;
            opacity: 0.7;
        }

        /* Step Indicator */
        .step-indicator {
            display: flex;
            justify-content: space-between;
            margin-bottom: 24px;
            position: relative;
        }

        .step-indicator::before {
            content: '';
            position: absolute;
            top: 20px;
            left: 0;
            right: 0;
            height: 2px;
            background: var(--border);
            z-index: 0;
        }

        .step {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            position: relative;
            z-index: 1;
        }

        .step-number {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--bg-hover);
            border: 2px solid var(--border);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            color: var(--text-secondary);
        }

        .step.active .step-number {
            background: var(--primary);
            border-color: var(--primary);
            color: white;
        }

        .step.completed .step-number {
            background: var(--success);
            border-color: var(--success);
            color: white;
        }

        .step-label {
            font-size: 12px;
            color: var(--text-secondary);
            text-align: center;
        }

        .step.active .step-label {
            color: var(--primary-light);
        }

        /* Step Content */
        .step-content {
            display: none;
        }

        .step-content.active {
            display: block;
        }

        .page-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 32px;
            padding-left: 0;
        }

        .page-title {
            font-size: 28px;
            font-weight: 600;
        }

        .page-title span {
            color: var(--primary-light);
        }

        .header-actions {
            display: flex;
            gap: 12px;
        }

        .btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 12px 24px;
            border-radius: 10px;
            font-family: inherit;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            border: none;
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            color: white;
            box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3);
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4);
        }

        .btn-secondary {
            background: var(--bg-card);
            color: var(--text-primary);
            border: 1px solid var(--border);
        }

        .btn-secondary:hover {
            background: var(--bg-hover);
        }

        .btn-danger {
            background: var(--danger);
            color: white;
        }

        .btn-sm {
            padding: 8px 16px;
            font-size: 13px;
        }

        /* Stats Grid */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 24px;
            margin-bottom: 32px;
        }

        .stat-card {
            background: var(--bg-card);
            border-radius: 16px;
            padding: 24px;
            border: 1px solid var(--border);
            position: relative;
            overflow: hidden;
        }

        .stat-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--primary), var(--primary-light));
        }

        .stat-card.warning::before {
            background: linear-gradient(90deg, var(--warning), #fbbf24);
        }

        .stat-card.success::before {
            background: linear-gradient(90deg, var(--success), #4ade80);
        }

        .stat-card.info::before {
            background: linear-gradient(90deg, var(--info), #60a5fa);
        }

        .stat-icon {
            width: 48px;
            height: 48px;
            background: var(--bg-hover);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            margin-bottom: 16px;
        }

        .stat-value {
            font-size: 32px;
            font-weight: 700;
            margin-bottom: 4px;
        }

        .stat-label {
            color: var(--text-secondary);
            font-size: 14px;
        }

        /* Data Table */
        .data-card {
            background: var(--bg-card);
            border-radius: 16px;
            border: 1px solid var(--border);
            overflow: hidden;
        }

        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 24px;
            border-bottom: 1px solid var(--border);
        }

        .card-title {
            font-size: 18px;
            font-weight: 600;
        }

        .card-actions {
            display: flex;
            gap: 12px;
        }

        .search-box {
            display: flex;
            align-items: center;
            gap: 8px;
            background: var(--bg-hover);
            padding: 10px 16px;
            border-radius: 10px;
            border: 1px solid var(--border);
        }

        .search-box input {
            background: transparent;
            border: none;
            color: var(--text-primary);
            font-family: inherit;
            font-size: 14px;
            outline: none;
            width: 200px;
        }

        .search-box input::placeholder {
            color: var(--text-muted);
        }

        .filter-select {
            background: var(--bg-hover);
            border: 1px solid var(--border);
            color: var(--text-primary);
            padding: 10px 16px;
            border-radius: 10px;
            font-family: inherit;
            font-size: 14px;
            cursor: pointer;
            outline: none;
        }

        table {
            width: 100%;
            border-collapse: collapse;
        }

        th,
        td {
            padding: 16px 24px;
            text-align: left;
        }

        th {
            background: var(--bg-hover);
            color: var(--text-secondary);
            font-weight: 500;
            font-size: 13px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        tr {
            border-bottom: 1px solid var(--border);
            transition: background 0.2s ease;
        }

        tbody tr:hover {
            background: rgba(13, 148, 136, 0.05);
        }

        .patient-info {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .patient-avatar {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 12px;
        }

        .patient-name {
            font-weight: 500;
        }

        .patient-country {
            font-size: 10px;
            color: var(--text-muted);
        }

        .status-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 8px;
            border-radius: 16px;
            font-size: 10px;
            font-weight: 500;
        }

        .status-pending {
            background: rgba(245, 158, 11, 0.15);
            color: var(--warning);
        }

        .status-confirmed {
            background: rgba(59, 130, 246, 0.15);
            color: var(--info);
        }

        .status-completed {
            background: rgba(34, 197, 94, 0.15);
            color: var(--success);
        }

        .status-cancelled {
            background: rgba(239, 68, 68, 0.15);
            color: var(--danger);
        }

        .status-ticket, .status-kapora {
            background: rgba(245, 158, 11, 0.15);
            color: var(--warning);
        }
        .status-visit1, .status-visit2, .status-visit3 {
            background: rgba(59, 130, 246, 0.15);
            color: var(--info);
        }

        .action-btns {
            display: flex;
            gap: 8px;
        }

        .action-btn {
            width: 26px;
            height: 26px;
            border-radius: 6px;
            border: 1px solid var(--border);
            background: transparent;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .action-btn:hover {
            background: var(--bg-hover);
            color: var(--text-primary);
        }

        .action-btn.delete:hover {
            background: rgba(239, 68, 68, 0.15);
            color: var(--danger);
            border-color: var(--danger);
        }

        /* Randevu durumu rozetleri (Randevular sayfası) */
        .appt-status-upcoming {
            background: rgba(13, 148, 136, 0.15);
            color: var(--primary);
            font-weight: 600;
        }
        .appt-status-today {
            background: rgba(16, 185, 129, 0.2);
            color: #059669;
            font-weight: 600;
        }
        .appt-status-past {
            background: rgba(107, 114, 128, 0.2);
            color: var(--text-muted);
        }

        /* Uçuş sayfası: Randevu ekle butonu – kullanıcı dostu, net */
        .btn-add-appointment {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            font-size: 12px;
            font-weight: 600;
            color: #fff;
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
            box-shadow: 0 2px 8px rgba(13, 148, 136, 0.25);
        }
        .btn-add-appointment:hover {
            background: linear-gradient(135deg, var(--primary-dark), var(--primary));
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35);
        }
        .btn-add-appointment svg {
            flex-shrink: 0;
        }

        /* Modal */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(4px);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 1300;
        }

        .modal-overlay.active {
            display: flex;
        }

        /* Compact table / list sizes - reduce vertical space ~30% for desktop lists (flights/patients) */
        .data-table table th,
        .data-table table td {
            padding: 8px 10px;
        }

        /* Compact appointment / patient cards (desktop) */
        .appointment-grid-card,
        .patient-card {
            padding: 10px;
        }

        .appointment-grid-card-inline,
        .appointment-grid-card-row,
        .totals-mobile-card-row {
            padding: 4px 0;
        }

        .modal {
            background: var(--bg-card);
            border-radius: 20px;
            width: 100%;
            max-width: 700px;
            max-height: 90vh;
            overflow-y: auto;
            border: 1px solid var(--border);
            animation: modalSlide 0.3s ease;
        }

        @keyframes modalSlide {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 24px;
            border-bottom: 1px solid var(--border);
        }

        .modal-title {
            font-size: 20px;
            font-weight: 600;
        }

        .modal-close {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            border: none;
            background: var(--bg-hover);
            color: var(--text-secondary);
            cursor: pointer;
            font-size: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }

        .modal-close:hover {
            background: var(--danger);
            color: white;
        }

        .modal-body {
            padding: 24px;
        }

        .form-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
        }

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .form-group.full-width {
            grid-column: span 2;
        }

        .form-label {
            font-size: 14px;
            font-weight: 500;
            color: var(--text-secondary);
        }

        .form-input,
        .form-select,
        .form-textarea {
            background: var(--bg-hover);
            border: 1px solid var(--border);
            border-radius: 10px;
            padding: 10px 14px;
            color: var(--text-primary);
            font-family: inherit;
            font-size: 14px;
            outline: none;
            transition: border-color 0.2s ease;
            line-height: 1.4;
        }

        .form-select {
            appearance: auto;
            -webkit-appearance: auto;
            padding-right: 28px;
            text-overflow: ellipsis;
            white-space: nowrap;
            overflow: hidden;
        }

        .form-select option {
            background: var(--bg-card);
            color: var(--text-primary);
            padding: 8px;
        }

        /* Compact filter inputs/selects */
        .filter-input,
        .filter-select {
            height: 38px;
            padding: 6px 12px;
            font-size: 13px;
            border-radius: 8px;
        }
        .filter-select {
            padding-right: 28px;
        }

        .form-input:focus,
        .form-select:focus,
        .form-textarea:focus {
            border-color: var(--primary);
        }

        /* Ülke seçim dropdown - input altında, kullanıcı dostu */
        .country-dropdown {
            position: fixed;
            z-index: 10002;
            min-width: 200px;
            max-width: 400px;
            max-height: 280px;
            overflow-y: auto;
            overflow-x: hidden;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 10px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.35);
            padding: 6px 0;
            display: none;
        }
        .country-dropdown.is-open {
            display: block;
        }
        .country-dropdown-item {
            padding: 10px 14px;
            cursor: pointer;
            font-size: 14px;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            transition: background 0.15s ease;
        }
        .country-dropdown-item:hover,
        .country-dropdown-item:focus {
            background: var(--bg-hover);
            outline: none;
        }
        .country-dropdown-item.active {
            background: rgba(13, 148, 136, 0.25);
            color: var(--primary-light);
        }
        .country-dropdown-empty {
            padding: 12px 14px;
            font-size: 13px;
            color: var(--text-muted);
        }

        .form-textarea {
            resize: vertical;
            min-height: 100px;
        }

        .form-section {
            margin-bottom: 24px;
        }

        /* Treatment inline grid - desktop */
        .treatment-inline-grid {
            display: flex;
            gap: 10px;
            align-items: stretch;
            margin-bottom: 16px;
        }
        .treatment-inline-col {
            display: flex;
            flex-direction: column;
            gap: 4px;
            flex: 1 1 0;
            min-width: 0;
        }
        /* Make treatment, currency and status equal width */
        .treatment-col-type {
            flex: 1 1 0;
        }
        .treatment-inline-row {
            display: flex;
            gap: 10px;
            flex: 1 1 0;
        }
        .treatment-inline-row .treatment-inline-col {
            flex: 1 1 0;
            min-width: 0;
        }
        .treatment-inline-col .form-label {
            font-size: 12px;
        }
        .treatment-inline-col .form-select {
            width: 100%;
            box-sizing: border-box;
        }
        /* Mobile: stack controls vertically */
        @media (max-width: 900px) {
            .treatment-inline-grid {
                flex-direction: column;
                gap: 8px;
            }
            .treatment-inline-row {
                flex-direction: column;
            }
        }

        .form-section-title {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 16px;
            padding-bottom: 8px;
            border-bottom: 1px solid var(--border);
            display: flex;
            align-items: center;
            gap: 8px;
            color: var(--primary-light);
        }

        .modal-footer {
            display: flex;
            justify-content: flex-end;
            gap: 12px;
            padding: 20px 24px;
            border-top: 1px solid var(--border);
        }

        /* Page Sections */
        .page-section {
            display: none;
        }

        .page-section.active {
            display: block;
        }

        /* Empty State */
        .empty-state {
            text-align: center;
            padding: 60px 20px;
        }

        .empty-state-icon {
            font-size: 64px;
            margin-bottom: 16px;
            opacity: 0.5;
        }

        .empty-state-text {
            color: var(--text-muted);
            font-size: 16px;
        }

        /* Salesperson Badge */
        .salesperson-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 10px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 500;
            background: var(--bg-hover);
        }

        .salesperson-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
        }

        /* Flight Info */
        .flight-info {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .flight-route {
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .flight-date {
            font-size: 13px;
            color: var(--text-muted);
        }

        /* Mobile Menu Toggle */
        .mobile-menu-btn {
            display: none;
            position: fixed;
            top: 12px;
            left: 12px;
            z-index: 1200;
            width: 44px;
            height: 44px;
            background: var(--primary);
            border: none;
            border-radius: 12px;
            color: white;
            font-size: 22px;
            cursor: pointer;
            box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3);
            -webkit-tap-highlight-color: transparent;
            transition: all 0.3s ease;
            line-height: 1;
        }

        .mobile-menu-btn:active {
            transform: scale(0.92);
        }

        .mobile-menu-btn.menu-open {
            background: var(--bg-hover);
            color: var(--text-primary);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        }

        /* Theme Toggle */
        .theme-toggle {
            position: fixed;
            top: 12px;
            right: 12px;
            z-index: 1200;
            width: 48px;
            height: 48px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 12px;
            color: var(--text-primary);
            font-size: 24px;
            cursor: pointer;
            display: none;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
            transition: all 0.3s ease;
            -webkit-tap-highlight-color: transparent;
        }

        .theme-toggle:hover {
            background: var(--bg-hover);
            border-color: var(--primary);
        }

        .theme-toggle:active {
            transform: scale(0.95);
        }

        /* Light Theme */
        body.light-theme {
            --bg-dark: #f8fafc;
            --bg-card: #ffffff;
            --bg-hover: #f1f5f9;
            --text-primary: #0f172a;
            --text-secondary: #475569;
            --text-muted: #94a3b8;
            --border: #e2e8f0;
            background-image:
                radial-gradient(ellipse at 20% 0%, rgba(13, 148, 136, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 100%, rgba(236, 72, 153, 0.05) 0%, transparent 50%);
        }

        body.light-theme .sidebar {
            background: var(--bg-card);
            border-right: 1px solid var(--border);
            box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
        }

        body.light-theme .data-card,
        body.light-theme .stat-card,
        body.light-theme .calendar-container,
        body.light-theme .simple-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        }

        body.light-theme .modal {
            background: var(--bg-card);
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        }

        body.light-theme .bottom-nav {
            background: rgba(255, 255, 255, 0.88);
            box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08), 0 -1px 4px rgba(0, 0, 0, 0.04);
            border-top-color: rgba(0, 0, 0, 0.06);
        }
        body.light-theme .bottom-nav-item {
            color: rgba(100, 116, 139, 0.7);
        }
        body.light-theme .bottom-nav-item.active {
            color: #0d9488;
        }
        body.light-theme .bottom-nav-item.active .bottom-nav-icon {
            background: rgba(13, 148, 136, 0.1);
        }
        body.light-theme .bottom-nav-item.active .bottom-nav-label {
            color: #0d9488;
        }

        body.light-theme .notification {
            background: var(--bg-card);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
        }

        body.light-theme .calendar-day {
            background: var(--bg-hover);
        }

        body.light-theme .calendar-day.today {
            background: linear-gradient(135deg, rgba(13, 148, 136, 0.15), rgba(13, 148, 136, 0.08));
        }

        body.light-theme .appointment-card,
        body.light-theme .patient-card {
            background: var(--bg-hover);
        }

        body.light-theme .appointment-card:hover,
        body.light-theme .patient-card:hover {
            background: var(--bg-card);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
        }

        /* Calendar Styles */
        /* Dashboard Calendar Side-by-Side Layout */
        .dashboard-calendar-wrapper {
            display: flex;
            gap: 20px;
            margin-bottom: 24px;
        }

        .dashboard-calendar-left {
            flex: 55;
            background: var(--bg-card);
            border-radius: 16px;
            border: 1px solid var(--border);
            padding: 20px;
            min-width: 0;
        }

        .dashboard-calendar-right {
            flex: 45;
            background: var(--bg-card);
            border-radius: 16px;
            border: 1px solid var(--border);
            padding: 20px;
            min-width: 0;
            max-height: 480px;
            overflow-y: auto;
        }

        .dashboard-calendar-left .calendar-day {
            min-height: 56px;
            padding: 6px 4px;
        }

        .dashboard-calendar-left .calendar-day-number {
            font-size: 13px;
        }

        .dashboard-calendar-left .calendar-weekdays div {
            font-size: 11px;
            padding: 8px 4px;
        }

        @media (max-width: 1024px) {
            .dashboard-calendar-wrapper {
                flex-direction: column;
            }
        }

        .calendar-container {
            background: var(--bg-card);
            border-radius: 16px;
            border: 1px solid var(--border);
            padding: 24px;
            margin-bottom: 24px;
        }

        .calendar-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
            padding-left: 0;
        }

        .calendar-nav {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .calendar-nav-btn {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            border: 1px solid var(--border);
            background: var(--bg-hover);
            color: var(--text-primary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }

        .calendar-nav-btn:hover {
            background: var(--primary);
            border-color: var(--primary);
        }

        .calendar-month-year {
            font-size: 20px;
            font-weight: 600;
        }

        .calendar-weekdays {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 8px;
            margin-bottom: 8px;
        }

        .calendar-weekday {
            text-align: center;
            font-size: 13px;
            font-weight: 700;
            color: var(--text-secondary);
            padding: 12px 8px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            background: var(--bg-hover);
            border-radius: 8px;
        }

        .calendar-days {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 8px;
        }

        .calendar-day {
            border-radius: 12px;
            border: 2px solid var(--border);
            background: var(--bg-hover);
            display: flex;
            flex-wrap: wrap;
            align-items: flex-start;
            align-content: flex-start;
            padding: 5px;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            min-height: 70px;
            gap: 3px;
        }

        .calendar-day:hover {
            background: var(--bg-card);
            border-color: var(--primary);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
        }

        .calendar-day.other-month {
            opacity: 0.25;
            background: var(--bg-dark);
        }

        .calendar-day.today {
            background: linear-gradient(135deg, rgba(13, 148, 136, 0.25), rgba(13, 148, 136, 0.15));
            border-color: var(--primary);
            border-width: 2px;
            font-weight: 700;
            box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.3);
        }

        .calendar-day.today::before {
            content: 'Bugün';
            position: absolute;
            top: 4px;
            right: 4px;
            font-size: 8px;
            font-weight: 600;
            color: var(--primary-light);
            background: var(--primary);
            padding: 2px 4px;
            border-radius: 4px;
        }

        .calendar-day.selected {
            background: linear-gradient(135deg, rgba(13, 148, 136, 0.4), rgba(13, 148, 136, 0.25));
            border-color: var(--primary);
            border-width: 3px;
            box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.3), 0 4px 16px rgba(13, 148, 136, 0.4);
            transform: scale(1.02);
        }

        .calendar-day.has-appointment {
            border-color: var(--info);
            border-width: 2px;
            background: linear-gradient(135deg, var(--bg-hover), rgba(59, 130, 246, 0.1));
        }

        .calendar-day.has-appointment.today {
            background: linear-gradient(135deg, rgba(13, 148, 136, 0.3), rgba(59, 130, 246, 0.15));
        }

        .calendar-day-number {
            font-size: 12px;
            font-weight: 700;
            color: var(--text-secondary);
            line-height: 1;
            padding: 1px 3px;
            min-width: 18px;
        }

        .calendar-day.today .calendar-day-number {
            color: var(--primary-light);
            font-size: 18px;
        }

        .calendar-day.selected .calendar-day-number {
            color: var(--primary-light);
            font-size: 18px;
        }

        .calendar-day-events {
            display: flex;
            flex-direction: column;
            gap: 3px;
            width: 100%;
            margin-top: auto;
            align-items: center;
        }

        .calendar-event-dot {
            width: 90%;
            height: 4px;
            border-radius: 2px;
            background: var(--primary);
        }

        .calendar-event-dot.warning {
            background: var(--warning);
        }

        .calendar-event-dot.success {
            background: var(--success);
        }

        .calendar-event-dot.danger {
            background: var(--danger);
        }

        .calendar-event-count {
            font-size: 11px;
            font-weight: 600;
            color: var(--primary-light);
            background: var(--primary);
            padding: 2px 6px;
            border-radius: 10px;
            margin-top: 2px;
        }

        /* Calendar Badges (patient initials on days) */
        .calendar-badges {
            display: contents;
        }

        .calendar-badge {
            font-size: 9px;
            font-weight: 700;
            padding: 2px 6px;
            border-radius: 20px;
            line-height: 1.3;
            letter-spacing: 0.4px;
            white-space: nowrap;
            display: inline-flex;
            align-items: center;
            gap: 3px;
            backdrop-filter: blur(4px);
            border: 1px solid transparent;
            transition: all 0.2s ease;
        }

        .calendar-badge:hover {
            transform: scale(1.1);
        }

        .cal-badge-dot {
            width: 5px;
            height: 5px;
            border-radius: 50%;
            flex-shrink: 0;
        }

        .cal-badge-appt {
            background: rgba(13, 148, 136, 0.2);
            border-color: rgba(13, 148, 136, 0.35);
            color: var(--primary-light);
        }

        .cal-badge-appt .cal-badge-dot {
            background: var(--primary-light);
            box-shadow: 0 0 4px var(--primary-light);
        }

        .cal-badge-arrival {
            background: rgba(251, 146, 60, 0.15);
            border-color: rgba(251, 146, 60, 0.35);
            color: #fb923c;
        }

        .cal-badge-arrival .cal-badge-dot {
            background: #fb923c;
            box-shadow: 0 0 4px #fb923c;
        }

        .cal-badge-departure {
            background: rgba(239, 68, 68, 0.15);
            border-color: rgba(239, 68, 68, 0.35);
            color: #ef4444;
        }

        .cal-badge-departure .cal-badge-dot {
            background: #ef4444;
            box-shadow: 0 0 4px #ef4444;
        }

        .calendar-day.has-events {
            border-color: rgba(13, 148, 136, 0.4);
        }

        .calendar-selected-date {
            font-size: 16px;
            font-weight: 700;
            color: var(--primary-light);
            margin-bottom: 16px;
            padding-bottom: 10px;
            border-bottom: 1px solid var(--border);
        }

        /* Appointment Cards */
        .appointment-card {
            background: var(--bg-hover);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 16px;
            display: flex;
            align-items: center;
            gap: 16px;
            transition: all 0.3s ease;
            cursor: pointer;
            margin-bottom: 5px;
        }
        .appointment-card:last-child {
            margin-bottom: 0;
        }

        .appointment-card:hover {
            background: var(--bg-card);
            border-color: var(--primary);
            transform: translateX(4px);
            box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
        }

        .appointment-card-header {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .appointment-card-time {
            font-size: 14px;
            font-weight: 700;
            color: var(--primary-light);
            background: rgba(13, 148, 136, 0.15);
            padding: 4px 10px;
            border-radius: 6px;
            white-space: nowrap;
        }

        .appointment-card-patient {
            font-size: 15px;
            font-weight: 600;
            color: var(--text-primary);
            flex: 1;
            min-width: 0;
            word-break: break-word;
        }

        .appointment-card-sp {
            display: inline;
        }

        .appointment-card-treatment {
            font-size: 13px;
            color: var(--text-muted);
            margin-top: 4px;
            padding-left: 2px;
        }

        .appointment-time {
            min-width: 80px;
            text-align: center;
            padding: 12px;
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            border-radius: 10px;
            color: white;
            font-weight: 700;
            font-size: 16px;
        }

        .appointment-info {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .appointment-patient-name {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-primary);
        }

        .appointment-details {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            align-items: center;
        }

        .appointment-treatment {
            font-size: 13px;
            color: var(--text-secondary);
        }

        .appointment-actions {
            display: flex;
            gap: 8px;
        }

        .appointment-empty {
            text-align: center;
            padding: 60px 20px;
            color: var(--text-muted);
        }

        .appointment-empty-icon {
            font-size: 64px;
            margin-bottom: 16px;
            opacity: 0.5;
        }

        /* Patients Page - Header & Search */
        .patients-page-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
            gap: 10px;
        }
        .patients-page-title {
            color: var(--text-primary);
            font-size: 22px;
            margin: 0;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .patients-page-title svg { flex-shrink: 0; }
        .patients-count {
            font-size: 13px;
            font-weight: 500;
            background: rgba(13, 148, 136, 0.15);
            color: var(--primary-light);
            padding: 2px 8px;
            border-radius: 10px;
            margin-left: 4px;
        }
        /* Patients toolbar: search + filters in one row on desktop */
        .patients-toolbar {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 16px;
        }
        .patients-search-bar {
            display: flex;
            align-items: center;
            gap: 8px;
            background: var(--bg-hover);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 8px 14px;
            transition: border-color 0.2s;
            flex: 1;
            min-width: 0;
        }
        .patients-search-bar:focus-within {
            border-color: var(--primary);
        }
        .patients-search-bar svg {
            color: var(--text-muted);
            flex-shrink: 0;
        }
        .patients-search-bar input {
            flex: 1;
            min-width: 0;
            border: none;
            background: transparent;
            color: var(--text-primary);
            font-size: 14px;
            outline: none;
        }
        .patients-search-bar input::placeholder {
            color: var(--text-muted);
        }
        .patients-filter-toggle {
            display: none; /* shown only on mobile */
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            border: 1px solid var(--border);
            border-radius: 10px;
            background: var(--bg-card);
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s;
            position: relative;
            flex-shrink: 0;
        }
        .patients-filter-toggle.active {
            background: rgba(13, 148, 136, 0.12);
            border-color: var(--primary);
            color: var(--primary-light);
        }
        .patients-filter-badge {
            position: absolute;
            top: -4px;
            right: -4px;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: var(--primary);
            color: #fff;
            font-size: 9px;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        /* Desktop inline filters (beside search) */
        .patients-filters-inline {
            display: flex;
            gap: 8px;
            flex-shrink: 0;
        }
        .patients-filters-inline select {
            min-width: 160px;
        }
        /* Mobile collapsible filters panel */
        .patients-filters-panel {
            display: none;
            flex-direction: column;
            gap: 8px;
            margin-bottom: 12px;
        }
        .patients-filters-panel select {
            width: 100%;
        }

        /* Patient Cards - Mobile */
        .patients-grid {
            display: none;
            grid-template-columns: 1fr;
            gap: 7px;
            padding: 4px 0 16px;
        }
        .patients-grid > .patient-card {
            margin-bottom: 0;
        }

        .patient-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 12px;
            transition: all 0.2s ease;
            cursor: pointer;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
        }

        .patient-card:active {
            transform: scale(0.98);
            border-color: var(--primary);
            box-shadow: 0 2px 8px rgba(13, 148, 136, 0.15);
        }

        .patient-card-header {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .patient-card-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            font-size: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 16px;
            flex-shrink: 0;
            color: #fff;
        }

        .patient-card-details {
            flex: 1;
            min-width: 0;
        }

        .patient-card-phone {
            font-size: 12px;
            color: var(--text-muted);
            margin-top: 1px;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .patient-card-name {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            display: flex;
            align-items: center;
            gap: 4px;
            text-overflow: ellipsis;
            line-height: 1.3;
        }

        .patient-card-meta {
            font-size: 12px;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            gap: 6px;
            margin-top: 3px;
        }

        .patient-card-meta-dot {
            width: 3px;
            height: 3px;
            border-radius: 50%;
            background: var(--text-muted);
            flex-shrink: 0;
        }

        .patient-card-status {
            flex-shrink: 0;
        }

        .patient-card-chips {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
            margin-top: 12px;
            padding-top: 10px;
            border-top: 1px solid var(--border);
        }

        .patient-card-chip {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 4px 10px;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 500;
            background: var(--bg-hover);
            border: 1px solid var(--border);
            color: var(--text-secondary);
            white-space: nowrap;
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .patient-card-chip svg {
            flex-shrink: 0;
            opacity: 0.5;
        }

        .patient-card-actions {
            display: none; /* hidden on mobile compact view */
        }

        /* Desktop: Show table, hide cards */
        @media (min-width: 1025px) {
            table.patients-table-desktop {
                display: table !important;
            }

            .patients-grid {
                display: none !important;
            }
        }

        /* Arrivals list */
        .arrivals-list {
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .arrivals-date-group {
            background: var(--bg-hover);
            border-radius: 12px;
            padding: 16px;
            border: 1px solid var(--border);
        }

        .arrivals-date-title {
            font-size: 16px;
            font-weight: 700;
            color: var(--primary-light);
            margin-bottom: 12px;
            padding-bottom: 8px;
            border-bottom: 1px solid var(--border);
        }

        .arrivals-date-cards {
            display: grid;
            gap: 12px;
        }

        .arrival-card {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 12px;
            padding: 16px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 12px;
        }

        .arrival-card:hover {
            border-color: var(--primary);
        }

        .arrival-card-info {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .arrival-card-details {
            font-size: 13px;
            color: var(--text-muted);
        }

        .arrival-card-actions {
            display: flex;
            gap: 8px;
        }

        /* Arrivals Items (used by JS updateArrivalsTable) */
        .arrivals-item {
            display: flex;
            align-items: stretch;
            gap: 16px;
            padding: 16px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 14px;
            margin-bottom: 12px;
            transition: all 0.3s ease;
            cursor: default;
        }

        .arrivals-item:hover {
            border-color: var(--primary);
            transform: translateX(4px);
            box-shadow: 0 4px 16px rgba(13, 148, 136, 0.15);
        }

        .arrivals-day-badge {
            min-width: 72px;
            padding: 14px 12px;
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            border-radius: 12px;
            color: #fff;
            font-weight: 700;
            font-size: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            flex-shrink: 0;
            line-height: 1.2;
        }

        .arrivals-item-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 8px;
            min-width: 0;
        }

        .arrivals-item-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            flex-wrap: wrap;
        }

        .arrivals-item-name {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-primary);
        }

        .arrivals-item-date {
            font-size: 13px;
            color: var(--text-muted);
            font-weight: 500;
        }

        .arrivals-item-details {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .arrivals-item-flight {
            font-size: 13px;
            color: var(--text-secondary);
            background: var(--bg-hover);
            padding: 4px 10px;
            border-radius: 6px;
            font-weight: 500;
        }

        .totals-grid {
            display: none;
        }

        .totals-summary-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 20px;
            border-bottom: 1px solid var(--border);
            gap: 12px;
        }

        .totals-summary-row:last-child {
            border-bottom: none;
        }

        .totals-summary-values {
            display: flex;
            gap: 16px;
            flex-wrap: wrap;
        }

        .payment-status-paid {
            color: var(--success);
        }

        .payment-status-partial {
            color: var(--warning);
        }

        .payment-status-unpaid {
            color: var(--danger);
        }

        /* Notifications */
        .notification-container {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 2000;
            display: flex;
            flex-direction: column;
            gap: 12px;
            max-width: 400px;
        }

        .notification {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 16px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
            display: flex;
            align-items: flex-start;
            gap: 12px;
            animation: slideInRight 0.3s ease;
            position: relative;
        }

        @keyframes slideInRight {
            from {
                transform: translateX(400px);
                opacity: 0;
            }

            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        .notification-icon {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            flex-shrink: 0;
        }

        .notification-icon.warning {
            background: rgba(245, 158, 11, 0.2);
        }

        .notification-icon.info {
            background: rgba(59, 130, 246, 0.2);
        }

        .notification-content {
            flex: 1;
        }

        .notification-title {
            font-weight: 600;
            margin-bottom: 4px;
        }

        .notification-message {
            font-size: 13px;
            color: var(--text-secondary);
        }

        .notification-close {
            position: absolute;
            top: 8px;
            right: 8px;
            width: 24px;
            height: 24px;
            border: none;
            background: transparent;
            color: var(--text-muted);
            cursor: pointer;
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .notification-close:hover {
            background: var(--bg-hover);
            color: var(--text-primary);
        }

        /* File Upload */
        .file-upload-area {
            border: 2px dashed var(--border);
            border-radius: 12px;
            padding: 32px;
            text-align: center;
            background: var(--bg-hover);
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
        }

        .file-upload-area:hover {
            border-color: var(--primary);
            background: rgba(13, 148, 136, 0.1);
        }

        .file-upload-area.dragover {
            border-color: var(--primary);
            background: rgba(13, 148, 136, 0.2);
        }

        .file-upload-icon {
            font-size: 48px;
            margin-bottom: 16px;
        }

        .file-upload-text {
            font-size: 16px;
            font-weight: 500;
            margin-bottom: 8px;
        }

        .file-upload-hint {
            font-size: 13px;
            color: var(--text-muted);
        }

        .file-input {
            display: none;
        }

        .ocr-preview {
            margin-top: 20px;
            padding: 16px;
            background: var(--bg-hover);
            border-radius: 12px;
            max-height: 300px;
            overflow-y: auto;
        }

        /* Belge / görsel yükleme alanı (kullanıcı dostu) */
        .form-section-docs .form-section-desc {
            font-size: 13px;
            color: var(--text-muted);
            margin: -4px 0 16px 0;
            line-height: 1.45;
        }
        .docs-upload-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
        }
        @media (max-width: 640px) {
            .docs-upload-grid {
                grid-template-columns: 1fr;
            }
        }
        .doc-upload-block {
            margin-bottom: 0;
        }
        .doc-upload-header {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            margin-bottom: 10px;
        }
        .doc-upload-icon {
            width: 44px;
            height: 44px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .doc-upload-icon svg {
            color: #fff;
        }
        .doc-upload-icon-ticket {
            background: linear-gradient(135deg, #0d9488, #0f766e);
            box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
        }
        .doc-upload-icon-xray {
            background: linear-gradient(135deg, #6366f1, #4f46e5);
            box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
        }
        .doc-upload-title {
            font-size: 15px;
            font-weight: 600;
            color: var(--text-primary);
            display: block;
        }
        .doc-upload-hint {
            font-size: 12px;
            color: var(--text-muted);
            display: block;
            margin-top: 2px;
        }
        .file-upload-single-add {
            padding: 16px 20px !important;
            border-radius: 12px !important;
            border: 2px dashed var(--border) !important;
            background: var(--bg-secondary, #f8fafc) !important;
            text-align: center !important;
            transition: border-color 0.2s, background 0.2s;
            display: flex !important;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }
        .file-upload-single-add:hover {
            border-color: var(--primary) !important;
            background: rgba(13, 148, 136, 0.06) !important;
        }
        .file-upload-single-add-icon {
            font-size: 22px;
            font-weight: 700;
            color: var(--text-muted);
            line-height: 1;
        }
        .file-upload-single-add:hover .file-upload-single-add-icon {
            color: var(--primary);
        }
        .file-upload-single-add-text {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-muted);
        }
        .file-upload-single-add:hover .file-upload-single-add-text {
            color: var(--primary);
        }
        .doc-thumbs-wrap {
            margin-top: 12px;
            padding-top: 12px;
        }
        .doc-thumbs-wrap.has-thumbs {
            border-top: 1px solid var(--border);
        }
        .doc-thumbs-wrap .upload-thumbs-row {
            gap: 10px;
        }
        .quick-doc-card .quick-doc-hint {
            font-size: 12px;
            color: var(--text-muted);
            margin: -4px 0 10px 0;
        }

        /* Compact file upload (quick add vb.) */
        .file-upload-compact {
            padding: 12px 16px !important;
            display: flex !important;
            align-items: center;
            gap: 12px;
            text-align: left !important;
            border-radius: 10px !important;
            border: 2px dashed var(--primary) !important;
            background: rgba(13, 148, 136, 0.05) !important;
        }
        .file-upload-compact:hover {
            background: rgba(13, 148, 136, 0.12) !important;
            border-color: var(--primary-light) !important;
        }
        .file-upload-compact-icon {
            width: 36px;
            height: 36px;
            background: var(--primary);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .file-upload-compact-icon svg {
            color: #fff;
        }
        .file-upload-compact-text {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .file-upload-compact-title {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
        }
        .file-upload-compact-hint {
            font-size: 11px;
            color: var(--text-muted);
        }

        /* Compact OCR preview */
        .ocr-preview-compact {
            margin-top: 8px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        /* Ticket thumbnails */
        .ticket-thumbnail {
            max-width: 80px;
            max-height: 60px;
            border-radius: 6px;
            border: 1px solid var(--border);
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
            object-fit: cover;
        }
        .ticket-thumbnail:hover {
            transform: scale(1.05);
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        }
        .ticket-thumbnail-small {
            max-width: 50px;
            max-height: 40px;
            border-radius: 4px;
            border: 1px solid var(--border);
            cursor: pointer;
            transition: transform 0.2s;
            object-fit: cover;
        }
        .ticket-thumbnail-small:hover {
            transform: scale(1.1);
        }
        .multi-upload-preview {
            display: block;
            margin-top: 10px;
        }
        .upload-thumbs-label {
            font-size: 11px;
            font-weight: 600;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.04em;
            margin-bottom: 8px;
        }
        .upload-thumbs-row {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 10px;
        }
        .multi-thumb-wrap {
            position: relative;
            display: inline-flex;
            flex-shrink: 0;
        }
        .upload-thumb-img,
        .multi-thumb-wrap img.upload-thumb-img {
            width: 56px;
            height: 56px;
            object-fit: cover;
            border-radius: 8px;
            border: 1px solid var(--border);
            cursor: pointer;
            display: block;
        }
        .upload-thumb-img:hover,
        .multi-thumb-wrap img.upload-thumb-img:hover {
            border-color: var(--primary);
            box-shadow: 0 2px 8px rgba(13, 148, 136, 0.2);
        }
        .multi-thumb-wrap img {
            border-radius: 8px;
            border: 1px solid var(--border);
            cursor: pointer;
        }
        .multi-thumb-remove {
            position: absolute;
            top: -6px;
            right: -6px;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            border: none;
            background: var(--danger, #dc3545);
            color: #fff;
            font-size: 14px;
            line-height: 1;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
        }
        .multi-thumb-remove:hover {
            opacity: 0.9;
        }
        .upload-add-more {
            width: 56px;
            height: 56px;
            border: 2px dashed var(--border);
            border-radius: 8px;
            background: var(--bg-secondary, #f8fafc);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 2px;
            cursor: pointer;
            color: var(--text-muted);
            transition: border-color 0.2s, background 0.2s;
        }
        .upload-add-more:hover {
            border-color: var(--primary);
            background: rgba(13, 148, 136, 0.06);
            color: var(--primary);
        }
        .upload-add-more-icon {
            font-size: 18px;
            font-weight: 700;
            line-height: 1;
        }
        .upload-add-more-text {
            font-size: 10px;
            text-align: center;
            max-width: 52px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        /* Ticket preview popup */
        .ticket-preview-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.85);
            z-index: 10000;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            cursor: pointer;
        }
        .ticket-preview-container {
            position: relative;
            max-width: 90vw;
            max-height: 90vh;
            background: var(--bg-card);
            border-radius: 12px;
            padding: 8px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.5);
        }
        .ticket-preview-container img {
            max-width: 100%;
            max-height: calc(90vh - 60px);
            border-radius: 8px;
            display: block;
        }
        .ticket-preview-close {
            position: absolute;
            top: -12px;
            right: -12px;
            width: 32px;
            height: 32px;
            background: var(--danger);
            color: #fff;
            border: none;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            font-weight: bold;
            box-shadow: 0 2px 8px rgba(0,0,0,0.3);
        }
        .ticket-preview-close:hover {
            background: #dc2626;
        }

        .image-gallery-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
        }
        .image-gallery-img {
            max-width: 85vw;
            max-height: 70vh;
            object-fit: contain;
        }
        .image-gallery-nav {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 16px;
            width: 100%;
        }
        .image-gallery-prev,
        .image-gallery-next {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            border: 2px solid var(--border);
            background: var(--bg-card);
            color: var(--text-primary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s, border-color 0.2s;
        }
        .image-gallery-prev:hover,
        .image-gallery-next:hover {
            background: var(--primary);
            border-color: var(--primary);
            color: #fff;
        }
        .image-gallery-counter {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-muted);
            min-width: 48px;
            text-align: center;
        }

        .ocr-preview img {
            max-width: 100%;
            border-radius: 8px;
            margin-bottom: 12px;
        }

        .ocr-loading {
            text-align: center;
            padding: 20px;
            color: var(--text-secondary);
        }

        .ocr-results {
            margin-top: 16px;
        }

        .ocr-field {
            display: flex;
            justify-content: space-between;
            padding: 8px 0;
            border-bottom: 1px solid var(--border);
        }

        .ocr-field-label {
            font-weight: 500;
            color: var(--text-secondary);
        }

        .ocr-field-value {
            color: var(--text-primary);
        }

        /* Name Suggestions */
        .name-suggestions {
            margin-top: 16px;
            padding: 16px;
            background: var(--bg-hover);
            border-radius: 12px;
            border: 1px solid var(--border);
        }

        .name-suggestions-title {
            font-size: 14px;
            font-weight: 600;
            color: var(--primary-light);
            margin-bottom: 12px;
        }

        .name-suggestion-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px;
            margin-bottom: 8px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .name-suggestion-item:hover {
            background: var(--bg-hover);
            border-color: var(--primary);
        }

        .name-suggestion-item:last-child {
            margin-bottom: 0;
        }

        .name-suggestion-text {
            font-size: 14px;
            color: var(--text-primary);
            flex: 1;
        }

        .name-suggestion-btn {
            padding: 6px 16px;
            background: var(--primary);
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .name-suggestion-btn:hover {
            background: var(--primary-dark);
            transform: scale(1.05);
        }

        /* Mobile helpers */
        .desktop-only { display: block; }
        .mobile-only { display: none; }

        /* Appointments mobile grid */
        .appointments-grid {
            display: none;
            grid-template-columns: 1fr;
            gap: 7px;
        }

        .flights-grid {
            display: none;
            grid-template-columns: 1fr;
            gap: 7px;
        }

        .appointment-grid-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .appointment-grid-card:hover {
            border-color: var(--primary);
            transform: translateY(-1px);
        }
        .appointment-grid-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 8px;
        }
        .appointment-grid-card-name {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .appointment-grid-card-name .patient-avatar {
            width: 34px;
            height: 34px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 13px;
            color: #fff;
            font-size: 16px;
            flex-shrink: 0;
        }
        .appointment-grid-card-name span {
            font-weight: 600;
            font-size: 14px;
            color: var(--text-primary);
        }
        .appointment-grid-card-body {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .appointment-grid-card-inline {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 10px;
            background: var(--bg-hover);
            border-radius: 8px;
            font-size: 12px;
        }
        .appointment-inline-item {
            display: flex;
            align-items: center;
            gap: 5px;
            color: var(--text-primary);
            font-weight: 500;
            white-space: nowrap;
            min-width: 0;
        }
        .appointment-inline-item svg {
            color: var(--text-muted);
            flex-shrink: 0;
        }
        .appointment-inline-item span {
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .appointment-inline-divider {
            width: 1px;
            height: 16px;
            background: var(--border);
            flex-shrink: 0;
        }
        .appointment-grid-card-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 13px;
        }
        .appointment-grid-card-row .label {
            color: var(--text-muted);
            font-size: 12px;
        }
        .appointment-grid-card-row .value {
            color: var(--text-primary);
            font-weight: 500;
        }
        .appointment-grid-card-actions {
            display: flex;
            gap: 6px;
            margin-top: 8px;
            padding-top: 8px;
            border-top: 1px solid var(--border);
        }
        .appointment-grid-card-actions button {
            flex: 1;
            padding: 6px;
            border-radius: 7px;
            border: 1px solid var(--border);
            background: var(--bg-hover);
            color: var(--text-secondary);
            font-size: 12px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .appointment-grid-card-actions button:hover {
            background: var(--primary);
            border-color: var(--primary);
            color: #fff;
        }
        .appointment-grid-card-actions button.delete:hover {
            background: var(--danger);
            border-color: var(--danger);
        }

        /* Totals mobile card */
        .totals-mobile-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .totals-mobile-card:hover {
            border-color: var(--primary);
        }
        .totals-mobile-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 8px;
        }
        .totals-mobile-card-name {
            font-weight: 600;
            font-size: 14px;
            color: var(--text-primary);
        }
        .totals-mobile-card-cols {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 6px;
            padding: 6px 0;
        }
        .totals-mobile-col {
            text-align: center;
            padding: 6px 4px;
            background: var(--bg-hover);
            border-radius: 8px;
        }
        .totals-mobile-col-label {
            font-size: 10px;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.3px;
            margin-bottom: 2px;
        }
        .totals-mobile-col-value {
            font-size: 13px;
            font-weight: 700;
            color: var(--text-primary);
        }
        .totals-mobile-card-row {
            display: flex;
            justify-content: space-between;
            font-size: 13px;
            padding: 4px 0;
        }
        .totals-mobile-card-row .label {
            color: var(--text-muted);
        }
        .totals-mobile-card-progress {
            height: 3px;
            background: var(--border);
            border-radius: 2px;
            margin-top: 6px;
            overflow: hidden;
        }
        .totals-mobile-card-progress-bar {
            height: 100%;
            border-radius: 2px;
            transition: width 0.3s;
        }

        /* Mobile filter container */
        .mobile-filters-scroll {
            display: none;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            padding-bottom: 8px;
            margin-bottom: 12px;
            gap: 8px;
        }
        .mobile-filters-scroll::-webkit-scrollbar { display: none; }

        /* Dashboard mobile recent patients */
        .recent-patients-mobile {
            display: none;
            grid-template-columns: 1fr;
            gap: 10px;
        }
        .recent-patient-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 14px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 12px;
            transition: all 0.2s;
        }
        .recent-patient-card:hover {
            border-color: var(--primary);
        }
        .recent-patient-card .patient-avatar {
            width: 42px;
            height: 42px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            color: #fff;
            font-size: 16px;
            flex-shrink: 0;
        }
        .recent-patient-card-info {
            flex: 1;
            min-width: 0;
        }
        .recent-patient-card-info .name {
            font-weight: 600;
            font-size: 14px;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .recent-patient-card-info .meta {
            font-size: 12px;
            color: var(--text-muted);
            margin-top: 2px;
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        /* Responsive */
        @media (max-width: 1400px) {
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 1024px) {
            .sidebar {
                transform: translateX(-100%);
                transition: transform 0.3s ease;
                box-shadow: none;
            }

            .sidebar.mobile-open {
                transform: translateX(0);
                box-shadow: 4px 0 25px rgba(0, 0, 0, 0.3);
            }

            .main-content {
                margin-left: 0;
                padding: 16px;
                padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px));
            }

            .mobile-menu-btn {
                display: none;
            }

            .theme-toggle {
                display: none;
            }

            .page-header {
                padding-left: 16px;
                padding-right: 60px;
                margin-top: 8px;
            }

            .page-title {
                font-size: 20px;
            }

            .bottom-nav {
                display: block;
            }

            .quick-add-btn {
                display: flex;
                bottom: 75px;
                width: 52px;
                height: 52px;
            }

            .upcoming-widget { display: none !important; }
            .upcoming-fab { display: flex; }

            .bottom-nav-item {
                padding: 6px 0 4px;
                gap: 3px;
            }

            .bottom-nav-icon {
                width: 48px;
                height: 32px;
            }

            .bottom-nav-label {
                font-size: 10px;
            }

            .page-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 16px;
            }

            .header-actions {
                width: 100%;
                flex-wrap: wrap;
            }

            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 12px;
            }

            .simple-card {
                padding: 14px;
            }

            .simple-card-title {
                font-size: 13px;
                margin-bottom: 6px;
            }

            .simple-card-value {
                font-size: 18px;
            }

            .card-header {
                flex-direction: column;
                gap: 16px;
                align-items: flex-start;
            }

            .card-actions {
                width: 100%;
                flex-wrap: wrap;
            }

            .search-box {
                width: 100%;
            }

            .search-box input {
                width: 100%;
            }

            table {
                font-size: 13px;
            }

            th,
            td {
                padding: 12px 8px;
            }

            table.patients-table-desktop {
                display: none;
            }

            .patients-grid {
                display: grid !important;
                gap: 7px !important;
            }

            /* Patients page mobile */
            .patients-page-title { font-size: 18px; }
            .patients-toolbar { flex-direction: column; }
            .patients-search-bar { width: 100%; }
            .patients-filters-inline { display: none; }
            .patients-filter-toggle { display: flex; }
            .patients-filters-panel.open {
                display: flex;
                animation: filterSlideDown 0.2s ease;
            }
            @keyframes filterSlideDown {
                from { opacity: 0; transform: translateY(-6px); }
                to { opacity: 1; transform: translateY(0); }
            }

            /* Show mobile grids, hide desktop tables */
            .desktop-only { display: none !important; }
            .mobile-only { display: block !important; }
            .mobile-only.patients-grid,
            .mobile-only.appointments-grid,
            .mobile-only.flights-grid {
                display: grid !important;
            }

            .appointments-grid {
                display: grid !important;
                gap: 7px !important;
            }

            .totals-grid {
                display: grid !important;
                grid-template-columns: 1fr;
                gap: 7px !important;
            }

            #totalsViewSalesperson,
            #totalsViewPatient {
                display: none !important;
            }

            .recent-patients-mobile {
                display: grid !important;
            }

            .recent-patients-desktop {
                display: none !important;
            }

            .form-grid {
                grid-template-columns: 1fr;
            }

            .form-group.full-width {
                grid-column: span 1;
            }

            .detail-grid {
                grid-template-columns: 1fr;
            }

            .calendar-header {
                padding-left: 0;
            }

            .calendar-days {
                gap: 4px;
            }

            .calendar-day {
                min-height: 70px;
                padding: 8px 4px;
            }

            .calendar-day-number {
                font-size: 14px;
            }

            .calendar-day.today::before {
                font-size: 7px;
                padding: 1px 3px;
            }

            .appointment-card {
                flex-direction: column;
                align-items: flex-start;
            }

            .appointment-time {
                width: 100%;
                min-width: auto;
            }

            .appointment-actions {
                width: 100%;
                justify-content: flex-end;
            }

            .patient-card {
                padding: 16px;
            }

            .patient-card-avatar {
                width: 44px;
                height: 44px;
                font-size: 16px;
            }

            .patient-card-name {
                font-size: 15px;
            }

            .notification-container {
                left: 16px;
                right: 16px;
                max-width: none;
            }

            /* Mobile modal - slide up from bottom */
            .modal-overlay {
                align-items: flex-end;
            }

            .modal {
                margin: 0;
                max-width: 100%;
                max-height: 92vh;
                border-radius: 20px 20px 0 0;
                animation: modalSlideUp 0.3s ease;
            }

            @keyframes modalSlideUp {
                from { opacity: 0; transform: translateY(100%); }
                to { opacity: 1; transform: translateY(0); }
            }

            .modal-header {
                padding: 16px 18px;
                position: sticky;
                top: 0;
                background: var(--bg-card);
                z-index: 10;
                border-radius: 20px 20px 0 0;
            }

            .modal-title {
                font-size: 17px;
            }

            .modal-body {
                padding: 16px;
            }

            .modal-footer {
                padding: 14px 16px;
                position: sticky;
                bottom: 0;
                background: var(--bg-card);
                z-index: 10;
            }

            .modal-footer .btn {
                flex: 1;
            }

            .modal-close {
                width: 32px;
                height: 32px;
                font-size: 18px;
            }

            /* Patient detail header compact on mobile */
            .pd-header {
                gap: 10px;
                padding: 10px 12px;
                margin-bottom: 12px;
                border-radius: 12px;
            }
            .pd-header-avatar {
                width: 36px;
                height: 36px;
                font-size: 14px;
            }
            .pd-header-name {
                font-size: 14px;
            }
            .pd-header-meta {
                font-size: 11px;
                margin-top: 1px;
            }
            .pd-header-email {
                font-size: 10px;
            }

            /* Detail grid mobile: 2 columns, compact */
            .detail-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 6px;
            }

            .detail-card {
                padding: 8px 10px;
                border-radius: 8px;
            }

            .detail-card-title {
                font-size: 10px;
                margin-bottom: 2px;
            }

            .detail-card-value {
                font-size: 13px;
            }

            /* Form section compact */
            .form-section {
                margin-bottom: 12px;
            }

            .form-section-title {
                font-size: 13px;
                margin-bottom: 8px;
                padding-bottom: 4px;
                display: flex;
                align-items: center;
                flex-wrap: wrap;
                gap: 6px;
            }

            .form-section-title .btn-sm,
            .form-section-title .btn {
                font-size: 11px;
                padding: 5px 10px;
                margin-left: 0 !important;
            }

            .form-grid {
                gap: 12px;
            }

            .form-label {
                font-size: 12px;
                margin-bottom: 4px;
            }

            .form-input,
            .form-select,
            .form-textarea {
                font-size: 14px;
            }

            /* Treatment/Currency/Status grid fix for mobile */
            .treatment-inline-grid {
                flex-direction: column !important;
                gap: 10px !important;
            }
            .treatment-col-type {
                flex: none !important;
                width: 100% !important;
            }
            .treatment-inline-row {
                display: flex !important;
                gap: 8px !important;
                width: 100% !important;
            }
            .treatment-inline-row .treatment-inline-col {
                flex: 1 !important;
                width: auto !important;
            }

            .btn-sm {
                padding: 6px 12px;
                font-size: 12px;
            }

            .step-indicator {
                margin-bottom: 16px;
            }

            .step-number {
                width: 32px;
                height: 32px;
                font-size: 13px;
            }

            .step-label {
                font-size: 10px;
            }

            /* File upload area compact */
            .file-upload-area {
                padding: 16px;
            }
            .file-upload-text {
                font-size: 13px;
            }
            .file-upload-hint {
                font-size: 11px;
            }

            /* Mobile filter improvements */
            .mobile-filters-scroll {
                display: flex;
                flex-wrap: nowrap;
            }
            .mobile-filters-scroll .filter-select,
            .mobile-filters-scroll .filter-input {
                flex-shrink: 0;
                min-width: 130px;
                font-size: 12px;
            }

            /* Dashboard calendar mobile improvements */
            .dashboard-calendar-left {
                padding: 12px;
            }
            .dashboard-calendar-right {
                padding: 12px;
                max-height: 300px;
                overflow-y: auto;
            }
            .dashboard-calendar-left .calendar-day {
                min-height: 44px;
                padding: 4px 2px;
            }

            /* Payment plan rows compact */
            .payment-plan-row {
                flex-wrap: wrap;
                gap: 6px;
            }
        }

        /* Ödeme planı satırları - yöntem alanı tam görünsün */
        #patientPaymentPlanList,
        #quickPaymentPlanList {
            overflow-x: auto;
            overflow-y: visible;
            min-width: 0;
            -webkit-overflow-scrolling: touch;
        }
        .pp-row {
            overflow: visible;
            min-width: min(100%, 520px);
        }
        .pp-row .pp-method {
            min-width: 140px !important;
            width: 140px !important;
            flex-shrink: 0 !important;
            padding-left: 10px;
            padding-right: 28px;
            box-sizing: border-box;
            overflow: visible;
            text-overflow: clip;
        }

        @media (max-width: 640px) {
            .main-content {
                padding: 10px;
                padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px));
            }

            .page-title {
                font-size: 18px;
            }

            h2[style*="font-size:22px"] {
                font-size: 18px !important;
            }

            .btn {
                padding: 10px 16px;
                font-size: 13px;
            }

            .btn-primary {
                padding: 10px 14px;
                font-size: 12px;
            }

            .modal {
                max-height: 95vh;
                border-radius: 16px 16px 0 0;
            }

            .modal-header {
                padding: 14px 16px;
            }

            .modal-title {
                font-size: 16px;
            }

            .modal-body {
                padding: 14px;
            }

            /* Detail grid compact on small screens */
            .detail-grid {
                grid-template-columns: 1fr 1fr;
                gap: 5px;
            }

            .detail-card {
                padding: 6px 8px;
                border-radius: 6px;
            }

            .detail-card-title {
                font-size: 9px;
                margin-bottom: 1px;
            }

            .detail-card-value {
                font-size: 12px;
            }

            .calendar-weekdays,
            .calendar-days {
                gap: 2px;
            }

            .calendar-day {
                min-height: 48px;
                padding: 4px 2px;
            }

            .calendar-day-number {
                font-size: 12px;
            }

            .calendar-day.today::before {
                display: none;
            }

            .appointment-card {
                padding: 12px;
            }

            .appointment-time {
                font-size: 14px;
                padding: 10px;
            }

            .appointment-patient-name {
                font-size: 14px;
            }

            /* Stats grid 2 columns on small mobile */
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 8px;
            }

            .simple-card {
                padding: 12px;
                border-radius: 12px;
            }

            .simple-card-title {
                font-size: 12px;
                margin-bottom: 4px;
            }

            .simple-card-value {
                font-size: 16px;
            }

            /* Bottom nav small screen */
            .bottom-nav {
                padding: 2px 4px max(2px, env(safe-area-inset-bottom));
            }
            .bottom-nav-icon {
                width: 44px;
                height: 30px;
                border-radius: 15px;
            }
            .bottom-nav-icon svg {
                width: 20px;
                height: 20px;
            }
            .bottom-nav-label {
                font-size: 9px;
            }

            /* Appointment grid cards */
            .appointment-grid-card {
                padding: 10px;
            }

            /* Patient cards tighter */
            .patient-card {
                padding: 10px;
                border-radius: 10px;
            }
            .patient-card-avatar {
                width: 32px;
                height: 32px;
                font-size: 13px;
            }
            .patient-card-name {
                font-size: 13px;
            }
            .patients-page-title { font-size: 16px; }
            .patients-search-bar { padding: 6px 10px; }
            .patients-search-bar input { font-size: 13px; }

            /* Totals page mobile */
            .totals-view-btn {
                font-size: 11px !important;
                padding: 0 10px !important;
                height: 30px !important;
            }

            /* Quick add button */
            .quick-add-btn {
                width: 48px;
                height: 48px;
                bottom: 68px;
            }
            .upcoming-fab {
                width: 48px;
                height: 48px;
                bottom: 68px;
            }
        }

        /* Scrollbar */
        ::-webkit-scrollbar {
            width: 8px;
        }

        ::-webkit-scrollbar-track {
            background: var(--bg-dark);
        }

        ::-webkit-scrollbar-thumb {
            background: var(--bg-hover);
            border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: var(--text-muted);
        }

        /* Patient Detail Header */
        .pd-header {
            display: flex;
            align-items: center;
            gap: 14px;
            margin-bottom: 16px;
            padding: 14px;
            background: var(--bg-hover);
            border-radius: 14px;
        }
        .pd-header-avatar {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-weight: 700;
            font-size: 18px;
            flex-shrink: 0;
        }
        .pd-header-info {
            flex: 1;
            min-width: 0;
        }
        .pd-header-name {
            font-weight: 700;
            font-size: 16px;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .pd-header-meta {
            font-size: 12px;
            color: var(--text-muted);
            margin-top: 2px;
        }
        .pd-header-email {
            font-size: 11px;
            color: var(--text-muted);
            margin-top: 1px;
        }
        .pd-header-right {
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 4px;
        }
        .pd-header-sp {
            font-size: 11px;
            color: var(--text-muted);
        }

        /* Patient Detail: Önizleme (ad, tedavi, geliş, bilet) – modern */
        .pd-preview {
            margin-bottom: 16px;
            padding: 20px;
            background: linear-gradient(145deg, var(--bg-hover) 0%, rgba(13, 148, 136, 0.04) 100%);
            border-radius: 16px;
            border: 1px solid var(--border);
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
        }
        .pd-preview-header {
            display: flex;
            align-items: center;
            gap: 16px;
            margin-bottom: 14px;
        }
        .pd-preview .pd-header-avatar {
            width: 56px;
            height: 56px;
            font-size: 22px;
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
            border: 2px solid rgba(255, 255, 255, 0.25);
        }
        .pd-preview-main {
            flex: 1;
            min-width: 0;
        }
        .pd-preview-name {
            font-weight: 700;
            font-size: 18px;
            letter-spacing: -0.02em;
            color: var(--text-primary);
            margin-bottom: 4px;
            line-height: 1.3;
        }
        .pd-preview-treatment {
            display: inline-block;
            font-size: 12px;
            font-weight: 600;
            color: var(--primary);
            background: rgba(13, 148, 136, 0.12);
            padding: 4px 10px;
            border-radius: 20px;
            margin-bottom: 6px;
            letter-spacing: 0.01em;
        }
        .pd-preview-salesperson {
            font-size: 12px;
            color: var(--text-muted);
            margin-bottom: 2px;
        }
        .pd-preview-ticket {
            margin-top: 14px;
            padding-top: 14px;
            border-top: 1px solid var(--border);
        }
        .pd-preview-flights-title {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 6px;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .pd-preview-flights-list {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        .pd-preview-flights-item {
            font-size: 11px;
            color: var(--text-secondary);
        }
        .pd-preview-flights-label {
            font-weight: 600;
            color: var(--primary);
            margin-right: 4px;
        }
        .pd-preview-flights-empty {
            font-size: 11px;
            color: var(--text-muted);
        }
        .pd-preview-flight-row {
            margin-bottom: 2px;
        }
        .pd-preview-randevu-row {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            margin-top: 8px;
            padding-top: 8px;
            border-top: 1px solid var(--border);
        }
        .pd-preview-randevu-label {
            font-size: 11px;
            font-weight: 600;
            color: var(--text-muted);
            min-width: 48px;
        }
        .pd-preview-randevu-value {
            font-size: 11px;
            color: var(--text-secondary);
        }
        .pd-preview-randevu-notes {
            display: flex;
            gap: 6px;
            margin-top: 6px;
            padding-left: 0;
            font-size: 11px;
            color: var(--text-muted);
        }
        .pd-preview-randevu-notes-label {
            font-weight: 600;
            flex-shrink: 0;
        }
        .pd-preview-randevu-notes-value {
            word-break: break-word;
        }
        .pd-randevu-add-btn {
            font-size: 11px;
            font-weight: 600;
            color: var(--primary);
            background: transparent;
            border: 1px solid var(--primary);
            border-radius: 6px;
            padding: 4px 10px;
            cursor: pointer;
            transition: background 0.2s, color 0.2s;
        }
        .pd-randevu-add-btn:hover {
            background: rgba(13, 148, 136, 0.1);
            color: var(--primary-dark);
        }
        .pd-preview-actions {
            margin-top: 16px;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .pd-btn {
            padding: 10px 14px;
            font-size: 13px;
            font-weight: 600;
            border-radius: 999px;
            border: 1px solid var(--border);
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            transition: all 0.2s ease;
        }
        .pd-btn-primary {
            background: var(--primary);
            color: #fff;
            border-color: var(--primary);
        }
        .pd-btn-primary:hover {
            background: var(--primary-dark);
            border-color: var(--primary-dark);
        }
        .pd-btn-secondary {
            background: transparent;
            color: var(--primary);
        }
        .pd-btn-secondary:hover {
            background: rgba(13, 148, 136, 0.08);
            border-color: var(--primary);
        }
        .pd-detail-toggle-icon {
            font-size: 10px;
            opacity: 0.9;
            transition: transform 0.25s ease;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        .pd-detail-toggle-icon svg {
            display: block;
        }
        .pd-detail-section {
            margin-top: 16px;
            padding: 20px 0 0;
            border-top: 1px solid var(--border);
            animation: pdDetailFade 0.3s ease;
        }
        @keyframes pdDetailFade {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        /* Detay grupları – kullanıcı dostu kartlar */
        .pd-detail-groups {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }
        .pd-group {
            background: var(--bg-hover);
            border-radius: 12px;
            border: 1px solid var(--border);
            overflow: hidden;
        }
        .pd-group-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 8px;
            padding: 12px 14px;
            background: rgba(0, 0, 0, 0.02);
            border-bottom: 1px solid var(--border);
        }
        .pd-group-title {
            margin: 0;
            font-size: 13px;
            font-weight: 600;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .pd-group-title svg {
            opacity: 0.7;
            flex-shrink: 0;
        }
        .pd-group-badges {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }
        .pd-group-content {
            padding: 14px;
        }
        .pd-contact-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 6px 0;
            font-size: 13px;
            border-bottom: 1px solid var(--border);
        }
        .pd-contact-row:last-child {
            border-bottom: none;
        }
        .pd-contact-label {
            color: var(--text-muted);
            font-size: 12px;
            margin-right: 8px;
        }
        .pd-treatment-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
            gap: 10px;
        }
        .pd-treatment-item {
            padding: 8px 10px;
            background: var(--bg-card);
            border-radius: 8px;
            border: 1px solid var(--border);
        }
        .pd-treatment-item .pd-label {
            display: block;
            font-size: 10px;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.03em;
            margin-bottom: 2px;
        }
        .pd-treatment-item .pd-value {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-primary);
        }
        .pd-notes {
            margin-top: 10px;
            padding: 8px 10px;
            background: var(--bg-card);
            border-radius: 8px;
            font-size: 12px;
            color: var(--text-secondary);
            border-left: 3px solid var(--primary);
        }
        .pd-notes-meta {
            margin-top: 6px;
            font-size: 11px;
            color: var(--text-muted);
        }
        .pd-payment-cards {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
            margin-bottom: 10px;
        }
        .pd-payment-card {
            padding: 10px;
            text-align: center;
            background: var(--bg-card);
            border-radius: 10px;
            border: 1px solid var(--border);
        }
        .pd-payment-card .pd-label {
            display: block;
            font-size: 10px;
            color: var(--text-muted);
            text-transform: uppercase;
            margin-bottom: 4px;
        }
        .pd-payment-card .pd-value {
            font-size: 14px;
            font-weight: 700;
            color: var(--text-primary);
        }
        .pd-payment-card.pd-payment-paid .pd-value { color: #10b981; }
        .pd-payment-card.pd-payment-remaining .pd-value { color: #ef4444; }
        .pd-payment-bar {
            height: 6px;
            background: var(--border);
            border-radius: 3px;
            overflow: hidden;
            margin-bottom: 12px;
        }
        .pd-payment-bar-fill {
            height: 100%;
            border-radius: 3px;
            transition: width 0.4s ease;
        }
        .pd-group .detail-revision-box {
            margin-bottom: 12px;
            padding: 10px 12px;
            background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
            border-radius: 8px;
            border: 1px solid #fcd34d;
            font-size: 12px;
            color: #92400e;
        }
        .pd-group-flights .form-section {
            margin: 0;
            padding: 0;
            border: none;
            background: transparent;
        }
        .pd-group-flights .form-section > div:first-child {
            padding: 12px 14px;
            border-bottom: 1px solid var(--border);
            background: rgba(0, 0, 0, 0.02);
        }

        /* Hasta detay modalı – modern kutu */
        .modal-patient-detail {
            border-radius: 20px;
            box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12), 0 12px 24px rgba(0, 0, 0, 0.08);
            overflow: hidden;
        }
        .modal-body-patient-detail {
            padding: 20px 24px 24px;
            max-height: 70vh;
            overflow-y: auto;
        }

        /* Detail View */
        .detail-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 24px;
        }

        .detail-card {
            background: var(--bg-hover);
            border-radius: 12px;
            padding: 20px;
        }

        .detail-card-title {
            font-size: 12px;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 8px;
        }

        .detail-card-value {
            font-size: 16px;
            font-weight: 500;
        }

        .treatment-tag {
            display: inline-block;
            padding: 4px 10px;
            background: rgba(13, 148, 136, 0.15);
            color: var(--primary-light);
            border-radius: 6px;
            font-size: 13px;
            margin: 2px;
        }

        /* Tabs */
        .tabs {
            display: flex;
            gap: 4px;
            margin-bottom: 24px;
            background: var(--bg-hover);
            padding: 4px;
            border-radius: 12px;
            width: fit-content;
        }

        .tab {
            padding: 10px 20px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s ease;
            border: none;
            background: transparent;
        }

        .tab.active {
            background: var(--primary);
            color: white;
        }

        .tab:hover:not(.active) {
            color: var(--text-primary);
        }

/* Mobile responsiveness fixes for patients page - ensure it fits on small screens */
@media (max-width: 900px) {
    /* Prevent horizontal overflow at root */
    /* 100% not 100vw - 100vw includes scrollbar on some browsers and causes overflow */
    html, body { overflow-x: hidden !important; width: 100%; max-width: 100%; }

    /* Hide desktop table and show mobile cards */
    .data-table.desktop-only { display: none !important; }
    .mobile-only { display: block !important; }
    .mobile-only.patients-grid { display: grid !important; }

    /* Main content - fit viewport, no overflow, padding-bottom so content doesn't go under bottom nav */
    .main-content {
        padding: 10px 12px calc(110px + env(safe-area-inset-bottom, 0px)) 12px !important;
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    /* Page section and grid - constrain width */
    .page-section { width: 100% !important; max-width: 100% !important; min-width: 0 !important; overflow-x: hidden !important; }

    /* Patients grid - must not exceed container */
    .patients-grid {
        gap: 7px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Patient card - allow shrink, prevent overflow */
    .patient-card {
        padding: 10px !important;
        border-radius: 12px !important;
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    /* Inline detail row - wrap on narrow screens */
    .appointment-grid-card-inline {
        flex-wrap: wrap !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }
    .appointment-inline-item {
        white-space: normal !important;
        word-break: break-word !important;
        min-width: 0 !important;
    }

    /* Action buttons - allow shrink */
    .appointment-grid-card-actions {
        min-width: 0 !important;
        flex-wrap: wrap !important;
    }
    .appointment-grid-card-actions button {
        min-width: 0 !important;
        flex: 1 1 auto !important;
    }

    /* Compact search bar */
    .patients-search-bar { padding: 6px 10px; border-radius: 8px; width: 100% !important; max-width: 100% !important; }
    .patients-search-bar input { font-size: 14px; min-width: 0 !important; }

    .patient-card-header { gap: 8px !important; min-width: 0 !important; }
    .patient-card-details { min-width: 0 !important; overflow: hidden !important; }
    .patient-avatar { width: 28px !important; height: 28px !important; font-size: 12px !important; }
    .patient-card-name { font-size: 14px !important; white-space: normal !important; word-break: break-word !important; overflow: hidden !important; }
    .patient-card-phone { font-size: 12px !important; white-space: normal !important; word-break: break-word !important; overflow: hidden !important; }
    .treatment-tag, .status-badge { white-space: normal !important; word-break: break-word !important; max-width: 100% !important; }

    /* Table fallback - make scrollable and compact */
    .data-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .data-table table { width: 100%; table-layout: fixed; }
    .data-table table th, .data-table table td { padding: 8px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }

    /* Reduce action button sizes on mobile */
    .action-btn { width: 28px !important; height: 28px !important; border-radius: 6px !important; }

    .patients-page-header, .patients-toolbar { width: 100% !important; max-width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; }

    /* Filter selects - don't force extra width */
    .patients-filters-inline .filter-select, .patients-filters-panel select { max-width: 100% !important; box-sizing: border-box !important; }

    /* Totals page - extra bottom space so cards don't go under bottom nav */
    .totals-grid { padding-bottom: 24px !important; }
    .page-section { padding-bottom: 20px !important; }
}

/* Extra tight mobile fixes for very narrow devices (eg. iPhone 15 portrait) */
@media (max-width: 420px) {
    /* 100% not 100vw - 100vw includes scrollbar on some browsers and causes overflow */
    html, body { overflow-x: hidden !important; width: 100%; max-width: 100%; }
    .main-content { margin-left: 0 !important; padding: 10px 10px calc(110px + env(safe-area-inset-bottom, 0px)) 10px !important; max-width: 100% !important; width: 100% !important; box-sizing: border-box !important; }
    /* Ensure data tables never force horizontal overflow */
    .data-table { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
    .data-table table { min-width: 0 !important; width: 100% !important; table-layout: fixed !important; }
    .data-table table th, .data-table table td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 8px 6px !important; }
    /* Break long inline tags instead of expanding container */
    .treatment-tag, .status-badge, .patient-card-name, .patient-card-phone, .bottom-nav-label { white-space: normal !important; word-break: break-word !important; }
    /* Patient cards - extra constraint for narrow screens */
    .patient-card { padding: 8px 10px !important; }
    .patients-grid { padding-left: 0 !important; padding-right: 0 !important; }
    /* Inputs and selects must shrink to available width */
    .patients-search-bar input, .form-select, .filter-select, .filter-input { max-width: 100% !important; box-sizing: border-box !important; }
    /* Make sure fixed elements respect viewport */
    .bottom-sheet-wrapper, .bottom-sheet { left: 6px !important; right: 6px !important; width: calc(100% - 12px) !important; max-width: calc(100% - 12px) !important; }
    /* Reduce some fixed paddings that can push content */
    .patients-page-header, .patients-toolbar { margin-left: 0 !important; margin-right: 0 !important; padding-left: 0 !important; padding-right: 0 !important; }
    /* SVGs in cards - do not force overflow */
    .patient-card svg, .appointment-grid-card-inline svg { flex-shrink: 0 !important; }
}

/* Additional mobile overflow fixes - merged into main 900px block above */