:root {
            --table-radius: 20px;
            --table-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
            --table-glass: #ffc8c81a;
            --table-warning: #f59e0b;
            --table-warning-text: #78350f;
            --table-unlimited: #d40644;
            --table-unlimited-text: #ecfeff;
            --table-timetable: #00a093;
            --table-manual-end: #3b82f6;
            --table-gradient: linear-gradient(135deg, #8ba7d5 0%, #f16363 100%);
            --table-primary: #8BC34A;
            --table-primary-dark: #2563eb;
            --table-success: #28a745;
            --table-success-dark: #218838;
            --table-danger: #dc3545;
            --table-danger-dark: #c82333;
            --table-info: #007bff;
            --table-info-dark: #0056b3;
            --table-border: #e2e8f0;
            --table-text: #1a202c;
            --table-text-secondary: #6c757d;
            --table-card-bg: #ffffff;
            --table-c-bg-secondary: #f8fafc;
            --modal-bg: #fff;
            --modal-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
            --primary-btn-bg: #4caf50;
            --primary-btn-hover: #45a049;
            --danger-btn-bg: #f44336;
            --danger-btn-hover: #da190b;
            --text-primary: #333;
            --text-secondary: #666;
            --table-primary-light: #a4d169;
            --table-primary-orange: #ffcf3f;
            --table-primary-orange-hover: #e0b935;

            /* Light Theme Colors */
            --background: #FDFBF6;
            --card-bg: #FFFFFF;
            --text-main: #1C1C1C;
            --text-sec: #6B6B6B;
            --border: #E5E5E5;
            --accent: #d4ac0d;
            --accent-hover: #e0b935;


        }


        /* Appended styles moved from table.css to centralize styles per user request (added on 2025-11-12) */

        /* Pending orders list */
        #pendingOrdersList {
            margin: 10px 0;
            max-height: 150px;
            overflow-y: auto;
        }

        #pendingOrdersList ul {
            list-style-type: disc;
            margin: 0;
            padding-left: 20px;
        }

        #pendingOrdersList p {
            margin: 0;
            color: #666;
        }

        /* Expired modal tweaks */
        #expiredTableModal .modal-content {
            border: 2px solid red;
            background-color: #fff3f3;
        }

        #expiredTableModal h2 {
            color: red;
        }

        #expiredTableModal .modal-actions button {
            background-color: #ff4444;
            color: white;
            border: none;
            padding: 10px 20px;
            cursor: pointer;
        }

        #expiredTableModal .modal-actions button:hover {
            background-color: #cc0000;
        }

        #userSelect {
            max-height: 200px;
            overflow-y: auto;
        }

        .blink {
            animation: blink-animation 0.5s step-end infinite alternate;
        }

        @keyframes blink-animation {
            50% {
                opacity: 0.5;
            }
        }

        /* Masanın Başlangıç Saatini Güncelle Butonu Stili */
        #updateStartTimeBtn {
            padding: 10px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            transition: background-color 0.3s, transform 0.2s, color 0.3s;
            background-color: #f1c40f;
            color: #fff;
            flex: 1;
            min-width: 120px;
            max-width: 160px;
            text-align: center;
            font-size: 0.95rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        #updateStartTimeBtn:hover,
        #updateStartTimeBtn:focus {
            background-color: #d4ac0d;
            transform: translateY(-1px);
            outline: none;
        }

        #updateStartTimeBtn:active {
            transform: translateY(0);
        }

        #updateStartTimeBtn .fa-clock {
            margin-right: 8px;
        }

        /* Teal modifier: shared geometry only (no color) so it doesn't override semantic button colors */
        .btn.btn-teal {
            /* shared appearance: shape, shadow, spacing */
            border: none;
            padding: 10px 14px;
            border-radius: 8px;
            font-weight: 600;
            min-width: 140px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            box-shadow: 0 6px 18px rgba(16, 24, 40, 0.12);
            transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
        }

        .btn.btn-teal:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 24px rgba(16, 24, 40, 0.14);
        }

        .btn.btn-teal:active {
            transform: translateY(0);
        }

        /* If btn-teal is used alone (no semantic color class), give it a sensible teal color
        without overriding buttons that already have semantic color classes. */
        .btn.btn-teal:not(.btn-blue):not(.btn-green):not(.btn-orange):not(.btn-red):not(.btn-gray):not(.btn-purple):not(.btn-yellow) {
            background: linear-gradient(180deg, #14b8a6, #0ea5a0);
            color: #fff;
        }

        /* Dark theme adjustments: make .btn-gray visible on dark backgrounds */
        [data-theme="dark"] .btn-gray {
            background: linear-gradient(180deg, #374151, #1f2937);
            color: #fff;
            box-shadow: 0 6px 18px rgba(0,0,0,0.4);
        }

        /* Dark theme: ensure lone btn-teal also adapts to dark theme */
        [data-theme="dark"] .btn.btn-teal:not(.btn-blue):not(.btn-green):not(.btn-orange):not(.btn-red):not(.btn-gray):not(.btn-purple):not(.btn-yellow) {
            background: linear-gradient(180deg, #0d9488, #0f766e);
            color: #fff;
            box-shadow: 0 6px 18px rgba(0,0,0,0.45);
        }

        /* Change Controller modal: hidden by default; shown only when data-visible="true" */
        #changeControllerModal {
            display: none;
        }

        #changeControllerModal[data-visible="true"] {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        #changeControllerModal[data-visible="true"] .modal-content {
            width: 100%;
            max-width: 520px;
            border-radius: 14px;
            background: var(--card-bg, #ffffff);
            box-shadow: 0 20px 60px rgba(2, 6, 23, 0.6);
            overflow: hidden;
            border: 1px solid rgba(0, 0, 0, 0.06);
        }

        /* Controller info bottom-left styled similar to date badge */
        .card-bottom-controller .date {
            font-weight: 600;
        }

        #changeControllerModal[data-visible="true"] .modal-header {
            padding: 18px 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        }

        #changeControllerModal[data-visible="true"] .modal-header h2 {
            margin: 0;
            font-size: 1.05rem;
            font-weight: 700;
        }

        #changeControllerModal[data-visible="true"] .modal-body {
            padding: 18px 20px;
        }

        #changeControllerModal[data-visible="true"] .modal-body form {
            display: grid;
            gap: 12px;
        }

        #changeControllerModal[data-visible="true"] select,
        #changeControllerModal[data-visible="true"] input[type="time"],
        #changeControllerModal[data-visible="true"] input[type="text"] {
            padding: 10px 12px;
            border-radius: 8px;
            border: 1px solid #444444;
            background: #2a2a2a;
            font-size: 0.98rem;
        }

        #changeControllerModal[data-visible="true"] label {
            font-size: 0.95rem;
        }

        #changeControllerModal[data-visible="true"] .radio-row {
            display: flex;
            gap: 12px;
            align-items: center;
        }

        #changeControllerModal[data-visible="true"] .modal-footer {
            padding: 14px 18px;
            display: flex;
            gap: 10px;
            justify-content: flex-end;
            border-top: 1px solid rgba(0, 0, 0, 0.06);
        }

        #changeControllerModal[data-visible="true"] .btn {
            min-width: 100px;
        }

        [data-theme="dark"] {
            --background: #1C1C1C;
            --card-bg: #2A2A2A;
            --text-main: #FFFFFF;
            --text-sec: #A0A0A0;
            --border: #444444;
            --accent: #ffcf3f;
            --accent-hover: #e0b935;
            --table-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
            --table-glass: rgba(255, 255, 255, 0.05);
            --modal-bg: #2A2A2A;
            --modal-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
            --table-card-bg: #2A2A2A;
            --table-c-bg-secondary: #333333;
            --table-border: #444444;
            --table-text: #FFFFFF;
            --table-text-secondary: #A0A0A0;
        }


        /* General Body Styles */
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            color: var(--text-main);
            background: var(--background);
            transition: background-color 0.3s ease, color 0.3s ease;
        }

        body.modal-open {
            overflow: hidden;
            height: 100vh;
            width: 100%;
            position: fixed;
            top: 0;
            left: 0;
        }

        /* Content Alanı */
        .content {
            background: var(--background);
            min-height: 100vh;
            transition: background-color 0.3s ease;
        }

        /* Yeni eklenecek kodlar */
        [data-theme="light"] .content {
            background-color: #FFF9E6;
        }

        [data-theme="dark"] .content {
            background-color: #1C1C1C;
        }

        /* Tema Toggle Container */
        .theme-toggle-container {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;

        }

        /* Tema Toggle Butonu */
        .theme-toggle {
            position: relative;
            width: 80px;
            height: 40px;
            border-radius: 40px;
            border: 2px solid var(--border-color);
            background: var(--accent-hover);
            cursor: pointer;
            box-shadow:
                0 2px 10px var(--box-shadow-light),
                inset 0 1px 2px rgba(255, 255, 255, 0.6);
            transition: background-color 0.3s ease, transform 0.2s ease;
            display: flex;
            align-items: center;
            padding: 0;
        }

        .theme-toggle:hover {
            background: var(--table-primary-orange);
            transform: scale(1.05);
            box-shadow:
                0 4px 15px var(--box-shadow-light),
                inset 0 1px 2px rgba(255, 255, 255, 0.6);
        }

        .theme-toggle:active {
            transform: scale(0.95);
        }

        /* Toggle Thumb (kayan top) */
        .toggle-thumb {
            position: absolute;
            width: 31px;
            height: 31px;
            background: #000000;
            border-radius: 50%;
            top: 4px;
            left: 3px;
            box-shadow:
                0 3px 8px var(--box-shadow-light),
                inset 0 1px 1px rgba(255, 255, 255, 0.9);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 10;
        }

        /* Aktif tema, thumb sağa kayar ve koyulaşır */
        .theme-toggle.active .toggle-thumb {
            left: 42px;
            background: #000000;
            box-shadow:
                0 3px 8px var(--box-shadow-dark),
                inset 0 1px 1px rgba(0, 0, 0, 0.3);
        }


        /* İkonlar */
        .icon {
            position: absolute;
            width: 24px;
            height: 24px;
            transition: opacity 0.3s ease, transform 0.3s ease;
            top: 50%;
            left: 50%;
            transform-origin: center;
            transform: translate(-50%, -50%);
            pointer-events: none;
            user-select: none;
            fill: var(--icon-color);
        }

        .sun-icon {
            opacity: 1;
        }

        .moon-icon {
            opacity: 0;
            transform: translate(calc(-50% + 5px), -50%);
        }

        /* Aktif tema değiştiğinde ikon geçişleri */
        .theme-toggle.active .sun-icon {
            opacity: 0;
            transform: translate(calc(-50% - 5px), -50%);
        }

        .theme-toggle.active .moon-icon {
            opacity: 1;
            transform: translate(-50%, -50%);
        }

        /* Tables Grid */
        .tables-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
            gap: 1rem;
            padding: 2rem;
            max-width: 1440px;
            margin: 0 auto;
            font-family: 'Inter', system-ui, sans-serif;
            min-height: calc(100vh - 130px);
        }

        /* Table Card */
        .table-card {
            padding: 2rem;
            border: 1px solid var(--border);
            border-radius: var(--table-radius);
            cursor: pointer;
            background-color: var(--card-bg);
            transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
            box-shadow: var(--table-shadow);
            position: relative;
            overflow: hidden;
            backdrop-filter: blur(16px);
            transform-style: preserve-3d;

            height: 250px;
            /* Sabit yükseklik */

            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            /* Üstten başlama */
            align-items: flex-start;
            /* Sola hizalama */
            text-align: left;
            /* Yazılar sola hizalı */
        }

        /* Bottom-right small date badge inside table card */
        .table-card .card-bottom-date {
            position: absolute;
            right: 12px;
            bottom: 12px;
            font-size: 0.85rem;
            padding: 6px 8px;
            border-radius: 8px;
            background: rgba(0, 0, 0, 0.06);
            color: var(--text-main);
            backdrop-filter: blur(4px);
        }

        .table-card.active .card-bottom-date {
            background: rgba(255, 255, 255, 0.12);
            color: white;
        }

        .card-bottom-date .date {
            font-weight: 600;
        }

        /* Bottom-left small controller type badge inside table card */
        .table-card .card-bottom-controller {
            position: absolute;
            left: 12px;
            bottom: 12px;
            font-size: 0.85rem;
            padding: 6px 8px;
            border-radius: 8px;
            background: rgba(0, 0, 0, 0.06);
            color: var(--text-main);
            backdrop-filter: blur(4px);
        }

        .table-card.active .card-bottom-controller {
            background: rgba(255, 255, 255, 0.12);
            color: white;
        }

        .card-bottom-controller .controller-type {
            font-weight: 600;
        }

        .table-meta-item.meta-left {
            display: inline-block;
            color: var(--text-sec);
        }

        .table-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--table-glass);
            z-index: -1;
        }

        .table-card:hover {
            transform: translateY(-6px) rotateX(2deg) rotateY(2deg);
            box-shadow: 0 25px 50px -12px rgba(59, 130, 246, 0.15);
            border-color: var(--accent);
            background-color: var(--table-c-bg-secondary);
        }

        /* Ensure inactive table card text is white in dark mode */
        [data-theme="dark"] .table-card:not(.active) {
            color: var(--text-main);
        }

        [data-theme="dark"] .table-card:not(.active) h3,
        [data-theme="dark"] .table-card:not(.active) p,
        [data-theme="dark"] .table-card:not(.active) .table-header,
        [data-theme="dark"] .table-card:not(.active) .table-meta {
            color: var(--text-main);
        }

        /* Table Card States */
        /* Table Card States */
        .table-card.active {
            background: var(--table-success);
            color: white;
            border-color: transparent;
        }

        .table-card.active .table-meta,
        .table-card.active .icon {
            color: rgba(255, 255, 255, 0.9);
        }

        .table-card.active::after {
            content: '\f058';
            font-family: 'Font Awesome 6 Free';
            font-weight: 900;
            position: absolute;
            top: 16px;
            right: 16px;
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            font-size: 16px;
            color: white;
        }

        .table-card.active.unlimited {
            background: var(--table-unlimited);
            color: var(--table-unlimited-text);
            border-color: transparent;
        }

        .table-card.active.unlimited .icon,
        .table-card.active.unlimited .table-meta {
            color: var(--table-unlimited-text);
        }

        .table-card.active.unlimited::after {
            content: '\f254';
            font-family: 'Font Awesome 6 Free';
            font-weight: 900;
            position: absolute;
            top: 16px;
            right: 16px;
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            font-size: 16px;
            color: white;
        }

        .table-card.warning {
            background: var(--table-warning);
            color: var(--table-warning-text);
            border-color: var(--table-warning);
            box-shadow: 0 0 8px rgba(211, 47, 47, 0.5);
            animation: float 3s ease-in-out infinite;
        }

        .table-card.warning .icon,
        .table-card.warning .table-meta {
            color: var(--table-warning-text);
        }

        .table-card.warning::after {
            content: '\f071';
            font-family: 'Font Awesome 6 Free';
            font-weight: 900;
            position: absolute;
            top: 16px;
            right: 16px;
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            font-size: 16px;
            color: var(--table-warning-text);
        }

        .table-card.warning::before {
            content: '';
            background: rgba(245, 158, 11, 0.1);
        }

        .table-card.manual-end {
            background: var(--table-manual-end);
            color: white;
            border-color: transparent;
        }

        .table-card.manual-end .icon,
        .table-card.manual-end .table-meta {
            color: rgba(255, 255, 255, 0.9);
        }

        .table-card.manual-end::after {
            content: '\f017';
            font-family: 'Font Awesome 6 Free';
            font-weight: 900;
            position: absolute;
            top: 16px;
            right: 16px;
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            font-size: 16px;
            color: white;
        }

        .table-card.extended {
            background: var(--table-timetable);
            color: white;
            animation: pulseBorder 1.5s ease-in-out;
            border-color: var(--table-primary-dark);
        }

        .table-card.extended .table-meta,
        .table-card.extended .icon {
            color: rgba(255, 255, 255, 0.9);
        }

        .table-card.extended::after {
            content: '\f017';
            font-family: 'Font Awesome 6 Free';
            font-weight: 900;
            position: absolute;
            top: 16px;
            right: 16px;
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            font-size: 16px;
            color: white;
        }

        /* Icon Styling */
        .icon {
            width: 24px;
            height: 24px;
            color: var(--text-sec);
            transition: color 0.3s ease;
        }

        .table-card:hover .icon {
            color: var(--accent);
        }

        /* Table Content Layout */
        .table-content {
            display: flex;
            flex-direction: column;

        }

        .table-header {
            font-weight: 700;
            font-size: 1.5rem;
            /* Daha büyük başlık */
            color: var(--text-main);
            margin: 0;
        }

        .table-meta-item {
            font-size: 0.95rem;
            /* Küçük metinler - hafifçe büyütüldü */
            color: var(--text-sec);
            margin: 0;
            line-height: 1.2;
            /* Satır aralığını sıkılaştır */
        }

        /* Ensure .time inside meta items matches the same size and visual weight */
        .table-meta-item .time {
            font-size: inherit;
            color: var(--text);
            display: inline-block;
            margin-right: .4rem;
        }

        /* Active durumdaki metinler için */
        .table-card.active .table-meta-item {
            color: white;
            /* Kırmızı arka planda beyaz metin */
        }

        /* Modal Base Styles */
        .modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.6);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            pointer-events: auto;
            cursor: pointer;
        }

        .modal[data-visible="true"] {
            display: flex;
        }

        .modal[data-visible="false"] {
            display: none;
            pointer-events: none;
        }

        .tables-grid:has(.modal[data-visible="true"]) .table-card {
            pointer-events: none;
            cursor: default;
        }

        .modal-content {
            background: var(--modal-bg);
            padding: 1.5rem;
            border-radius: 12px;
            max-width: 600px;
            width: 90%;
            max-height: 90vh;
            overflow-y: auto;
            border: 1px solid var(--border);
            box-shadow: var(--modal-shadow);
            position: relative;
            z-index: 1001;
            pointer-events: auto;
            cursor: default;
        }

        .modal-content,
        .modal-content * {
            pointer-events: auto;
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-bottom: 1rem;
            border-bottom: 1px solid var(--border);
        }

        .modal-header h2 {
            margin: 0;
            font-size: 1.5rem;
            color: var(--text-main);
        }

        .modal-body {
            padding: 1rem 0;
            font-size: 1rem;
            color: var(--text-main);
        }

        .modal-body p {
            margin: 0.5rem 0;
        }

        .modal-footer {
            display: flex;
            justify-content: flex-end;
            padding-top: 1rem;
            border-top: 1px solid var(--border);
        }

        .close-btn {
            background: none;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: var(--text-main);
            transition: color 0.2s;
        }

        .close-btn:hover,
        .close-btn:focus {
            color: var(--accent);
            outline: none;
        }

        /* Specific Modal Styles */
        .success-modal-content {
            border: 2px solid var(--table-success);
        }

        .success-modal-content .modal-header {
            background-color: var(--table-success);
            color: white;
        }

        .error-modal-content {
            border: 2px solid var(--table-danger);
        }

        .error-modal-content .modal-header {
            background-color: var(--table-danger);
            color: white;
        }

        /* Button Styles */
        .btn {
            padding: 10px 20px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 1rem;
            transition: background-color 0.3s, transform 0.2s, color 0.3s;
        }

        .btn:hover,
        .btn:focus {
            transform: translateY(-1px);
            outline: none;
        }

        .btn:active {
            transform: translateY(0);
        }

        .btn-orange,
        button.primary {
            background: linear-gradient(180deg, #f59e0b, #d97706);
            color: white;
        }

        .btn-orange:hover,
        .btn-orange:focus,
        button.primary:hover {
            background-color: var(--accent);
            transform: translateY(-1px);
        }

        .btn-green,
        button.primary {
            background: linear-gradient(180deg, #16a34a, #15803d);
            color: white;
        }

        .btn-green:hover,
        .btn-green:focus,
        button.primary:hover {
            background-color: var(--primary-btn-hover);
            transform: translateY(-1px);
        }

        .btn-gray {
            background: linear-gradient(180deg, #f3f4f6, #e5e7eb);
            color: var(--text-main);
        }

        /* Keep hover motion but avoid changing the gray button's background color
        so 'Masayı İptal Et' (cancel) doesn't change color on hover. */
        .btn-gray:hover,
        .btn-gray:focus {
            transform: translateY(-1px);
            box-shadow: 0 6px 14px rgba(0,0,0,0.06);
            outline: none;
        }

        .btn-red,
        button.danger {
            background: linear-gradient(180deg, #ef4444, #dc2626);
            color: white;
        }

        .btn-red:hover,
        .btn-red:focus,
        button.danger:hover {
            background-color: var(--danger-btn-hover);
            transform: translateY(-1px);
        }

        .btn-blue {
            background: linear-gradient(180deg, #3b82f6, #2563eb);
            color: white;
        }

        .btn-blue:hover,
        .btn-blue:focus {
            background-color: #1e40af;
            transform: translateY(-1px);
        }

        /* Purple variant for secondary actions */
        .btn-purple {
            background: linear-gradient(180deg, #7c3aed, #6d28d9);
            color: white;
        }

        .btn-orange:hover,
        .btn-orange:focus {
            background: linear-gradient(180deg, #d97706, #b45309);
            transform: translateY(-1px);
        }

        .btn-green:hover,
        .btn-green:focus {
            background: linear-gradient(180deg, #15803d, #166534);
            transform: translateY(-1px);
        }

        .btn-gray:hover,
        .btn-gray:focus {
            /* Avoid changing the background color on hover for accessibility/stability.
            Keep the subtle lift only. */
            transform: translateY(-1px);
            box-shadow: 0 6px 14px rgba(0,0,0,0.06);
            outline: none;
        }

        .btn-red:hover,
        .btn-red:focus {
            background: linear-gradient(180deg, #dc2626, #b91c1c);
            transform: translateY(-1px);
        }

        .btn-purple:hover,
        .btn-purple:focus {
            background: linear-gradient(180deg, #6d28d9, #5b21b6);
            transform: translateY(-1px);
        }

        .btn.w-full {
            width: 100%;
        }

        .btn-yellow {
            background-color: #f1c40f;
            /* parlak sarı */
            color: #fff;
            /* beyaz yazı */
            border: none;
            padding: 10px 20px;
            border-radius: 5px;
            cursor: pointer;

            transition: background-color 0.3s ease;
        }

        .btn-yellow:hover {
            background-color: #d4ac0d;
            /* biraz koyu sarı */
        }

        /* Order Addition Modal Specific Styles */
        #orderAdditionModal .modal-content {
            max-width: 670px;
            width: 100%;
            margin: 0 auto;
            padding: 1.5rem;
            border-radius: 12px;
            background: var(--modal-bg);
            box-shadow: var(--modal-shadow);
        }

        #orderAdditionModal .modal-header {
            border-bottom: 2px solid var(--accent);
            padding-bottom: 1rem;
            margin-bottom: 1.5rem;
        }

        #orderAdditionModal .modal-header h2 {
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--text-main);
        }

        #orderAdditionModal .modal-body {
            padding: 0;
        }

        #orderAdditionModal .order-addition-container {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        /* Categories Section */
        #orderAdditionModal .categories-section {
            width: 100%;
        }

        #orderAdditionModal .categories-section h3 {
            font-size: 1.2rem;
            font-weight: 600;
            text-align: center;
            color: var(--text-main);
            margin-bottom: 0.8rem;
            border-bottom: 1px solid var(--border);
            padding-bottom: 0.5rem;
        }

        #orderAdditionModal #categoryList {
            display: flex;
            flex-wrap: nowrap;
            gap: 0.5rem;
            margin-bottom: 1rem;
            overflow-x: auto;
            white-space: nowrap;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
            -ms-overflow-style: none;
            padding-bottom: 0.5rem;
        }

        #orderAdditionModal #categoryList::-webkit-scrollbar {
            display: none;
        }

        #orderAdditionModal #categoryList li {
            background: var(--table-c-bg-secondary);
            padding: 8px 16px;
            border-radius: 20px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 0.9rem;
            color: var(--text-main);
            border: 1px solid var(--border);
            flex: 0 0 auto;
        }

        #orderAdditionModal #categoryList li:hover,
        #orderAdditionModal #categoryList li:focus {
            background: var(--accent);
            color: white;
            border-color: var(--accent);
            transform: translateY(-2px);
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
        }

        #orderAdditionModal #categoryList li:active {
            transform: translateY(0);
        }

        /* Product List */
        #orderAdditionModal #productList {
            max-height: 192px;
            overflow-y: auto;
            border: 1px solid var(--border);
            border-radius: 6px;
            padding: 0.5rem;
            background: var(--card-bg);
            -webkit-overflow-scrolling: touch;
        }

        #orderAdditionModal .product-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px;
            border-bottom: 1px solid var(--border);
            transition: all 0.3s ease;
        }

        #orderAdditionModal .product-item:last-child {
            border-bottom: none;
        }

        #orderAdditionModal .product-item span {
            font-size: 0.95rem;
            color: var(--text-main);
            font-weight: 500;
        }

        #orderAdditionModal .product-item button {
            background: var(--table-info);
            color: white;
            border: none;
            padding: 6px 12px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.85rem;
            transition: all 0.3s ease;
        }

        #orderAdditionModal .product-item button:hover,
        #orderAdditionModal .product-item button:focus {
            background: var(--table-info-dark);
            transform: translateY(-1px);
        }

        #orderAdditionModal .product-item button:active {
            transform: translateY(0);
        }

        #orderAdditionModal .product-item button:disabled {
            background: var(--border);
            color: var(--text-sec);
            cursor: not-allowed;
            transform: none;
        }

        #orderAdditionModal .product-item:hover {
            background: var(--table-c-bg-secondary);
        }

        /* Selected Orders Section */
        #orderAdditionModal .selected-orders-section {
            width: 100%;
        }

        #orderAdditionModal .selected-orders-section h3 {
            font-size: 1.2rem;
            font-weight: 600;
            text-align: center;
            color: var(--text-main);
            margin-bottom: 0.8rem;
            border-bottom: 1px solid var(--border);
            padding-bottom: 0.5rem;
        }

        #orderAdditionModal #selectedOrdersTable {
            border: 1px solid var(--border);
            border-radius: 6px;
            background: var(--card-bg);
            width: 100%;
        }

        #orderAdditionModal #selectedOrdersTable th,
        #orderAdditionModal #selectedOrdersTable td {
            padding: 8px;
            text-align: left;
            border-bottom: 1px solid var(--border);
        }

        #orderAdditionModal #selectedOrdersTable th {
            background: var(--table-c-bg-secondary);
            font-weight: 600;
            color: var(--text-main);
        }

        #orderAdditionModal #selectedOrdersTable td {
            color: var(--text-main);
        }

        #orderAdditionModal #selectedOrdersTable th:nth-child(1),
        #orderAdditionModal #selectedOrdersTable td:nth-child(1) {
            width: 45%;
        }

        #orderAdditionModal #selectedOrdersTable th:nth-child(2),
        #orderAdditionModal #selectedOrdersTable td:nth-child(2) {
            width: 24%;
            text-align: center;
        }

        #orderAdditionModal #selectedOrdersTable th:nth-child(3),
        #orderAdditionModal #selectedOrdersTable td:nth-child(3) {
            width: 31%;
            text-align: center;
        }

        #orderAdditionModal #selectedOrdersTable tbody {
            max-height: 144px;
            overflow-y: auto;
            display: block;
            -webkit-overflow-scrolling: touch;
        }

        #orderAdditionModal #selectedOrdersTable tr {
            display: table;
            width: 100%;
            table-layout: fixed;
        }

        #orderAdditionModal #selectedOrdersTable tbody tr:hover {
            background: var(--table-c-bg-secondary);
        }

        /* Modernized Action Controls for Selected Orders Table */
        #orderAdditionModal #selectedOrdersTable .action-controls {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 6px;
            padding: 4px 0;
        }

        #orderAdditionModal #selectedOrdersTable .action-controls button {
            width: 32px;
            height: 32px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            position: relative;
            overflow: hidden;
        }

        #orderAdditionModal #selectedOrdersTable .action-controls .decrease-btn,
        #orderAdditionModal #selectedOrdersTable .action-controls .increase-btn {
            background: var(--table-info);
            color: white;
        }

        #orderAdditionModal #selectedOrdersTable .action-controls .delete-btn {
            background: linear-gradient(145deg, var(--danger-btn-bg) 0%, var(--danger-btn-hover) 100%);
            color: white;
            box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
        }

        #orderAdditionModal #selectedOrdersTable .action-controls button:hover {
            transform: translateY(-2px) scale(1.05);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
        }

        #orderAdditionModal #selectedOrdersTable .action-controls button:active {
            transform: translateY(0) scale(0.98);
        }

        /* Modal Footer Buttons */
        #orderAdditionModal .modal-footer {
            margin-top: 1.5rem;
            padding-top: 1rem;
            border-top: 1px solid var(--border);
            display: flex;
            justify-content: flex-end;
            gap: 0.8rem;
        }

        #orderAdditionModal .modal-footer .btn {
            padding: 8px 16px;
            font-size: 0.95rem;
            border-radius: 6px;
            min-width: 100px;
        }

        /* Order Grid */
        .order-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
            margin-top: 12px;
            max-height: calc(3 * (60px + 12px));
            overflow-x: auto;
            overflow-y: hidden;
            white-space: nowrap;
            -webkit-overflow-scrolling: touch;
        }

        .order-item {
            padding: 10px;
            border: 2px solid var(--border);
            border-radius: 6px;
            background-color: var(--card-bg);
            cursor: pointer;
            color: var(--text-main);
            text-align: center;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
            transform: translateZ(0);
            min-height: 60px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .order-item:hover,
        .order-item:focus {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            background-color: var(--table-c-bg-secondary);
            outline: none;
        }

        .order-item:active {
            transform: scale(0.96);
        }

        .order-item.highlight-green,
        .order-item.highlight-blue {
            animation: highlightFlash 0.8s ease-out forwards;
            border-color: var(--table-success);
        }

        @keyframes highlightFlash {
            0% {
                background-color: var(--accent);
                color: white;
                border-color: var(--table-success);
                box-shadow: 0 0 10px rgba(59, 130, 246, 0.5), 0 0 0 2px var(--table-success);
            }

            50% {
                background-color: var(--accent);
                color: white;
                border-color: var(--table-success);
                box-shadow: 0 0 15px rgba(59, 130, 246, 0.7), 0 0 0 3px var(--table-success);
            }

            100% {
                background-color: var(--card-bg);
                color: var(--text-main);
                border-color: var(--border);
                box-shadow: none;
            }
        }

        .order-item::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            transform: translate(-50%, -50%);
            opacity: 0;
        }

        .order-item.highlight-blue::after,
        .order-item.highlight-green::after {
            animation: ripple 0.6s ease-out;
        }

        @keyframes ripple {
            0% {
                width: 0;
                height: 0;
                opacity: 1;
            }

            100% {
                width: 200px;
                height: 200px;
                opacity: 0;
            }
        }

        /* Form Elements */
        select,
        input[type="number"],
        input[type="time"],
        input {
            width: 100%;
            padding: 10px;
            margin: 8px 0;
            border: 1px solid var(--border);
            border-radius: 6px;
            background-color: var(--card-bg);
            color: var(--text-main);
            font-size: 1rem;
            box-sizing: border-box;
        }

        select:focus,
        input[type="number"]:focus,
        input[type="time"]:focus,
        input:focus {
            border-color: var(--accent);
            outline: none;
            box-shadow: 0 0 4px var(--accent);
        }

        label {
            display: block;
            margin-bottom: 6px;
            font-weight: 500;
            color: var(--text-main);
        }

        /* Orders Table */
        #ordersList,
        .orders-header table,
        .orders-body table {
            width: 100%;
            table-layout: fixed;
            border-collapse: collapse;
            margin-top: 12px;
            background-color: var(--card-bg);
            border: 1px solid var(--border);
            border-radius: 6px;
        }

        #ordersList,
        .orders-body {
            max-height: 120px;
            overflow-y: auto;
        }

        .orders-header {
            border-bottom: none;
            border-radius: 6px 6px 0 0;
        }

        #ordersList tr,
        .orders-body tr {
            transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            transform-origin: left;
        }

        #ordersList tr.new-item,
        .orders-body tr.new-item {
            animation: slideIn 0.4s ease-out forwards;
            background: rgba(76, 175, 80, 0.05);
        }

        #ordersList tr.removing,
        .orders-body tr.removing {
            animation: slideOut 0.3s ease-in forwards;
        }

        #ordersList th,
        #ordersList td,
        .orders-header th,
        .orders-body td {
            padding: 10px;
            text-align: left;
            border-bottom: 1px solid var(--border);
            color: var(--text-main);
        }

        #ordersList th,
        .orders-header th {
            background-color: var(--table-c-bg-secondary);
            font-weight: 600;
        }

        #ordersList th:nth-child(1),
        #ordersList td:nth-child(1),
        .orders-header th:nth-child(1),
        .orders-body td:nth-child(1) {
            width: 40%;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        #ordersList th:nth-child(2),
        #ordersList td:nth-child(2),
        .orders-header th:nth-child(2),
        .orders-body td:nth-child(2) {
            width: 15%;
            text-align: center;
        }

        #ordersList th:nth-child(3),
        #ordersList td:nth-child(3),
        .orders-header th:nth-child(3),
        .orders-body td:nth-child(3) {
            width: 20%;
            text-align: right;
        }

        #ordersList th:nth-child(4),
        #ordersList td:nth-child(4),
        .orders-header th:nth-child(4),
        .orders-body td:nth-child(4) {
            width: 25%;
            text-align: right;
        }

        #noOrdersMessage {
            text-align: center;
            padding: 20px;
            color: var(--text-sec);
        }

        /* Orders Section */
        #ordersSection {
            margin-top: 20px;
        }

        #ordersSection h3 {
            margin: 0 0 10px;
            font-size: 1.2em;
            color: var(--text-main);
        }

        /* Action Controls */
        .action-controls {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 6px;
        }

        .action-controls button {
            width: 34px;
            height: 34px;
            border: none;
            border-radius: 8px;
            background-color: var(--table-c-bg-secondary);
            color: var(--text-main);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
            transition: all 0.3s ease;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .action-controls button:hover,
        .action-controls button:focus {
            background-color: var(--accent);
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
            border-color: var(--accent);
            outline: none;
        }

        .action-controls button:active {
            transform: translateY(0);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .action-controls .delete-btn {
            background-color: var(--danger-btn-bg);
            border-color: var(--danger-btn-bg);
            color: white;
        }

        .action-controls .delete-btn:hover,
        .action-controls .delete-btn:focus {
            background-color: var(--danger-btn-hover);
            border-color: var(--danger-btn-hover);
            transform: rotate(15deg) scale(1.1);
        }

        .action-controls .delete-btn::after {
            content: "✕";
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .action-controls .delete-btn:hover::after {
            opacity: 1;
        }

        /* Quantity Indicator */
        .quantity {
            display: inline-block;
            min-width: 28px;
            padding: 4px;
            position: relative;
            transition: all 0.3s ease;
        }

        .quantity::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 100%;
            height: 2px;
            background: var(--accent);
            transform: scaleX(0);
            transition: transform 0.3s ease;
        }

        .quantity.changed::after {
            transform: scaleX(1);
        }

        /* Table Row Hover */
        #ordersList tr:hover,
        .orders-body tr:hover {
            background: rgba(0, 0, 0, 0.02);
        }

        /* Animations */
        @keyframes float {

            0%,
            100% {
                transform: translateY(0);
            }

            50% {
                transform: translateY(-8px);
            }
        }

        @keyframes pulseBorder {
            0% {
                box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
            }

            70% {
                box-shadow: 0 0 0 15px rgba(59, 130, 246, 0);
            }

            100% {
                box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
            }
        }

        @keyframes cardEntrance {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateX(-20px);
            }

            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        @keyframes slideOut {
            to {
                opacity: 0;
                transform: translateX(100%);
                height: 0;
                padding: 0;
            }
        }

        @keyframes pulse {
            0% {
                transform: scale(1);
            }

            50% {
                transform: scale(1.1);
            }

            100% {
                transform: scale(1);
            }
        }

        /* Utility Classes */
        .hidden {
            display: none !important;
        }

        .mt-2 {
            margin-top: 8px;
        }

        .w-full {
            width: 100%;
        }

        .text-right {
            text-align: right;
        }

        .mt-20 {
            margin-top: 20px;
        }

        /* Specific Modal Footer Styles */
        #infoModal .modal-footer {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        #infoModal .footer-top {
            display: flex;
            justify-content: center;
            gap: 0.5rem;
            flex-wrap: wrap;
        }

        #infoModal .footer-top .btn {
            flex: 1;
            min-width: 120px;
            max-width: 160px;
            text-align: center;
            padding: 10px;
            font-size: 0.95rem;
        }

        #infoModal .footer-bottom {
            display: flex;
            justify-content: center;
            gap: 0.5rem;
            border-top: 1px solid var(--border);
            padding-top: 1rem;
        }

        #infoModal .footer-bottom .btn {
            flex: 1;
            min-width: 120px;
            max-width: 160px;
            text-align: center;
            padding: 10px;
            font-size: 0.95rem;
        }

        #extendModal .modal-footer {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            gap: 1rem;
            padding: 1rem;
            border-top: 1px solid var(--border);
        }

        #timePickerModal .modal-footer {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            gap: 1rem;
            padding: 1rem;
            border-top: 1px solid var(--border);
        }

        /* Payment Modal Specific */
        #paymentModal .modal-body p {
            margin: 10px 0;
            color: var(--text-main);
        }

        #paymentModal .modal-body select,
        #paymentModal .modal-body input[type="number"] {
            width: 100%;
            padding: 8px;
            margin-top: 5px;
            border: 1px solid var(--border);
            border-radius: 4px;
            background-color: var(--card-bg);
            color: var(--text-main);
        }

        #paymentModal .modal-body #cashSection {
            margin-top: 10px;
        }

        #paymentModal .modal-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        /* Status Badge */
        .status-badge {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 12px;
            border-radius: 20px;
            background: rgba(59, 130, 246, 0.1);
            font-size: 0.85rem;
            color: var(--text-main);
        }

        .status-badge.warning {
            background: rgba(245, 158, 11, 0.1);
        }

        /* Progress Bar */
        .progress-bar {
            height: 8px;
            background: rgba(226, 232, 240, 0.4);
            border-radius: 4px;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            background: var(--accent);
            width: 65%;
            transition: width 0.4s ease;
        }

        /* Action Menu */
        .action-menu {
            position: absolute;
            top: 16px;
            right: 16px;
            padding: 6px;
            border-radius: 8px;
            transition: all 0.3s ease;
        }

        .action-menu:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        /* Responsive Adjustments */
        @media (max-width: 768px) {
            .theme-toggle-container {
                padding: 0.8rem;
                justify-content: center;
            }

            .theme-toggle {
                width: 80px;
                height: 40px;
                border-radius: 18px;
            }

            .theme-toggle::before {
                width: 28px;
                height: 28px;
                left: 3px;
            }

            .theme-toggle.active::before {
                transform: translateX(36px) translateY(-50%);
            }

            .theme-toggle .icon {
                font-size: 16px;
            }

            .theme-toggle .sun-icon {
                left: 8px;
            }

            .theme-toggle .moon-icon {
                right: 8px;
            }

            .theme-toggle-label {
                font-size: 0.85rem;
            }

            .tables-grid {
                grid-template-columns: 1fr;
                gap: 1.5rem;
                padding: 0.8rem;
                margin: 1.5rem auto;
                max-width: 100%;
            }

            .table-card {
                padding: 1rem;
                border-radius: calc(var(--table-radius) * 0.6);
                box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
                transform: translateY(0);
            }

            .table-card:hover {
                transform: translateY(-2px);
                box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
            }

            .table-card::before {
                background: rgba(255, 255, 255, 0.05);
            }

            .modal-content {
                max-width: 95%;
                padding: 1rem;
                border-radius: 10px;
                box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
            }

            .btn {
                font-size: 0.85rem;
                padding: 0.6rem 1rem;
                width: 100%;
                border-radius: 8px;
            }

            #infoModal .footer-top,
            #infoModal .footer-bottom {
                flex-direction: column;
                gap: 0.5rem;
            }

            #infoModal .footer-top .btn,
            #infoModal .footer-bottom .btn {
                width: 100%;
                max-width: none;
                padding: 12px;
                font-size: 0.9rem;
            }

            .order-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 8px;
                margin-top: 8px;
                max-height: calc(3 * (50px + 8px));
                overflow-x: auto;
                overflow-y: hidden;
                white-space: nowrap;
                -webkit-overflow-scrolling: touch;
            }

            .order-item {
                min-height: 50px;
                display: inline-flex;
                align-items: center;
                justify-content: center;
            }

            #ordersList,
            .orders-body {
                font-size: 0.85rem;
                max-height: 200px;
                border-radius: 6px;
            }

            #ordersList th,
            #ordersList td,
            .orders-header th,
            .orders-body td {
                padding: 8px;
            }

            .action-controls button {
                width: 30px;
                height: 30px;
                font-size: 0.9rem;
                border-radius: 6px;
            }

            #orderAdditionModal .modal-content {
                max-width: 95%;
                padding: 1rem;
                display: flex;
                flex-direction: column;
                justify-content: space-between;
                border-radius: 10px;
                background: var(--modal-bg);
                box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
            }

            #orderAdditionModal .modal-header {
                padding-bottom: 0.5rem;
                margin-bottom: 1rem;
                border-bottom: 2px solid var(--accent);
            }

            #orderAdditionModal .modal-header h2 {
                font-size: 1.2rem;
                font-weight: 600;
                color: var(--text-main);
            }

            #orderAdditionModal .modal-body {
                padding: 0;
            }

            #orderAdditionModal .order-addition-container {
                flex-direction: column;
                gap: 1rem;
            }

            #orderAdditionModal .categories-section {
                width: 100%;
            }

            #orderAdditionModal .categories-section h3 {
                font-size: 1rem;
                font-weight: 600;
                text-align: left;
                color: var(--text-main);
                margin-bottom: 0.8rem;
                border-bottom: 1px solid var(--border);
                padding-bottom: 0.5rem;
            }

            #orderAdditionModal #categoryList {
                display: flex;
                flex-wrap: wrap;
                gap: 0.5rem;
                margin-bottom: 1rem;
                overflow-x: hidden;
                padding-bottom: 0;
            }

            #orderAdditionModal #categoryList li {
                background: var(--table-c-bg-secondary);
                padding: 6px 12px;
                border-radius: 20px;
                cursor: pointer;
                transition: all 0.3s ease;
                font-size: 0.85rem;
                color: var(--text-main);
                border: 1px solid var(--border);
                flex: 1 0 30%;
                margin-bottom: 0.5rem;
            }

            #orderAdditionModal #categoryList li:hover,
            #orderAdditionModal #categoryList li:focus {
                background: var(--accent);
                color: white;
                border-color: var(--accent);
                transform: translateY(-2px);
                box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
            }

            #orderAdditionModal #categoryList li:active {
                transform: translateY(0);
            }

            #orderAdditionModal #productList {
                max-height: 150px;
                overflow-y: auto;
                border: 1px solid var(--border);
                border-radius: 6px;
                padding: 0.5rem;
                background: var(--card-bg);
                -webkit-overflow-scrolling: touch;
            }

            #orderAdditionModal .product-item {
                display: flex;
                flex-direction: column;
                align-items: flex-start;
                padding: 8px;
                border-bottom: 1px solid var(--border);
                transition: all 0.3s ease;
            }

            #orderAdditionModal .product-item:last-child {
                border-bottom: none;
            }

            #orderAdditionModal .product-item span {
                font-size: 0.9rem;
                color: var(--text-main);
                font-weight: 500;
                margin-bottom: 0.5rem;
            }

            #orderAdditionModal .product-item button {
                background: var(--table-info);
                color: white;
                border: none;
                padding: 5px 10px;
                border-radius: 6px;
                cursor: pointer;
                font-size: 0.8rem;
                transition: all 0.3s ease;
                width: 100%;
            }

            #orderAdditionModal .product-item button:hover,
            #orderAdditionModal .product-item button:focus {
                background: var(--table-info-dark);
                transform: translateY(-1px);
            }

            #orderAdditionModal .product-item button:active {
                transform: translateY(0);
            }

            #orderAdditionModal .product-item button:disabled {
                background: var(--border);
                color: var(--text-sec);
                cursor: not-allowed;
                transform: none;
            }

            #orderAdditionModal .product-item:hover {
                background: var(--table-c-bg-secondary);
            }

            #orderAdditionModal .selected-orders-section {
                width: 100%;
            }

            #orderAdditionModal .selected-orders-section h3 {
                font-size: 1rem;
                font-weight: 600;
                text-align: left;
                color: var(--text-main);
                margin-bottom: 0.8rem;
                border-bottom: 1px solid var(--border);
                padding-bottom: 0.5rem;
            }

            #orderAdditionModal #selectedOrdersTable {
                border: 1px solid var(--border);
                border-radius: 6px;
                background: var(--card-bg);
                width: 100%;
                font-size: 0.8rem;
            }

            #orderAdditionModal #selectedOrdersTable th,
            #orderAdditionModal #selectedOrdersTable td {
                padding: 0.5rem;
                text-align: left;
                border-bottom: 1px solid var(--border);
            }

            #orderAdditionModal #selectedOrdersTable th {
                background: var(--table-c-bg-secondary);
                font-weight: 600;
                color: var(--text-main);
            }

            #orderAdditionModal #selectedOrdersTable td {
                color: var(--text-main);
            }

            #orderAdditionModal #selectedOrdersTable th:nth-child(1),
            #orderAdditionModal #selectedOrdersTable td:nth-child(1) {
                width: 45%;
            }

            #orderAdditionModal #selectedOrdersTable th:nth-child(2),
            #orderAdditionModal #selectedOrdersTable td:nth-child(2) {
                width: 24%;
                text-align: center;
            }

            #orderAdditionModal #selectedOrdersTable th:nth-child(3),
            #orderAdditionModal #selectedOrdersTable td:nth-child(3) {
                width: 31%;
                text-align: center;
            }

            #orderAdditionModal #selectedOrdersTable tbody {
                max-height: 144px;
                overflow-y: auto;
                display: block;
                -webkit-overflow-scrolling: touch;
            }

            #orderAdditionModal #selectedOrdersTable tr {
                display: table;
                width: 100%;
                table-layout: fixed;
            }

            #orderAdditionModal #selectedOrdersTable tbody tr:hover {
                background: var(--table-c-bg-secondary);
            }

            #orderAdditionModal #selectedOrdersTable .action-controls {
                display: flex;
                align-items: center;
                justify-content: flex-end;
                gap: 6px;
                padding: 4px 0;
            }

            #orderAdditionModal #selectedOrdersTable .action-controls button {
                width: 25px;
                height: 25px;
                border: none;
                border-radius: 8px;
                cursor: pointer;
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 0.8rem;
                transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
                box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            }

            #orderAdditionModal #selectedOrdersTable .action-controls .decrease-btn,
            #orderAdditionModal #selectedOrdersTable .action-controls .increase-btn {
                background: var(--table-info);
                color: white;
            }

            #orderAdditionModal #selectedOrdersTable .action-controls .delete-btn {
                background: linear-gradient(145deg, var(--danger-btn-bg) 0%, var(--danger-btn-hover) 100%);
                color: white;
                box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
            }

            #orderAdditionModal #selectedOrdersTable .action-controls button:hover {
                transform: translateY(-2px) scale(1.05);
                box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
            }

            #orderAdditionModal #selectedOrdersTable .action-controls button:active {
                transform: translateY(0) scale(0.98);
            }

            #orderAdditionModal .modal-footer {
                margin-top: 1rem;
                padding-top: 1rem;
                border-top: 1px solid var(--border);
                flex-direction: column;
                gap: 0.5rem;
            }

            #orderAdditionModal .modal-footer .btn {
                width: 100%;
                padding: 0.5rem;
                font-size: 0.8rem;
                border-radius: 6px;
                min-width: unset;
            }

            /* Scoped select fix for Change Controller Modal (moved from inline <style> in tables (26).php)
            Ensure the select and its options use the modal's card background and readable text
            in both light and dark themes. Also handle option:checked and vendor prefixes. */
            #changeControllerModal .modal-content select,
            #changeControllerModal .modal-content select option {
                background-color: var(--card-bg) !important;
                color: var(--text-main) !important;
                -webkit-text-fill-color: var(--text-main) !important; /* WebKit fix for some browsers */
            }

            /* Make the select border match modal input style and ensure the displayed value uses correct color */
            #changeControllerModal .modal-content select {
                border: 1px solid rgba(255, 255, 255, 0.08) !important;
                padding: 8px 10px;
                border-radius: 6px;
                appearance: none;
                -webkit-appearance: none;
                -moz-appearance: none;
                background-image: linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.12) 50%), linear-gradient(135deg, rgba(255, 255, 255, 0.12) 50%, transparent 50%);
                background-position: calc(100% - 18px) calc(1em + 2px), calc(100% - 13px) calc(1em + 2px);
                background-size: 6px 6px, 6px 6px;
                background-repeat: no-repeat;
                padding-right: 34px; /* space for caret */
                color: var(--text-main) !important;
            }

            /* When the select is focused give a subtle outline (but keep colors consistent) */
            #changeControllerModal .modal-content select:focus {
                box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.08);
                outline: none;
            }

            /* Make the selected option inside the dropdown readable (best-effort across browsers) */
            #changeControllerModal .modal-content select option:checked,
            #changeControllerModal .modal-content select option[selected] {
                background-color: rgba(0,0,0,0.12) !important;
                color: var(--text-main) !important;
            }

            /* For Windows/Edge/IE caret/value color */
            #changeControllerModal .modal-content select::-ms-value {
                color: var(--text-main) !important;
            }

            /* If theme uses data-theme attribute, ensure dark theme selectors match the same vars.
            Also explicitly set option backgrounds and text to avoid OS/browser defaults that
            can produce white-on-white in some environments. */
            [data-theme="dark"] #changeControllerModal .modal-content select,
            [data-theme="dark"] #changeControllerModal .modal-content select option {
                background-color: var(--card-bg) !important;
                color: #e6e6e6 !important;
                -webkit-text-fill-color: #e6e6e6 !important; /* WebKit engines */
            }

            /* Match the masa-transfer select styling so both selects look identical in dark theme.
            Target the specific ID to be extra-safe. */
            [data-theme="dark"] #newControllerSelect,
            [data-theme="dark"] #newControllerSelect option {
                background-color: var(--card-bg) !important;
                color: #e6e6e6 !important;
                -webkit-text-fill-color: #e6e6e6 !important;
            }

            /* Ensure options in the open dropdown also use the modal background color and readable text */
            [data-theme="dark"] #changeControllerModal .modal-content select option,
            [data-theme="dark"] #newControllerSelect option {
                background-color: var(--card-bg) !important;
                color: #e6e6e6 !important;
            }

            /* Strong overrides for Windows/Chromium/Edge where native dropdowns can still show
            white backgrounds/text. Force both the displayed value and option list to be readable. */
            [data-theme="dark"] #newControllerSelect,
            [data-theme="dark"] #newControllerSelect option,
            [data-theme="dark"] #targetTableSelect,
            [data-theme="dark"] #targetTableSelect option,
            [data-theme="dark"] #changeControllerModal .modal-content select,
            [data-theme="dark"] #changeControllerModal .modal-content select option {
                background-color: #2A2A2A !important; /* modal card bg */
                color: #f3f4f6 !important; /* light text */
                -webkit-text-fill-color: #f3f4f6 !important; /* WebKit */
                caret-color: #f3f4f6 !important;
            }

            /* ms-specific value/caret */
            [data-theme="dark"] #newControllerSelect::-ms-value,
            [data-theme="dark"] #targetTableSelect::-ms-value {
                color: #f3f4f6 !important;
            }

            /* Some browsers require the option element to be styled separately when list is opened */
            [data-theme="dark"] select option {
                background-color: #2A2A2A !important;
                color: #f3f4f6 !important;
            }

            /* Fallback: if the browser still forces native white background for options, make the
            select use a custom dropdown via appearance auto which can help some engines. */
            [data-theme="dark"] #newControllerSelect,
            [data-theme="dark"] #targetTableSelect {
                -webkit-appearance: none !important;
                -moz-appearance: none !important;
                appearance: none !important;
                background-image: linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.08) 50%), linear-gradient(135deg, rgba(255,255,255,0.08) 50%, transparent 50%);
                background-position: calc(100% - 18px) calc(1em + 2px), calc(100% - 13px) calc(1em + 2px);
                background-size: 6px 6px, 6px 6px;
                background-repeat: no-repeat;
                padding-right: 34px !important;
            }
        }