.vehicle-profile-layout {
    display: grid;
    grid-template-columns: minmax(240px, 0.7fr) minmax(360px, 1.3fr);
    gap: 24px;
    align-items: start;
}
.vehicle-profile-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 22px;
}
.vehicle-profile-heading, .vehicle-spec-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.vehicle-type-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 13px;
    margin-top: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
}
.vehicle-type-item span, .vehicle-spec-row span { display: block; color: #64748b; font-size: 13px; margin-top: 4px; }
.vehicle-type-item.is-active { border-color: #0f766e; background: #f0fdfa; }
.vehicle-profile-form, .vehicle-spec-fields { display: grid; gap: 14px; }
.vehicle-profile-form label, .vehicle-spec-fields label { display: grid; gap: 7px; font-weight: 600; }
.vehicle-profile-form input, .vehicle-profile-form select, .vehicle-profile-form textarea,
.vehicle-spec-fields input, .vehicle-spec-fields select { width: 100%; }
.vehicle-check { display: flex !important; grid-template-columns: auto 1fr; align-items: center; }
.vehicle-check input { width: auto; }
.vehicle-spec-row { padding: 12px 0; border-bottom: 1px solid #e2e8f0; }
.vehicle-spec-form { margin-top: 20px; padding-top: 20px; border-top: 1px solid #e2e8f0; }
@media (max-width: 800px) { .vehicle-profile-layout { grid-template-columns: 1fr; } }
/* ============================================
   PROFESSIONAL OPERATIONS DASHBOARD CSS
   ============================================ */

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

/* ===== VARIABLES ===== */
:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --bg-input: #374151;
    --border: #4b5563;
    --border-hover: #2563eb;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --green: #22c55e;
    --blue: #3b82f6;
    --red: #ef4444;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.4);
    --radius: 10px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

 .none{
    display: none;
 }
/* زر القائمة */
.menu-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1200;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 14px;
    background: rgba(0, 76, 255, 0.95);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition), background var(--transition);
    box-shadow: var(--shadow-sm);
}

.header__item{
    cursor:pointer;
    display:flex;
    align-items:center;
    gap:6px;
}

.sort-icon{
    font-size:14px;
    width:15px;
}
.menu-btn:hover {
    transform: translateY(-1px);
    background: rgba(0, 38, 119, 0.9);
}

.menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 999px;
    margin: 3px 0;
}


/* القائمة */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    padding: 24px 20px 24px;
    background: linear-gradient(180deg, #0b1125 0%, #111827 100%);
    transform: translateX(-100%);
    transition: transform 0.35s ease;
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.35);

    display: flex;
    flex-direction: column;
    gap: 32px;
}

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

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;

    color: white;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 0.08em;
}

.logo-title {
    color: white;
    font-size: 18px;
    font-weight: 800;
}

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

.close-sidebar {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 10px;
    border-radius: 12px;
    transition: background var(--transition);
}

.close-sidebar:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 16px;
    transition: background var(--transition), color var(--transition), transform var(--transition);
    font-weight: 600;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(37, 99, 235, 0.15);
    color: white;
    transform: translateX(2px);
}

.nav-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 16px;
}

.sidebar-footer {
    margin-top: auto;
    padding: 18px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-label {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.footer-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.18);
    color: var(--green);
    font-size: 13px;
    font-weight: 700;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 1050;
}

.sidebar-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

body.sidebar-open {
    overflow: hidden;
}

body.sidebar-open .sidebar {
    transform: translateX(0);
}

body.sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
}

body.sidebar-open .top-controls,
body.sidebar-open .operations-wrapper,
body.sidebar-open .page-subtitle,
body.sidebar-open h1 {
    transition: margin-left var(--transition);
}

@media (min-width: 900px) {

    body.sidebar-open .top-controls,
    body.sidebar-open .operations-wrapper {
        margin-left: 300px;
    }
}

/* اللينكات */
.sidebar a {

    display: block;

    color: white;
    text-decoration: none;

    padding: 18px 25px;

    font-size: 17px;

    transition: .2s;
}


.sidebar a:hover {

    background: #2563eb;
    padding-left: 35px;

}


/* اللوجو */
.logo {

    position: absolute;
    top: 25px;
    left: 25px;

    color: white;
    font-size: 22px;
    font-weight: bold;

}

/* ===== BASE ===== */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a1a2e 50%, #16213e 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.login-page {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 36px;
    box-shadow: var(--shadow-lg);
}

.login-card h1 {
    margin-bottom: 12px;
    font-size: 32px;
    text-align: center;
}

.login-card .page-subtitle {
    margin-bottom: 24px;
    text-align: center;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.login-form input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.75);
    color: var(--text-primary);
}

.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.25);
}

.alert ul {
    list-style: disc;
    padding-left: 18px;
    color: var(--text-primary);
}

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

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

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

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

/* ===== HEADER ===== */
h1 {
    text-align: center;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 30px;
}

/* ===== TOP CONTROLS ===== */
.top-controls {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.date-filter-form {
    display: flex;
    align-items: center;
}

.date-filter-group {
    display: flex;
    margin-left: 50px;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.06);
    padding: 10px 14px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.date-nav-btn {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.date-filter-group label {
    color: var(--text-secondary);
    font-weight: 600;
}

.date-filter-group input {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 12px;
    min-width: 150px;
}

/* ===== ADD BUTTON ===== */
#openFormBtn {
    background: linear-gradient(135deg, #16a34a, #059669);
    color: white;
    border: none;
    padding: 14px 22px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(22, 163, 74, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 140px;
}

#openFormBtn::before {
    content: '+';
    font-size: 18px;
    font-weight: 300;
}

#openFormBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(22, 163, 74, 0.4);
}

/* ===== LAYOUT ===== */
.operations-wrapper {
    display: flex;
    flex-direction: row;
    gap: 24px;
    margin-top: 20px;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* Ensure both columns take EXACTLY equal space (50% each) */
.operations-left,
.operations-right {
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.bus-row {
    background: rgba(8, 111, 132, 0.08) !important;
    color: #102433 !important;
}

.microbus-row {
    background: rgba(234, 220, 18, 0.14) !important;
    color: #102433 !important;
}

.van-row {
    background: rgba(16, 31, 46, 0.07) !important;
    color: #102433 !important;
}
.limousine-row {
    background: rgba(8, 111, 132, 0.12) !important;
    color: #102433 !important;
}

/* ===== COLUMN HEADER ===== */
.column-header {
    background: var(--bg-card);
    padding: 16px 20px;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.column-title {
    font-weight: 700;
    font-size: 16px;
    color: #102433 !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.column-count {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    min-width: 36px;
    text-align: center;
}

/* ===== RIGHT SIDE - CARDS ===== */
#operationsRight {
    min-height: 500px;
    padding: 20px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-content: flex-start;
    justify-content: flex-start;
    background: rgba(30, 41, 59, 0.5);
    transition: var(--transition);
    width: 100%;
}

#operationsRight.drag-over {
    border-color: var(--border-hover);
    background: rgba(37, 99, 235, 0.08);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.1);
}

/* Operation Card */
.operation-card {
    flex: 0 0 calc(50% - 8px);
    min-width: 160px;
    max-width: 220px;
    min-height: 180px;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: grab;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.operation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    transition: var(--transition);
}

.operation-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 255, 255, 0.1);
}

.operation-card:active {
    cursor: grabbing;
}

/* Card Rows */
.card-row {
    padding: 7px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
    color: var(--text-primary);
}

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

/* Vehicle Colors for Cards */
.operation-card.bus-row::before {
    background: linear-gradient(90deg, var(--green), #16a34a);
}

.operation-card.microbus-row::before {
    background: linear-gradient(90deg, var(--blue), #6366f1);
}

.operation-card.van-row::before {
    background: linear-gradient(90deg, var(--red), #dc2626);
}

/* ===== LEFT SIDE - TABLE ===== */
#operationsLeft {
    min-height: 400px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);

    background: rgba(30, 41, 59, 0.3);
    transition: var(--transition);
}

#operationsLeft.drag-over {
    border-color: var(--border-hover);
    background: rgba(37, 99, 235, 0.08);
}

