:root {
    --ltc-navy: #23242A;
    --ltc-navy-light: #2d2e36;
    --ltc-navy-lighter: #383944;
    --ltc-orange: #F57C00;
    --ltc-orange-hover: #E06800;
    --ltc-orange-light: rgba(245, 124, 0, 0.1);
    --ltc-white: #FFFFFF;
    --ltc-gray: #6B7280;
    --ltc-gray-light: #F3F4F6;
    --ltc-gray-muted: #9CA3AF;
    --ltc-green: #22C55E;
    --ltc-red: #EF4444;
    --ltc-border: #E5E7EB;
    --ltc-bg: #F0F2F5;
    --ltc-text: #1F2937;
    --ltc-text-light: #4B5563;
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 64px;
    --transition-speed: 0.25s;
}

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

body {
    background-color: var(--ltc-bg);
    color: var(--ltc-text);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    font-size: 0.925rem;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}

body[dir="rtl"] {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ============ SIDEBAR ============ */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--ltc-navy);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width var(--transition-speed) ease;
    -webkit-overflow-scrolling: touch;
}

body[dir="rtl"] .sidebar {
    left: auto;
    right: 0;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.25rem;
    border-bottom: 1px solid var(--ltc-navy-lighter);
    min-height: 60px;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-brand-icon {
    font-size: 1.75rem;
    color: var(--ltc-orange);
    flex-shrink: 0;
}

.sidebar-brand-text {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ltc-white);
    letter-spacing: 0.5px;
    opacity: 1;
    transition: opacity var(--transition-speed) ease;
}

.sidebar.collapsed .sidebar-brand-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-nav {
    flex: 1;
    padding: 0.5rem 0;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    min-height: 44px;
}

body[dir="rtl"] .sidebar-link {
    border-left: none;
    border-right: 3px solid transparent;
}

.sidebar-link i {
    font-size: 1.15rem;
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-link span {
    opacity: 1;
    transition: opacity var(--transition-speed) ease;
}

.sidebar.collapsed .sidebar-link span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-link:hover {
    color: var(--ltc-white);
    background-color: rgba(245, 124, 0, 0.12);
    text-decoration: none;
}

.sidebar-link.active {
    color: var(--ltc-orange);
    background-color: rgba(245, 124, 0, 0.18);
    border-left-color: var(--ltc-orange);
    font-weight: 600;
}

body[dir="rtl"] .sidebar-link.active {
    border-left-color: transparent;
    border-right-color: var(--ltc-orange);
}

.sidebar-footer {
    border-top: 1px solid var(--ltc-navy-lighter);
    padding: 0.5rem 0;
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.25rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-user-info i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sidebar-user-info span {
    opacity: 1;
    transition: opacity var(--transition-speed) ease;
}

.sidebar.collapsed .sidebar-user-info span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-logout {
    color: var(--ltc-red) !important;
}

.sidebar-logout:hover {
    background-color: rgba(239, 68, 68, 0.12) !important;
    color: var(--ltc-red) !important;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1035;
}

.sidebar-overlay.active {
    display: block;
}

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

.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    background-color: var(--ltc-white);
    border-bottom: 1px solid var(--ltc-border);
    height: 56px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.top-header-left {
    display: flex;
    align-items: center;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.35rem;
    color: var(--ltc-navy);
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    border-radius: 6px;
    transition: background-color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

.sidebar-toggle:hover {
    background-color: var(--ltc-gray-light);
}

.top-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-header-lang {
    display: flex;
    gap: 0.25rem;
}

.lang-toggle-inactive-header {
    background-color: var(--ltc-gray-light);
    color: var(--ltc-gray);
}

.lang-toggle-inactive-header:hover {
    color: var(--ltc-navy);
    background-color: #E5E7EB;
}

.top-header-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ltc-text);
    font-size: 0.85rem;
    font-weight: 500;
}

.top-header-user i {
    color: var(--ltc-gray);
    font-size: 1.1rem;
}

/* ============ CONTENT WRAPPER ============ */

.content-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left var(--transition-speed) ease;
}

body[dir="rtl"] .content-wrapper {
    margin-left: 0;
    margin-right: var(--sidebar-width);
    transition: margin-right var(--transition-speed) ease;
}

