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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f6fa;
    direction: rtl;
    text-align: right;
}

/* Login & Install */
.login-page, .install-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-box, .install-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 450px;
}

.login-box h1, .install-box h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.install-info {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 14px;
}

.install-info h3 {
    margin-bottom: 10px;
    color: #333;
}

.install-info p {
    margin: 5px 0;
    color: #666;
}

/* Mobile Toggle Button */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1001;
    background: #2c3e50;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 20px;
    cursor: pointer;
}

/* Sidebar Overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Layout */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100vh;
    background: #2c3e50;
    color: white;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    background: #1a252f;
    text-align: center;
    border-bottom: 1px solid #34495e;
}

.sidebar-header h2 {
    font-size: 20px;
    margin-bottom: 5px;
}

.sidebar-header p {
    font-size: 12px;
    color: #95a5a6;
}

.sidebar-user {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.sidebar-user-name {
    color: #ecf0f1;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.sidebar-user-role .badge {
    font-size: 11px;
    padding: 3px 10px;
    display: inline-block;
}

.sidebar-nav ul {
    list-style: none;
    padding: 10px 0;
}

.sidebar-nav li {
    border-bottom: 1px solid #34495e;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background: #34495e;
    padding-right: 30px;
}

.sidebar-nav li.has-submenu.active > a {
    background: #34495e;
    padding-right: 30px;
}

.sidebar-nav .icon {
    margin-left: 10px;
    font-size: 18px;
}

.sidebar-nav .has-submenu > a {
    cursor: pointer;
    user-select: none;
}

.sidebar-nav .submenu-toggle::after {
    content: "▼";
    margin-right: auto;
    font-size: 10px;
    transition: transform 0.3s;
}

.sidebar-nav .has-submenu.open > a .submenu-toggle::after,
.sidebar-nav .has-submenu.active > .submenu-toggle::after {
    transform: rotate(180deg);
}

.sidebar-nav .submenu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: rgba(0,0,0,0.15);
    padding: 0;
}

.sidebar-nav .has-submenu.open .submenu {
    max-height: 500px;
    padding: 5px 0;
}

.sidebar-nav .submenu li {
    border-bottom: none;
}

.sidebar-nav .submenu a {
    padding: 10px 20px 10px 45px;
    font-size: 14px;
}

.sidebar-nav .submenu a.active {
    background: #2c3e50;
    border-right: 3px solid #3498db;
    padding-right: 17px;
}

.perm-tree {
    background: #f8f9fa;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 15px;
    max-height: 450px;
    overflow-y: auto;
}

.perm-tree-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.perm-tree-children {
    margin-right: 30px;
    border-right: 2px solid #e1e4e8;
    padding-right: 15px;
    margin-top: 8px;
}

.perm-tree-node {
    padding: 8px 0;
    border-bottom: 1px solid #eef0f2;
}

.perm-tree-node:last-child {
    border-bottom: none;
}

.perm-tree-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.perm-tree-icon {
    font-size: 18px;
}

.perm-tree-label strong {
    color: #2c3e50;
    font-size: 15px;
}

.perm-tree-child .perm-tree-label {
    color: #495057;
    font-size: 14px;
}

.perm-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    margin-right: 25px;
}

.perm-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: white;
    border: 1px solid #dee2e6;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.perm-action:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.perm-action input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.perm-action input[type="checkbox"]:checked + span {
    color: #1976d2;
    font-weight: 600;
}