/* ===== SHARED GRID COLUMNS (Header + Row must always match) ===== */
.table-header,
.table-row {
    display: grid;
    grid-template-columns: 70px 160px 140px 140px 120px 100px 160px 140px 120px 60px;
    align-items: center;
    min-width: max-content;
}

/* Table Header */
.table-header {
    background: linear-gradient(135deg, #000, #1a1f35);
    padding: 12px 10px;
    gap:  auto !important;
    border-radius: var(--radius);
    margin-bottom: 10px;
}

.table-header a,
.table-header div {
    color: #ffffff !important;
    text-align: center;
    font-weight: 700;
    font-size: 12px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Allow horizontal scrolling for wide tables so columns stay in one row */
.table {
    width: 100%;
    overflow-x: auto;
}

/* Table Row */
.table-row {
    background: var(--bg-card);
    padding: 10px 10px;
    margin-bottom: 6px;
    border-radius: var(--radius);
    cursor: grab;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
    animation: slideIn 0.3s ease forwards;
}

.table-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: var(--radius) 0 0 var(--radius);
    transition: var(--transition);
}

.table-row:hover {
    background: var(--bg-card-hover);
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

.table-row:hover::before {
    background: linear-gradient(180deg, var(--primary), #6366f1);
}

.table-row:active {
    cursor: grabbing;
}

/* Vehicle Colors for Table Rows */
.table-row.bus-row {
    border-left: 4px solid var(--green);
}

.table-row.microbus-row {
    border-left: 4px solid var(--blue);
}

.table-row.van-row {
    border-left: 4px solid var(--red);
}

/* Row Cells */
.table-row>div {
    text-align: center;
    font-size: 13px;
    line-height: 1.4;
    padding: 4px 6px;
  
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-row>div:last-child {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
    min-width: 0;
}

/* ===== MODAL ===== */
#formModal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#formModal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    min-width: 400px;
}

#formModal.active .modal-content {
    transform: scale(1) translateY(0);
}

#modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 1000;
}

#modal.hidden {
    display: none !important;
}

.modal-content h2 {
    margin-bottom: 24px;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-content h2::before {
    content: '✏️';
}

/* ===== FORM ===== */
#operationForm {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#operationForm input,
#operationForm select,
#operationForm textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}

#operationForm input::placeholder,
#operationForm textarea::placeholder {
    color: var(--text-muted);
}

#operationForm input:hover,
#operationForm select:hover,
#operationForm textarea:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

#operationForm input:focus,
#operationForm select:focus,
#operationForm textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

#operationForm select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

#operationForm select option {
    background: var(--bg-dark);
    color: var(--text-primary);
}

/* ===== MODAL BUTTONS ===== */
.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.save-btn {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}
.savee{
    background-color: green;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}
.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}
.print-modal-overlay{
    display: none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);
   
    justify-content:center;
    align-items:center;
    z-index:9999;
    font-family:Arial,sans-serif;
}

.print-modal{
    width: 650px;
    max-width: 95%;
    max-height: 90vh;
    overflow: hidden;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,.2);
}

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

.print-body{
    padding: 22px 24px 24px;
    overflow-y: auto;
}

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

@media (max-width: 640px) {
    .print-modal {
        width: calc(100% - 32px);
    }

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

    .print-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .print-footer .btn {
        width: 100%;
    }
}

.print-header h2{
    margin:0;
    font-size:22px;
}

.close-btn{
    background:none;
    border:none;
    font-size:28px;
    cursor:pointer;
    color:#666;
}

.section{
    margin-bottom:20px;
}

.section-title{
    display:block;
    font-weight:bold;
    margin-bottom:12px;
    color:#444;
}

.radio-item,
.columns-grid label,
.section label{
    display:flex;
    align-items:center;
    gap:10px;
    cursor:pointer;
    color:#555;
    font-size:14px;
}

.radio-item input,
.columns-grid input{
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
}

hr{
    border:none;
    border-top:1px solid #eee;
    margin:22px 0;
}

.print-footer{
    display:flex;
    justify-content:flex-end;
    gap:12px;
    padding:20px;
    border-top:1px solid #eee;
}

.btn{
    border:none;
    padding:12px 22px;
    border-radius:10px;
    cursor:pointer;
    font-size:15px;
    font-weight:bold;
}

.cancel-btn{
    background:#ececec;
}

.print-btn{
    background:#2563eb;
    color:white;
}

.print-btn:hover{
    background:#1d4ed8;
}
/* ===========================
   PRINT MODAL
=========================== */
.back{
    background-color: green !important;
}
.print-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    font-family: Arial, sans-serif;
}

.print-modal {
    width: 700px;
    max-width: 95%;
    max-height: 90vh;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .2);
    animation: fadeIn .25s ease;
}

/* ===========================
   HEADER
=========================== */

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

.print-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #222;
}

.close-btn {
    background: none;
    border: none;
    font-size: 30px;
    color: #666;
    cursor: pointer;
    transition: .2s;
}

.close-btn:hover {
    color: #e53935;
}

/* ===========================
   BODY
=========================== */

.print-body {
    padding: 24px;
    max-height: 65vh;
    overflow-y: auto;
}

.section {
    margin-bottom: 25px;
}

.section-title {
    display: block;
    margin-bottom: 18px;
    font-size: 18px;
    font-weight: 600;
    color: #222;
}

/* ===========================
   OPTIONS GRID
=========================== */

.print-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 12px;
    cursor: pointer;
    transition: .25s;
    user-select: none;
}

.radio-item:hover {
    background: #eff6ff;
    border-color: #2563eb;
    transform: translateY(-2px);
}

.radio-item input {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
    cursor: pointer;
}

