/* ============================================
   RENTAL CRM BACKOFFICE - STYLES
   Theme variables, base, components. Responsive in responsive.css
   Structure aligned with RentalCRM.Rentals/wwwroot/css/styles.css
   ============================================ */

/* --------------------------------------------
   1. THEME VARIABLES (kế thừa palette Rentals + alias BackOffice)
   -------------------------------------------- */
:root {
  /* Primary */
  --primary-color: #0066cc;
  --primary-dark: #0052a3;
  --primary-light: #338fff;
  --brand-primary: var(--primary-color);
  --brand-primary-dark: var(--primary-dark);
  --brand-primary-light: var(--primary-light);
  --brand-primary-lighter: #66a3e0;
  --brand-primary-lightest: #e6f2ff;

  /* Secondary / Accent */
  --secondary-color: #e55a00;
  --secondary-light: #f97316;
  --secondary-dark: #c2410c;
  --brand-secondary: #ff6600;
  --brand-secondary-dark: #cc5200;
  --brand-secondary-light: #ff8533;
  --brand-secondary-lighter: #ffa366;
  --brand-secondary-lightest: #ffe6d6;
  --brand-secondary-darker: #b34700;

  /* Status */
  --success-color: #16a34a;
  --success-light: #22c55e;
  --danger-color: #dc3545;
  --warning-color: #f97316;
  --brand-success: #00cc66;
  --brand-warning: #ff9900;
  --brand-danger: #cc0000;
  --brand-info: var(--primary-color);
  --brand-accent: var(--brand-success);
  --brand-accent-lightest: #d6ffe6;

  /* Neutrals */
  --text-primary: #1a1a1a;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --brand-text-primary: var(--text-primary);
  --brand-text-secondary: #666666;
  --brand-text-light: #999999;
  --brand-text-inverse: #ffffff;
  --brand-neutral-dark: #1a1a1a;
  --brand-neutral-darker: #2d2d2d;
  --brand-neutral-gray: #666666;
  --brand-neutral-light: #e6e6e6;
  --brand-neutral-lighter: #f5f5f5;
  --brand-neutral-lightest: #fafafa;

  /* Backgrounds */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f1f5f9;
  --brand-bg-primary: var(--bg-primary);
  --brand-bg-secondary: #f5f5f5;
  --brand-bg-accent: #e6f2ff;

  /* Borders */
  --border-color: #e5e7eb;
  --border-light: #f3f4f6;
  --border-neutral: #e9ecef;

  /* Semantic (kế thừa từ palette, dễ bảo trì) */
  --danger-bg: #ffe6e6;
  --danger-border: #ffcccc;
  --warning-bg: #fff3cd;
  --warning-border: #ffeaa7;
  --info-cyan: #0dcaf0;
  --success-bg: #e8f5e9;
  --text-muted: var(--brand-text-secondary);

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Typography */
  --font-xs: 0.75rem;
  --font-sm: 0.875rem;
  --font-base: 1rem;
  --font-lg: 1.125rem;
  --font-xl: 1.25rem;
  --font-2xl: 1.5rem;
  --font-semibold: 600;
  --font-bold: 700;
  --line-tight: 1.2;
  --line-normal: 1.5;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;

  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;

  /* Layout BackOffice */
  --sidebar-width: 260px;
  --header-height: 56px;

  /* Derived / semantic (tránh hardcode trong component) */
  --table-border: #f0f0f0;
  --danger-hover: #c82333;
  --danger-hover-border: #bd2130;
  --danger-light: #ff6b7a;
  --input-border-hover: #d0d0d0;
  --timeline-line: #e0e0e0;
  --calendar-booked-bg: #ffeaa7;
  --calendar-booked-border: #d4a574;
  --calendar-free-bg: #e9ecef;
  --calendar-free-border: #adb5bd;
  --result-motorbike-bg: #e3f2fd;
  --result-contract-bg: #f3e5f5;
  --result-contract-color: var(--result-contract-color);
  --avatar-gradient-start: #667eea;
  --avatar-gradient-end: #764ba2;
}

/* --------------------------------------------
   2. BASE & RESET
   -------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 14px;
  overflow-x: hidden;
  max-width: 100%;
  position: relative;
  min-height: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  max-width: 100%;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-primary);
}

img { max-width: 100%; height: auto; }

/* --------------------------------------------
   3. UTILITIES
   -------------------------------------------- */
.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-success { color: var(--success-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.align-items-center { align-items: center !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.text-center { text-align: center !important; }
.rounded { border-radius: var(--radius-md) !important; }

.fa-icon-spacing { margin-right: 0.5rem; }
.fa-icon-spacing-left { margin-left: 0.5rem; }
.fa-brand-primary { color: var(--brand-primary); }
.fa-brand-secondary { color: var(--brand-secondary); }
.fa-brand-success { color: var(--brand-success); }
.fa-brand-warning { color: var(--brand-warning); }
.fa-brand-danger { color: var(--brand-danger); }

/* --------------------------------------------
   4. GLOBAL COMPONENTS
   -------------------------------------------- */
.navbar {
  background-color: var(--brand-bg-primary) !important;
  border-bottom: 2px solid var(--brand-primary-lightest) !important;
}
.navbar-brand { font-weight: 600; color: var(--brand-primary) !important; }
.navbar-brand:hover { color: var(--brand-primary-dark) !important; }
.nav-link { color: var(--brand-text-primary) !important; transition: color 0.2s ease; }
.nav-link:hover { color: var(--brand-primary) !important; }
.nav-link.active { color: var(--brand-primary) !important; font-weight: 500; }

.card {
  border: none;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border-color: var(--brand-neutral-light);
}
.card-header {
  background-color: var(--brand-primary-lightest);
  border-bottom-color: var(--brand-primary-lighter);
  color: var(--brand-text-primary);
  padding: 1.25rem 1.5rem;
}
.card-title { color: var(--brand-primary); font-size: 1.1rem; font-weight: 600; }

.table thead th {
  background-color: var(--brand-primary-lightest);
  color: var(--brand-primary-dark);
  border-bottom: 2px solid var(--brand-primary-lighter);
  font-weight: 600;
}
.table tbody tr:hover { background-color: var(--brand-neutral-lighter); }

.badge.bg-primary { background-color: var(--brand-primary) !important; }
.badge.bg-secondary { background-color: var(--brand-secondary) !important; }
.badge.bg-success { background-color: var(--brand-success) !important; }
.badge.bg-warning { background-color: var(--brand-warning) !important; }
.badge.bg-danger { background-color: var(--brand-danger) !important; }
.badge.bg-info { background-color: var(--brand-info) !important; }

.alert-primary { background-color: var(--brand-primary-lightest); border-color: var(--brand-primary-lighter); color: var(--brand-primary-dark); }
.alert-success { background-color: var(--brand-accent-lightest); border-color: var(--brand-accent); color: var(--brand-success); }
.alert-warning { background-color: var(--brand-secondary-lightest); border-color: var(--brand-secondary-lighter); color: var(--brand-secondary-dark); }
.alert-danger { background-color: var(--danger-bg); border-color: var(--danger-border); color: var(--brand-danger); }
.alert-info { background-color: var(--brand-primary-lightest); border-color: var(--brand-primary-lighter); color: var(--brand-primary-dark); }

.footer {
  background-color: var(--brand-bg-secondary);
  border-top: 1px solid var(--brand-neutral-light);
  color: var(--brand-text-secondary);
}
.footer a { color: var(--brand-primary); text-decoration: none; }
.footer a:hover { color: var(--brand-primary-dark); text-decoration: underline; }

/* Form controls */
.btn:focus, .btn:active:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--brand-primary);
}
.form-control:focus { border-color: var(--brand-primary); }
.form-check-input:checked { background-color: var(--brand-primary); border-color: var(--brand-primary); }
.form-check { display: flex !important; align-items: center !important; min-height: 1.5rem; padding-left: 0 !important; }
.form-check .form-check-input { float: none !important; margin-left: 0 !important; margin-right: 0.5rem !important; width: 1.25em !important; height: 1.25em !important; }
.form-check .form-check-label { margin-bottom: 0; cursor: pointer; }
.form-check-inline { display: inline-flex !important; align-items: center !important; }

.form-floating>.form-control-plaintext::placeholder,
.form-floating>.form-control::placeholder { color: var(--bs-secondary-color); text-align: end; }

/* --------------------------------------------
   5. AUTH (Login, Logout, Access Denied)
   -------------------------------------------- */
.auth-page, .login-page { background-color: var(--brand-bg-secondary); font-family: 'Roboto', sans-serif; }
.auth-container, .login-container { min-height: 100vh; max-width: 100%; overflow-x: hidden; width: 100%; }

.login-form-wrapper, .auth-form-wrapper { width: 100%; max-width: 450px; padding: 2rem; }
.login-form, .auth-form {
  background: var(--bg-primary)fff; border-radius: 12px; padding: 3rem 2.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.login-logo { height: 60px; width: auto; }
.auth-logo { height: 48px; width: auto; }
.login-title, .auth-title { font-size: 2rem; font-weight: 700; color: var(--brand-text-primary); margin-bottom: 0.5rem; }
.login-subtitle, .auth-subtitle { font-size: 1rem; color: var(--brand-text-secondary); margin-bottom: 0; }

.login-form .form-floating>.form-control, .auth-form .form-floating>.form-control {
  padding-left: 1.2rem; padding-right: 3rem; border: 1px solid var(--brand-neutral-light);
  border-radius: 8px; height: calc(3.5rem + 2px); transition: all 0.3s ease;
}
.login-form .form-floating>.form-control:focus { border-color: var(--brand-primary); box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.15); }
.login-form .form-floating>label { padding-left: 1.2rem; color: var(--brand-text-secondary); }
.password-toggle { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); z-index: 10; color: var(--brand-text-secondary); background: transparent; border: none; cursor: pointer; }
.password-toggle:hover { color: var(--brand-primary); }
.forgot-password-link { color: var(--brand-primary); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.forgot-password-link:hover { color: var(--brand-primary-dark); text-decoration: underline; }

.btn-login, .btn-auth {
  background-color: var(--brand-primary); border: none; color: var(--brand-text-inverse);
  font-weight: 500; font-size: 1rem; padding: 0.75rem 1.5rem; border-radius: 8px;
  transition: all 0.3s ease; box-shadow: 0 2px 4px rgba(0, 102, 204, 0.2);
}
.btn-login:hover, .btn-auth:hover {
  background-color: var(--brand-primary-dark); color: var(--brand-text-inverse);
  transform: translateY(-1px); box-shadow: 0 4px 8px rgba(0, 102, 204, 0.3);
}
.btn-auth-secondary { background-color: var(--brand-secondary); border: none; color: var(--brand-text-inverse); font-weight: 500; padding: 0.75rem 1.5rem; border-radius: 8px; }
.btn-auth-secondary:hover { background-color: var(--brand-secondary-dark); color: var(--brand-text-inverse); }

.login-footer { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--brand-neutral-light); }
.login-image-column { position: relative; background: linear-gradient(135deg, var(--brand-neutral-dark) 0%, var(--brand-neutral-darker) 100%); overflow: hidden; }
.login-image-wrapper { width: 100%; height: 100%; background-image: url('../images/thue-xe-may.jpg'); background-size: cover; background-position: center; position: relative; }
.login-image-wrapper::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(26,26,26,0.35) 0%, rgba(45,45,45,0.35) 100%); z-index: 1; }
.login-image-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%); z-index: 2; }
.login-testimonial { position: absolute; bottom: 4rem; left: 3rem; right: 3rem; z-index: 3; color: var(--brand-text-inverse); max-width: calc(100% - 6rem); }
.testimonial-line { width: 60px; height: 4px; background-color: var(--brand-primary); margin-bottom: 2rem; border-radius: 2px; }
.testimonial-quote { font-size: 2rem; font-weight: 500; line-height: 1.4; color: var(--brand-text-inverse); margin-bottom: 2rem; font-style: italic; }