.perm-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.sidebar-nav .badge {
    margin-right: auto;
    background: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.logout-item {
    margin-top: auto;
    border-top: 1px solid #34495e;
}

/* Main Content */
.main-content {
    margin-right: 260px;
    padding: 20px;
    min-height: 100vh;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ddd;
    gap: 15px;
}

.top-bar h1 {
    color: #2c3e50;
    font-size: 24px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    font-size: 40px;
}

.stat-info h3 {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.stat-number {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
}

.stat-detail {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #e67e22;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

.btn-block {
    width: 100%;
}

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

/* Forms */
.form-container {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-group small {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 5px;
}

.live-msg {
    display: block;
    font-size: 12px;
    margin-top: 6px;
    min-height: 16px;
}

.live-msg.ok {
    color: #27ae60;
}

.live-msg.error {
    color: #e74c3c;
    font-weight: 600;
}

.live-msg.warn {
    color: #d35400;
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Table */
.table-responsive {
    overflow-x: auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.table tr:hover {
    background: #f8f9fa;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: 500;
    font-size: 14px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-pending {
    background: #fff3cd;
    color: #856404;
}

.badge-approved {
    background: #d4edda;
    color: #155724;
}

.badge-completed {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.badge-rejected {
    background: #f8d7da;
    color: #721c24;
}

.badge-admin {
    background: #e74c3c;
    color: white;
}

.badge-staff {
    background: #3498db;
    color: white;
}

.badge-employee {
    background: #3498db;
    color: white;
}

.badge-viewer {
    background: #95a5a6;
    color: white;
}

.badge-success {
    background: #27ae60;
    color: white;
}

.badge-danger {
    background: #e74c3c;
    color: white;
}

.badge-login { background: #2980b9; color: white; }
.badge-logout { background: #7f8c8d; color: white; }
.badge-create { background: #27ae60; color: white; }
.badge-update { background: #f39c12; color: white; }
.badge-delete { background: #c0392b; color: white; }
.badge-approve { background: #8e44ad; color: white; }

/* Permission / access control */
.permission-box {
    background: #f8f9fa;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}
.perm-title {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}
.perm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}
.perm-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 5px;
    padding: 8px 10px;
    cursor: pointer;
}
.perm-item input {
    width: auto;
}
.perm-note {
    display: block;
    margin-top: 10px;
    color: #777;
    font-size: 12px;
}

/* Filters layout for logs */
.filters .form-group {
    flex: 1;
    min-width: 150px;
}


/* Filters */
.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filters .form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

/* Order Info */
.order-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-right: 4px solid #3498db;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-item {
    padding: 10px;
}

.info-item label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.info-item span {
    font-weight: 600;
    color: #333;
}

.info-item.highlight {
    background: #e8f5e9;
    padding: 15px;
    border-radius: 5px;
}

.info-item.highlight span {
    color: #27ae60;
    font-size: 18px;
}

/* Quick Actions */
.quick-actions {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.quick-actions h2 {
    margin-bottom: 20px;
    color: #333;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Recent Orders */
.recent-orders, .recent-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.recent-orders h2, .recent-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.text-center {
    text-align: center;
    color: #666;
    padding: 20px;
}

/* Detail Card */
.detail-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.detail-item {
    padding: 10px;
}

.detail-item label {
    display: block;
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.detail-item span {
    font-weight: 600;
    color: #333;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item.full-width p {
    color: #333;
    line-height: 1.6;
}

/* Outputs Section */
.outputs-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.outputs-section h3 {
    margin-bottom: 20px;
    color: #333;
}

.output-summary {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    flex-wrap: wrap;
}

.output-summary p {
    font-weight: 600;
    color: #333;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Number input arrows removal */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.page-btn {
    padding: 8px 14px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    min-width: 40px;
    text-align: center;
}

.page-btn:hover {
    background: #f0f0f0;
    border-color: #bbb;
}

.page-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-dots {
    padding: 8px 4px;
    color: #666;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 25px;
    border-bottom: 2px solid #ddd;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 22px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 15px;
    color: #666;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: #2c3e50;
}

.tab-btn.active {
    color: #2c3e50;
    border-bottom-color: #3498db;
    font-weight: 600;
}

.tab-content {
}

.tab-content > .tab-pane.active.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: flex-start;
    justify-content: center;
    z-index: 2000;
    padding: 40px 15px;
    overflow-y: auto;
}

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

.modal-overlay.show .modal {
    display: block;
}

.modal {
    background: white;
    border-radius: 10px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalIn 0.25s ease;
    margin: auto 0;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.modal-header {
    padding: 18px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #2c3e50;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #999;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Import Report */
.row-ok { background: #f0fff4; }
.row-warn { background: #fffbea; }
.row-error { background: #fff5f5; opacity: 0.7; }
.import-badge { display: inline-block; padding: 4px 10px; border-radius: 4px; font-size: 12px; }
.import-ok { background: #27ae60; color: white; }
.import-warn { background: #f39c12; color: white; }
.import-error { background: #e74c3c; color: white; }

/* Tablet Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }

    .main-content {
        margin-right: 220px;
    }

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

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .detail-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar-toggle {
        display: block;
    }

    .sidebar {
        transform: translateX(100%);
        width: 260px;
        box-shadow: -5px 0 20px rgba(0,0,0,0.3);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-overlay.show {
        display: block;
        opacity: 1;
    }

    .main-content {
        margin-right: 0;
        padding: 15px;
    }

    .top-bar {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 10px;
        padding-top: 50px;
    }

    .top-bar h1 {
        font-size: 20px;
    }

    .user-info {
        justify-content: center;
    }

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

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

    .stat-card {
        padding: 20px;
    }

    .stat-icon {
        font-size: 32px;
    }

    .stat-number {
        font-size: 22px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
        text-align: center;
    }

    .filters {
        flex-direction: column;
    }

    .filters .form-group {
        min-width: 100%;
    }

    .detail-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

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

    .output-summary {
        flex-direction: column;
        gap: 15px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
        text-align: center;
    }

    .table-responsive {
        overflow-x: visible;
        box-shadow: none;
        background: transparent;
    }

    .table,
    .table tbody,
    .table tr,
    .table td {
        display: block;
        width: 100%;
    }

    .table thead {
        display: none;
    }

    .table tr {
        background: white;
        border: 1px solid #ddd;
        border-radius: 10px;
        margin-bottom: 15px;
        padding: 5px 0;
        box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    }

    .table tr:hover {
        background: white;
    }

    .table td {
        text-align: right;
        border-bottom: 1px solid #eee;
        padding: 10px 12px;
        white-space: normal;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }

    .table td:last-child {
        border-bottom: none;
    }

    .table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #666;
        font-size: 13px;
        flex-shrink: 0;
    }

    .table td > * {
        text-align: left;
    }

    .table td.text-center {
        justify-content: center;
    }

    .table td.text-center::before {
        content: none;
    }

    .table td.text-center > * {
        text-align: center;
    }

    .btn-sm {
        padding: 4px 8px;
        font-size: 11px;
    }

    .login-box, .install-box {
        padding: 25px 20px;
    }

    .login-box h1, .install-box h1 {
        font-size: 20px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .main-content {
        padding: 10px;
    }

    .top-bar {
        padding-top: 45px;
    }

    .top-bar h1 {
        font-size: 18px;
    }

    .stat-card {
        padding: 15px;
        gap: 15px;
    }

    .stat-icon {
        font-size: 28px;
    }

    .stat-number {
        font-size: 20px;
    }

    .stat-info h3 {
        font-size: 12px;
    }

    .form-container,
    .detail-card,
    .quick-actions,
    .recent-orders,
    .recent-section,
    .outputs-section {
        padding: 15px;
        border-radius: 8px;
    }

    .table td {
        padding: 8px 10px;
        font-size: 14px;
    }

    .table td::before {
        font-size: 12px;
    }

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

    .btn-sm {
        padding: 3px 7px;
        font-size: 10px;
    }

    .pagination {
        gap: 3px;
    }

    .page-btn {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 35px;
    }

    .alert {
        padding: 12px 15px;
        font-size: 13px;
    }
}

.install-pane { display: none; }
.install-pane.active { display: block; }
.alert-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

.install-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 25px;
    background: #fff;
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    overflow: hidden;
    border: 1px solid #e1e4e8;
}

.install-tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #555;
    border-radius: 8px;
    transition: all 0.25s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.install-tab-btn:hover {
    background: #f0f4f8;
    color: #2c3e50;
}

.install-tab-btn.active {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    font-weight: 600;
}

.install-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
}

.settings-card {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.settings-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.settings-toolbar h3 {
    margin: 0;
    color: #2c3e50;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    padding: 12px 15px;
    border-radius: 6px;
    margin: 10px 0;
}

.badge-success { background: #27ae60; color: white; padding: 3px 8px; border-radius: 4px; font-size: 12px; }

.searchable-dropdown {
    position: relative;
}

.searchable-dropdown .dropdown-input {
    width: 100%;
    padding: 10px 35px 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

.searchable-dropdown .dropdown-toggle {
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #777;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
}

.searchable-dropdown .dropdown-list {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 6px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-top: 4px;
}

.searchable-dropdown.open .dropdown-list {
    display: block;
}

.searchable-dropdown .dropdown-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
}

.searchable-dropdown .dropdown-item:hover {
    background: #f0f7ff;
}

.searchable-dropdown .dropdown-item.active,
.searchable-dropdown .dropdown-item.active:hover {
    background: #3498db;
    color: #fff;
}

.searchable-dropdown .dropdown-item.active small {
    color: #e0e0e0;
}

.searchable-dropdown .dropdown-item:last-child {
    border-bottom: none;
}

.searchable-dropdown .dropdown-item small {
    color: #888;
    font-size: 11px;
    margin-top: 2px;
}

.searchable-dropdown .dropdown-empty {
    padding: 16px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

.order-number-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.order-number-row input {
    flex: 1;
}

.order-number-prefix {
    background: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 10px 12px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    white-space: nowrap;
}

#created_at_display[readonly] {
    background: #f8f9fa;
    color: #666;
}

#created_at_display:not([readonly]) {
    background: #fffbe6;
    border-color: #f39c12;
}

.order-number-status {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    min-height: 16px;
}
.order-number-status.valid { color: #27ae60; }
.order-number-status.invalid { color: #c0392b; }
.order-number-status.pending { color: #f39c12; }

.owner-selector {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.input-with-suffix {
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-with-suffix input {
    flex: 1;
}

.input-with-suffix span {
    color: #777;
    font-size: 13px;
}

.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #1976d2;
}

.order-items-table {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}

.order-items-table input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 13px;
}

.order-items-table .item-product-name {
    font-weight: 500;
}

.order-items-table .item-product-code {
    display: block;
    color: #888;
    font-size: 11px;
    margin-top: 2px;
}

.order-items-table tfoot td {
    background: #f8f9fa;
    font-size: 14px;
    padding: 12px;
}

.order-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.order-summary-grid > div {
    display: flex;
    flex-direction: column;
    padding: 10px 14px;
    background: #f8f9fa;
    border-radius: 6px;
    border-right: 3px solid #3498db;
}

.order-summary-grid small {
    color: #888;
    font-size: 11px;
    margin-bottom: 4px;
}

.order-summary-grid strong {
    color: #2c3e50;
    font-size: 14px;
}

.order-summary-grid small.muted {
    color: #aaa;
    font-size: 11px;
    margin-top: 2px;
    margin-bottom: 0;
}

.order-description {
    margin-top: 15px;
    padding: 10px 14px;
    background: #fffbf0;
    border-radius: 6px;
    border-right: 3px solid #f39c12;
}

.order-description p {
    margin: 5px 0 0 0;
    color: #555;
    line-height: 1.7;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.section-header h3 {
    margin: 0;
    color: #2c3e50;
}

.grand-info, .payment-info {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    background: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.paid-amount, .remaining-amount {
    font-size: 13px;
}

.payment-form {
    background: #f8f9fa;
    padding: 18px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.row-cancelled { opacity: 0.5; }
.row-cancelled td { text-decoration: line-through; }

.menu-badge {
    background: #e74c3c;
    color: #fff;
    border-radius: 50%;
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    margin-right: 6px;
    padding: 0 6px;
    animation: pulse-badge 1.5s ease-in-out infinite;
}
@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.deadline-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}
.deadline-ok { background: #d4edda; color: #155724; }
.deadline-soon { background: #fff3cd; color: #856404; }
.deadline-over { background: #f8d7da; color: #721c24; }

@media (max-width: 768px) {
    .install-tabs {
        flex-direction: column;
    }
    .install-tab-btn {
        padding: 10px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .install-tab-btn {
        padding: 8px;
        font-size: 12px;
    }
    .install-tab-btn span {
        display: none;
    }
}

/* ===== Output Modal (Fancy) ===== */
.modal-large {
    max-width: 900px;
    width: 95%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header-customer {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    color: #fff;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 3px solid #3498db;
}

.header-customer-default {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
}

.header-customer-default .header-icon {
    font-size: 22px;
}

.header-customer-active {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.hc-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hc-icon {
    font-size: 28px;
    background: rgba(255, 255, 255, 0.15);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hc-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hc-info strong {
    font-size: 16px;
    font-weight: 700;
}

.hc-info small {
    color: #bdc3c7;
    font-size: 12px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 18px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    order: -1;
    margin-left: auto;
    margin-right: 0;
}

[dir="rtl"] .modal-close {
    margin-left: 0;
    margin-right: auto;
}

.modal-close:hover {
    background: #e74c3c;
    border-color: #e74c3c;
    transform: scale(1.05);
}

.modal-tabs {
    display: flex;
    background: #ecf0f1;
    border-bottom: 1px solid #ddd;
    padding: 0;
}

.modal-tab-btn {
    flex: 1;
    padding: 12px 18px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    position: relative;
}

.modal-tab-btn:hover {
    background: #d5dbdf;
    color: #2c3e50;
}

.modal-tab-btn.active {
    background: #fff;
    color: #2c3e50;
    border-bottom-color: #3498db;
    font-weight: 700;
}

.modal-body-tabs {
    flex: 1;
    overflow-y: auto;
    padding: 20px 22px;
    max-height: 60vh;
}

.modal-pane {
    display: none;
}

.modal-pane.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

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

.modal-footer {
    padding: 14px 22px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: #fafbfc;
}

/* Customer summary block */
.customer-summary {
    background: linear-gradient(135deg, #e8f4f8, #f4f8fb);
    border: 1px solid #d6e4ea;
    border-radius: 8px;
    padding: 14px 16px;
    margin: 14px 0;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-item.highlight {
    background: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    border-right: 3px solid #3498db;
}

.summary-label {
    color: #7f8c8d;
    font-size: 11px;
}

.summary-item strong {
    font-size: 18px;
    color: #2c3e50;
    font-weight: 700;
}

/* Orders container */
.orders-container {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #95a5a6;
    background: #fafbfc;
    border: 2px dashed #e0e6e8;
    border-radius: 8px;
}

.empty-state.error {
    color: #c0392b;
    background: #fef5f5;
    border-color: #f5c6cb;
}

.empty-state span {
    font-size: 36px;
    display: block;
    margin-bottom: 8px;
}

.empty-state p {
    margin: 0;
    font-size: 14px;
}

.order-card {
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.order-card-header {
    background: #f4f7f9;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #e1e4e8;
    flex-wrap: wrap;
}

.order-card-title {
    font-weight: 700;
    color: #2c3e50;
    font-size: 14px;
}

.order-card-date {
    color: #95a5a6;
    font-size: 11px;
    margin-right: 8px;
}

.order-card-progress {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    font-size: 12px;
    color: #555;
    min-width: 200px;
}

.progress-bar {
    width: 200px;
    height: 6px;
    background: #e0e6e8;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    transition: width 0.3s;
}

.order-items-list {
    display: flex;
    flex-direction: column;
}

.order-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f2f4;
    transition: all 0.2s;
    flex-wrap: wrap;
}

.order-item-row:last-child {
    border-bottom: none;
}

.order-item-row:hover {
    background: #f8fafb;
}

.order-item-row.selected {
    background: #ebf5fb;
    border-right: 3px solid #3498db;
}

.order-item-row.disabled {
    opacity: 0.5;
}

.item-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 200px;
    cursor: pointer;
}

.item-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #3498db;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.item-info strong {
    color: #2c3e50;
    font-size: 14px;
}

.item-info small {
    color: #7f8c8d;
    font-size: 12px;
}

.item-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.stat-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f4f7f9;
    padding: 6px 12px;
    border-radius: 6px;
    min-width: 80px;
}

.stat-block.highlight {
    background: #fff3cd;
    color: #856404;
}

.stat-block.highlight strong {
    color: #856404;
}

.stat-block.input-stat {
    background: #d6eaf8;
    padding: 4px 8px;
}

.stat-block span {
    font-size: 10px;
    color: #7f8c8d;
    margin-bottom: 2px;
}

.stat-block.highlight span {
    color: #856404;
}

.stat-block strong {
    color: #2c3e50;
    font-size: 14px;
    font-weight: 700;
}

.item-output-input {
    width: 100px;
    padding: 4px 8px;
    border: 1px solid #3498db;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
    background: #fff;
}

/* Selected items info */
.selected-info {
    position: sticky;
    bottom: 0;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: #fff;
    border-radius: 8px;
    padding: 12px 18px;
    margin-top: 14px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.selected-info-grid {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.selected-info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.selected-info-item strong {
    font-size: 16px;
    color: #2ecc71;
    font-weight: 700;
}

#pane-scale .alert {
    margin-top: 12px;
}

@media (max-width: 768px) {
    .modal-large { max-width: 98%; }
    .order-card-progress { width: 100%; min-width: unset; }
    .progress-bar { width: 100%; }
    .item-checkbox-label { min-width: unset; }
    .modal-tab-btn { padding: 10px; font-size: 12px; }
    .modal-tab-btn span { display: inline; }
}

/* Modal error banner */
.modal-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

/* Per-item live validation message */
.item-live-msg {
    flex-basis: 100%;
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    display: block;
}

.item-live-msg.ok {
    background: #d4edda;
    color: #155724;
}

.item-live-msg.warn {
    background: #fff3cd;
    color: #856404;
}

.item-live-msg.error {
    background: #f8d7da;
    color: #721c24;
}

/* ===== Output New Page Header ===== */
.output-header-card {
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 10px;
    padding: 18px 22px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.output-header-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.output-header-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.output-header-item label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 13px;
}

.output-header-item .order-number-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.output-header-item .order-number-prefix {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: #2c3e50;
    font-size: 15px;
    white-space: nowrap;
}

.output-header-item input[disabled] {
    background: #f4f7f9;
    color: #555;
}

/* Selected items bar */
.selected-items-bar {
    margin-top: 16px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: #fff;
    border-radius: 8px;
    padding: 12px 18px;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
}

.selected-bar-grid {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.selected-bar-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.selected-bar-item strong {
    font-size: 16px;
    color: #2ecc71;
    font-weight: 700;
}

/* Form tabs */
.form-tabs {
    display: flex;
    background: #ecf0f1;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.form-tab-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
}

.form-tab-btn:hover {
    background: #d5dbdf;
    color: #2c3e50;
}

.form-tab-btn.active {
    background: #fff;
    color: #2c3e50;
    border-bottom-color: #3498db;
    font-weight: 700;
}

.tab-pane.active,
.tab-pane.active.show {
    display: block !important;
    animation: fadeIn 0.2s ease;
}

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

/* Responsive */
@media (max-width: 768px) {
    .output-header-grid { grid-template-columns: 1fr; }
    .selected-bar-grid { flex-direction: column; align-items: flex-start; gap: 8px; }
    .form-tab-btn { padding: 10px; font-size: 12px; }
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    width: calc(100% - 40px);
    pointer-events: none;
}

.toast-notification {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    animation: slideInDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    direction: rtl;
    text-align: right;
    border-right: 5px solid rgba(255,255,255,0.3);
    min-height: 56px;
    pointer-events: auto;
    backdrop-filter: blur(10px);
}

.toast-notification.toast-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    border-right-color: #5cb85c;
    color: #fff;
}

.toast-notification.toast-error,
.toast-notification.toast-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border-right-color: #e57373;
    color: #fff;
}

.toast-notification.toast-error .toast-icon,
.toast-notification.toast-danger .toast-icon {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.toast-notification.toast-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    border-right-color: #ffcd39;
    color: #212529;
}

.toast-notification.toast-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border-right-color: #4fc3f7;
    color: #fff;
}

.toast-notification.toast-warning .toast-icon { color: #212529; }
.toast-notification.toast-info .toast-icon { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.2); }

.toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

.toast-notification.toast-hiding {
    animation: slideOutUp 0.3s ease-in forwards;
}

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

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

@media (max-width: 768px) {
    #toast-container {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: none;
        width: auto;
    }
    
    .toast-notification {
        font-size: 13px;
        padding: 12px 14px;
    }
}

.charts-section { margin-top: 30px; }
.charts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 20px; margin-top: 16px; }
.chart-card { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.chart-card h3 { margin: 0 0 14px; font-size: 15px; color: #2c3e50; }
@media (max-width: 600px) { .charts-grid { grid-template-columns: 1fr; } }