.radio-item span {
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

/* عند التحديد */

.radio-item:has(input:checked) {
    background: #2563eb;
    border-color: #2563eb;
}

.radio-item:has(input:checked) span {
    color: #fff;
}

/* ===== PRINT FORM - Improved layout & controls ===== */
.print-modal { direction: rtl; }
.print-body form label { display: block; margin-bottom: 6px; color: #222; font-weight: 600; text-align: right; }
.print-body h3 { margin-top: 6px; color: #222; }
.print-body .report-filter { display: flex; gap: 12px; align-items: center; }
.print-body .report-filter label { margin: 0; font-weight: 600; color: #444; }
.print-body .report-filter input[type="date"] { flex: 1; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; background: #fff; color: #222; }
.print-body select,
.print-body input[type="date"],
.print-body input[type="text"],
.print-body input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #222;
    box-shadow: none;
    font-size: 14px;
}
.print-body select { appearance: none; background-image: none; }
.print-body select option { color: #222; }
.print-body .columns-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
.print-body .section { margin-bottom: 16px; }
.print-modal .print-footer { padding: 16px; border-top: 1px solid #f1f1f1; background: #fafafa; }
.print-footer .btn { padding: 10px 16px; border-radius: 8px; }


/* ===========================
   FOOTER
=========================== */

.print-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 22px;
    margin-top: 25px;
    border-top: 1px solid #eee;
}

/* ===========================
   BUTTONS
=========================== */

.btn {
    border: none;
    padding: 12px 26px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: .25s;
}

.cancel-btn {
    background: #fff;
    color: #086f84;
    border: 1px solid rgba(8, 111, 132, 0.18);
}

.cancel-btn:hover {
    background: #ddd;
}

.print-btn {
    background: #2563eb;
    color: #fff;
}

.print-btn:hover {
    background: #1d4ed8;
}

/* ===========================
   SCROLLBAR
=========================== */

.print-body::-webkit-scrollbar {
    width: 8px;
}

.print-body::-webkit-scrollbar-thumb {
    background: #c5c5c5;
    border-radius: 20px;
}

.print-body::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ===========================
   RESPONSIVE
=========================== */

@media (max-width: 700px) {

    .print-modal {
        width: 95%;
    }

    .print-options {
        grid-template-columns: 1fr;
    }

    .print-footer {
        flex-direction: column-reverse;
    }

    .print-footer .btn {
        width: 100%;
    }
}

/* ===========================
   ANIMATION
=========================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}
.cancel-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 24px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}



/* ===== ANIMATIONS ===== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-15px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.operation-card {
    animation: fadeIn 0.3s ease forwards;
}

/* Stagger delays */
.operation-card:nth-child(1) {
    animation-delay: 0.05s;
}

.operation-card:nth-child(2) {
    animation-delay: 0.1s;
}

.operation-card:nth-child(3) {
    animation-delay: 0.15s;
}

.operation-card:nth-child(4) {
    animation-delay: 0.2s;
}

.operation-card:nth-child(5) {
    animation-delay: 0.25s;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .operations-wrapper {
        flex-direction: column;
    }

    .operations-left,
    .operations-right {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    h1 {
        font-size: 24px;
    }

    .table-header,
    .table-row {
        grid-template-columns: 60px 1fr 1fr 1fr 1fr 1fr 1fr 1fr 40px;
        font-size: 12px;
        padding: 10px;
    }

    .operation-card {
        width: 100%;
        max-width: 280px;
    }

    .modal-content {
        padding: 20px;
    }
}

element.style {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    min-width: 400px;
}

@media (max-width: 480px) {

    .table-header,
    .table-row {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }


    .table-header>div,
    .table-row>div {
        flex: 1 1 80px;
    }

    .operation-card {
        width: 100%;
    }
}

/* ===== UTILITY ===== */
.hidden {
    display: none !important;
}

/* ===== OPERATIONS UPGRADE ===== */
.operations-page {
    width: min(1600px, 100%);
    margin: 0 auto;
}

.operation-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
}

.operation-toolbar .date-filter-form {
    flex: 1 1 720px;
    flex-wrap: wrap;
    gap: 12px;
}

.operation-toolbar .date-filter-group {
    margin-left: 0;
}

.search-group {
    flex: 1 1 280px;
}

.search-group input,
.operation-toolbar select {
    min-height: 40px;
}

.toolbar-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 12px 18px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: var(--transition);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.operation-message {
    width: min(920px, 100%);
    min-height: 0;
    margin: 0 auto 14px;
    padding: 0;
    border-radius: var(--radius);
    opacity: 0;
    transform: translateY(-4px);
    transition: var(--transition);
}

.operation-message.visible {
    min-height: auto;
    padding: 12px 16px;
    opacity: 1;
    transform: translateY(0);
}

.operation-message.success {
    background: rgba(34, 197, 94, 0.14);
    border: 1px solid rgba(34, 197, 94, 0.28);
}

.operation-message.error {
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.28);
}

.operation-modal {
    width: min(960px, calc(100vw - 28px));
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.98);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-lg);
    z-index: 9999999999999999999999999999999 !important;
}

.operation-modal label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
}

.operation-modal h2::before {
    content: none;
}

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

.finance-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.vehicle-preview {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 13px;
}

.vehicle-preview strong {
    color: var(--text-primary);
}

.operation-board {
    align-items: flex-start;
}

.operations-table-grid {
    overflow-x: auto;
}

.operations-table-grid .table {
    min-width: 1240px;
}

.operations-table-grid .table-header,
.operations-table-grid .table-row {
    grid-template-columns:
        76px minmax(120px, 1.2fr) minmax(145px, 1.4fr) minmax(145px, 1.4fr) minmax(115px, 1fr) minmax(120px, 1.1fr) minmax(115px, 1fr) minmax(115px, 1fr) minmax(106px, 0.9fr) minmax(96px, 0.8fr) 86px;
}

.table-row.selected,
.operation-card.selected {
    outline: 2px solid rgba(250, 204, 21, 0.65);
    outline-offset: 2px;
}

.editable-cell {
    cursor: text;
}

.editable-cell:hover {
    color: white;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.inline-editor {
    width: 100%;
    min-width: 76px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.96);
    color: var(--text-primary);
}

.row-action {
    border: none;
    border-radius: 8px;
    padding: 8px 10px;
    color: white;
    cursor: pointer;
    font-weight: 700;
}

.row-action.danger {
    background: rgba(239, 68, 68, 0.85);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: rgba(148, 163, 184, 0.18);
    color: #dbeafe;
}

.status-pill.pending {
    background: rgba(250, 204, 21, 0.16);
    color: #fde68a;
}

.status-pill.in_progress {
    background: rgba(59, 130, 246, 0.18);
    color: #bfdbfe;
}

.status-pill.completed {
    background: rgba(34, 197, 94, 0.18);
    color: #bbf7d0;
}

.status-pill.cancelled {
    background: rgba(239, 68, 68, 0.18);
    color: #fecaca;
}

.status-pill.unpaid {
    background: rgba(239, 68, 68, 0.18);
    color: #fecaca;
}

.status-pill.partial {
    background: rgba(250, 204, 21, 0.16);
    color: #fde68a;
}

.status-pill.paid {
    background: rgba(34, 197, 94, 0.18);
    color: #bbf7d0;
}

.empty-state,
.details-empty {
    width: 100%;
    padding: 24px;
    color: var(--text-secondary);
    text-align: center;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.03);
}

.operation-details {
    margin: 24px auto 0;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
}

.details-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.details-header h2 {
    margin: 0 0 4px;
    font-size: 20px;
}

.details-header p {
    margin: 0;
    color: var(--text-secondary);
}

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

.details-grid>div {
    padding: 12px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.04);
}

.details-grid strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
}

.details-grid span {
    color: var(--text-primary);
    word-break: break-word;
}

@media (max-width: 900px) {

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

    .toolbar-actions,
    .operation-toolbar .date-filter-form,
    .operation-toolbar .date-filter-group {
        width: 100%;
    }

    .toolbar-actions>* {
        flex: 1 1 160px;
    }
}

/* ===== ACCOUNTING ===== */
.accounting-page {
    width: min(1600px, 100%);
    margin: 0 auto;
    padding: 20px;
}

.success-alert {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.28);
}

.accounting-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.accounting-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.summary-card,
.accounting-panel {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 18px;
}

.summary-card strong {
    display: block;
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.summary-card span {
    font-size: 22px;
    font-weight: 800;
}

.accounting-panel {
    margin-bottom: 22px;
}

.accounting-panel h2 {
    margin-bottom: 14px;
}

.settings-grid,
.ledger-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    align-items: end;
}

.settings-grid label,
.ledger-filters label {
    display: block;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 7px;
}

.settings-grid input,
.settings-grid select,
.ledger-filters input,
.ledger-filters select,
.inline-form select,
.payment-form input,
.payment-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.8);
    color: var(--text-primary);
}

.settings-wide {
    grid-column: 1 / -1;
}

.accounting-table {
    overflow-x: auto;
    overflow-y: hidden;
}

.accounting-table .table-header,
.accounting-table .table-row,
.accounting-table .table-content {
    min-width: max-content;
}

.wide-table .table-header,
.wide-table .table-row,
.wide-table .table-content {
    min-width: max-content;
}
.dashboard-cards{
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 20px;
    width: 100%;
    margin: 20px 0;
}

.card{
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
    min-width: 0;
}
.receipt-grid {
    grid-template-columns:
        minmax(130px, 1.1fr) 95px minmax(150px, 1.2fr) minmax(160px, 1.3fr) minmax(120px, 1fr) 100px 90px minmax(150px, 1.2fr) 100px 100px minmax(280px, 1.8fr) !important;
}

.vehicle-ledger-grid {
    grid-template-columns: minmax(220px, 2fr) minmax(140px, 1fr) 120px 120px 120px !important;
}