.auth-alert { border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
.auth-alert-warning { background-color: var(--brand-secondary-lightest); border: 1px solid var(--brand-secondary-lighter); color: var(--brand-secondary-dark); }
.auth-alert-danger { background-color: var(--danger-bg); border: 1px solid var(--danger-border); color: var(--brand-danger); }
.auth-alert-info { background-color: var(--brand-primary-lightest); border: 1px solid var(--brand-primary-lighter); color: var(--brand-primary-dark); }
.auth-icon { font-size: 3rem; margin-bottom: 1rem; }
.btn-login:disabled { opacity: 0.6; cursor: not-allowed; }
.login-form .text-danger { font-size: 0.875rem; margin-top: 0.25rem; display: block; }
.login-form .alert-danger { border-radius: 8px; border: none; background-color: var(--danger-bg); color: var(--brand-danger); font-size: 0.9rem; padding: 0.75rem 1rem; }

/* --------------------------------------------
   6. DASHBOARD LAYOUT
   -------------------------------------------- */
.dashboard-body { margin: 0; padding: 0; overflow-x: hidden; background-color: var(--brand-bg-secondary); width: 100%; max-width: 100%; }
.dashboard-wrapper { display: flex; min-height: 100vh; width: 100%; max-width: 100%; margin: 0; padding: 0; overflow-x: hidden; }

.sidebar {
  width: var(--sidebar-width); background-color: var(--bg-primary); border-right: 1px solid var(--brand-neutral-light);
  display: flex; flex-direction: column; position: fixed; height: 100vh; left: 0; top: 0; z-index: 1000;
  overflow-y: auto; transition: transform 0.3s ease;
}
.sidebar-header { padding: .6rem 1rem; border-bottom: 1px solid var(--brand-neutral-light); display: flex; align-items: center; gap: 0.75rem; }
.sidebar-logo { height: 55px; width: auto; }
.sidebar-nav { flex: 1; padding: 1rem 0; }
.nav-menu { list-style: none; padding: 0; margin: 0; }
.nav-section { padding: 1rem 1.5rem 0.5rem; }
.nav-section-title { font-size: 0.75rem; font-weight: 600; color: var(--brand-text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.nav-item { margin: 0.25rem 0; }
.sidebar .nav-link {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.5rem;
  color: var(--brand-text-primary); text-decoration: none; transition: all 0.2s ease; border-left: 3px solid transparent;
}
.sidebar .nav-link:hover { background-color: var(--brand-neutral-lighter); color: var(--brand-primary); }
.sidebar .nav-link.active { background-color: var(--brand-secondary-lightest); color: var(--brand-secondary); border-left-color: var(--brand-secondary); font-weight: 500; }
.sidebar .nav-link i { width: 20px; text-align: center; font-size: 1.1rem; }
.sidebar-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--brand-neutral-light); }
.user-profile { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem; border-radius: 8px; cursor: pointer; }
.user-profile:hover { background-color: var(--brand-neutral-lighter); }
.user-avatar { width: 40px; height: 40px; border-radius: 50%; background-color: var(--brand-primary); display: flex; align-items: center; justify-content: center; color: var(--brand-text-inverse); font-size: 1rem; flex-shrink: 0; }
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 0.9rem; font-weight: 500; color: var(--brand-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 0.75rem; color: var(--brand-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0;
  background: transparent; border: 1px solid transparent; border-radius: var(--radius-sm);
  color: var(--brand-text-secondary); cursor: pointer; transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.user-menu-toggle:hover { color: var(--brand-primary); background-color: rgba(0, 102, 204, 0.08); }
.user-menu-toggle:focus { outline: none; }
.user-menu-toggle:focus-visible { border-color: var(--brand-primary); box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2); }
.user-menu-toggle[aria-expanded="true"] { color: var(--brand-primary); background-color: rgba(0, 102, 204, 0.08); }
.user-dropdown-menu { background-color: var(--brand-primary); border: 1px solid var(--brand-secondary-lighter); border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); min-width: 200px; margin-top: 0.5rem; }
.user-dropdown-menu .dropdown-item i { width: 16px; }
.user-dropdown-menu .dropdown-item { color: var(--brand-text-inverse); padding: 0.75rem 1rem; }
.user-dropdown-menu .dropdown-item:hover { background-color: var(--brand-secondary-darker); color: var(--brand-text-inverse); }
.user-dropdown-menu .dropdown-item.text-danger:hover { background-color: color-mix(in srgb, var(--danger-color) 10%, transparent); color: var(--danger-light); }

.main-content { flex: 1; margin-left: var(--sidebar-width); display: flex; flex-direction: column; min-height: 100vh; max-width: 100%; overflow-x: hidden; }
.dashboard-header {
  background-color: var(--bg-primary); border-bottom: 1px solid var(--brand-neutral-light); padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem; position: sticky; top: 0; z-index: 100;
}
.header-left { flex: 1; display: flex; align-items: center; gap: 1rem; max-width: 500px; }
.menu-toggle-btn { background: none; border: none; font-size: 1.5rem; color: var(--brand-text-primary); cursor: pointer; padding: 0.5rem; display: none; align-items: center; justify-content: center; height: 44px; width: 44px; border-radius: 8px; }
.menu-toggle-btn:hover { background-color: var(--brand-neutral-lighter); }
.search-box { position: relative; display: flex; align-items: center; width: 100%; }
.search-box i { position: absolute; left: 1rem; color: var(--brand-text-secondary); z-index: 1; }
.search-input { width: 100%; padding: 0.5rem 1rem 0.5rem 2.5rem; border: 1px solid var(--brand-neutral-light); border-radius: 8px; font-size: 0.9rem; transition: all 0.2s ease; }
.search-input:focus { outline: none; border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(0,102,204,0.1); }
.header-right { display: flex; align-items: center; gap: 0.5rem; }
.header-icon-btn { width: 40px; height: 40px; border: none; background: none; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--brand-text-secondary); cursor: pointer; position: relative; }
.header-icon-btn:hover { background-color: var(--brand-neutral-lighter); color: var(--brand-primary); }
.header-icon-btn .badge { position: absolute; top: 4px; right: 4px; background-color: var(--brand-danger); color: var(--brand-text-inverse); font-size: 0.7rem; padding: 0.15rem 0.4rem; border-radius: 10px; min-width: 18px; text-align: center; }
.dashboard-main { flex: 1; padding: 2rem; max-width: 100%; overflow-x: hidden; }

.dashboard-section-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; }
.section-header-left { flex: 1; }
.date-info { margin-bottom: 0.5rem; }
.date-label { font-size: 0.9rem; color: var(--brand-text-secondary); }
.section-title { font-size: 1.25rem; font-weight: 600; color: var(--brand-text-primary); margin: 0; }
.section-header-right { display: flex; gap: 0.75rem; }

/* --- KPI Cards (Dashboard, Report, Analysis) --- */
.kpi-card {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}
.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
}
.kpi-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.kpi-icon-blue { background-color: rgba(0,102,204,0.12); color: var(--brand-primary); }
.kpi-icon-green { background-color: rgba(0,204,102,0.12); color: var(--brand-success); }
.kpi-icon-orange { background-color: rgba(255,102,0,0.12); color: var(--brand-secondary); }
.kpi-icon-red { background-color: rgba(204,0,0,0.12); color: var(--brand-danger); }
.kpi-content { flex: 1; min-width: 0; }
.kpi-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-text-primary);
  line-height: 1.2;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}
