/* assets/css/main.css - Rameez Scripts Saloon Enterprise Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

:root {
  --primary-color: #C59B27;
  --primary-hover: #a8821f;
  --primary-light: rgba(197, 155, 39, 0.12);
  --primary-border: rgba(197, 155, 39, 0.3);
  --primary-contrast: #ffffff;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Light Theme */
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --bg-hover: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);

  --sidebar-width: 260px;
  --sidebar-collapsed-width: 76px;
  --header-height: 64px;

  /* Glass Defaults */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-filter: blur(12px);

  /* Sidebar color themes */
  --sidebar-bg: #0f172a;
  --sidebar-text: #e2e8f0;
  --sidebar-text-muted: #94a3b8;
  --sidebar-hover: rgba(255, 255, 255, 0.08);
  --sidebar-border: rgba(255, 255, 255, 0.1);
  --sidebar-active-bg: rgba(197, 155, 39, 0.2);
  --sidebar-active-text: #ffffff;
}

/* Dark Theme Overrides */
[data-theme-mode="dark"] {
  --bg-body: #0b0f19;
  --bg-card: #131c2e;
  --bg-card-subtle: #1a253c;
  --bg-hover: #1e2c47;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --border-color: #24324f;
  --border-subtle: #1c273e;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  --glass-bg: rgba(19, 28, 46, 0.85);
  --glass-border: rgba(255, 255, 255, 0.08);
}

/* Sidebar Themes */
[data-theme-sidebar="navy"] {
  --sidebar-bg: #07172b;
}
[data-theme-sidebar="light"] {
  --sidebar-bg: #ffffff;
  --sidebar-text: #1e293b;
  --sidebar-text-muted: #64748b;
  --sidebar-hover: #f1f5f9;
  --sidebar-border: #e2e8f0;
  --sidebar-active-bg: var(--primary-light);
  --sidebar-active-text: var(--primary-color);
}
[data-theme-sidebar="theme"] {
  --sidebar-bg: var(--primary-color);
  --sidebar-text: #ffffff;
  --sidebar-text-muted: rgba(255, 255, 255, 0.75);
  --sidebar-hover: rgba(255, 255, 255, 0.15);
  --sidebar-border: rgba(255, 255, 255, 0.2);
  --sidebar-active-bg: rgba(0, 0, 0, 0.25);
  --sidebar-active-text: #ffffff;
}

/* Corners: Square Mode */
[data-theme-corners="square"] * {
  border-radius: 0 !important;
}

/* Glass Variations */
[data-theme-glass="blur"] .glass-panel,
[data-theme-glass="blur"] .modal-content,
[data-theme-glass="blur"] .preview-card-sticky {
  background: var(--glass-bg) !important;
  backdrop-filter: var(--glass-filter) !important;
  -webkit-backdrop-filter: var(--glass-filter) !important;
  border-color: var(--glass-border) !important;
}

/* Global Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* App Wrapper Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Left Sidebar */
.app-sidebar {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: width 0.25s ease, background-color 0.25s ease;
  overflow: hidden;
  border-right: 1px solid var(--sidebar-border);
}

.sidebar-header {
  height: var(--header-height);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--sidebar-border);
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon-gold {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #d4af37 0%, #aa771c 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(170, 119, 28, 0.4);
}

.brand-title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--sidebar-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-collapse-btn {
  background: none;
  border: none;
  color: var(--sidebar-text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-collapse-btn:hover {
  color: #fff;
  background: var(--sidebar-hover);
}

.sidebar-search-box {
  padding: 12px 16px;
  border-bottom: 1px solid var(--sidebar-border);
}
.sidebar-search-input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  background: var(--sidebar-hover);
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius-md);
  color: var(--sidebar-text);
  font-size: 13px;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
  background-size: 16px;
}
.sidebar-search-input:focus {
  border-color: var(--primary-color);
}

.sidebar-nav-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}
.sidebar-nav-scroll::-webkit-scrollbar {
  width: 5px;
}
.sidebar-nav-scroll::-webkit-scrollbar-thumb {
  background: var(--sidebar-border);
  border-radius: 4px;
}

