/* Gọn nút tạo đơn hàng admin */
#open-create-order-btn {
    padding: 6px 10px !important;
    min-width: 60px !important;
    max-width: 120px !important;
    border-radius: 8px !important;
    height: auto !important;
    line-height: 1.2 !important;
    box-sizing: border-box;
}
@media (max-width: 480px) {
    #open-create-order-btn {
        padding: 5px 6px !important;
        min-width: 48px !important;
        max-width: 90px !important;
        border-radius: 7px !important;
    }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.app-mode {
    display: block;
    background: #f5f7fc;
    align-items: flex-start;
    color: #1a1d24;
    color-scheme: light;
}

.language-toggle-btn {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1200;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.language-toggle-btn:hover {
    transform: translateY(-1px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Login Styles */
.login-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    max-width: 400px;
    margin: 0 auto;
}

.login-container h1 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group textarea {
    min-height: 96px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.alert {
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-size: 14px;
}

.alert-error {
    background: #fee;
    color: #c00;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #080;
    border: 1px solid #cfc;
}

.app-notice-overlay {
    position: fixed;
    inset: 0;
    background: rgba(21, 24, 34, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 20px;
}

.app-notice-overlay.active {
    display: flex;
}

.app-notice-modal {
    width: min(460px, 100%);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 48px rgba(13, 18, 30, 0.24);
    overflow: hidden;
    animation: appNoticeIn 0.16s ease-out;
}

.app-notice-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2430;
    padding: 16px 20px 10px;
}

.app-notice-message {
    padding: 0 20px 18px;
    color: #3a4253;
    line-height: 1.5;
    white-space: pre-line;
    font-size: 15px;
}

.app-notice-input {
    display: none;
    width: calc(100% - 40px);
    margin: 0 20px 16px;
    padding: 11px 12px;
    border: 1px solid #d6dbe8;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
}

.app-notice-input:focus {
    outline: none;
    border-color: #5e75f5;
    box-shadow: 0 0 0 3px rgba(94, 117, 245, 0.18);
}

.app-notice-actions {
    padding: 0 20px 18px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.app-notice-cancel,
.app-notice-ok {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    min-width: 96px;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
}

.app-notice-cancel {
    border: 1px solid #d0d7e5;
    background: #fff;
    color: #485067;
}

.app-notice-cancel:hover {
    background: #f5f7fc;
}

.app-notice-ok {
    border: none;
    background: linear-gradient(135deg, #4f6ef7 0%, #5f4fd1 100%);
    color: #fff;
}

.app-notice-ok:hover {
    filter: brightness(0.96);
}

.app-notice-ok:focus {
    outline: 3px solid rgba(79, 110, 247, 0.32);
    outline-offset: 2px;
}

@keyframes appNoticeIn {
    from {
        transform: translateY(6px) scale(0.985);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Dashboard Styles */
.dashboard {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 30px;
    margin: 16px auto;
    display: none;
    color: #1a1d24;
    color-scheme: light;
}

.dashboard.active {
    display: block;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.header h1 {
    color: #333;
    margin-bottom: 5px;
}

.admin-header {
    align-items: flex-start;
}

.admin-header-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.admin-header-meta p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.admin-header .user-info {
    justify-content: flex-end;
    text-align: right;
    flex-wrap: nowrap;
}

.header > div:first-child {
    flex: 1;
}

.user-info {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    text-align: right;
}

.user-info .name {
    color: #666;
    font-size: 14px;
    margin-right: 8px;
}

.user-info .role {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-top: 5px;
}

.logout-btn {
    background: #9ea8b8;
    color: white;
    border: none;
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
    margin-left: 6px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    line-height: 1;
}

.logout-btn:hover {
    background: #7a8699;
}

.logout-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    line-height: 1;
}

.logout-icon svg {
    width: 16px;
    height: 16px;
    display: block;
    transform: scaleX(-1);
    transform-origin: center;
}

.user-info .change-password-btn {
    margin-left: 0 !important;
}

.language-toggle-btn.inline-toggle {
    position: static;
    width: 42px;
    height: 42px;
    box-shadow: none;
    background: #fff;
    border: 1px solid #ddd;
    font-size: 20px;
}

#language-toggle-btn,
.language-toggle-btn,
.language-toggle-btn.inline-toggle {
    display: none !important;
}

/* Form Styles */
.form-section {
    margin-bottom: 30px;
}

.form-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row.full {
    grid-template-columns: 1fr;
}

.form-group.full {
    grid-column: 1 / -1;
}

.task-selector {
    border: 1px solid #ddd;
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: auto;
    background: #fff;
}

/* Task table inside selector */
.task-table {
    width: 100%;
    border-collapse: collapse;
}

.task-table thead {
    position: sticky;
    top: 0;
    background: #f0f0f5;
    z-index: 1;
}

.task-table thead th {
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-table .col-check { width: 40px; text-align: center; }
.task-table .col-name  { text-align: left; }
.task-table .col-price { width: 110px; text-align: right; padding-right: 12px; white-space: nowrap; }
.task-table .col-staff { width: 80px; padding: 0 10px; }

.task-row {
    border-top: 1px solid #eee;
    cursor: pointer;
    transition: background 0.15s;
}

.task-row:hover { background: #f5f5ff; }
.task-row-checked { background: #eef1ff; }
.task-row-checked:hover { background: #e4e8ff; }

.task-row td { padding: 9px 10px; vertical-align: middle; }
.task-row .col-check { text-align: center; }
.task-row .col-price { text-align: right; padding-right: 12px; font-weight: 400; font-size: 14px; color: #667eea; white-space: nowrap; }
.task-row .col-staff { padding: 5px 10px; }

.staff-select {
    width: 100%;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s;
}

.staff-select:hover { border-color: #667eea; }
.staff-select:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 2px rgba(102,126,234,0.1); }

#assigned-to {
    width: 60% !important;
    padding: 0 !important;
    font-size: 14px !important;
    line-height: 1 !important;
    border: 1px solid #ddd !important;
    border-radius: 5px !important;
    background: #fff !important;
    color: #333 !important;
    cursor: pointer !important;
}

.task-row input[type="checkbox"] {
    width: 17px;
    height: 17px;
    cursor: pointer;
    accent-color: #667eea;
}

.task-title { font-weight: 400; font-size: 14px; display: block; }
.task-desc  { font-size: 12px; color: #999; display: block; margin-top: 2px; }

/* Price summary below task selector */
.order-price-summary {
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: #fafafa;
    padding: 10px 14px;
}

.price-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #555;
    padding-bottom: 8px;
    border-bottom: 1px dashed #ddd;
    margin-bottom: 10px;
}

.price-total-row span:last-child {
    font-size: 16px;
    font-weight: 400;
    color: #333;
}

.price-actual-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-actual-row label {
    font-size: 14px;
    font-weight: 400;
    color: #667eea;
    white-space: nowrap;
    min-width: 70px;
}

.price-actual-row input[type="number"] {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #667eea;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 400;
    color: #333;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.price-actual-row input[type="number"]:focus {
    border-color: #764ba2;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}

/* Legacy .task-item kept for safety */
.task-item { display: none; }

/* Orders Table */
.orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.orders-table thead {
    background: #f5f5f5;
}

.orders-table th,
.orders-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.orders-table th {
    font-weight: 400;
    color: #333;
}

.orders-table tbody tr {
    transition: background 0.2s;
}

.orders-table tbody tr:hover {
    background: #f9f9f9;
}

/* Bảng dữ liệu: tách khỏi màu chữ toàn trang (dark mode trình duyệt / OS) — luôn nền sáng + chữ tối */
#expense-table-wrap {
    color-scheme: light;
    background-color: #fff;
    color: #1a1d24;
}

body.app-mode .orders-table {
    color-scheme: light;
    border-color: #d0d5de;
}

body.app-mode .orders-table thead {
    background-color: #e8eaef;
}

body.app-mode .orders-table th,
body.app-mode .orders-table td {
    color: #1a1d24;
    border-bottom-color: #d0d5de;
}

body.app-mode .orders-table th {
    font-weight: 600;
}

body.app-mode .orders-table tbody tr:nth-child(odd) td {
    background-color: #fff;
}

body.app-mode .orders-table tbody tr:nth-child(even) td {
    background-color: #f3f4f7;
}

body.app-mode .orders-table tbody tr:hover td {
    background-color: #e4e8f0;
    color: #1a1d24;
}

body.app-mode .orders-table tfoot td {
    background-color: #dde1ea;
    color: #111418;
    font-weight: 700;
    border-top: 1px solid #c8ced9;
}

/* Bảng chi tiêu: cột số ngay cạnh ngày — đỡ mất cột số khi màn hẹp (trước đây số ở cột 3, hay nằm ngoài vùng cuộn) */
#expense-table th.expense-col-amount,
#expense-table td.expense-col-amount,
#expense-total {
    text-align: right;
    white-space: nowrap;
    min-width: 5.5rem;
    font-variant-numeric: tabular-nums;
}

#expense-table-wrap {
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
}

#expense-table {
    min-width: 100%;
}

.orders-table .order-index {
    width: 60px;
    text-align: center;
    font-weight: 600;
}

.orders-table .order-actions {
    width: 120px;
    text-align: left;
}

.order-code {
    font-weight: 400;
    color: #667eea;
}

.order-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.view-order-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}

.view-order-btn:hover {
    background: #5568d3;
}

.staff-action-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.icon-action-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    border-radius: 8px;
}

.admin-tab-btn .tab-icon {
    display: block;
    font-size: 22px;
    line-height: 1;
    margin-bottom: 6px;
}

.admin-tab-btn .tab-label {
    display: block;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 0;
    padding: 15px;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    box-shadow: none;
}

.modal-content .form-row {
    grid-template-columns: 1fr;
    gap: 10px;
}

.modal-content .form-section {
    margin-bottom: 15px;
}

.modal-content .form-section h2 {
    font-size: 16px;
    margin-bottom: 10px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.modal-header h2 {
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

    #categories-table .category-index-col {
        width: 24px !important;
        min-width: 24px !important;
        max-width: 24px !important;
        text-align: center;
        padding-left: 1px !important;
        padding-right: 1px !important;
        white-space: nowrap;
    }

    #categories-table th:last-child,
    #categories-table td:last-child {
        width: 88px;
        min-width: 88px;
    }

    .category-actions-cell {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .category-icon-btn {
        width: 34px;
        height: 34px;
        padding: 0;
        font-size: 16px;
        line-height: 1;
        border-radius: 8px;
    }
.close-btn:hover {
    color: #333;
}

/* Order Details Styles */
.order-detail-info {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.order-detail-info p {
    margin: 8px 0;
    color: #666;
}

.order-detail-info strong {
    color: #333;
}

.order-tasks {
    margin-top: 20px;
}

.order-tasks h3 {
    color: #333;
    margin-bottom: 15px;
}

.selected-item-row {
    display: grid;
    grid-template-columns: 34px 1fr auto auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    margin-bottom: 8px;
    background: #fff;
}

.selected-item-index {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #f1f3ff;
    color: #4b60db;
    font-weight: 700;
    font-size: 12px;
}

.selected-item-title {
    color: #2f2f2f;
    font-weight: 400;
}

.selected-item-price {
    color: #4b60db;
    font-weight: 400;
    white-space: nowrap;
}

.selected-item-staff {
    color: #666;
    font-size: 13px;
}

.task-item-order {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.task-item-order.completed {
    background: #d4edda;
    border-color: #c3e6cb;
}

.task-item-order input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.task-item-order label {
    cursor: pointer;
    flex: 1;
}

.task-item-order.completed label {
    text-decoration: line-through;
    color: #666;
}

.stats-summary-grid {
    margin-bottom: 20px;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.info-card {
    background: #f7f8fc;
    border: 1px solid #eceef7;
    border-radius: 8px;
    padding: 12px 14px;
}

.stat-inline-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.stat-inline-row h3 {
    margin: 0;
    font-size: 16px;
    color: #222;
}

.stat-inline-row p {
    margin: 0;
    font-size: 28px;
    font-weight: 400;
    color: #111;
    line-height: 1;
}

.stats-revenue-card {
    background: #fff3cd;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-tabs {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 0 !important;
        align-items: stretch;
        overflow-x: auto;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
        background: none;
    }

    .admin-tab-btn {
        min-width: 80px;
        max-width: 140px;
        flex: 1 1 80px;
        padding: 8px 2px !important;
        font-size: 12px !important;
        line-height: 1.25;
        text-align: center;
        white-space: normal;
        word-break: keep-all;
        overflow-wrap: break-word;
        background: none;
    }

    .admin-tab-btn .tab-icon {
        font-size: 18px;
        margin-bottom: 2px;
    }
    .admin-tab-btn .tab-label {
        font-size: 11px;
        line-height: 1.1;
    }

    .language-toggle-btn {
        top: 10px;
        right: 10px;
        width: 42px;
        height: 42px;
        font-size: 20px;
    }

    body.app-mode {
        padding: 0;
    }

    .dashboard {
        padding: 16px;
        width: 100%;
        max-width: 100%;
        min-height: 100svh;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .container {
        padding: 10px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        margin-bottom: 20px;
        padding-bottom: 14px;
    }

    .header h1 {
        font-size: 24px;
    }

    .user-info {
        justify-content: center;
        text-align: center;
    }

    .admin-header {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        text-align: left;
        gap: 10px;
    }

    .admin-header .user-info {
        justify-content: flex-end;
        text-align: right;
        width: auto;
    }

    .admin-header .logout-btn {
        margin-left: 0;
    }

    .form-section h2 {
        font-size: 24px;
        margin-bottom: 14px;
    }

    .task-selector {
        max-height: none;
        overflow-x: auto;
        overflow-y: auto;
    }

    .task-table {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
    }

    .task-title {
        font-size: 13px;
    }

    .staff-select {
        min-height: 34px;
        font-size: 14px;
        padding: 0;
    }

    .task-row input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }

    .order-price-summary {
        padding: 10px;
    }

    .price-total-row {
        font-size: 13px;
    }

    .price-total-row span:last-child {
        font-size: 15px;
    }

    .price-actual-row {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .price-actual-row label {
        min-width: 0;
    }

    .orders-table {
        font-size: 14px;
        width: 100%;
        table-layout: fixed;
        white-space: normal;
    }

    .orders-table th,
    .orders-table td {
        padding: 6px;
        word-break: break-word;
    }

    #expense-table {
        table-layout: auto;
    }

    #expense-table th,
    #expense-table td {
        vertical-align: top;
    }

    #expense-table th.expense-col-amount,
    #expense-table td.expense-col-amount {
        min-width: 6.25rem;
    }

    #bulk-checkbox-header,
    .order-select-cell {
        width: 30px !important;
        min-width: 30px;
        max-width: 30px;
        text-align: center;
        padding-left: 2px;
        padding-right: 2px;
    }

    #select-all-checkbox,
    .order-checkbox {
        width: 18px;
        height: 18px;
    }

    .selected-item-row {
        padding: 8px 9px;
        gap: 8px;
        margin-bottom: 6px;
    }

    .view-order-btn {
        padding: 5px 9px;
        font-size: 11px;
    }

    .staff-action-group {
        gap: 4px;
    }

    .icon-action-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
        border-radius: 7px;
    }

    .modal-content {
        margin: 0;
        width: 100%;
        height: 100%;
        padding: 12px;
    }

    .modal-content .form-row {
        gap: 8px;
    }

    .stats-summary-grid {
        grid-template-columns: 1fr;
    }

    .stat-inline-row h3 {
        font-size: 18px;
    }

    .stat-inline-row p {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .admin-tabs {
        gap: 0 !important;
    }
    .admin-tab-btn {
        min-width: 60px;
        max-width: 100px;
        flex: 1 1 60px;
        padding: 6px 1px !important;
        font-size: 10px !important;
    }
    .admin-tab-btn .tab-icon {
        font-size: 15px;
        margin-bottom: 1px;
    }
    .admin-tab-btn .tab-label {
        font-size: 9px;
    }
    .dashboard {
        padding: 2px;
        border-radius: 6px;
        min-height: 100svh;
    }
}
    .container {
        padding: 2px;
    }

    body.app-mode {
        background: #ffffff;
    }

    .header h1 {
        font-size: 20px;
    }

    .form-section h2 {
        font-size: 19px;
        margin-bottom: 10px;
    }

    .form-section {
        margin-bottom: 20px;
    }

    .form-group label {
        font-size: 14px;
    }

    input,
    select,
    textarea,
    .btn,
    .logout-btn,
    .view-order-btn {
        font-size: 14px;
    }

    .task-selector {
        border-radius: 6px;
        margin-left: 0;
        margin-right: 0;
        overflow-x: auto;
        overflow-y: auto;
    }

    .task-table {
        width: 100%;
        min-width: 0;
    }

    .order-price-summary {
        margin-left: 0;
        margin-right: 0;
        border-radius: 0 0 6px 6px;
        padding: 8px;
    }

    .task-title {
        font-size: 14px;
    }

    .staff-select {
        min-height: 34px;
        font-size: 14px;
        padding: 0;
    }

    .orders-table {
        font-size: 13px;
        table-layout: fixed;
        width: 100%;
    }

    .orders-table th,
    .orders-table td {
        padding: 5px;
    }

    #expense-table {
        table-layout: auto;
    }

    #expense-table th.expense-col-amount,
    #expense-table td.expense-col-amount {
        min-width: 6rem;
    }

    #bulk-checkbox-header,
    .order-select-cell {
        width: 26px !important;
        min-width: 26px;
        max-width: 26px;
        padding-left: 1px;
        padding-right: 1px;
    }

    .selected-item-row {
        grid-template-columns: 26px 1fr auto;
        padding: 7px 8px;
        gap: 6px;
    }

    .price-total-row,
    .price-actual-row label,
    .selected-item-title,
    .selected-item-price,
    .selected-item-index,
    .modal-header h2 {
        font-size: 14px;
    }

    .selected-item-staff {
        display: none;
    }

    .price-total-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .modal-content {
        margin: 0;
        padding: 16px;
        width: 100%;
        height: 100%;
    }

    .stat-inline-row h3 {
        font-size: 15px;
    }

    .stat-inline-row p {
        font-size: 22px;
    }
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