.kpi-label {
  font-size: 0.875rem;
  color: var(--brand-text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.kpi-change { font-size: 0.8rem; display: flex; align-items: center; gap: 0.25rem; }
.kpi-change-positive { color: var(--brand-success); font-weight: 500; }
.kpi-change-negative { color: var(--brand-danger); font-weight: 500; }

/* Report: .kpi-card-header, .kpi-card-title, .kpi-card-icon, .kpi-card-value, .kpi-card-footer, .kpi-card-change */
.kpi-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}
.kpi-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.kpi-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #fff;
  flex-shrink: 0;
}
.kpi-card-icon.kpi-icon-green { background: linear-gradient(135deg, #00cc66, #00a352); }
.kpi-card-icon.kpi-icon-blue { background: linear-gradient(135deg, #0066cc, #0052a3); }
.kpi-card-icon.kpi-icon-purple { background: linear-gradient(135deg, #9966cc, #7a4da3); }
.kpi-card-icon.kpi-icon-orange { background: linear-gradient(135deg, #ff9900, #cc7a00); }
.kpi-card-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.kpi-card-footer { margin-top: auto; }
.kpi-card-change {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
}
.kpi-card-change.positive { color: var(--brand-success); }
.kpi-card-change.negative { color: var(--brand-danger); }
.kpi-card-change i { font-size: 0.75rem; }

/* Analysis / VehicleAnalysis: .kpi-header, .kpi-icon.revenue, .kpi-trend */
.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  width: 100%;
}
.kpi-icon.revenue { background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: #fff; }
.kpi-icon.utilization { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); color: #fff; }
.kpi-icon.profit { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); color: #fff; }
.kpi-icon.maintenance { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); color: #fff; }
.kpi-icon.damage { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); color: #fff; }
.kpi-icon.rental { background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%); color: #fff; }
.kpi-icon.calculation { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); color: #fff; }
.kpi-trend {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
}
.kpi-trend.positive { color: #10b981; text-align: right; }
.kpi-trend.negative { color: #ef4444; text-align: right; }

.chart-card { background: var(--bg-primary); border-radius: 12px; padding: 1.5rem; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.chart-title { font-size: 1.1rem; font-weight: 600; color: var(--brand-text-primary); margin: 0; }
.chart-body { height: 300px; position: relative; }

.table tbody td { padding: 1rem; vertical-align: middle; border-bottom: 1px solid var(--table-border); }
.customer-avatar { width: 32px; height: 32px; border-radius: 50%; background-color: var(--brand-primary); color: var(--brand-text-inverse); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 600; flex-shrink: 0; }

.customer-avatar-sm { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, var(--avatar-gradient-start) 0%, var(--avatar-gradient-end) 100%); color: var(--brand-text-inverse); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; text-transform: uppercase; }

/* --------------------------------------------
   7. FILTERS & FORMS (search, select, input, buttons)
   -------------------------------------------- */
.report-filters, .search-filters-section, .filter-section, .filters-section {
  background-color: var(--bg-primary); border-radius: 12px; padding: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.08); border: 1px solid var(--brand-neutral-light);
}
.audit-filter-form .form-label.audit-filter-label { font-size: 0.8125rem; font-weight: 500; color: var(--brand-text-secondary); margin-bottom: 0.375rem; }
.audit-filter-form .form-control, .audit-filter-form .form-select { height: 42px; border-radius: var(--radius-sm); border: 1px solid var(--brand-neutral-light); font-size: 0.9rem; }
.audit-filter-form .form-control:focus, .audit-filter-form .form-select:focus { border-color: var(--brand-primary); box-shadow: 0 0 0 0.2rem rgba(0,102,204,0.15); }
.audit-filter-form .btn { min-height: 42px; padding: 0.5rem 1rem; }
.search-box .form-control { padding-left: 2.75rem; padding-right: 1rem; height: 44px; border: 1px solid var(--brand-neutral-light); border-radius: 8px; font-size: 0.9rem; background-color: var(--bg-primary); }
.search-box .form-control:focus { border-color: var(--brand-primary); box-shadow: 0 0 0 0.2rem rgba(0,102,204,0.15); outline: none; }
.search-box .form-control::placeholder { color: var(--brand-text-light); font-size: 0.9rem; }

.form-floating>.form-select {
  height: 44px; padding: 1rem 1rem 0.5rem 1.2rem; border: 1px solid var(--brand-neutral-light); border-radius: 8px; font-size: 0.9rem;
  background-color: var(--bg-primary); background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 16px 12px; padding-right: 2.5rem; appearance: none; cursor: pointer;
}
.form-floating>.form-select:focus { border-color: var(--brand-primary); box-shadow: 0 0 0 0.2rem rgba(0,102,204,0.15); outline: none; }
.form-floating>label { position: absolute; top: 0; left: 0; height: 100%; padding: 1rem 1rem 1.2rem 1.2rem; pointer-events: none; color: var(--brand-text-secondary); font-size: 0.85rem; font-weight: 500; display: flex; align-items: center; }
.form-floating>.form-select:focus~label, .form-floating>.form-select:not(:placeholder-shown)~label { opacity: 1; transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); color: var(--brand-primary); }
.form-floating>label i { margin-right: 0.5rem; font-size: 0.85rem; }

.form-select, .form-select-sm { height: 44px; padding: 0.5rem 2.5rem 0.5rem 1rem; border: 1px solid var(--brand-neutral-light); border-radius: 8px; font-size: 0.9rem; background-color: var(--bg-primary); appearance: none; cursor: pointer; }
.form-select:focus { border-color: var(--brand-primary); box-shadow: 0 0 0 0.2rem rgba(0,102,204,0.15); outline: none; }
.form-control, .form-control-sm { border: 1px solid var(--brand-neutral-light); border-radius: 8px; font-size: 0.9rem; background-color: var(--bg-primary); }
.form-control { height: 44px; padding: 0.5rem 1rem; }
.form-control:focus { border-color: var(--brand-primary); box-shadow: 0 0 0 0.2rem rgba(0,102,204,0.15); outline: none; }
.form-control::placeholder { color: var(--brand-text-light); }

.input-group { display: flex; align-items: stretch; height: 44px; }
.input-group-text { background-color: var(--bg-secondary); border: 1px solid var(--brand-neutral-light); border-right: none; border-radius: 8px 0 0 8px; color: var(--brand-text-secondary); padding: 0.5rem 0.75rem; min-width: 44px; display: flex; align-items: center; justify-content: center; }
.input-group .form-control { border-left: none; border-radius: 0 8px 8px 0; height: 44px; border: 1px solid var(--brand-neutral-light); }
.input-group:focus-within .input-group-text { border-color: var(--brand-primary); background-color: var(--bg-primary); color: var(--brand-primary); }
.input-group:focus-within .form-control { border-color: var(--brand-primary); box-shadow: 0 0 0 0.2rem rgba(0,102,204,0.15); outline: none; }

.btn { border-radius: 8px; font-weight: 500; font-size: 0.9rem; padding: 0.625rem 1.25rem; transition: all 0.2s ease; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; border: 1px solid transparent; cursor: pointer; height: 44px; min-height: 44px; line-height: 1.5; font-family: 'Roboto', sans-serif; }
.btn-primary { background-color: var(--brand-primary); border-color: var(--brand-primary); color: var(--brand-text-inverse); box-shadow: 0 2px 4px rgba(0,102,204,0.2); }
.btn-primary:hover { background-color: var(--brand-primary-dark); border-color: var(--brand-primary-dark); color: var(--brand-text-inverse); box-shadow: 0 4px 8px rgba(0,102,204,0.3); transform: translateY(-1px); }
.btn-outline-secondary { background-color: var(--bg-primary); border-color: var(--brand-neutral-light); color: var(--brand-text-primary); }
.btn-outline-secondary:hover { background-color: var(--bg-secondary); border-color: var(--input-border-hover); color: var(--brand-text-primary); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; height: 38px; min-height: 38px; }
.btn i { font-size: 0.85rem; }
.btn-brand-primary { background-color: var(--brand-primary); border-color: var(--brand-primary); color: var(--brand-text-inverse); }
.btn-brand-primary:hover { background-color: var(--brand-primary-dark); border-color: var(--brand-primary-dark); color: var(--brand-text-inverse); }
.btn-brand-secondary { background-color: var(--brand-secondary); border-color: var(--brand-secondary); color: var(--brand-text-inverse); }
.btn-brand-secondary:hover { background-color: var(--brand-secondary-dark); border-color: var(--brand-secondary-dark); color: var(--brand-text-inverse); }
.btn-link { text-decoration: none; }
.btn-link:hover { text-decoration: none; }
.view-detail { text-decoration: none; }

.form-label { font-weight: 500; color: var(--brand-text-primary); margin-bottom: 0.5rem; font-size: 0.875rem; }
.dropdown-menu { border-radius: 8px; border: 1px solid var(--brand-neutral-light); box-shadow: 0 4px 12px rgba(0,0,0,0.1); padding: 0.5rem; margin-top: 0.5rem; }
.dropdown-item { border-radius: 6px; padding: 0.5rem 0.75rem; font-size: 0.9rem; }
.dropdown-item:hover { background-color: var(--brand-primary-lightest); color: var(--brand-primary); }
.dropdown-item.active { background-color: var(--brand-primary); color: var(--brand-text-inverse); }

/* --------------------------------------------
   8. MANAGEMENT (list, detail, mobile cards)
   -------------------------------------------- */
.management-page { min-height: calc(100vh - 200px); max-width: 100%; overflow-x: hidden; }
.management-list-panel { border-right: 1px solid var(--brand-neutral-light); padding: 1.5rem; max-height: calc(100vh - 150px); overflow-y: auto; }
.management-detail-panel { padding: 1.5rem; max-height: calc(100vh - 150px); overflow-y: auto; }

.list-header { border-bottom: 1px solid var(--brand-neutral-light); padding-bottom: 1rem; }
.page-subtitle { font-size: 1.5rem; font-weight: 700; color: var(--brand-text-primary); margin: 0; }
.search-filters { margin-top: 1rem; }
.search-box .form-control { padding-left: 2.5rem; }

.table thead th { background-color: var(--brand-neutral-lightest); border-bottom: 2px solid var(--brand-neutral-light); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--brand-text-secondary); padding: 0.75rem; }
.table tbody td { padding: 1rem 0.75rem; vertical-align: middle; border-bottom: 1px solid var(--table-border); }
.table tbody tr { cursor: pointer; transition: background-color 0.2s ease; }
.table tbody tr:hover { background-color: var(--brand-neutral-lightest); }
.table tbody tr.selected { background-color: var(--brand-primary-lightest); border-left: 3px solid var(--brand-secondary); }

.customer-list { display: flex; flex-direction: column; gap: 0.75rem; }
.customer-item { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 1.25rem; padding: 1rem; background: var(--bg-primary); border: 1px solid var(--brand-neutral-light); border-radius: 8px; cursor: pointer; transition: all 0.2s ease; }
.customer-item:hover { background-color: var(--brand-neutral-lightest); border-color: var(--brand-primary-lighter); }
.customer-item.selected { background-color: var(--brand-secondary-lightest); border-left: 3px solid var(--brand-secondary); }
.customer-avatar-large { width: 56px; height: 56px; border-radius: 50%; background-color: var(--brand-primary); color: var(--brand-text-inverse); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 1.1rem; flex-shrink: 0; }
.customer-info { min-width: 0; overflow: hidden; }
.customer-name { font-weight: 600; font-size: 1rem; color: var(--brand-text-primary); margin-bottom: 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.customer-phone { font-size: 0.875rem; color: var(--brand-text-secondary); }
.customer-nationality { font-size: 0.75rem; color: var(--brand-text-light); }
.customer-dates { display: flex; flex-direction: column; gap: 0.25rem; min-width: 160px; max-width: 180px; text-align: left; flex-shrink: 0; }
.customer-status { min-width: 100px; text-align: right; flex-shrink: 0; }

.detail-panel { background: var(--bg-primary); border-radius: 12px; padding: 2rem; }
.detail-header { border-bottom: 1px solid var(--brand-neutral-light); padding-bottom: 1.5rem; }
.detail-title { font-size: 1.5rem; font-weight: 700; color: var(--brand-text-primary); margin-bottom: 0.5rem; }
.detail-subtitle { font-size: 0.9rem; color: var(--brand-text-secondary); margin-bottom: 1rem; }
.detail-label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--brand-text-secondary); margin-bottom: 0.25rem; text-transform: uppercase; letter-spacing: 0.5px; }
.detail-value { font-size: 1rem; color: var(--brand-text-primary); line-height: 1.4; font-weight: 500; }
.detail-section { border-top: 1px solid var(--brand-neutral-light); padding-top: 1.5rem; margin-bottom: 1.5rem; }
.section-title { font-size: 1rem; font-weight: 600; color: var(--brand-text-primary); margin: 0 0 0.75rem 0; border-bottom: 2px solid var(--border-neutral); padding-bottom: 0.5rem; }
/* --- Summary cards (Motorbike detail, Payment, Rental) --- */
.summary-card {
  background: var(--bg-primary);
  border: 2px solid var(--brand-primary);
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,102,204,0.08);
  transition: box-shadow 0.2s ease;
}
.summary-card:hover { box-shadow: 0 4px 12px rgba(0,102,204,0.12); }
.summary-card-orange { border-color: var(--brand-secondary); box-shadow: 0 2px 6px rgba(255,102,0,0.08); }
.summary-card-orange:hover { box-shadow: 0 4px 12px rgba(255,102,0,0.12); }
.summary-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--brand-text-secondary);
  margin-bottom: 0.5rem;
}
.summary-value {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--brand-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.summary-card-orange .summary-value { color: var(--brand-secondary); }

/* Summary large (Payment page: doanh thu, tiền cọc, hoàn tiền) */
.summary-card-large {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}
.summary-card-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
}
.summary-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.summary-icon-blue { background-color: rgba(0,102,204,0.12); color: var(--brand-primary); }
.summary-icon-orange { background-color: rgba(255,102,0,0.12); color: var(--brand-secondary); }
.summary-icon-red { background-color: rgba(204,0,0,0.12); color: var(--brand-danger); }
.summary-content { flex: 1; min-width: 0; }
.summary-value-large {
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-text-primary);
  margin: 0.35rem 0 0.5rem 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.summary-change { font-size: 0.875rem; font-weight: 500; display: flex; align-items: center; gap: 0.35rem; }
.summary-change.text-success { color: var(--brand-success); }
.summary-change.text-muted { color: var(--brand-text-secondary); }
.info-card { background: var(--bg-primary); border: 1px solid var(--brand-neutral-light); border-radius: 8px; overflow: hidden; }
.info-card-header { background-color: var(--brand-neutral-lightest); padding: 1rem 1.25rem; border-bottom: 1px solid var(--brand-neutral-light); font-weight: 600; color: var(--brand-text-primary); }
.info-card-body { padding: 1.25rem; }
.info-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; color: var(--brand-text-secondary); letter-spacing: 0.5px; margin-bottom: 0.25rem; }
.info-value { font-size: 0.95rem; color: var(--brand-text-primary); }
.info-value-large { font-size: 1.5rem; font-weight: 700; }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; margin-bottom: 1rem; }
.page-title-large { font-size: 2rem; font-weight: 700; color: var(--brand-text-primary); margin-bottom: 0.5rem; }
.page-description { color: var(--brand-text-secondary); margin: 0; }
.detail-actions { border-top: 1px solid var(--brand-neutral-light); padding-top: 1.5rem; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 400px; text-align: center; padding: 4rem 2rem; }

/* Mobile cards (management) */
.motorbike-card-mobile, .customer-card-mobile, .contract-card-mobile, .payment-card-mobile { display: none; background: var(--bg-primary); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; box-shadow: 0 2px 4px rgba(0,0,0,0.05); border: 1px solid var(--brand-neutral-light); cursor: pointer; transition: all 0.2s ease; }
.motorbike-cards-mobile, .customer-cards-mobile, .contract-cards-mobile, .payment-cards-mobile { display: flex; flex-direction: column; gap: 0.75rem; }
.payment-cards-mobile .payment-card-mobile { position: relative; }
.payment-cards-mobile .payment-card-actions-mobile { position: absolute; top: 10px; right: 10px; display: flex; gap: 0.25rem; opacity: 0.8; }
.payment-cards-mobile .payment-card-mobile:hover .payment-card-actions-mobile { opacity: 1; }

.customer-type-badge { font-size: 0.75rem; font-weight: 500; padding: 0.375rem 0.75rem; border-radius: 0.375rem; display: inline-flex; align-items: center; gap: 0.25rem; }
.customer-new-badge { background-color: var(--success-color) !important; color: var(--brand-text-inverse); border: 1px solid var(--success-color); }
.customer-old-badge { background-color: var(--brand-text-secondary) !important; color: var(--brand-text-inverse); border: 1px solid var(--brand-text-secondary); }

/* --------------------------------------------
   9. CONTRACT CREATE (wizard, progress, selected cards, pricing)
   -------------------------------------------- */
.contract-create-page { max-width: 1200px; margin: 0 auto; padding: 2rem; width: 100%; overflow-x: hidden; }
.progress-tracker-container { background: var(--bg-primary); border-radius: 12px; padding: 2rem; box-shadow: 0 2px 4px rgba(0,0,0,0.05); margin-bottom: 2rem; }
.progress-tracker { display: flex; align-items: center; justify-content: space-between; position: relative; margin-top: 1.5rem; padding: 1rem; background: var(--brand-bg-secondary); border-radius: 8px; }
.progress-step { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; flex: 1; position: relative; z-index: 2; color: var(--brand-text-light); font-size: 0.75rem; }
.progress-step.completed { color: var(--brand-primary); }
.progress-step.active { color: var(--brand-primary); font-weight: 600; }
.progress-step i { font-size: 1.25rem; }
.step-icon { width: 48px; height: 48px; border-radius: 50%; background-color: var(--brand-neutral-light); color: var(--brand-text-light); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; transition: all 0.3s ease; }
.progress-step.completed .step-icon { background-color: var(--brand-primary); color: var(--brand-text-inverse); }
.progress-step.active .step-icon { background-color: var(--brand-secondary); color: var(--brand-text-inverse); box-shadow: 0 0 0 4px rgba(255,102,0,0.2); }
.step-label { font-size: 0.875rem; font-weight: 500; color: var(--brand-text-secondary); text-align: center; }
.progress-line { position: absolute; top: 24px; left: 0; right: 0; height: 2px; background-color: var(--brand-neutral-light); z-index: 1; }
.progress-line.completed { background-color: var(--brand-primary); }

.contract-form-container { background: var(--bg-primary); border-radius: 12px; padding: 2rem; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.step-content { min-height: 400px; }
.step-title { font-size: 1.5rem; font-weight: 600; color: var(--brand-text-primary); margin-bottom: 2rem; }
.customer-result-item, .vehicle-result-item { display: flex; align-items: center; gap: 1rem; padding: 1.25rem; background: var(--brand-bg-primary); border: 2px solid var(--brand-primary-lighter); border-radius: 16px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 2px 8px rgba(0,102,204,0.08); }
.customer-result-item:hover, .vehicle-result-item:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,102,204,0.1); }
.selected-customer-card, .selected-vehicle-card { background: var(--bg-primary); border: 2px solid var(--brand-neutral-light); border-radius: 16px; padding: 0; margin-top: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.08); overflow: hidden; }
.selected-customer-card, .selected-vehicle-card { border-color: var(--brand-primary); }
.vehicle-image-wrapper { width: 180px; height: 180px; background: var(--bg-secondary); border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.selected-vehicle-name { font-size: 1.5rem; font-weight: 700; color: var(--brand-text-primary); margin: 0; line-height: 1.3; }
.selected-vehicle-meta { font-size: 1rem; color: var(--brand-text-secondary); margin: 0; font-weight: 500; }
.btn-change-vehicle { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; background: var(--danger-color); border: 1px solid var(--danger-color); border-radius: 8px; color: var(--brand-text-inverse); font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: all 0.2s ease; }
.btn-change-vehicle:hover { background: var(--danger-hover); border-color: var(--danger-hover-border); color: var(--brand-text-inverse); transform: translateY(-1px); }
.rental-summary-card {
  background: var(--brand-neutral-lightest);
  border: 1px solid var(--brand-neutral-light);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.rental-summary-card .summary-value { font-size: 1.5rem; }
.pricing-card { background: var(--brand-neutral-lightest); border: 1px solid var(--brand-neutral-light); border-radius: 8px; padding: 1.5rem; }
.pricing-row { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 0; border-bottom: 1px solid var(--brand-neutral-light); }
.pricing-label { font-weight: 500; color: var(--brand-text-primary); }
.pricing-value { font-weight: 600; color: var(--brand-text-primary); text-align: right; display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; }
.pricing-value-large { font-size: 1.5rem; font-weight: 700; color: var(--brand-primary); text-align: right; }
.review-section { margin-bottom: 2rem; }
.review-card { background: var(--brand-neutral-lightest); border: 1px solid var(--brand-neutral-light); border-radius: 8px; padding: 1.5rem; }
.review-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; color: var(--brand-text-secondary); letter-spacing: 0.5px; margin-bottom: 0.25rem; }
.review-value { font-size: 0.95rem; color: var(--brand-text-primary); font-weight: 500; }
.form-navigation { border-top: 1px solid var(--brand-neutral-light); padding-top: 2rem; margin-top: 2rem; }
.vehicle-status-badge { display: inline-flex; align-items: center; padding: 0.5rem 1rem; border-radius: 10px; font-weight: 600; font-size: 0.875rem; }
.vehicle-status-badge.badge-status-available { background: var(--brand-success); color: var(--brand-text-inverse); }
.vehicle-status-badge.badge-status-reserved { background: var(--brand-secondary); color: var(--brand-text-inverse); }
.vehicle-status-badge.badge-status-active { background: var(--brand-primary); color: var(--brand-text-inverse); }
.vehicle-status-badge.badge-status-maintenance { background: var(--brand-danger); color: var(--brand-text-inverse); }

/* --------------------------------------------
   10. SETTINGS (sidebar, templates, editor, preview, action-bar)
   -------------------------------------------- */
.settings-page { min-height: calc(100vh - 200px); padding: 0; padding-bottom: 80px; max-width: 100%; overflow-x: hidden; }
.settings-sidebar { border-right: 1px solid var(--brand-neutral-light); padding: 1.5rem; background-color: var(--brand-neutral-lightest); max-height: calc(100vh - 150px); overflow-y: auto; }
.sidebar-title { font-size: 1.1rem; font-weight: 600; color: var(--brand-text-primary); margin: 0; }
.filter-tabs-container { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; min-width: 0; flex: 1; }
.filter-tabs { display: flex; gap: 0.5rem; flex-wrap: nowrap; align-items: center; }
.filter-tab { padding: 0.5rem 1rem; border: 1px solid var(--brand-neutral-light); background: var(--bg-primary); border-radius: 6px; font-size: 0.875rem; cursor: pointer; transition: all 0.2s ease; white-space: nowrap; flex-shrink: 0; display: inline-flex; align-items: center; gap: 0.5rem; }
.filter-tab:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.filter-tab.active { background-color: var(--brand-primary); color: var(--brand-text-inverse); border-color: var(--brand-primary); }
.templates-list { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; }
.template-item { background: var(--bg-primary); border: 1px solid var(--brand-neutral-light); border-radius: 8px; padding: 1rem; cursor: pointer; transition: all 0.2s ease; }
.template-item:hover { border-color: var(--brand-primary-lighter); box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.template-item.selected { background-color: var(--brand-primary-lightest); border-color: var(--brand-primary); border-left: 3px solid var(--brand-primary); }
.template-name { font-weight: 600; color: var(--brand-text-primary); margin-bottom: 0.25rem; }
.template-type-badge { font-size: 0.7rem; font-weight: 600; padding: 0.25rem 0.5rem; border-radius: 4px; text-transform: uppercase; }
.settings-editor { padding: 1.5rem; background-color: var(--bg-primary); max-height: calc(100vh - 150px); overflow-y: auto; }
.editor-toolbar { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem; background-color: var(--brand-neutral-lightest); border: 1px solid var(--brand-neutral-light); border-radius: 6px; flex-wrap: wrap; }
.editor-textarea { font-family: 'Roboto', sans-serif; font-size: 0.95rem; line-height: 1.6; border: 1px solid var(--brand-neutral-light); border-radius: 6px; padding: 1rem; resize: vertical; }
.editor-textarea:focus { border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(0,102,204,0.1); outline: none; }
.settings-preview { border-left: 1px solid var(--brand-neutral-light); padding: 1.5rem; background-color: var(--brand-bg-secondary); max-height: calc(100vh - 150px); overflow-y: auto; }
.settings-page .btn-sm { height: 32px; min-height: 32px; padding: 0.375rem 0.75rem; font-size: 0.875rem; }
.action-bar { position: fixed; bottom: 0; left: var(--sidebar-width); right: 0; background: var(--bg-primary); border-top: 1px solid var(--brand-neutral-light); padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 -2px 4px rgba(0,0,0,0.05); z-index: 100; max-width: 100%; overflow-x: hidden; }
.action-bar-left { flex: 1; min-width: 0; margin-right: 1rem; }
.action-bar-right { display: flex; gap: 0.5rem; flex-shrink: 0; }

/* ContractTerms page – layout, sidebar, editor */
.contract-terms-page { padding: 2rem; max-width: 100%; overflow-x: hidden; }
.contract-terms-page .page-header { margin-bottom: 1.5rem; }
.contract-terms-page .page-title-large { font-size: 1.5rem; font-weight: 700; color: var(--brand-text-primary); margin-bottom: 0.375rem; }
.contract-terms-page .page-description { font-size: 0.9375rem; color: var(--brand-text-secondary); margin: 0; line-height: 1.5; }

.contract-terms-page .settings-sidebar { padding: 1.25rem; background: var(--brand-neutral-lightest); border-right: 1px solid var(--brand-neutral-light); border-radius: 0 var(--radius-md) var(--radius-md) 0; min-height: 400px; }
.contract-terms-page .sections-header { margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--brand-neutral-light); }
.contract-terms-page .sections-header .sidebar-title { font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; color: var(--brand-text-primary); letter-spacing: 0.5px; margin: 0; }
.contract-terms-page .sections-list { display: flex; flex-direction: column; gap: 0.5rem; }
.contract-terms-page .section-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem 1rem; background: var(--bg-primary); border: 1px solid var(--brand-neutral-light); border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s ease; margin: 0; }
.contract-terms-page .section-item:hover { border-color: var(--brand-primary-lighter); background: var(--brand-primary-lightest); }
.contract-terms-page .section-item.selected { background: var(--brand-primary-lightest); border-color: var(--brand-primary); border-left: 4px solid var(--brand-primary); }
.contract-terms-page .section-drag-handle { color: var(--brand-text-light); font-size: 0.875rem; cursor: grab; flex-shrink: 0; }
.contract-terms-page .section-content { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.contract-terms-page .section-content .section-title { font-size: 0.9375rem; font-weight: 600; color: var(--brand-text-primary); margin: 0 0 0.25rem 0; line-height: 1.3; }
.contract-terms-page .section-meta { font-size: 0.75rem; color: var(--brand-text-secondary); display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap; }
.contract-terms-page .section-meta .status-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.contract-terms-page .section-meta .dot-green { background: var(--success-color); }
.contract-terms-page .section-meta .badge { font-size: 0.65rem; padding: 0.2rem 0.4rem; }
.contract-terms-page .section-actions { flex-shrink: 0; }
.contract-terms-page .section-actions .edit-section-btn { padding: 0.35rem 0.5rem; min-width: 32px; }

.contract-terms-page .settings-editor { padding: 1.5rem 2rem; background: var(--bg-primary); border-radius: var(--radius-md) 0 0 var(--radius-md); min-height: 400px; }
.contract-terms-page .editor-container { max-width: 100%; }
.contract-terms-page .editor-header { margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--brand-neutral-light); }
.contract-terms-page .editor-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; color: var(--brand-text-secondary); letter-spacing: 0.5px; margin-bottom: 0.375rem; }
.contract-terms-page .editor-title { font-size: 1.25rem; font-weight: 600; color: var(--brand-text-primary); margin: 0; }
.contract-terms-page .section-config { padding: 1rem 0; }
.contract-terms-page .section-config .form-label { font-size: 0.875rem; font-weight: 500; color: var(--brand-text-primary); margin-bottom: 0.375rem; }
.contract-terms-page .section-config .form-control { height: 42px; border-radius: var(--radius-sm); border: 1px solid var(--brand-neutral-light); font-size: 0.9rem; }
.contract-terms-page .editor-toolbar { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; background: var(--brand-neutral-lightest); border: 1px solid var(--brand-neutral-light); border-radius: var(--radius-sm); flex-wrap: wrap; margin-bottom: 1rem; }
.contract-terms-page .editor-toolbar .btn { min-height: 34px; }
.contract-terms-page .toolbar-divider { width: 1px; height: 24px; background: var(--brand-neutral-light); margin: 0 0.25rem; }
.contract-terms-page .clause-editor { margin-bottom: 1rem; }
.contract-terms-page .editor-textarea { font-family: 'Roboto', sans-serif; font-size: 0.9375rem; line-height: 1.65; border: 1px solid var(--brand-neutral-light); border-radius: var(--radius-sm); padding: 1rem 1.25rem; resize: vertical; min-height: 280px; }
.contract-terms-page .editor-textarea:focus { border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.12); outline: none; }
.contract-terms-page .variable-hints { font-size: 0.8125rem; color: var(--brand-text-secondary); }
.contract-terms-page .variable-hints code { background: var(--brand-neutral-lightest); padding: 0.15rem 0.4rem; border-radius: 4px; font-size: 0.8rem; color: var(--brand-primary); }
.contract-terms-page .signature-toggle { padding: 0.75rem 0; }
.contract-terms-page .signature-toggle .form-check-label { font-size: 0.9rem; font-weight: 500; color: var(--brand-text-primary); }
.contract-terms-page .editor-actions { padding-top: 1rem; border-top: 1px solid var(--brand-neutral-light); }
.contract-terms-page .editor-actions .text-muted { font-size: 0.8125rem; color: var(--brand-text-secondary); }
.contract-terms-page .editor-actions .btn { min-height: 40px; padding: 0.5rem 1rem; }