.nav-group-title {
  padding: 14px 20px 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--sidebar-text-muted);
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 20px;
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.15s ease;
  position: relative;
}
.nav-link:hover {
  background-color: var(--sidebar-hover);
  color: #ffffff;
}
.nav-link.active {
  background-color: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  font-weight: 600;
}
.nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: var(--primary-color);
}
.nav-link-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-link-icon {
  width: 18px;
  text-align: center;
  font-size: 15px;
  opacity: 0.85;
}
.nav-counter-badge {
  background-color: var(--primary-color);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  gap: 8px;
}
.sidebar-footer-btn {
  flex: 1;
  padding: 8px 10px;
  background: var(--sidebar-hover);
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius-md);
  color: var(--sidebar-text);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s;
}
.sidebar-footer-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Main Content Area */
.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.25s ease;
}

/* Collapsed Sidebar State */
body.sidebar-collapsed .app-sidebar {
  width: var(--sidebar-collapsed-width);
}
body.sidebar-collapsed .app-main {
  margin-left: var(--sidebar-collapsed-width);
}
body.sidebar-collapsed .brand-title,
body.sidebar-collapsed .brand-subtitle,
body.sidebar-collapsed .sidebar-search-box,
body.sidebar-collapsed .nav-group-title,
body.sidebar-collapsed .nav-link-text,
body.sidebar-collapsed .nav-counter-badge,
body.sidebar-collapsed .sidebar-footer {
  display: none !important;
}
body.sidebar-collapsed .nav-link {
  justify-content: center;
  padding: 12px 0;
}
body.sidebar-collapsed .nav-link-left {
  justify-content: center;
}

/* Header */
.app-header {
  height: var(--header-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: var(--shadow-sm);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-muted);
}
.breadcrumb-nav a:hover {
  color: var(--primary-color);
}
.breadcrumb-nav .separator {
  color: var(--border-color);
}
.breadcrumb-nav .current {
  font-weight: 600;
  color: var(--text-main);
}

/* Master Branch Switcher */
.branch-switcher-select {
  padding: 7px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card-subtle);
  color: var(--text-main);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  outline: none;
}
.branch-switcher-select:focus {
  border-color: var(--primary-color);
}

.header-center {
  flex: 1;
  max-width: 450px;
  margin: 0 24px;
}
.global-search-wrapper {
  position: relative;
  width: 100%;
}
.global-search-input {
  width: 100%;
  padding: 8px 14px 8px 38px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
}
.global-search-input:focus {
  background: var(--bg-card);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.global-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.15s;
}
.header-btn:hover {
  background: var(--bg-hover);
  color: var(--primary-color);
}
.header-badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background-color: #ef4444;
  border-radius: 50%;
}

/* User Profile & Demo Switcher */
.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 6px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  cursor: pointer;
}
.user-avatar-small {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}
.user-name-role {
  text-align: left;
  line-height: 1.2;
}
.user-name-text {
  font-size: 13px;
  font-weight: 600;
}
.user-role-text {
  font-size: 11px;
  color: var(--text-muted);
}

/* Body Content Container */
.page-container {
  padding: 24px;
  flex: 1;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}
.page-title-group h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
}
.page-title-group p {
  font-size: 13.5px;
  color: var(--text-muted);
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Universal Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  outline: none;
}
.btn-primary {
  background-color: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(197, 155, 39, 0.3);
}
.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-color);
}
.btn-secondary:hover {
  background-color: var(--bg-hover);
}
.btn-dark {
  background-color: #0f172a;
  color: #ffffff;
}
.btn-dark:hover {
  background-color: #1e293b;
}
.btn-danger {
  background-color: #ef4444;
  color: #ffffff;
}
.btn-danger:hover {
  background-color: #dc2626;
}
.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}
.btn-lg {
  padding: 12px 24px;
  font-size: 15px;
}

/* Universal Metric Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.kpi-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.kpi-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.kpi-icon-box {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.kpi-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  font-family: var(--font-sans);
}
.kpi-subtext {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Universal Table Card & Action Bar */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 24px;
}

.table-action-bar {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background-color: var(--bg-card);
}