body.sidebar-collapsed .content-wrapper {
    margin-left: var(--sidebar-collapsed-width);
}

body[dir="rtl"].sidebar-collapsed .content-wrapper {
    margin-left: 0;
    margin-right: var(--sidebar-collapsed-width);
}

.no-sidebar-wrapper {
    min-height: 100vh;
}

/* ============ MAIN CONTENT ============ */

.main-content {
    padding: 1.75rem 2rem;
    min-height: calc(100vh - 56px);
}

.page-title {
    color: var(--ltc-navy);
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--ltc-orange);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.page-title i {
    color: var(--ltc-orange);
}

/* ============ CARDS ============ */

.card {
    background-color: var(--ltc-white);
    border: 1px solid var(--ltc-border);
    border-radius: 12px;
    color: var(--ltc-text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.card-header {
    background-color: var(--ltc-navy) !important;
    border-bottom: 1px solid var(--ltc-border);
    font-weight: 600;
    color: var(--ltc-white);
    padding: 0.9rem 1.25rem;
    border-radius: 12px 12px 0 0 !important;
    font-size: 0.95rem;
}

.card-body {
    padding: 1.25rem;
}

.stat-card {
    background: var(--ltc-white);
    border: 1px solid var(--ltc-border);
    border-radius: 14px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

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

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.stat-card .stat-icon {
    font-size: 2rem;
    color: var(--ltc-orange);
    margin-bottom: 0.5rem;
    display: block;
    opacity: 0.8;
}

.stat-card .stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--ltc-navy);
    display: block;
    margin-bottom: 0.25rem;
    line-height: 1.2;
    word-break: break-all;
}

.stat-card .stat-label {
    font-size: 0.78rem;
    color: var(--ltc-gray);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    font-weight: 600;
}

/* ============ KPI CARDS ============ */

.kpi-card {
    background: var(--ltc-white);
    border: 1px solid var(--ltc-border);
    border-radius: 14px;
    padding: 1.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.kpi-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.kpi-card-icon.orange { background-color: rgba(245, 124, 0, 0.12); color: var(--ltc-orange); }
.kpi-card-icon.green { background-color: rgba(34, 197, 94, 0.12); color: var(--ltc-green); }
.kpi-card-icon.navy { background-color: rgba(35, 36, 42, 0.1); color: var(--ltc-navy); }
.kpi-card-icon.red { background-color: rgba(239, 68, 68, 0.1); color: var(--ltc-red); }
.kpi-card-icon.blue { background-color: rgba(59, 130, 246, 0.1); color: #3B82F6; }

.kpi-card-body {
    flex: 1;
    min-width: 0;
}

.kpi-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ltc-navy);
    line-height: 1.2;
    word-break: break-all;
}

.kpi-card-label {
    font-size: 0.8rem;
    color: var(--ltc-gray);
    font-weight: 500;
}

.kpi-card-sub {
    font-size: 0.75rem;
    color: var(--ltc-gray-muted);
    margin-top: 0.15rem;
}

/* ============ TABLES ============ */

.table {
    color: var(--ltc-text);
    margin-bottom: 0;
    width: max-content;
    min-width: 100%;
    table-layout: auto;
}

.table thead th {
    background-color: var(--ltc-navy) !important;
    color: var(--ltc-white);
    border-bottom: 2px solid var(--ltc-orange);
    font-weight: 600;
    padding: 0.8rem 1rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    vertical-align: middle;
}

.table tbody tr {
    background-color: var(--ltc-white);
    color: var(--ltc-text);
    transition: background-color 0.15s;
}

.table tbody tr:nth-child(even) {
    background-color: #FAFBFC;
}

.table tbody tr:hover {
    background-color: #F0F4FF;
}

.table tbody td {
    padding: 0.7rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--ltc-border);
    font-size: 0.875rem;
    white-space: nowrap;
}