.ledger-grid {
    grid-template-columns:
        95px minmax(130px, 1fr) minmax(210px, 1.6fr) minmax(220px, 1.8fr) minmax(140px, 1fr) minmax(120px, 1fr) 110px 110px !important;
}

.inline-form {
    display: grid;
    grid-template-columns: minmax(92px, 1fr) auto;
    gap: 6px;
}

.payment-form {
    display: grid;
    grid-template-columns: 78px 120px 78px 80px auto;
    gap: 6px;
}

.mini-btn {
    border: none;
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.9);
    color: white;
    padding: 8px 10px;
    cursor: pointer;
    font-weight: 700;
}

/* ---------- Summary tiles ---------- */
.accounting-summary .summary-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
}

.accounting-summary .summary-card strong {
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
}

.accounting-summary .summary-card span {
    font-size: 24px !important;
    font-weight: 950 !important;
}

/* ---------- Toolbar / filters ---------- */
.operation-toolbar {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-end !important;
    justify-content: space-between !important;
    gap: 14px !important;
    margin-bottom: 20px !important;
    padding: 14px 16px !important;
}

.operation-toolbar .date-filter-form {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-end !important;
    gap: 14px !important;
    flex: 1 1 auto !important;
}

.date-filter-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}

.date-filter-group label {
    color: #5b6b78 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
}

.date-filter-group input,
.date-filter-group select {
    height: 40px !important;
    min-width: 150px !important;
    padding: 0 12px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(16, 31, 46, 0.14) !important;
    background: #fff !important;
    color: var(--brand-navy) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
}

.date-filter-group input:focus,
.date-filter-group select:focus {
    outline: none !important;
    border-color: var(--brand-teal) !important;
    box-shadow: 0 0 0 3px rgba(8, 111, 132, 0.14) !important;
}

.date-filter-group.search-group {
    flex: 1 1 220px !important;
    min-width: 220px !important;
}

.date-filter-group.search-group input {
    width: 100% !important;
    min-width: 0 !important;
}

.operation-toolbar .toolbar-actions {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

/* second toolbar row ("حجز جديد" / "الأسعار") */
.top-controls.operation-toolbar + .toolbar-actions,
.top-controls.operation-toolbar ~ .toolbar-actions {
    margin-top: 4px !important;
}

/* ---------- Bookings table ---------- */
.accounting-panel h2 {
    margin-bottom: 14px !important;
    color: var(--brand-navy) !important;
    font-size: 16px !important;
    font-weight: 900 !important;
}
.row-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.row-actions a {
    text-decoration: none;
}
.secondary-btn,
.mini-btn {
    border-color: rgba(8, 111, 132, 0.18);
}
.mini-btn {
    border: none;
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.9);
    color: white;
    padding: 8px 10px;
    cursor: pointer;
    font-weight: 700;
}
.accounting-table.wide-table {
    border-radius: 18px !important;
    overflow-x: auto !important;
}

.booking-grid {
    display: grid !important;
    grid-template-columns: repeat(19, minmax(140px, 1fr))!important ;
    min-width: 2240px !important;
}

.booking-grid.table-header {
    background: var(--brand-navy) !important;
}

.booking-grid.table-header > .header__item,
.booking-grid.table-row > div {
    min-width: 0 !important;
}

.booking-grid.table-header > div {
    padding: 12px 10px !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    border-inline-start: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.booking-grid.table-row {
    align-items: center !important;
    border-bottom: 1px solid rgba(16, 31, 46, 0.06) !important;
    background: #fff !important;
    transition: background 120ms ease !important;
}

.booking-grid.table-row:hover {
    background: rgba(245, 248, 248, 0.9) !important;
}

.booking-grid.table-row > div {
    padding: 11px 10px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
}

/* first column (booking number) reads as the row's identity */
.booking-grid.table-row > div:first-child {
    color: var(--brand-navy) !important;
    font-weight: 900 !important;
}


/* ---------- Responsive ---------- */
.booking-grid.table-header > div,
.booking-grid.table-row > div {
    text-align: center !important;
}


@media (max-width: 900px) {
    .operation-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .operation-toolbar .date-filter-form {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .operation-toolbar .toolbar-actions {
        justify-content: flex-end !important;
    }
}

/* 2026-08-01 page polish: stable booking table with clean actions */
.accounting-table.wide-table {
    border: 1px solid var(--shell-line, #dfe8ec) !important;
    border-radius: 18px !important;
    background: #fff !important;
}



.booking-grid.table-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 4 !important;
}

.booking-grid.table-row > div {
    color: #102433 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    border-inline-start: 1px solid rgba(16, 31, 46, 0.06) !important;
}

.booking-grid .row-actions,
.booking-grid.table-row > div.row-actions {
    
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    white-space: normal !important;
}

.booking-pagination,
.pagination {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    margin-top: 12px !important;
    padding: 12px !important;
    border: 1px solid var(--shell-line, #dfe8ec) !important;
    border-radius: 14px !important;
    background: #fff !important;
}

.booking-pagination a,
.pagination a,
.pagination button {
    min-width: 38px !important;
    min-height: 36px !important;
    border-radius: 10px !important;
    border: 1px solid rgba(8, 111, 132, 0.18) !important;
    background: #fff !important;
    color: #086f84 !important;
    font-weight: 900 !important;
    text-decoration: none !important;
}

.booking-pagination .active,
.pagination .active {
    background: #086f84 !important;
    color: #fff !important;
}

.booking-pagination .pagination-info,
.pagination .pagination-info {
    margin-inline-end: auto !important;
    color: #5b6b78 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
}

.booking-pagination .disabled,
.pagination .disabled {
    opacity: 0.42 !important;
    pointer-events: none !important;
}

.booking-pagination .pagination-gap,
.pagination .pagination-gap {
    min-width: 24px !important;
    color: #7a8994 !important;
    text-align: center !important;
    font-weight: 900 !important;
}

@media (max-width: 760px) {
    .booking-grid {
        min-width: 1600px !important;
    }
}


.muted-text {
    color: var(--text-muted);
}

@media (max-width: 760px) {
    .accounting-page {
        padding: 12px 0;
    }

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

/* ===== 2026 ERP PRO SHELL ===== */
:root {
    --bg-dark: #101012;
    --bg-card: rgba(24, 25, 28, 0.88);
    --bg-card-hover: rgba(34, 35, 39, 0.94);
    --bg-input: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.12);
    --border-hover: rgba(24, 184, 166, 0.72);
    --text-primary: #f7f7f4;
    --text-secondary: #b7bbc2;
    --text-muted: #7d838c;
    --green: #24c48e;
    --blue: #20a7bd;
    --red: #de6a57;
    --primary: #18b8a6;
    --primary-hover: #129c8e;
    --accent-metal: #d7c29a;
    --surface-light: rgba(255, 255, 255, 0.74);
    --surface-line: rgba(20, 20, 20, 0.08);
    --shell-width: 292px;
    --topbar-height: 78px;
    --radius: 12px;
    --radius-lg: 18px;
    --shadow-sm: 0 8px 24px rgba(18, 19, 21, 0.08);
    --shadow: 0 18px 50px rgba(18, 19, 21, 0.14);
    --shadow-lg: 0 30px 90px rgba(18, 19, 21, 0.22);
    --transition: 180ms ease;
}

html {
    background: #eef0f3;
}

body {
    min-height: 100vh;
    padding: 20px;
    color: #17181c;
    background:
        linear-gradient(145deg, #f7f8f9 0%, #ebeef1 48%, #f4f0e7 100%);
    background-attachment: fixed;
    font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: 0;
}

body.has-erp-shell {
    padding: calc(var(--topbar-height) + 18px) 22px 24px;
}

body.sidebar-open {
    overflow: hidden;
}

.erp-topbar {
    position: fixed;
    top: 14px;
    left: 16px;
    right: 16px;
    z-index: 1180;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.68);
    box-shadow: 0 18px 55px rgba(31, 33, 38, 0.16);
    backdrop-filter: blur(22px) saturate(1.25);
    -webkit-backdrop-filter: blur(22px) saturate(1.25);
}

.menu-btn {
    position: static;
    z-index: auto;
    width: 46px;
    height: 38px;
    flex: 0 0 46px;
    border: 1px solid rgba(15, 16, 18, 0.08);
    border-radius: 999px;
    background: #111215;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 12px 28px rgba(17, 18, 21, 0.18);
}

.menu-btn span {
    width: 17px;
    height: 2px;
    margin: 2px 0;
    background: currentColor;
}

.menu-btn:hover {
    transform: translateY(-1px);
    background: #25272b;
}

.erp-brand,
.logo {
    color: inherit;
    text-decoration: none;
}

.erp-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin-right: auto;
}

.erp-brand-mark,
.logo-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(145deg, #26282d, #0c0d0f);
    color: #f4e7c8;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 12px 28px rgba(17, 18, 21, 0.18);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

/* Vehicle Colors for Table Rows */
.table-row.bus-row {
    border-left: 4px solid var(--green);
}

.table-row.microbus-row {
    border-left: 4px solid var(--blue);
}

.table-row.van-row {
    border-left: 4px solid var(--red);
}

.erp-brand strong {
    display: block;
    color: #17181c;
    font-size: 15px;
    line-height: 1.15;
}

.erp-brand small {
    display: block;
    color: #737983;
    font-size: 11px;
    line-height: 1.15;
}

.erp-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.erp-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(36, 196, 142, 0.16);
}

.erp-user-name {
    color: #25272c;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
    font-size: 13px;
}

.erp-role-chip {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(16, 17, 19, 0.08);
    color: #17181c;
    font-size: 11px;
    font-weight: 900;
}

.sidebar {
    top: 90px;
    left: 16px;
    bottom: 16px;
    width: var(--shell-width);
    padding: 18px;
    border-radius: 28px;
    background:
        linear-gradient(155deg, rgba(43, 44, 49, 0.96), rgba(12, 13, 15, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 28px 80px rgba(17, 18, 21, 0.30);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateX(calc(-100% - 28px));
    gap: 20px;
    overflow: hidden;
}

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

.sidebar-header {
    align-items: center;
}

.sidebar .logo {
    position: static;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar .logo-mark {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 16px;
}

.logo-title {
    display: block;
    color: #fff;
    font-size: 16px;
    line-height: 1.2;
}

.logo-subtitle {
    display: block;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
}

.close-sidebar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.74);
}

.sidebar-menu {
    gap: 7px;
    overflow-y: auto;
    padding-right: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 10px 12px;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.70);
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 760;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.10);
    transform: translateX(0);
    padding-left: 12px;
}

.nav-item.active {
    box-shadow: inset 3px 0 0 var(--primary);
}

.nav-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.08);
    color: #f2dfb7;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.sidebar-footer {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-label {
    color: rgba(255, 255, 255, 0.56);
}