.section-item { display: flex; align-items: center; gap: 0.75rem; padding: 1rem; margin: 1rem 0; background: var(--bg-primary); border: 1px solid var(--brand-neutral-light); border-radius: 8px; cursor: pointer; transition: all 0.2s ease; }
.section-item.selected { background-color: var(--brand-primary-lightest); border-color: var(--brand-primary); border-left: 3px solid var(--brand-primary); }

/* Templates page – sidebar, editor, preview */
.templates-page { padding: 2rem; max-width: 100%; overflow-x: hidden; min-height: calc(100vh - 120px); }
.templates-page .settings-sidebar { padding: 1.25rem; background: var(--brand-neutral-lightest); border-right: 1px solid var(--brand-neutral-light); border-radius: 0 var(--radius-md) var(--radius-md) 0; min-height: 400px; }
.templates-page .sidebar-header { margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--brand-neutral-light); }
.templates-page .sidebar-title { font-size: 0.9375rem; font-weight: 600; color: var(--brand-text-primary); margin: 0; letter-spacing: 0.3px; }
.templates-page .filter-tabs-container { min-width: 0; }
.templates-page .filter-tab { padding: 0.4rem 0.75rem; font-size: 0.8125rem; border-radius: var(--radius-sm); }
.templates-page .filter-tab.active { background: var(--brand-primary); color: var(--brand-text-inverse); border-color: var(--brand-primary); }
.templates-page .search-box { position: relative; margin-bottom: 1rem; }
.templates-page .search-box i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--brand-text-secondary); z-index: 1; font-size: 0.875rem; }
.templates-page .search-box .form-control { padding-left: 2.5rem; height: 42px; border-radius: var(--radius-sm); border: 1px solid var(--brand-neutral-light); font-size: 0.9rem; }
.templates-page .templates-list { display: flex; flex-direction: column; gap: 0.625rem; margin-top: 0; }
.templates-page .template-item { padding: 1rem 1.25rem; background: var(--bg-primary); border: 1px solid var(--brand-neutral-light); border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s ease; }
.templates-page .template-item:hover { border-color: var(--brand-primary-lighter); background: var(--brand-primary-lightest); box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.templates-page .template-item.selected { background: var(--brand-primary-lightest); border-color: var(--brand-primary); border-left: 4px solid var(--brand-primary); }
.templates-page .template-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; flex-wrap: wrap; gap: 0.375rem; }
.templates-page .template-type-badge { font-size: 0.65rem; font-weight: 600; padding: 0.2rem 0.45rem; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.3px; }
.templates-page .template-type-badge.template-type-email { background: var(--brand-primary-lightest); color: var(--brand-primary); }
.templates-page .template-type-badge.template-type-sms { background: var(--success-bg); color: var(--success-color); }
.templates-page .template-type-badge.template-type-zalo { background: #e8f4fd; color: #0066ff; }
.templates-page .template-status .status-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.templates-page .template-status .dot-green { background: var(--success-color); }
.templates-page .template-status .dot-grey { background: var(--brand-text-light); }
.templates-page .template-name { font-size: 0.9375rem; font-weight: 600; color: var(--brand-text-primary); margin-bottom: 0.25rem; line-height: 1.3; }
.templates-page .template-subject { font-size: 0.8125rem; color: var(--brand-text-secondary); margin-bottom: 0.25rem; line-height: 1.4; }
.templates-page .template-preview { font-size: 0.8125rem; color: var(--brand-text-secondary); margin-bottom: 0.25rem; line-height: 1.4; max-height: 2.5em; overflow: hidden; text-overflow: ellipsis; }
.templates-page .template-id { font-size: 0.75rem; color: var(--brand-text-light); margin-bottom: 0.25rem; font-family: monospace; }
.templates-page .template-actions { margin-top: 0.75rem; padding-top: 0.5rem; border-top: 1px solid var(--brand-neutral-light); }
.templates-page .template-actions .edit-template-btn { min-height: 32px; padding: 0.35rem 0.75rem; font-size: 0.8125rem; }

.templates-page .settings-editor { padding: 1.5rem 1.75rem; background: var(--bg-primary); border-radius: var(--radius-md); min-height: 400px; border: 1px solid var(--brand-neutral-light); border-left: none; }
.templates-page .editor-container { max-width: 100%; }
.templates-page .editor-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--brand-neutral-light); }
.templates-page .editor-header .editor-title { font-size: 1.25rem; font-weight: 600; color: var(--brand-text-primary); margin: 0 0 0.25rem 0; }
.templates-page .editor-header .text-muted { font-size: 0.8125rem; color: var(--brand-text-secondary); }
.templates-page .editor-section { margin-bottom: 1.5rem; padding: 1rem 0; }
.templates-page .editor-section .form-label { font-size: 0.875rem; font-weight: 500; color: var(--brand-text-primary); margin-bottom: 0.375rem; }
.templates-page .editor-section .form-control, .templates-page .editor-section .form-select { height: 42px; border-radius: var(--radius-sm); border: 1px solid var(--brand-neutral-light); font-size: 0.9rem; }
.templates-page .editor-toolbar { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; background: var(--brand-neutral-lightest); border: 1px solid var(--brand-neutral-light); border-radius: var(--radius-sm); flex-wrap: wrap; margin-bottom: 0.75rem; }
.templates-page .editor-toolbar .btn { min-height: 34px; }
.templates-page .variables-section { margin-bottom: 0.75rem; }
.templates-page .variables-section .small { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; color: var(--brand-text-secondary); letter-spacing: 0.5px; margin-bottom: 0.5rem; display: block; }
.templates-page .variable-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.templates-page .variable-buttons .btn { font-size: 0.8rem; padding: 0.35rem 0.6rem; }
.templates-page .editor-textarea { font-family: 'Roboto', sans-serif; font-size: 0.9375rem; line-height: 1.65; border: 1px solid var(--brand-neutral-light); border-radius: var(--radius-sm); padding: 1rem 1.25rem; resize: vertical; min-height: 260px; }
.templates-page .editor-textarea:focus { border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.12); outline: none; }