.table-responsive {
    border-radius: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid var(--ltc-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    scrollbar-gutter: stable both-edges;
}

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

.table-responsive .table th,
.table-responsive .table td {
    text-overflow: clip;
}

.floating-table-scroll {
    position: fixed;
    bottom: 0.85rem;
    height: 18px;
    z-index: 1030;
    display: none;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid var(--ltc-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
    scrollbar-color: var(--ltc-orange) var(--ltc-gray-light);
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.floating-table-scroll.is-visible {
    display: block;
}

.floating-table-scroll-spacer {
    height: 1px;
}

.table-cell-wrap {
    white-space: normal !important;
    min-width: 12rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.table-cell-tight {
    white-space: nowrap !important;
    min-width: 7rem;
}

body[dir="rtl"] .table-responsive {
    direction: rtl;
}

body[dir="rtl"] .table-responsive .table {
    direction: rtl;
}

/* ============ MOBILE CARD TABLE ============ */

.mobile-card-list {
    display: none;
}

.mobile-booking-card {
    background: var(--ltc-white);
    border: 1px solid var(--ltc-border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.mobile-booking-card .mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
}

.mobile-booking-card .mobile-card-name {
    font-weight: 700;
    color: var(--ltc-navy);
    font-size: 1rem;
}

.mobile-booking-card .mobile-card-row {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--ltc-gray-light);
}

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

.mobile-booking-card .mobile-card-label {
    color: var(--ltc-gray);
    font-weight: 500;
}

.mobile-booking-card .mobile-card-value {
    font-weight: 600;
    color: var(--ltc-text);
    text-align: end;
}

.mobile-booking-card .mobile-card-actions {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--ltc-border);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mobile-booking-card .mobile-card-actions .btn {
    flex: 1;
    min-width: 0;
}

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

.btn {
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.btn-sm {
    padding: 0.3rem 0.65rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-primary {
    background-color: var(--ltc-orange) !important;
    border-color: var(--ltc-orange) !important;
    color: var(--ltc-white) !important;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--ltc-orange-hover) !important;
    border-color: var(--ltc-orange-hover) !important;
    box-shadow: 0 4px 12px rgba(245, 124, 0, 0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--ltc-white) !important;
    border: 1.5px solid var(--ltc-navy) !important;
    color: var(--ltc-navy) !important;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
}

.btn-secondary:hover {
    background-color: var(--ltc-navy) !important;
    color: var(--ltc-white) !important;
}

.btn-outline-primary {
    color: var(--ltc-orange) !important;
    border-color: var(--ltc-orange) !important;
}

.btn-outline-primary:hover {
    background-color: var(--ltc-orange) !important;
    color: var(--ltc-white) !important;
}

.btn-outline-secondary {
    color: var(--ltc-navy) !important;
    border-color: var(--ltc-navy) !important;
}

.btn-outline-secondary:hover {
    background-color: var(--ltc-navy) !important;
    color: var(--ltc-white) !important;
}

.btn-danger {
    background-color: var(--ltc-red) !important;
    border-color: var(--ltc-red) !important;
}

.btn-danger:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.btn-success {
    background-color: var(--ltc-green) !important;
    border-color: var(--ltc-green) !important;
}

.btn-success:hover {
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
}

.btn-export {
    background-color: #16A34A !important;
    border-color: #16A34A !important;
    color: var(--ltc-white) !important;
    font-weight: 600;
}

.btn-export:hover {
    background-color: #15803D !important;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.35);
}

/* ============ FORMS ============ */

.form-control,
.form-select {
    background-color: var(--ltc-white);
    border: 1.5px solid #D1D5DB;
    color: var(--ltc-text);
    border-radius: 8px;
    padding: 0.55rem 0.85rem;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 44px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--ltc-orange);
    box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.15);
    background-color: var(--ltc-white);
    color: var(--ltc-text);
}

.form-label {
    color: var(--ltc-navy);
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-check-input {
    min-width: 1.1rem;
    min-height: 1.1rem;
}

.form-check-input:checked {
    background-color: var(--ltc-orange);
    border-color: var(--ltc-orange);
}

.form-check-label {
    padding-top: 0.1rem;
}

/* ============ BADGES ============ */

.badge-pending {
    background: linear-gradient(135deg, #F59E0B, var(--ltc-orange)) !important;
    color: var(--ltc-white) !important;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.73rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-confirmed {
    background: linear-gradient(135deg, #34D399, var(--ltc-green)) !important;
    color: var(--ltc-white) !important;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.73rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-canceled {
    background: linear-gradient(135deg, #F87171, var(--ltc-red)) !important;
    color: var(--ltc-white) !important;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.73rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-active {
    background: linear-gradient(135deg, #34D399, var(--ltc-green)) !important;
    color: var(--ltc-white) !important;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.73rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-open {
    background: linear-gradient(135deg, #34D399, var(--ltc-green)) !important;
    color: var(--ltc-white) !important;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.73rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-closed {
    background: linear-gradient(135deg, #F87171, var(--ltc-red)) !important;
    color: var(--ltc-white) !important;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.73rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-void {
    background: linear-gradient(135deg, #9CA3AF, #6B7280) !important;
    color: var(--ltc-white) !important;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.73rem;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ============ MISC ============ */

.orange-text {
    color: var(--ltc-orange) !important;
}

.alert {
    border-radius: 10px;
    border: none;
    font-size: 0.875rem;
    padding: 0.85rem 1.15rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.alert-success {
    background-color: rgba(34, 197, 94, 0.1);
    color: #16A34A;
    border-left: 4px solid var(--ltc-green);
}

body[dir="rtl"] .alert-success {
    border-left: none;
    border-right: 4px solid var(--ltc-green);
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #DC2626;
    border-left: 4px solid var(--ltc-red);
}

body[dir="rtl"] .alert-danger {
    border-left: none;
    border-right: 4px solid var(--ltc-red);
}

.alert-warning {
    background-color: rgba(245, 124, 0, 0.1);
    color: #EA580C;
    border-left: 4px solid var(--ltc-orange);
}

body[dir="rtl"] .alert-warning {
    border-left: none;
    border-right: 4px solid var(--ltc-orange);
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.1);
    color: #2563EB;
    border-left: 4px solid #3B82F6;
}

body[dir="rtl"] .alert-info {
    border-left: none;
    border-right: 4px solid #3B82F6;
}

/* ============ LOGIN ============ */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ltc-navy) 0%, #1a1b20 100%);
    padding: 1rem;
}

.login-card {
    background-color: var(--ltc-white);
    border: 1px solid var(--ltc-border);
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.login-card .login-title {
    color: var(--ltc-orange);
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.login-card .login-subtitle {
    color: var(--ltc-gray);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.login-card .form-label {
    color: var(--ltc-navy);
}

/* ============ LANG TOGGLE ============ */

.lang-toggle {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    min-height: 32px;
    line-height: 1.6;
}

.lang-toggle-active {
    background-color: var(--ltc-orange);
    color: var(--ltc-white);
}

.lang-toggle-inactive {
    background-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
}

.lang-toggle-inactive:hover {
    color: var(--ltc-white);
    background-color: rgba(255, 255, 255, 0.25);
}

.lang-toggle-inactive-login {
    background-color: var(--ltc-gray-light);
    color: var(--ltc-gray);
}

.lang-toggle-inactive-login:hover {
    color: var(--ltc-navy);
    background-color: #E5E7EB;
}

.select-all-checkbox {
    cursor: pointer;
}

.amount-highlight {
    color: var(--ltc-orange);
    font-weight: 700;
}

.text-muted {
    color: var(--ltc-gray) !important;
}

/* ============ FILTER BAR ============ */

.filter-bar {
    background: var(--ltc-white);
    border: 1px solid var(--ltc-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* ============ PROFILE ============ */

.profile-header {
    background: linear-gradient(135deg, var(--ltc-navy) 0%, var(--ltc-navy-lighter) 100%);
    color: var(--ltc-white);
    padding: 2rem;
    border-radius: 14px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 16px rgba(35, 36, 42, 0.2);
}

.profile-header .profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    word-break: break-word;
}

.profile-header .profile-detail {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.payment-history-item {
    border-left: 3px solid var(--ltc-border);
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--ltc-gray-light);
    border-radius: 0 8px 8px 0;
    transition: background-color 0.15s;
}

.payment-history-item:hover {
    background: #E8EAF0;
}

body[dir="rtl"] .payment-history-item {
    border-left: none;
    border-right: 3px solid var(--ltc-border);
    border-radius: 8px 0 0 8px;
}

.payment-history-item.confirmed {
    border-left-color: var(--ltc-green);
}

body[dir="rtl"] .payment-history-item.confirmed {
    border-left-color: var(--ltc-border);
    border-right-color: var(--ltc-green);
}

.payment-history-item.pending {
    border-left-color: var(--ltc-orange);
}

body[dir="rtl"] .payment-history-item.pending {
    border-left-color: var(--ltc-border);
    border-right-color: var(--ltc-orange);
}

.payment-history-item.void {
    border-left-color: var(--ltc-gray);
    opacity: 0.6;
}

body[dir="rtl"] .payment-history-item.void {
    border-left-color: var(--ltc-border);
    border-right-color: var(--ltc-gray);
}

/* ============ PAGINATION ============ */

.pagination .page-link {
    color: var(--ltc-navy);
    border-color: var(--ltc-border);
    font-size: 0.85rem;
    border-radius: 6px;
    margin: 0 2px;
    min-width: 38px;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination .page-item.active .page-link {
    background-color: var(--ltc-orange);
    border-color: var(--ltc-orange);
    color: var(--ltc-white);
}

/* ============ SECTION HEADING ============ */

.section-heading {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ltc-navy);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-heading i {
    color: var(--ltc-orange);
}

/* ============ DASHBOARD SHORTCUTS ============ */

.dash-shortcut-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    background: var(--ltc-white);
    border: 1px solid var(--ltc-border);
    border-radius: 14px;
    padding: 1.25rem 0.75rem;
    text-decoration: none;
    color: var(--ltc-text);
    font-weight: 600;
    font-size: 0.82rem;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    min-height: 110px;
    position: relative;
    overflow: hidden;
}

.dash-shortcut-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--sc-color, var(--ltc-orange));
    opacity: 0;
    transition: opacity 0.2s;
}

.dash-shortcut-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    color: var(--ltc-text);
    text-decoration: none;
    border-color: var(--sc-color, var(--ltc-orange));
}

.dash-shortcut-card:hover::after {
    opacity: 1;
}

.dash-sc-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: color-mix(in srgb, var(--sc-color) 12%, transparent);
    color: var(--sc-color, var(--ltc-orange));
    transition: transform 0.2s;
}

.dash-shortcut-card:hover .dash-sc-icon {
    transform: scale(1.08);
}

/* ============ DASHBOARD MINI STATS ============ */

.dash-stat-mini {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: var(--ltc-white);
    border: 1px solid var(--ltc-border);
    border-radius: 12px;
    padding: 1rem 1.15rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.dash-stat-mini-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.dash-stat-mini-val {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--ltc-navy);
    line-height: 1.2;
}

.dash-stat-mini-lbl {
    font-size: 0.72rem;
    color: var(--ltc-gray);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.accounting-detail-card {
    display: block;
    min-height: 150px;
    padding: 1.15rem;
    border: 1px solid var(--ltc-border);
    border-radius: 16px;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
    color: inherit;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.accounting-detail-card:hover {
    color: inherit;
    transform: translateY(-2px);
    border-color: var(--ltc-orange);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.10);
}

.accounting-detail-title,
.accounting-detail-subtitle {
    display: block;
}

.accounting-detail-title {
    font-weight: 700;
    color: var(--ltc-gray-dark);
}

.accounting-detail-value {
    display: block;
    margin: 0.7rem 0 0.4rem;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--ltc-navy);
}

.accounting-detail-subtitle {
    color: var(--ltc-gray);
    font-size: 0.875rem;
}

/* ============ DASHBOARD ALERTS ============ */

.dash-alerts-card {
    overflow: hidden;
}

.dash-alert-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.25rem;
    text-decoration: none;
    transition: background-color 0.15s;
    border-bottom: 1px solid var(--ltc-border);
}

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

.dash-alert-row:hover {
    text-decoration: none;
}

.dash-alert-danger:hover { background: rgba(239,68,68,0.06); }
.dash-alert-warning:hover { background: rgba(245,158,11,0.06); }
.dash-alert-info:hover { background: rgba(59,130,246,0.06); }

.dash-alert-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.dash-alert-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.dash-alert-icon-wrap.danger { background: rgba(239,68,68,0.12); color: #EF4444; }
.dash-alert-icon-wrap.warning { background: rgba(245,158,11,0.12); color: #F59E0B; }
.dash-alert-icon-wrap.info { background: rgba(59,130,246,0.12); color: #3B82F6; }

.dash-alert-title {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--ltc-text);
}

.dash-alert-sub {
    font-size: 0.75rem;
    color: var(--ltc-gray);
    margin-top: 0.1rem;
}

.dash-alert-arrow {
    color: var(--ltc-gray-muted);
    font-size: 1rem;
    flex-shrink: 0;
}

/* ============ DASHBOARD SEARCH ============ */

.dash-search-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dash-search-icon {
    font-size: 1.25rem;
    color: var(--ltc-gray);
    flex-shrink: 0;
}

.dash-search-input {
    border: none !important;
    box-shadow: none !important;
    font-size: 0.95rem !important;
    padding: 0.5rem 0 !important;
    background: transparent !important;
    min-height: auto !important;
}

.dash-search-input:focus {
    border: none !important;
    box-shadow: none !important;
}

/* ============ DASHBOARD ACTIVITY ============ */

.dash-activity-list {
    max-height: 420px;
    overflow-y: auto;
}

.dash-activity-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--ltc-gray-light);
    transition: background 0.15s;
}

.dash-activity-item:last-child {
    border-bottom: none;
}

.dash-activity-item:hover {
    background: #FAFBFC;
}

a.dash-activity-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.dash-activity-link:hover {
    text-decoration: none;
    color: inherit;
    background: rgba(59,130,246,0.04);
}

.dash-activity-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.dash-activity-body {
    flex: 1;
    min-width: 0;
}

.dash-activity-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.dash-activity-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--ltc-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-activity-amount {
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

.dash-activity-meta {
    font-size: 0.72rem;
    color: var(--ltc-gray);
    margin-top: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.d-flex-responsive {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ============ TABLET (max-width: 992px) ============ */

@media (max-width: 992px) {
    .main-content {
        padding: 1.25rem 1.5rem;
    }

    .stat-card .stat-number {
        font-size: 1.8rem;
    }

    .kpi-card-value {
        font-size: 1.3rem;
    }

    .kpi-card-icon {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }

    .page-title {
        font-size: 1.25rem;
    }

    .card-body {
        padding: 1rem;
    }
}

/* ============ MOBILE (max-width: 768px) ============ */

@media (max-width: 768px) {
    .sidebar {
        left: 0;
        right: auto;
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
        transition: transform var(--transition-speed) ease;
    }

    body[dir="rtl"] .sidebar {
        left: auto;
        right: 0;
        transform: translateX(100%);
    }

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

    .sidebar.collapsed {
        width: var(--sidebar-width) !important;
    }

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

    body[dir="rtl"] .content-wrapper {
        margin-right: 0 !important;
    }

    .main-content {
        padding: 1rem 0.85rem;
    }

    .top-header {
        padding: 0 0.75rem;
        height: 52px;
    }

    .top-header-right {
        gap: 0.5rem;
    }

    .top-header-user span {
        display: none;
    }

    .top-header-user .badge {
        display: none;
    }

    .page-title {
        font-size: 1.15rem;
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
    }

    .card {
        border-radius: 10px;
    }

    .card-header {
        border-radius: 10px 10px 0 0 !important;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .card-body {
        padding: 0.85rem;
    }

    .stat-card {
        padding: 1rem;
        border-radius: 10px;
        margin-bottom: 0.5rem;
    }

    .stat-card .stat-number {
        font-size: 1.6rem;
    }

    .stat-card .stat-label {
        font-size: 0.7rem;
    }

    .stat-card:hover {
        transform: none;
    }

    .kpi-card {
        margin-bottom: 0.5rem;
        padding: 1rem;
        border-radius: 10px;
    }

    .kpi-card:hover {
        transform: none;
    }

    .kpi-card-icon {
        width: 42px;
        height: 42px;
        font-size: 1.15rem;
        border-radius: 10px;
    }

    .kpi-card-value {
        font-size: 1.2rem;
    }

    .kpi-card-label {
        font-size: 0.75rem;
    }

    .kpi-card-sub {
        font-size: 0.7rem;
    }

    .table-responsive {
        border-radius: 10px;
    }

    .table thead th {
        padding: 0.6rem 0.65rem;
        font-size: 0.7rem;
    }

    .table tbody td {
        padding: 0.55rem 0.65rem;
        font-size: 0.8rem;
    }

    .btn {
        padding: 0.55rem 1rem;
        font-size: 0.85rem;
        min-height: 44px;
    }

    .btn-sm {
        padding: 0.4rem 0.75rem;
        font-size: 0.78rem;
        min-height: 36px;
    }

    .form-control,
    .form-select {
        font-size: 16px;
        padding: 0.6rem 0.85rem;
        min-height: 48px;
    }

    .form-label {
        font-size: 0.75rem;
    }

    .form-check-input {
        min-width: 1.25rem;
        min-height: 1.25rem;
    }

    .form-check-label {
        font-size: 0.85rem;
    }

    .filter-bar {
        padding: 0.85rem;
        border-radius: 10px;
    }

    .profile-header {
        padding: 1.25rem;
        border-radius: 10px;
        margin-bottom: 1rem;
    }

    .profile-header .profile-name {
        font-size: 1.2rem;
    }

    .profile-header .profile-detail {
        font-size: 0.82rem;
    }

    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.82rem;
        border-radius: 8px;
    }

    .login-card {
        padding: 1.5rem;
        border-radius: 12px;
        margin: 0 0.5rem;
    }

    .login-card .login-title {
        font-size: 1.3rem;
    }

    .d-flex.justify-content-between.align-items-center {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .dash-shortcut-card {
        min-height: 90px;
        padding: 1rem 0.5rem;
        font-size: 0.75rem;
        border-radius: 10px;
    }

    .dash-sc-icon {
        width: 40px;
        height: 40px;
        font-size: 1.15rem;
    }

    .dash-stat-mini {
        padding: 0.75rem;
        gap: 0.6rem;
    }

    .dash-stat-mini-val {
        font-size: 1.2rem;
    }

    .dash-stat-mini-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .dash-alert-row {
        padding: 0.75rem 1rem;
    }

    .dash-alert-icon-wrap {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
    }

    .dash-alert-title {
        font-size: 0.82rem;
    }

    .dash-search-form {
        flex-wrap: wrap;
    }

    .dash-search-input {
        font-size: 16px !important;
    }

    .dash-activity-item {
        padding: 0.65rem 1rem;
        gap: 0.65rem;
    }

    .dash-activity-icon-wrap {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .dash-activity-name {
        font-size: 0.8rem;
    }

    .dash-activity-amount {
        font-size: 0.8rem;
    }

    .badge-pending,
    .badge-confirmed,
    .badge-canceled,
    .badge-active,
    .badge-open,
    .badge-closed,
    .badge-void {
        padding: 0.25rem 0.6rem;
        font-size: 0.65rem;
    }

    .payment-history-item {
        padding: 0.6rem 0.75rem;
        font-size: 0.82rem;
    }

    .mobile-card-list {
        display: block;
    }

    .desktop-table {
        display: none;
    }
}

/* ============ SMALL MOBILE (max-width: 480px) ============ */

@media (max-width: 480px) {
    .main-content {
        padding: 0.75rem 0.6rem;
    }

    .page-title {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .stat-card .stat-number {
        font-size: 1.35rem;
    }

    .kpi-card-value {
        font-size: 1.1rem;
    }

    .kpi-card-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .card-body {
        padding: 0.75rem;
    }

    .top-header-lang .lang-toggle {
        padding: 0.2rem 0.5rem;
        font-size: 0.7rem;
    }

    .login-card {
        padding: 1.25rem;
    }
}

/* ============ DESKTOP (min-width: 769px) ============ */

@media (min-width: 769px) {
    .sidebar-overlay {
        display: none !important;
    }

    .mobile-card-list {
        display: none !important;
    }
}

/* ============ PRINT ============ */

@media print {
    .sidebar, .sidebar-overlay, .top-header {
        display: none !important;
    }

    .content-wrapper {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .main-content {
        padding: 0;
    }
}