.footer-badge {
    background: rgba(24, 184, 166, 0.16);
    color: #9af5e9;
}

.sidebar-overlay {
    background: rgba(11, 12, 14, 0.42);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.mobile-tabbar {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 1160;
    display: none;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
    padding: 8px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.60);
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 18px 50px rgba(18, 19, 21, 0.20);
    backdrop-filter: blur(22px) saturate(1.25);
    -webkit-backdrop-filter: blur(22px) saturate(1.25);
}

.mobile-tab {
    min-width: 0;
    border: 0;
    border-radius: 20px;
    padding: 8px 4px;
    background: transparent;
    color: #626872;
    text-decoration: none;
    display: grid;
    place-items: center;
    gap: 2px;
    font: inherit;
}

.mobile-tab span {
    width: 28px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: inherit;
    font-size: 11px;
    font-weight: 900;
}

.mobile-tab small {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
    font-weight: 800;
}

.mobile-tab.active {
    background: #111215;
    color: #f7f7f4;
}

h1 {
    color: #17181c;
    background: none;
    -webkit-text-fill-color: currentColor;
    font-size: clamp(24px, 3vw, 38px);
    letter-spacing: 0;
}

.page-subtitle {
    color: #69707a;
}

.page-content,
.operations-page,
.accounting-page {
    max-width: none;
}

.page-content {
    margin-left: 0 !important;
    padding: 0 !important;
}

.page-header {
    margin-bottom: 20px;
}

.top-controls,
.operation-toolbar,
.accounting-actions,
.date-filter-group,
.summary-card,
.accounting-panel,
.operation-details,
.modal-content,
.table,
.login-card {
    border: 1px solid rgba(255, 255, 255, 0.68);
    background: rgba(255, 255, 255, 0.66);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(18px) saturate(1.15);
    -webkit-backdrop-filter: blur(18px) saturate(1.15);
}

.top-controls,
.operation-toolbar,
.accounting-actions {
    padding: 12px;
    border-radius: 24px;
}

.date-filter-group {
    border-radius: 18px;
    margin-left: 0;
    color: #17181c;
}

.date-filter-group label,
.settings-grid label,
.ledger-filters label,
#operationForm label {
    color: #4e555f;
}

input,
select,
textarea,
#operationForm input,
#operationForm select,
#operationForm textarea,
.settings-grid input,
.settings-grid select,
.ledger-filters input,
.ledger-filters select,
.date-filter-group input,
.date-filter-group select {
    min-height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(19, 20, 23, 0.10);
    background: rgba(255, 255, 255, 0.80);
    color: #17181c;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

input::placeholder,
textarea::placeholder {
    color: #8c939d;
}

button,
.save-btn,
.cancel-btn,
.secondary-btn {
    border-radius: 14px;
}

.save-btn,
#openFormBtn {
    background: linear-gradient(145deg, #101214, #303238);
    box-shadow: 0 14px 34px rgba(17, 18, 21, 0.20);
}

.secondary-btn,
.cancel-btn,
.date-nav-btn {
    background: #fff;
    color: #086f84;
    border: 1px solid rgba(19, 20, 23, 0.10);
}

.table {
    border-radius: 20px;
    overflow: hidden;
}

.table-header {
    background: #17181c;
    border-radius: 0;
}

.table-header a,
.table-header div {
    color: #f7f7f4 !important;
    letter-spacing: 0;
}

.table-row {

    color: #17181c;
    border: 1px solid rgba(19, 20, 23, 0.08);
    box-shadow: none;
}

.table-row:hover {
    background: #fff;
    box-shadow: 0 10px 28px rgba(18, 19, 21, 0.10);
}

.table-row>div,
.details-grid span,
.summary-card span {
    color: #17181c;
}

.operation-card,
.operation-details,
.summary-card,
.accounting-panel {
    border-radius: 20px;
}

.operation-card {
    background: linear-gradient(145deg, rgba(31, 32, 36, 0.96), rgba(15, 16, 18, 0.98));
    border-color: rgba(255, 255, 255, 0.10);
}

.operation-modal {
    background: rgba(255, 255, 255, 0.88);
    color: #17181c;
}

.vehicle-preview,
.details-grid>div {
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(19, 20, 23, 0.08);
}

.details-header h2,
.accounting-panel h2 {
    color: #17181c;
}

.details-header p,
.details-grid strong,
.summary-card strong {
    color: #69707a;
}

.alert {
    color: #17181c;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(239, 68, 68, 0.24);
}

.success-alert {
    border-color: rgba(34, 197, 94, 0.28);
}

.status-pill {
    color: #17181c;
}

@media (min-width: 1100px) {
    body.has-erp-shell {
        padding-left: calc(var(--shell-width) + 42px);
        padding-right: 28px;
    }

    .erp-topbar {
        left: calc(var(--shell-width) + 34px);
    }

    .menu-btn,
    .close-sidebar {
        display: none;
    }

    .sidebar {
        transform: translateX(0);
    }

    .page-content,
    .operations-page,
    .accounting-page {
        width: 100%;
    }

    body.sidebar-open .top-controls,
    body.sidebar-open .operations-wrapper {
        margin-left: auto;
    }
}

@media (max-width: 1099px) {
    body.has-erp-shell {
        padding-left: 14px;
        padding-right: 14px;
        padding-bottom: 108px;
    }

    .erp-topbar {
        left: 10px;
        right: 10px;
        top: 10px;
    }

    .sidebar {
        top: 82px;
        left: 10px;
        right: 10px;
        bottom: 92px;
        width: auto;
        max-width: 390px;
    }

    .mobile-tabbar {
        display: grid;
    }

    .erp-user-name {
        display: none;
    }

    .top-controls,
    .operation-toolbar {
        align-items: stretch;
    }
}

@media (max-width: 760px) {
    body.has-erp-shell {
        padding-top: 82px;
    }

    .erp-topbar {
        height: 54px;
        border-radius: 24px;
    }

    .erp-brand small,
    .erp-role-chip {
        display: none;
    }

    .erp-brand-mark {
        width: 36px;
        height: 36px;
        border-radius: 13px;
    }

    .top-controls,
    .operation-toolbar,
    .accounting-actions {
        border-radius: 18px;
    }

    .date-filter-form,
    .toolbar-actions {
        width: 100%;
    }

    .operations-wrapper {
        gap: 16px;
    }

    .page-header {
        margin-bottom: 14px;
    }

    h1 {
        text-align: left;
    }

    .page-subtitle {
        text-align: left;
    }
}

/* ===== BOOKING + RATES MODULE ===== */
.booking-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    align-items: end;
}