.templates-page .settings-preview { padding: 1.25rem; background: var(--brand-neutral-lightest); border-left: 1px solid var(--brand-neutral-light); border-radius: var(--radius-md) 0 0 var(--radius-md); min-height: 400px; }
.templates-page .preview-container { max-width: 100%; }
.templates-page .preview-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--brand-neutral-light); }
.templates-page .preview-title { font-size: 0.9375rem; font-weight: 600; color: var(--brand-text-primary); margin: 0; }
.templates-page .preview-toggle .btn { min-height: 32px; padding: 0.35rem 0.5rem; }
.templates-page .email-preview { background: var(--bg-primary); border: 1px solid var(--brand-neutral-light); border-radius: var(--radius-sm); overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.templates-page .email-header { padding: 1rem; border-bottom: 1px solid var(--brand-neutral-light); font-size: 0.875rem; }
.templates-page .email-banner { height: 60px; background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%); }
.templates-page .email-body { padding: 1rem 1.25rem; font-size: 0.9rem; line-height: 1.55; color: var(--brand-text-primary); }
.templates-page .email-body .email-info-box { background: var(--brand-neutral-lightest); border-radius: var(--radius-sm); padding: 0.75rem 1rem; margin: 0.75rem 0; border: 1px solid var(--brand-neutral-light); font-size: 0.875rem; }
.templates-page .email-footer { padding: 0.75rem 1rem; font-size: 0.75rem; color: var(--brand-text-secondary); border-top: 1px solid var(--brand-neutral-light); background: var(--brand-neutral-lightest); }