.action-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 280px;
}
.table-search-input {
  max-width: 260px;
  padding: 7px 12px 7px 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 8px center;
  background-size: 16px;
}
.table-search-input:focus {
  border-color: var(--primary-color);
  background: var(--bg-card);
}

.action-bar-filter-select {
  padding: 7px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
  color: var(--text-main);
  font-size: 13px;
  cursor: pointer;
  outline: none;
}

.action-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Bulk Selection Floating Bar */
.bulk-selection-bar {
  display: none;
  background-color: #0f172a;
  color: #ffffff;
  padding: 10px 18px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.bulk-selection-bar.active {
  display: flex;
}
.bulk-badge {
  background: var(--primary-color);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

/* Filter Tabs */
.filter-tabs-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 18px;
  background-color: var(--bg-card-subtle);
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
}
.filter-tab {
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.filter-tab:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.04);
}
.filter-tab.active {
  background: var(--bg-card);
  color: var(--primary-color);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

/* Clean Data Table */
.data-table-wrapper {
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}
.data-table th {
  background-color: var(--bg-card-subtle);
  padding: 12px 16px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}
.data-table tr:hover td {
  background-color: var(--bg-hover);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #e0f2fe; color: #075985; }
.badge-neutral { background: #f1f5f9; color: #475569; }
.badge-primary { background: var(--primary-light); color: var(--primary-color); border: 1px solid var(--primary-border); }

/* Table Action Buttons */
.action-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.action-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s;
}
.action-icon-btn:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
  background: var(--primary-light);
}

/* =========================================================================
   UNIVERSAL SPLIT-SCREEN MODAL ARCHITECTURE
   ========================================================================= */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.active {
  display: flex;
}

.split-modal-container {
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.modal-header-luxury {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
}
.modal-title-group h2 {
  font-size: 18px;
  font-weight: 700;
}
.modal-title-group p {
  font-size: 12.5px;
  color: var(--text-muted);
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.demo-fill-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.split-modal-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.modal-form-col {
  width: 68%;
  padding: 24px;
  overflow-y: auto;
  border-right: 1px solid var(--border-color);
}

.modal-preview-col {
  width: 32%;
  padding: 24px;
  background-color: var(--bg-card-subtle);
  overflow-y: auto;
}

.preview-card-sticky {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
}

.preview-card-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary-color);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin: 18px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-section-title:first-child {
  margin-top: 0;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

.form-group {
  margin-bottom: 14px;
}
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}
.form-label .required-star {
  color: #ef4444;
}
.form-control {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s;
}
.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.modal-footer-actions {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: var(--bg-card);
}

/* =========================================================================
   POP-UPS, TOASTS & RTL SUPPORT
   ========================================================================= */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast-card {
  min-width: 300px;
  max-width: 420px;
  padding: 14px 18px;
  background: #0f172a;
  color: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 4px solid var(--primary-color);
  animation: slideInRight 0.25s ease forwards;
}
.toast-card.toast-error {
  border-left-color: #ef4444;
}
.toast-card.toast-success {
  border-left-color: #10b981;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* RTL Support */
[dir="rtl"] {
  text-align: right;
}
[dir="rtl"] .app-sidebar {
  left: auto;
  right: 0;
  border-right: none;
  border-left: 1px solid var(--sidebar-border);
}
[dir="rtl"] .app-main {
  margin-left: 0;
  margin-right: var(--sidebar-width);
}
[dir="rtl"] body.sidebar-collapsed .app-main {
  margin-left: 0;
  margin-right: var(--sidebar-collapsed-width);
}
[dir="rtl"] .nav-link.active::before {
  left: auto;
  right: 0;
}
[dir="rtl"] .modal-form-col {
  border-right: none;
  border-left: 1px solid var(--border-color);
}
[dir="rtl"] .toast-container {
  right: auto;
  left: 24px;
}
[dir="rtl"] .global-search-input {
  padding: 8px 38px 8px 14px;
}
[dir="rtl"] .global-search-icon {
  left: auto;
  right: 14px;
}
[dir="rtl"] .table-search-input {
  padding: 7px 32px 7px 12px;
  background-position: calc(100% - 8px) center;
}