.booking-form-grid label {
    display: block;
    color: #4e555f;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 7px;
}

.booking-form-grid input,
.booking-form-grid select,
.booking-form-grid textarea {
    width: 100%;
    min-height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(19, 20, 23, 0.10);
    background: rgba(255, 255, 255, 0.80);
    color: #17181c;
    padding: 10px 12px;
}

.booking-grid {
    grid-template-columns:
        minmax(130px, 1fr) 95px 75px minmax(140px, 1.2fr) minmax(120px, 1fr) minmax(160px, 1.4fr) minmax(110px, 0.9fr) minmax(120px, 1fr) minmax(120px, 1fr) 90px 90px 110px minmax(260px, 1.7fr) !important;
}

.accounting-table.wide-table .table-header.booking {
    background: linear-gradient(135deg, rgba(59,130,246,0.95), rgba(99,102,241,0.95));
    border: 1px solid rgba(99,102,241,0.28);
    border-radius: 18px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.25);
}

.accounting-table.wide-table .table-header.booking > div {
    padding: 16px 14px;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.accounting-table.wide-table .table-row.booking {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    margin-bottom: 14px;
    padding: 14px;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}


.accounting-table.wide-table .table-row.booking > div {
    padding: 10px 12px;
    color: #f8fafc !important;
    font-size: 13px;
    line-height: 1.5;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.accounting-table.wide-table .table-row.booking:nth-child(odd) {
    background: rgba(15, 23, 42, 0.82);
}

.accounting-table.wide-table .table-content .empty-state {
    padding: 28px 18px;
    color: rgba(255, 255, 255, 0.72);
    text-align: center;
    font-weight: 700;
}

.booking-rate-grid {
    grid-template-columns:
        minmax(150px, 1.2fr) minmax(130px, 1fr) minmax(170px, 1.4fr) minmax(110px, 0.9fr) 105px 105px 95px 95px 90px minmax(190px, 1.3fr) !important;
}

.row-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.row-actions a {
    text-decoration: none;
}

.danger-mini {
    background: rgba(220, 74, 57, 0.9);
}

.status-pill.draft {
    background: rgba(107, 114, 128, 0.18);
    color: #374151;
}

.status-pill.confirmed {
    background: rgba(24, 184, 166, 0.18);
    color: #0f766e;
}

.status-pill.dispatched {
    background: rgba(59, 130, 246, 0.18);
    color: #1d4ed8;
}

.status-pill.inactive {
    background: rgba(107, 114, 128, 0.18);
    color: #4b5563;
}

.status-pill.active {
    background: rgba(34, 197, 94, 0.18);
    color: #15803d;
}

.logout-form {
    margin-top: 10px;
}

.logout-btn {
    width: 100%;
    border: 1px solid rgba(23, 24, 28, 0.12);
    background: rgba(255, 255, 255, 0.75);
    color: #17181c;
    border-radius: 12px;
    padding: 9px 12px;
    font-weight: 800;
    cursor: pointer;
}

.logout-btn:hover {
    background: rgba(220, 74, 57, 0.12);
    border-color: rgba(220, 74, 57, 0.28);
    color: #b42318;
}

/* ===== USER PERMISSIONS ===== */
.permissions-layout {
    display: grid;
    grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.8fr);
    gap: 18px;
    align-items: start;
}

.permission-user-list {
    display: grid;
    gap: 10px;
}

.permission-user-card {
    display: grid;
    gap: 4px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(23, 24, 28, 0.09);
    background: rgba(255, 255, 255, 0.78);
    color: #17181c;
    text-decoration: none;
}

.permission-user-card:hover,
.permission-user-card.active {
    border-color: rgba(24, 184, 166, 0.35);
    background: rgba(24, 184, 166, 0.10);
}

.permission-user-card span,
.permission-user-card small,
.permission-editor-head p {
    color: #68707d;
}

.permission-editor-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.permission-form {
    display: grid;
    gap: 16px;
}

.permission-group {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(23, 24, 28, 0.08);
    background: rgba(255, 255, 255, 0.58);
}

.permission-group h3 {
    margin: 0;
    color: #17181c;
    font-size: 16px;
}

.permission-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.permission-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(23, 24, 28, 0.08);
    background: rgba(255, 255, 255, 0.72);
}

.permission-check input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.permission-check span {
    display: grid;
    gap: 5px;
}

.permission-default {
    width: fit-content;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.13);
    color: #1d4ed8;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 800;
}

.permission-save-row {
    justify-content: flex-start;
}

@media (max-width: 860px) {
    .permissions-layout {
        grid-template-columns: 1fr;
    }
}

/* ===== WHITE SHARK BRAND THEME ===== */
:root {
    --brand-navy: #101f2e;
    --brand-navy-soft: #173247;
    --brand-teal: #086f84;
    --brand-teal-soft: #0b8198;
    --brand-yellow: #e8dc12;
    --brand-foam: #f5f8f8;
    --primary: var(--brand-teal);
    --primary-hover: #05596b;
    --border-hover: rgba(8, 111, 132, 0.58);
    --green: #0b8198;
    --blue: #086f84;
    --accent-metal: var(--brand-yellow);
}