/* --------------------------------------------
   11. AUDIT LOG
   -------------------------------------------- */
.audit-log-page { padding: 2rem; max-width: 100%; overflow-x: hidden; }
.audit-log-table-container { background: var(--bg-primary); border-radius: 8px; padding: 1.5rem; box-shadow: 0 2px 4px rgba(0,0,0,0.05); overflow-x: auto; }
.audit-log-table thead th { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; color: var(--brand-text-secondary); letter-spacing: 0.5px; border-bottom: 2px solid var(--brand-neutral-light); padding: 1rem 0.75rem; white-space: nowrap; }
.audit-log-table tbody td { padding: 1rem 0.75rem; vertical-align: middle; border-bottom: 1px solid var(--table-border); }
.audit-log-table tbody tr:hover { background-color: var(--brand-neutral-lightest); }
.timestamp-cell { display: flex; flex-direction: column; gap: 0.25rem; }
.user-avatar-small { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%); color: var(--brand-text-inverse); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.875rem; flex-shrink: 0; }
.pagination-section { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; }
.pagination .page-link { color: var(--brand-primary); border-color: var(--brand-neutral-light); padding: 0.5rem 0.75rem; }
.pagination .page-item.active .page-link { background-color: var(--brand-primary); border-color: var(--brand-primary); color: var(--brand-text-inverse); }
.value-box { background: var(--bg-secondary); border: 1px solid var(--brand-neutral-light); border-radius: 4px; padding: 0.75rem; max-height: 200px; overflow-y: auto; }

/* --------------------------------------------
   12. PERMISSION (RolePermission page)
   -------------------------------------------- */
.role-permission-page { padding: 2rem; max-width: 100%; overflow-x: hidden; }
.role-permission-page .page-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.role-permission-page .page-title-large { font-size: 1.5rem; font-weight: 700; color: var(--brand-text-primary); margin-bottom: 0.375rem; }
.role-permission-page .page-description { font-size: 0.9375rem; color: var(--brand-text-secondary); margin: 0; line-height: 1.5; }
.header-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.last-modified-info { font-size: 0.8125rem; color: var(--brand-text-secondary); padding: 0.5rem 0; }
.last-modified-info small { color: var(--brand-text-secondary); }

.roles-panel { background: var(--bg-primary); border-radius: var(--radius-md); box-shadow: 0 2px 8px rgba(0,0,0,0.06); border: 1px solid var(--brand-neutral-light); overflow: hidden; }
.roles-panel .panel-header { background: var(--bg-secondary); padding: 1rem 1.25rem; border-bottom: 1px solid var(--brand-neutral-light); }
.roles-panel .panel-title { font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; color: var(--brand-text-primary); letter-spacing: 0.5px; margin: 0; }
.roles-panel .panel-body { padding: 1.25rem; }
.role-permission-page .filter-box { position: relative; display: flex; align-items: center; margin-bottom: 1rem; }
.role-permission-page .filter-box i { position: absolute; left: 0.75rem; color: var(--brand-text-secondary); font-size: 0.875rem; z-index: 1; }
.role-permission-page .filter-box .form-control { padding-left: 2.25rem; height: 42px; border-radius: var(--radius-sm); border: 1px solid var(--brand-neutral-light); font-size: 0.9rem; }
.roles-list { display: flex; flex-direction: column; gap: 0.75rem; }
.role-item { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; background: var(--brand-neutral-lightest); border: 1px solid var(--brand-neutral-light); border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s ease; gap: 0.75rem; }
.role-item:hover { background: var(--brand-primary-lightest); border-color: var(--brand-primary-lighter); }
.role-item.active { background: var(--brand-primary); border-color: var(--brand-primary); color: var(--brand-text-inverse); }
.role-item.active .role-name, .role-item.active .role-user-count { color: var(--brand-text-inverse); }
.role-item .role-info { flex: 1; min-width: 0; }
.role-item .role-name { font-size: 0.9375rem; font-weight: 600; color: var(--brand-text-primary); margin-bottom: 0.25rem; }
.role-item .role-user-count { font-size: 0.8125rem; color: var(--brand-text-secondary); margin: 0; }
.role-item > i { color: var(--brand-text-light); font-size: 0.75rem; flex-shrink: 0; }
.role-item.active > i { color: rgba(255,255,255,0.9); }

.permissions-panel { background: var(--bg-primary); border-radius: var(--radius-md); box-shadow: 0 2px 8px rgba(0,0,0,0.06); border: 1px solid var(--brand-neutral-light); padding: 1.5rem; min-height: 520px; }
.role-permission-page .nav-tabs { border-bottom: 2px solid var(--brand-neutral-light); margin-bottom: 1.5rem; gap: 0; }
.role-permission-page .nav-tabs .nav-link { border: none; border-bottom: 3px solid transparent; color: var(--brand-text-secondary); padding: 0.75rem 1.25rem; font-weight: 500; font-size: 0.9rem; }
.role-permission-page .nav-tabs .nav-link:hover { color: var(--brand-primary); }
.role-permission-page .nav-tabs .nav-link.active { color: var(--brand-primary); border-bottom-color: var(--brand-primary); background: transparent; }
.permission-search { position: relative; margin-bottom: 1.5rem; }
.permission-search i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--brand-text-secondary); z-index: 1; font-size: 0.875rem; }
.permission-search .form-control { padding-left: 2.5rem; height: 42px; border-radius: var(--radius-sm); border: 1px solid var(--brand-neutral-light); font-size: 0.9rem; }
.role-permission-page .user-search { position: relative; margin-bottom: 1.5rem; }
.role-permission-page .user-search i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--brand-text-secondary); z-index: 1; font-size: 0.875rem; }
.role-permission-page .user-search .form-control { padding-left: 2.5rem; height: 42px; border-radius: var(--radius-sm); border: 1px solid var(--brand-neutral-light); font-size: 0.9rem; }
.permission-categories { display: flex; flex-direction: column; gap: 1rem; }
.permission-category { border: 1px solid var(--brand-neutral-light); border-radius: var(--radius-md); overflow: hidden; background: var(--bg-primary); }
.permission-category .category-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; background: var(--bg-secondary); border-bottom: 1px solid var(--brand-neutral-light); flex-wrap: wrap; gap: 0.75rem; }
.permission-category .category-info { display: flex; align-items: flex-start; gap: 0.75rem; flex: 1; min-width: 0; }
.permission-category .category-info > i { color: var(--brand-primary); font-size: 1.125rem; margin-top: 0.125rem; flex-shrink: 0; }
.permission-category .category-name { font-size: 0.9375rem; font-weight: 600; color: var(--brand-text-primary); margin-bottom: 0.25rem; }
.permission-category .category-description { font-size: 0.8125rem; color: var(--brand-text-secondary); margin: 0; line-height: 1.4; }
.permission-category .category-toggle { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.permission-category .toggle-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; color: var(--brand-text-secondary); letter-spacing: 0.5px; }
.category-permissions { padding: 0.75rem 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.permission-item { display: flex; justify-content: space-between; align-items: center; padding: 0.875rem 1rem; background: var(--brand-neutral-lightest); border-radius: var(--radius-sm); border: 1px solid var(--brand-neutral-light); gap: 1rem; transition: all 0.2s ease; }
.permission-item .permission-info { flex: 1; min-width: 0; }
.permission-item .permission-name { font-size: 0.9rem; font-weight: 600; color: var(--brand-text-primary); margin-bottom: 0.125rem; }
.permission-item .permission-description { font-size: 0.8125rem; color: var(--brand-text-secondary); margin: 0; line-height: 1.4; }
.permission-item .form-check-input { flex-shrink: 0; }
.permission-item.warning { border-color: var(--brand-warning); background: var(--warning-bg); }
.permission-item.warning .permission-name { color: var(--brand-text-primary); }

.users-list { display: flex; flex-direction: column; gap: 0.75rem; }
.role-permission-page .users-list .user-item { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; background: var(--brand-neutral-lightest); border: 1px solid var(--brand-neutral-light); border-radius: var(--radius-sm); }
.role-permission-page .users-list .user-avatar-small { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%); color: var(--brand-text-inverse); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.875rem; flex-shrink: 0; }
.role-permission-page .users-list .user-info { flex: 1; min-width: 0; }
.role-permission-page .users-list .user-name { font-size: 0.9375rem; font-weight: 600; color: var(--brand-text-primary); margin-bottom: 0.25rem; }
.role-permission-page .users-list .user-email { font-size: 0.8125rem; color: var(--brand-text-secondary); margin: 0; }
.role-permission-page .users-list .user-assigned-date { font-size: 0.8125rem; color: var(--brand-text-secondary); flex-shrink: 0; }

.role-permission-page .audit-log-list { display: flex; flex-direction: column; gap: 0.75rem; }
.role-permission-page .audit-log-item { display: flex; align-items: flex-start; gap: 1rem; padding: 1rem 1.25rem; background: var(--brand-neutral-lightest); border: 1px solid var(--brand-neutral-light); border-radius: var(--radius-sm); }
.role-permission-page .audit-log-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--bg-secondary); display: flex; align-items: center; justify-content: center; color: var(--brand-primary); flex-shrink: 0; }
.role-permission-page .audit-log-info { flex: 1; min-width: 0; }
.role-permission-page .audit-log-action { font-size: 0.9rem; font-weight: 600; color: var(--brand-text-primary); margin-bottom: 0.25rem; }
.role-permission-page .audit-log-description { font-size: 0.875rem; color: var(--brand-text-secondary); margin-bottom: 0.25rem; line-height: 1.4; }
.role-permission-page .audit-log-meta { font-size: 0.75rem; color: var(--brand-text-light); margin: 0; }

.role-permission-page .empty-state { min-height: 400px; padding: 3rem 1.5rem; }
.role-permission-page .empty-state h5 { font-weight: 600; color: var(--brand-text-primary); margin-bottom: 0.5rem; }
.role-permission-page .empty-state .text-muted { color: var(--brand-text-secondary); font-size: 0.9rem; }
.role-permission-page .action-bar { position: relative; left: auto; right: auto; margin-top: 1.5rem; border-radius: var(--radius-md); }

/* --------------------------------------------
   13. ANALYSIS & REPORT
   -------------------------------------------- */
.vehicle-analysis-page, .report-page { padding: 2rem; max-width: 100%; overflow-x: hidden; }
.report-page .kpi-card { flex-direction: column; }
.chart-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.chart-card-title { font-size: 1.1rem; font-weight: 600; color: var(--brand-text-primary); margin: 0; }
.chart-card-link { color: var(--brand-primary); text-decoration: none; font-size: 0.875rem; font-weight: 500; }
.chart-container { position: relative; height: 300px; flex: 1; }
.table-card { background-color: var(--bg-primary); border-radius: 12px; padding: 1.5rem; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.table-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.table-card-title { font-size: 1.1rem; font-weight: 600; color: var(--brand-text-primary); margin: 0; }
.nav-tabs { border-bottom: 2px solid var(--brand-neutral-light); }
.nav-tabs .nav-link { border: none; border-bottom: 3px solid transparent; color: var(--brand-text-secondary); padding: 0.75rem 1.5rem; font-weight: 500; }
.nav-tabs .nav-link.active { color: var(--brand-primary); border-bottom-color: var(--brand-primary); background-color: transparent; }

/* --------------------------------------------
   14. VIEW-SPECIFIC
   -------------------------------------------- */
.edit-payment-page .form-label.required::after { content: " *"; color: var(--danger-color); }
.edit-payment-page .status-info ul li { margin-bottom: 0.25rem; }
.edit-payment-page .status-info ul li:last-child { margin-bottom: 0; }

.table-calendar { font-size: 0.85rem; }
.calendar-col-vehicle { min-width: 180px; max-width: 220px; position: sticky; left: 0; background: var(--bg-primary); z-index: 1; }
.calendar-day-header { min-width: 52px; max-width: 80px; font-weight: 600; }
.calendar-day-cell { min-width: 52px; max-width: 100px; vertical-align: middle; }
.calendar-cell-booked { background-color: var(--calendar-booked-bg); border: 1px solid var(--calendar-booked-border); }
.calendar-cell-free { background-color: var(--calendar-free-bg); border: 1px solid var(--calendar-free-border); }
.calendar-vehicle-thumb { width: 48px; height: 48px; object-fit: cover; }
.calendar-vehicle-thumb-placeholder { background: var(--border-neutral); }
.calendar-legend-dot { display: inline-block; width: 16px; height: 16px; border-radius: 3px; vertical-align: middle; margin-right: 6px; border: 2px solid rgba(0,0,0,0.3); box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.badge-sm { font-size: 0.65rem; padding: 0.15rem 0.3rem; }

.note-item { padding: 0.75rem; background: var(--brand-bg-secondary); border-radius: 6px; border-left: 3px solid var(--brand-primary); }
.note-content { margin-bottom: 0.5rem; color: var(--brand-text-primary); line-height: 1.5; }
.note-meta { font-size: 0.75rem; color: var(--brand-text-secondary); }
.activity-timeline { display: flex; flex-direction: column; gap: 1rem; }
.activity-item { display: flex; gap: 1rem; position: relative; }
.activity-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; margin-top: 0.25rem; }
.activity-dot-green { background-color: var(--brand-success); }
.activity-dot-blue { background-color: var(--brand-primary); }
.activity-dot-red { background-color: var(--brand-danger); }
.activity-dot-grey { background-color: var(--brand-text-light); }
.activity-content { flex: 1; }
.activity-title { font-weight: 600; color: var(--brand-text-primary); margin-bottom: 0.25rem; }
.activity-date { font-size: 0.75rem; color: var(--brand-text-secondary); margin-bottom: 0.25rem; }
.activity-desc { font-size: 0.875rem; color: var(--brand-text-secondary); }
.activity-timeline-full { position: relative; padding-left: 2rem; }
.activity-item-full { display: flex; gap: 1rem; position: relative; padding-bottom: 1.5rem; }
.activity-item-full:not(:last-child)::before { content: ''; position: absolute; left: 5px; top: 20px; bottom: -10px; width: 2px; background: var(--timeline-line); }
.activity-dot-full { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; margin-top: 0.25rem; position: absolute; left: -1.5rem; }
.activity-content-full { flex: 1; background: var(--bg-secondary); padding: 1rem; border-radius: 8px; border-left: 3px solid var(--brand-primary); }
.activity-title-full { font-weight: 600; color: var(--brand-text-primary); margin-bottom: 0.5rem; font-size: 0.95rem; }
.activity-date-full { font-size: 0.75rem; color: var(--brand-text-secondary); margin-bottom: 0.5rem; }
.activity-desc-full { font-size: 0.875rem; color: var(--brand-text-secondary); margin-bottom: 0.5rem; line-height: 1.5; }
.activity-user-full { font-size: 0.75rem; color: var(--brand-text-secondary); font-style: italic; }

.photo-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; margin-top: 1rem; }
.photo-item { position: relative; cursor: pointer; transition: transform 0.2s; }
.photo-item:hover { transform: scale(1.05); }
.photo-item img { width: 100%; height: 150px; object-fit: cover; border-radius: 8px; }
.image-modal .modal-dialog { max-width: 90vw; }
.image-modal .modal-body img { width: 100%; height: auto; border-radius: 8px; }
.damage-section { margin-top: 1.5rem; }