body {
    background:
        radial-gradient(circle at 18% 8%, rgba(232, 220, 18, 0.16), transparent 28%),
        radial-gradient(circle at 92% 12%, rgba(8, 111, 132, 0.13), transparent 34%),
        linear-gradient(145deg, #f8faf9 0%, #edf4f5 48%, #f5f2d8 100%);
}

.erp-topbar {
    border-color: rgba(8, 111, 132, 0.15);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 48px rgba(16, 31, 46, 0.13);
}

.brand-logo-frame {
    background: #fff !important;
    border-color: rgba(8, 111, 132, 0.18) !important;
    overflow: hidden;
    padding: 3px;
    display: grid;
    place-items: center;
}

.brand-logo-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.erp-brand-mark.brand-logo-frame {
    width: 76px;
    height: 44px;
    border-radius: 14px;
}

.sidebar .logo-mark.brand-logo-frame {
    width: 88px;
    height: 58px;
    border-radius: 16px;
    flex-basis: 88px;
}

.erp-brand strong,
.logo-title {
    color: var(--brand-navy);
}

.erp-brand small {
    color: var(--brand-teal);
    font-weight: 800;
}

.sidebar {
    background:
        linear-gradient(158deg, rgba(23, 50, 71, 0.98), rgba(12, 25, 38, 0.99));
    border-color: rgba(232, 220, 18, 0.16);
    box-shadow: 0 28px 80px rgba(16, 31, 46, 0.32);
}

.sidebar .logo-title {
    color: #fff;
}

.logo-subtitle,
.sidebar .logo-subtitle {
    color: rgba(232, 220, 18, 0.86);
}

.menu-btn,
.save-btn,
button.save-btn,
.print-btn {
    background: linear-gradient(145deg, var(--brand-teal), #064f60) !important;
    color: #fff !important;
}

.menu-btn:hover,
.save-btn:hover,
button.save-btn:hover {
    background: linear-gradient(145deg, var(--brand-teal-soft), var(--brand-navy)) !important;
}

.secondary-btn,
.mini-btn {
    border-color: rgba(8, 111, 132, 0.18);
}

.nav-icon,
.mobile-tab span {
    background: rgba(232, 220, 18, 0.14);
    color: #f7ee38;
}

.nav-item:hover,
.nav-item.active,
.permission-user-card:hover,
.permission-user-card.active {
    background: rgba(8, 111, 132, 0.20);
    border-color: rgba(232, 220, 18, 0.24);
}

.nav-item.active {
    box-shadow: inset 3px 0 0 var(--brand-yellow);
}

.erp-status-dot,
.footer-badge {
    background: var(--brand-yellow);
    color: var(--brand-navy);
    box-shadow: 0 0 0 4px rgba(232, 220, 18, 0.18);
}

.erp-role-chip,
.status-pill.active,
.status-pill.confirmed {
    background: rgba(8, 111, 132, 0.12);
    color: var(--brand-teal);
}

.login-card {
    border: 1px solid rgba(8, 111, 132, 0.16);
    border-top: 5px solid var(--brand-yellow);
    background: rgba(255, 255, 255, 0.82);
}

.login-logo {
    display: block;
    width: min(280px, 100%);
    height: auto;
    margin: 0 auto 18px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(16, 31, 46, 0.10);
}

.login-card h1 {
    color: var(--brand-navy);
    background: none;
    -webkit-text-fill-color: currentColor;
}

.login-card .page-subtitle,
.page-subtitle {
    color: #516171;
}

.accounting-panel,
.summary-card,
.permission-group,
.permission-check,
.permission-user-card,
.top-controls,
.operation-details,
.table,
.login-card {
    box-shadow: 0 16px 42px rgba(16, 31, 46, 0.08);
}

@media (max-width: 640px) {
    .erp-brand-mark.brand-logo-frame {
        width: 58px;
        height: 36px;
    }

    .sidebar .logo-mark.brand-logo-frame {
        width: 76px;
        height: 50px;
        flex-basis: 76px;
    }
}

/* ===== DASHBOARD HOME ===== */
.dashboard-page {
    display: grid;
    gap: 18px;
}

.dashboard-summary {
    margin-bottom: 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.dashboard-panel {
    min-width: 0;
}

.dashboard-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.dashboard-panel-head h2,
.dashboard-panel h2 {
    margin: 0;
}

.dashboard-list {
    display: grid;
    gap: 10px;
}

.dashboard-operation-card {
    display: grid;
    gap: 8px;
    padding: 13px;
    border-radius: 16px;
    border: 1px solid rgba(8, 111, 132, 0.10);
    background: rgba(255, 255, 255, 0.72);
}

.dashboard-operation-card>div:first-child {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.dashboard-operation-card strong {
    color: var(--brand-navy);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-operation-card span,
.dashboard-operation-card small {
    color: #596778;
}

.dashboard-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.dashboard-card-meta>span:first-child {
    min-width: 54px;
    font-weight: 900;
    color: var(--brand-teal);
}

.dashboard-table .table-content {
    max-height: 520px;
    overflow: auto;
}

.dashboard-credit-grid {
    grid-template-columns: minmax(180px, 1.5fr) 100px 140px !important;
}

.dashboard-rank-grid {
    grid-template-columns: minmax(150px, 1.3fr) minmax(120px, 1fr) 100px 100px !important;
}

@media (max-width: 980px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-credit-grid,
    .dashboard-rank-grid {
        min-width: 620px;
    }
}

/* ===== ARABIC ERP WHITE BACKGROUND OVERRIDE ===== */
html,
body {
    background: #fff !important;
}

/* ===== OPERATIONS TABLE HORIZONTAL SCROLL OVERRIDE ===== */
.operations-table {
    border: 1px solid rgba(19, 20, 23, 0.12) !important;
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 15px;
}

.operations-table .table {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-color: #3b82f6 #f1f5f9 !important;
    scrollbar-width: auto !important;
}

/* Custom blue scrollbar for Chrome, Safari, and Edge */
.operations-table .table::-webkit-scrollbar {
    height: 10px !important;
}

.operations-table .table::-webkit-scrollbar-track {
    background: #f1f5f9 !important;
    border-radius: 6px !important;
}

.operations-table .table::-webkit-scrollbar-thumb {
    background: #3b82f6 !important;
    border-radius: 6px !important;
    border: 2px solid #f1f5f9 !important;
}

.operations-table .table::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8 !important;
}

.operations-table .table-content,
.operations-table #operationsLeft {
    width: max-content !important;
    min-width: 100% !important;
}

.table-header {
    display: grid !important;
    grid-template-columns: 70px 160px 140px 140px 120px 100px 160px 140px 120px 60px !important;
    width: max-content !important;
    min-width: 100% !important;
    overflow-x: visible !important;
}

.operations-table .table-header>div,
.operations-table .table-row>div {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.operations-table .table-row>div:last-child {
    overflow: visible !important;
}

/* ===== RESPONSIVE MASTER-DATA AND RATE TABLES ===== */
.erp-workspace,
.rate-management-page {
    min-width: 0 !important;
    max-width: 100% !important;
}

.erp-table,
.rate-management-page .accounting-table.wide-table {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

.erp-table .table-content,
.rate-management-page .accounting-table .table-content {
    width: 100% !important;
    min-width: 0 !important;
}

.erp-table .table-header,
.erp-table .table-row,
.rate-management-page .booking-rate-grid {
    width: 100% !important;
    min-width: 0 !important;
}

.erp-table .table-header > div,
.erp-table .table-row > div,
.rate-management-page .booking-rate-grid > div {
    min-width: 0 !important;
    overflow-wrap: anywhere;
}

.erp-table--drivers .table-header,
.erp-table--drivers .table-row {
    grid-template-columns: 1.05fr .9fr 1.2fr .9fr .85fr .8fr .7fr .95fr 1.05fr !important;
}

.erp-table--vehicles .table-header,
.erp-table--vehicles .table-row {
    grid-template-columns: 1.1fr .7fr .85fr .85fr .7fr .9fr .7fr 1.05fr !important;
}

.erp-table--companies .table-header,
.erp-table--companies .table-row {
    grid-template-columns: 1.05fr .9fr .8fr 1.1fr 1.2fr .7fr 1.1fr 1fr !important;
}

.erp-table--suppliers .table-header,
.erp-table--suppliers .table-row {
    grid-template-columns: 1.2fr 1fr .9fr 1fr 1.1fr !important;
}

.erp-table--locations .table-header,
.erp-table--locations .table-row {
    grid-template-columns: .45fr 1.6fr 1fr 1fr 1fr !important;
}

.erp-table--users .table-header,
.erp-table--users .table-row {
    grid-template-columns: 1.05fr 1.35fr .8fr .75fr 1fr 1.1fr !important;
}

.erp-table--reviews .table-header,
.erp-table--reviews .table-row {
    grid-template-columns: .8fr 1.3fr .8fr 1.1fr !important;
}

.company-rate-page .booking-rate-grid {
    grid-template-columns: 1.3fr 1fr .85fr .85fr .7fr 1.1fr !important;
}

.supplier-rate-page .booking-rate-grid {
    grid-template-columns: 1.3fr 1fr .8fr .8fr .7fr .8fr 1.1fr !important;
}

@media (max-width: 760px) {
    .erp-table {
        overflow-x: visible !important;
    }

    .erp-table .table-header {
        display: none !important;
    }

    .erp-table .table-row {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 0 !important;
        width: 100% !important;
        margin-bottom: 12px !important;
        padding: 8px 12px !important;
        overflow: visible !important;
        cursor: default;
    }

    .erp-table .table-row:hover {
        transform: none;
    }

    .erp-table .table-row > div {
        display: grid;
        grid-template-columns: minmax(92px, .75fr) minmax(0, 1.25fr);
        gap: 10px;
        align-items: center;
        width: 100%;
        padding: 9px 0 !important;
        border-bottom: 1px solid rgba(15, 23, 42, .08);
        text-align: start !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
    }

    .erp-table .table-row > div:last-child {
        border-bottom: 0;
    }

    .erp-table .table-row > div::before {
        color: var(--brand-teal, #087286);
        font-size: 11px;
        font-weight: 900;
    }

    .erp-table--drivers .table-row > div:nth-child(1)::before { content: "الاسم"; }
    .erp-table--drivers .table-row > div:nth-child(2)::before { content: "التليفون"; }
    .erp-table--drivers .table-row > div:nth-child(3)::before { content: "البريد الإلكتروني"; }
    .erp-table--drivers .table-row > div:nth-child(4)::before { content: "الرخصة"; }
    .erp-table--drivers .table-row > div:nth-child(5)::before { content: "تاريخ الرخصة"; }
    .erp-table--drivers .table-row > div:nth-child(6)::before { content: "درجة الرخصة"; }
    .erp-table--drivers .table-row > div:nth-child(7)::before { content: "الحالة"; }
    .erp-table--drivers .table-row > div:nth-child(8)::before { content: "تاريخ الإنشاء"; }
    .erp-table--drivers .table-row > div:nth-child(9)::before { content: "إجراءات"; }

    .erp-table--vehicles .table-row > div:nth-child(1)::before { content: "الاسم"; }
    .erp-table--vehicles .table-row > div:nth-child(2)::before { content: "الكود"; }
    .erp-table--vehicles .table-row > div:nth-child(3)::before { content: "الكود الداخلي"; }
    .erp-table--vehicles .table-row > div:nth-child(4)::before { content: "الرخصة"; }
    .erp-table--vehicles .table-row > div:nth-child(5)::before { content: "اللون"; }
    .erp-table--vehicles .table-row > div:nth-child(6)::before { content: "النوع"; }
    .erp-table--vehicles .table-row > div:nth-child(7)::before { content: "الحالة"; }
    .erp-table--vehicles .table-row > div:nth-child(8)::before { content: "إجراءات"; }

    .erp-table--companies .table-row > div:nth-child(1)::before { content: "الاسم"; }
    .erp-table--companies .table-row > div:nth-child(2)::before { content: "مسؤول التواصل"; }
    .erp-table--companies .table-row > div:nth-child(3)::before { content: "التليفون"; }
    .erp-table--companies .table-row > div:nth-child(4)::before { content: "البريد الإلكتروني"; }
    .erp-table--companies .table-row > div:nth-child(5)::before { content: "العنوان"; }
    .erp-table--companies .table-row > div:nth-child(6)::before { content: "الحالة"; }
    .erp-table--companies .table-row > div:nth-child(7)::before { content: "ملاحظات"; }
    .erp-table--companies .table-row > div:nth-child(8)::before { content: "إجراءات"; }

    .erp-table--suppliers .table-row > div:nth-child(1)::before { content: "الاسم"; }
    .erp-table--suppliers .table-row > div:nth-child(2)::before { content: "التليفون"; }
    .erp-table--suppliers .table-row > div:nth-child(3)::before { content: "نوع الحساب"; }
    .erp-table--suppliers .table-row > div:nth-child(4)::before { content: "تاريخ الإنشاء"; }
    .erp-table--suppliers .table-row > div:nth-child(5)::before { content: "إجراءات"; }

    .erp-table--locations .table-row > div:nth-child(1)::before { content: "الكود"; }
    .erp-table--locations .table-row > div:nth-child(2)::before { content: "الاسم"; }
    .erp-table--locations .table-row > div:nth-child(3)::before { content: "إجراءات"; }

    .erp-table--users .table-row > div:nth-child(1)::before { content: "الاسم"; }
    .erp-table--users .table-row > div:nth-child(2)::before { content: "البريد الإلكتروني"; }
    .erp-table--users .table-row > div:nth-child(3)::before { content: "الدور"; }
    .erp-table--users .table-row > div:nth-child(4)::before { content: "الحالة"; }
    .erp-table--users .table-row > div:nth-child(5)::before { content: "تاريخ الإنشاء"; }
    .erp-table--users .table-row > div:nth-child(6)::before { content: "إجراءات"; }

    .erp-table--reviews .table-row > div:nth-child(1)::before { content: "كود العملية"; }
    .erp-table--reviews .table-row > div:nth-child(2)::before { content: "اسم المستخدم"; }
    .erp-table--reviews .table-row > div:nth-child(3)::before { content: "الحالة"; }
    .erp-table--reviews .table-row > div:nth-child(4)::before { content: "تاريخ المراجعة"; }

    .rate-management-page .accounting-table.wide-table {
        overflow-x: visible !important;
    }

    .rate-management-page .booking-rate-grid.table-header {
        display: none !important;
    }

    .rate-management-page .booking-rate-grid.table-row {
        display: grid !important;
        grid-template-columns: 1fr !important;
        width: 100% !important;
        min-width: 0 !important;
        padding: 8px 12px !important;
    }

    .rate-management-page .booking-rate-grid.table-row > div {
        display: grid;
        grid-template-columns: minmax(92px, .75fr) minmax(0, 1.25fr);
        gap: 10px;
        align-items: center;
        padding: 9px 0 !important;
        border-bottom: 1px solid rgba(15, 23, 42, .08);
        text-align: start !important;
    }

    .rate-management-page .booking-rate-grid.table-row > div:last-child {
        border-bottom: 0;
    }

    .rate-management-page .booking-rate-grid.table-row > div::before {
        color: var(--brand-teal, #087286);
        font-size: 11px;
        font-weight: 900;
    }

    .company-rate-page .booking-rate-grid.table-row > div:nth-child(1)::before { content: "البيان"; }
    .company-rate-page .booking-rate-grid.table-row > div:nth-child(2)::before { content: "نوع المركبة"; }
    .company-rate-page .booking-rate-grid.table-row > div:nth-child(3)::before { content: "سعر الشركة"; }
    .company-rate-page .booking-rate-grid.table-row > div:nth-child(4)::before { content: "إكرامية الشركة"; }
    .company-rate-page .booking-rate-grid.table-row > div:nth-child(5)::before { content: "الحالة"; }
    .company-rate-page .booking-rate-grid.table-row > div:nth-child(6)::before { content: "إجراء"; }

    .supplier-rate-page .booking-rate-grid.table-row > div:nth-child(1)::before { content: "البيان"; }
    .supplier-rate-page .booking-rate-grid.table-row > div:nth-child(2)::before { content: "نوع المركبة"; }
    .supplier-rate-page .booking-rate-grid.table-row > div:nth-child(3)::before { content: "التكلفة"; }
    .supplier-rate-page .booking-rate-grid.table-row > div:nth-child(4)::before { content: "الإكرامية"; }
    .supplier-rate-page .booking-rate-grid.table-row > div:nth-child(5)::before { content: "الحالة"; }
    .supplier-rate-page .booking-rate-grid.table-row > div:nth-child(6)::before { content: "الاعتماد"; }
    .supplier-rate-page .booking-rate-grid.table-row > div:nth-child(7)::before { content: "إجراء"; }
}