.vehicle-info-card { position: relative; }
.btn-change-vehicle-compact { position: absolute; top: 0.75rem; right: 0.75rem; width: 32px; height: 32px; padding: 0; display: flex; align-items: center; justify-content: center; background: var(--bg-secondary); border: 1px solid var(--brand-neutral-light); border-radius: 6px; color: var(--brand-text-secondary); font-size: 0.875rem; cursor: pointer; transition: all 0.2s ease; z-index: 10; }
.btn-change-vehicle-compact:hover { background: var(--border-neutral); border-color: var(--calendar-free-border); color: var(--brand-text-secondary); transform: scale(1.1); }
.vehicle-image-container { width: 100%; height: 180px; border-radius: 8px; overflow: hidden; background: var(--bg-secondary); display: flex; align-items: center; justify-content: center; }
.vehicle-image-container .vehicle-image { width: 100%; height: 100%; object-fit: cover; }
.vehicle-name { font-size: 1.25rem; font-weight: 700; color: var(--brand-text-primary); margin: 0; line-height: 1.3; }
.vehicle-details { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 0.9rem; color: var(--brand-text-secondary); }
.vehicle-info-item { padding: 0.75rem; background: var(--bg-secondary); border-radius: 6px; height: 100%; }
.vehicle-info-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; color: var(--brand-text-secondary); letter-spacing: 0.5px; margin-bottom: 0.5rem; }
.vehicle-info-value { font-size: 1.1rem; font-weight: 700; color: var(--brand-text-primary); }

.payment-detail-page .detail-item { margin-bottom: 1.5rem; }
.payment-detail-page .detail-item:last-child { margin-bottom: 0; }
.payment-detail-page .detail-label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--brand-text-secondary); margin-bottom: 0.25rem; text-transform: uppercase; letter-spacing: 0.5px; }
.payment-detail-page .detail-value { font-size: 1rem; color: var(--brand-text-primary); line-height: 1.4; }
.payment-detail-page .status-item { display: flex; align-items: flex-start; margin-bottom: 1rem; position: relative; }
.payment-detail-page .status-item:not(:last-child)::after { content: ''; position: absolute; left: 8px; top: 20px; bottom: -1rem; width: 2px; background: var(--border-neutral); }
.payment-detail-page .status-dot { width: 16px; height: 16px; border-radius: 50%; margin-right: 0.75rem; margin-top: 2px; flex-shrink: 0; }
.payment-detail-page .status-content { flex: 1; }
.payment-detail-page .bg-success { background-color: var(--success-color) !important; }
.payment-detail-page .bg-warning { background-color: var(--brand-warning) !important; }
.payment-detail-page .bg-danger { background-color: var(--danger-color) !important; }
.payment-detail-page .bg-secondary { background-color: var(--brand-text-secondary) !important; }

.change-status-page .current-status-display { padding: 1rem; background-color: var(--bg-secondary); border-radius: 0.5rem; border-left: 4px solid var(--brand-text-secondary); }
.change-status-page .info-display { margin-bottom: 1rem; }
.change-status-page .info-display .info-value { font-size: 1rem; color: var(--brand-text-primary); line-height: 1.4; }
.change-status-page .status-info .status-item { margin-bottom: 1rem; }
.change-status-page .status-info .status-item:last-child { margin-bottom: 0; }
.change-status-page .form-label.required::after { content: " *"; color: var(--danger-color); }
.change-status-page .bg-success { background-color: var(--success-color) !important; }
.change-status-page .bg-warning { background-color: var(--brand-warning) !important; }
.change-status-page .bg-danger { background-color: var(--danger-color) !important; }

.user-detail .info-card { background: var(--bg-secondary); padding: 1rem; border-radius: 8px; border: 1px solid var(--border-neutral); }
.user-detail .info-label { font-size: 0.875rem; color: var(--brand-text-secondary); margin-bottom: 0.25rem; font-weight: 500; }
.user-detail .info-value { font-size: 1.1rem; font-weight: 600; color: var(--brand-text-primary); }
.user-detail .detail-section { margin-bottom: 1.5rem; }
.user-detail .section-title { color: var(--brand-text-secondary); font-weight: 600; margin-bottom: 0.75rem; border-bottom: 2px solid var(--border-neutral); padding-bottom: 0.5rem; }
.user-detail .activity-summary .activity-card { background: var(--bg-secondary); padding: 1.5rem; border-radius: 8px; text-align: center; border: 1px solid var(--border-neutral); }
.user-detail .activity-icon { font-size: 2rem; color: var(--brand-text-secondary); margin-bottom: 0.75rem; }
.user-detail .activity-number { font-size: 1.5rem; font-weight: 700; color: var(--brand-text-secondary); margin-bottom: 0.25rem; }
.user-detail .activity-label { font-size: 0.875rem; color: var(--brand-text-secondary); }
.user-detail .account-info { background: var(--bg-secondary); padding: 1rem; border-radius: 8px; }
.user-detail .info-item { margin-bottom: 0.75rem; display: flex; justify-content: space-between; align-items: center; }
.user-detail .info-item:last-child { margin-bottom: 0; }
.user-detail .modal-actions { border-top: 1px solid var(--border-neutral); padding-top: 1rem; }

.nav-tabs-custom .nav-link { border: none; color: var(--brand-text-secondary); font-weight: 500; padding: 0.75rem 1.5rem; position: relative; transition: all 0.3s ease; }
.nav-tabs-custom .nav-link:hover { border: none; color: var(--brand-primary); }
.nav-tabs-custom .nav-link.active { color: var(--brand-primary); background-color: transparent; border: none; border-bottom: 3px solid var(--brand-primary); }
.nav-tabs-custom .nav-link i { margin-right: 5px; }
.tab-content { background: var(--bg-primary); border-radius: 0 0 0.5rem 0.5rem; }

.notification-list { max-height: 400px; overflow-y: auto; }
.notification-items { display: flex; flex-direction: column; gap: 8px; }
.notification-item { padding: 12px; border-radius: 8px; cursor: pointer; transition: all 0.2s ease; border: 1px solid var(--border-neutral); position: relative; }
.notification-item:hover { background-color: var(--bg-secondary); transform: translateY(-1px); box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.notification-item.unread { background-color: var(--warning-bg); border-color: var(--warning-border); }
.notification-item.read { background-color: var(--bg-secondary); }
.notification-info { border-left: 4px solid var(--info-cyan); }
.notification-success { border-left: 4px solid var(--success-color); }
.notification-warning { border-left: 4px solid var(--brand-warning); }
.notification-danger { border-left: 4px solid var(--danger-color); }
.notification-unread-indicator { position: absolute; top: 12px; right: 12px; width: 8px; height: 8px; background-color: var(--info-cyan); border-radius: 50%; }
.notification-content { flex: 1; }
.notification-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 4px; }
.notification-title { font-size: 14px; color: var(--brand-text-primary); flex: 1; margin-right: 8px; }
.notification-time { font-size: 12px; color: var(--brand-text-secondary); white-space: nowrap; }
.notification-message { font-size: 13px; color: var(--brand-text-secondary); margin: 4px 0; line-height: 1.4; }
.notification-link { font-size: 12px; color: var(--info-cyan); text-decoration: none; font-weight: 500; }
.notification-link:hover { text-decoration: underline; }
.notification-count-badge { display: none; }
.notification-count-badge:not(:empty) { display: inline-block; }
.search-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-primary); border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); border: 1px solid var(--border-neutral); z-index: 1000; max-height: 400px; overflow-y: auto; margin-top: 4px; }
.search-result-item { display: flex; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--bg-secondary); cursor: pointer; transition: background-color 0.2s ease; }
.search-result-item:hover { background-color: var(--bg-secondary); }
.search-result-item:last-child { border-bottom: none; }
.search-result-icon { width: 32px; height: 32px; border-radius: 6px; display: flex; align-items: center; justify-content: center; margin-right: 12px; font-size: 14px; }
.search-result-icon.motorbike { background-color: var(--result-motorbike-bg); color: var(--brand-primary); }
.search-result-icon.contract { background-color: var(--result-contract-bg); color: var(--result-contract-color); }
.search-result-content { flex: 1; min-width: 0; }
.search-result-title { font-size: 14px; font-weight: 500; color: var(--brand-text-primary); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-subtitle { font-size: 12px; color: var(--brand-text-secondary); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-description { font-size: 11px; color: var(--brand-text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-loading, .search-empty { padding: 20px; text-align: center; color: var(--brand-text-secondary); }

.maintenance-detail .info-card { background: var(--bg-secondary); padding: 1rem; border-radius: 8px; border: 1px solid var(--border-neutral); }
.maintenance-detail .info-label { font-size: 0.875rem; color: var(--brand-text-secondary); margin-bottom: 0.25rem; font-weight: 500; }
.maintenance-detail .info-value { font-size: 1.1rem; font-weight: 600; color: var(--brand-text-primary); }
.maintenance-detail .info-value.cost-value { color: var(--danger-color); font-size: 1.25rem; }
.maintenance-detail .detail-section { margin-bottom: 1.5rem; }
.maintenance-detail .section-title { color: var(--brand-text-secondary); font-weight: 600; margin-bottom: 0.75rem; border-bottom: 2px solid var(--border-neutral); padding-bottom: 0.5rem; }
.maintenance-detail .description-content, .maintenance-detail .notes-content { background: var(--bg-secondary); padding: 1rem; border-radius: 8px; border-left: 4px solid var(--brand-primary); }
.maintenance-detail .timestamps { background: var(--bg-secondary); padding: 1rem; border-radius: 8px; }
.maintenance-detail .timestamp-item { display: flex; align-items: center; margin-bottom: 0.5rem; }
.maintenance-detail .timestamp-item:last-child { margin-bottom: 0; }
.maintenance-detail .modal-actions { border-top: 1px solid var(--border-neutral); padding-top: 1rem; }
.success-icon { animation: checkmark 0.8s ease-in-out; }
@keyframes checkmark { 0% { transform: scale(0); opacity: 0; } 50% { transform: scale(1.2); opacity: 0.8; } 100% { transform: scale(1); opacity: 1; } }
.security-info { display: flex; align-items: center; padding: 0.75rem; background: var(--bg-secondary); border-radius: 8px; border: 1px solid var(--border-neutral); }
.practice-item { display: flex; align-items: center; padding: 0.5rem 0; }
.items-list { display: flex; flex-direction: column; gap: 1rem; }
.item-card { border: 1px solid var(--border-neutral); border-radius: 0.375rem; padding: 1rem; background: var(--bg-primary); transition: all 0.3s ease; }
.item-card:hover { box-shadow: 0 0.125rem 0.5rem rgba(0,0,0,0.1); }
.form-control-plaintext { padding: 0.5rem 0.75rem; margin-bottom: 0; line-height: 1.5; color: var(--brand-text-primary); background-color: var(--bg-secondary); border: 1px solid var(--border-neutral); border-radius: 0.375rem; }
