/* ==========================================================================
   ArtCRM Design System 2026 — Modern Enterprise SaaS UI/UX
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  /* Brand Primary Colors */
  --primary-50:  #eef2ff;
  --primary-100: #e0e7ff;
  --primary-200: #c7d2fe;
  --primary-300: #a5b4fc;
  --primary-400: #818cf8;
  --primary-500: #6366f1;
  --primary-600: #4f46e5;
  --primary-700: #4338ca;
  --primary-800: #3730a3;
  --primary-900: #312e81;
  --primary:     #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-glow: rgba(79, 70, 229, 0.16);

  /* Semantic Accents */
  --secondary:       #0ea5e9;
  --secondary-light: #f0f9ff;
  --secondary-border:#bae6fd;
  
  --success:         #10b981;
  --success-dark:    #059669;
  --success-light:   #ecfdf5;
  --success-border:  #a7f3d0;
  --success-text:    #065f46;

  --warning:         #f59e0b;
  --warning-dark:    #d97706;
  --warning-light:   #fffbeb;
  --warning-border:  #fde68a;
  --warning-text:    #92400e;

  --danger:          #f43f5e;
  --danger-dark:     #e11d48;
  --danger-light:    #fff1f2;
  --danger-border:   #fecdd3;
  --danger-text:     #9f1239;

  --purple:          #8b5cf6;
  --purple-light:    #f5f3ff;
  --purple-border:   #ddd6fe;

  /* Neutrals & Surfaces */
  --sidebar-bg:      #0b1120;
  --sidebar-surface: #131d33;
  --sidebar-border:  #1e293b;
  --sidebar-text:    #94a3b8;
  --sidebar-hover:   #1e293b;
  --sidebar-active:  #ffffff;

  --bg-page:         #f8fafc;
  --bg-card:         #ffffff;
  --bg-subtle:       #f1f5f9;
  --bg-hover:        #f8fafc;

  --text-main:       #0f172a;
  --dark:            #0f172a;
  --text-body:       #334155;
  --text-muted:      #64748b;
  --text-subtle:     #94a3b8;

  --border:          #e2e8f0;
  --border-light:    #f1f5f9;
  --border-focus:    #6366f1;

  /* Dimensions */
  --sidebar-w:       264px;
  --header-h:        68px;
  --radius-xs:       4px;
  --radius-sm:       8px;
  --radius-md:       12px;
  --radius-lg:       16px;
  --radius-xl:       24px;

  /* Layered Shadows */
  --shadow-xs:       0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-sm:       0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-md:       0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg:       0 10px 15px -3px rgba(15, 23, 42, 0.07), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl:       0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-glow:     0 0 20px rgba(99, 102, 241, 0.25);

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-norm: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-body);
  line-height: 1.5;
  font-size: 13.5px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code, pre {
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--primary-hover);
}

/* Base Vector Icon System */
.icon {
  display: inline-block;
  vertical-align: -0.15em;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: transform var(--transition-fast), stroke var(--transition-fast);
}

.icon-sm {
  width: 14px;
  height: 14px;
}

.icon-md {
  width: 18px;
  height: 18px;
}

.icon-lg {
  width: 24px;
  height: 24px;
}

.icon-xl {
  width: 32px;
  height: 32px;
}

.btn .icon {
  vertical-align: -0.16em;
  margin-right: 6px;
}

.btn:has(> .icon:only-child),
.btn-icon-only .icon {
  margin-right: 0;
  vertical-align: middle;
}

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

/* Sidebar Styling */
.app-sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
  transition: transform var(--transition-slow);
}

.app-sidebar::-webkit-scrollbar {
  width: 5px;
}
.app-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}

.sidebar-brand {
  padding: 20px 20px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--sidebar-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
  flex-shrink: 0;
}

.brand-text h1 {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-text span {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  display: block;
  letter-spacing: 0.02em;
}

.sidebar-nav {
  padding: 14px 10px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-title {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #64748b;
  padding: 14px 12px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
  text-decoration: none;
  transform: translateX(2px);
}

.nav-link.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.22) 0%, rgba(99, 102, 241, 0.04) 100%);
  color: #ffffff;
  font-weight: 600;
}

.nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3.5px;
  border-radius: 0 4px 4px 0;
  background: var(--primary-500);
  box-shadow: 0 0 10px var(--primary-500);
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity var(--transition-fast);
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
  opacity: 1;
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  flex-shrink: 0;
}


/* Main Layout Area */
.app-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: var(--bg-page);
}

/* Header */
.app-header {
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 40;
}

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

/* Tenant Pill */
.tenant-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  padding: 6px 14px;
  border-radius: var(--radius-xl);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
}

.tenant-badge:hover {
  border-color: #cbd5e1;
}

.tenant-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  animation: pulse-dot 2.5s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Header Quick Search Shortcut */
.quick-search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px 14px;
  font-size: 12.5px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.quick-search-trigger:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  color: var(--text-main);
  box-shadow: var(--shadow-xs);
}

.kbd-shortcut {
  font-size: 10px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.lang-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 5px;
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.lang-btn:hover {
  color: var(--text-main);
  text-decoration: none;
}

.lang-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow-xs);
}

/* User Menu */
.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  padding: 4px 10px 4px 5px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition-fast);
}

.user-menu:hover {
  border-color: #cbd5e1;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12.5px;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.25);
}

.user-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.user-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.user-role-pill {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.2;
}

/* Content Container */
.app-content {
  padding: 32px;
  flex: 1;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* Page Header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-main);
  line-height: 1.2;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 400;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
  position: relative;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
  flex-wrap: wrap;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

/* Grids */
.grid-cols-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-cols-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

@media (max-width: 1180px) {
  .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-3 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .app-sidebar { transform: translateX(-100%); }
  .app-sidebar.open { transform: translateX(0); }
  .app-main { margin-left: 0; }
  .grid-cols-4, .grid-cols-2 { grid-template-columns: 1fr; }
  .app-header { padding: 0 16px; }
  .app-content { padding: 18px 14px; }
  #mobileMenuToggle { display: inline-flex !important; }
}

/* Stat Cards */
.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.stat-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0;
  background: var(--primary);
  transition: opacity var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.stat-card:hover::after {
  opacity: 1;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-icon.indigo { background: #eef2ff; color: #4f46e5; border: 1px solid #e0e7ff; }
.stat-icon.green  { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.stat-icon.amber  { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.stat-icon.rose   { background: #fff1f2; color: #e11d48; border: 1px solid #fecdd3; }
.stat-icon.sky    { background: #f0f9ff; color: #0284c7; border: 1px solid #bae6fd; }
.stat-icon.purple { background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe; }

.stat-value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-main);
  line-height: 1.15;
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all var(--transition-fast);
  line-height: 1.4;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.2);
}
.btn-primary:hover {
  background: var(--primary-hover);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-main);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: #cbd5e1;
  color: var(--text-main);
}

.btn-success {
  background: var(--success);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.2);
}
.btn-success:hover {
  background: var(--success-dark);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(244, 63, 94, 0.2);
}
.btn-danger:hover {
  background: var(--danger-dark);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.35);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 11.5px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 12px 24px;
  font-size: 14px;
  border-radius: var(--radius-md);
}

/* Badges & Pills */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-xl);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-success { background: var(--success-light); color: var(--success-text); border: 1px solid var(--success-border); }
.badge-warning { background: var(--warning-light); color: var(--warning-text); border: 1px solid var(--warning-border); }
.badge-danger  { background: var(--danger-light);  color: var(--danger-text);  border: 1px solid var(--danger-border); }
.badge-info    { background: var(--secondary-light); color: #0369a1; border: 1px solid var(--secondary-border); }
.badge-purple  { background: var(--purple-light); color: #6d28d9; border: 1px solid var(--purple-border); }
.badge-neutral { background: var(--bg-subtle); color: #475569; border: 1px solid var(--border); }

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #ffffff;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 13px;
}

.table th {
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.07em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-body);
  vertical-align: middle;
  background: #ffffff;
  transition: background var(--transition-fast);
}

.table tbody tr:hover td {
  background: #f8fafc;
}

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

/* Table Search Filter */
.table-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  max-width: 340px;
}

.search-input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input-wrap input {
  padding-left: 36px !important;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 12.5px;
  margin-bottom: 6px;
  color: #334155;
}

.form-control {
  width: 100%;
  padding: 9px 13px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-size: 13px;
  font-family: inherit;
  background: #ffffff;
  color: var(--text-main);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

select.form-control {
  cursor: pointer;
}

textarea.form-control {
  min-height: 90px;
  resize: vertical;
}

/* Alerts */
.alert {
  padding: 13px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  box-shadow: var(--shadow-xs);
  animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.alert-success { background: var(--success-light); color: var(--success-text); border-color: var(--success-border); }
.alert-danger  { background: var(--danger-light);  color: var(--danger-text);  border-color: var(--danger-border); }
.alert-warning { background: var(--warning-light); color: var(--warning-text); border-color: var(--warning-border); }

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity var(--transition-norm);
}

.modal-backdrop.open {
  display: flex;
  opacity: 1;
}

.modal-box {
  background: #ffffff;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 28px;
  border: 1px solid var(--border);
  transform: scale(0.96) translateY(10px);
  transition: transform var(--transition-norm);
}

.modal-backdrop.open .modal-box {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.modal-close {
  background: var(--bg-subtle);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: #e2e8f0;
  color: var(--text-main);
  transform: rotate(90deg);
}

/* Command Palette (Ctrl+K) */
.cmd-palette-box {
  max-width: 540px !important;
  padding: 16px !important;
}

.cmd-search-input {
  width: 100%;
  border: none;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 12px;
  outline: none;
  background: transparent;
  color: var(--text-main);
}

.cmd-results {
  margin-top: 12px;
  max-height: 340px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.cmd-item:hover, .cmd-item.active {
  background: var(--primary-light);
  color: var(--primary);
}

.cmd-item-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* Attendance Radio Pills */
.attendance-pill-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.attendance-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.attendance-pill input[type="radio"] {
  display: none;
}

.attendance-pill.status-present:hover,
.attendance-pill.status-present:has(input:checked) {
  background: var(--success-light);
  border-color: var(--success);
  color: var(--success-text);
  box-shadow: 0 0 0 1px var(--success);
}

.attendance-pill.status-valid:hover,
.attendance-pill.status-valid:has(input:checked) {
  background: var(--warning-light);
  border-color: var(--warning);
  color: var(--warning-text);
  box-shadow: 0 0 0 1px var(--warning);
}

.attendance-pill.status-invalid:hover,
.attendance-pill.status-invalid:has(input:checked) {
  background: var(--danger-light);
  border-color: var(--danger);
  color: var(--danger-text);
  box-shadow: 0 0 0 1px var(--danger);
}

.attendance-pill.status-makeup:hover,
.attendance-pill.status-makeup:has(input:checked) {
  background: var(--secondary-light);
  border-color: var(--secondary);
  color: #0369a1;
  box-shadow: 0 0 0 1px var(--secondary);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.8;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.empty-state-text {
  font-size: 13px;
  max-width: 420px;
  margin: 0 auto 16px;
}

/* Print Styles */
@media print {
  .app-sidebar, .app-header, .btn, .no-print, form, .modal-backdrop, .quick-search-trigger {
    display: none !important;
  }
  .app-main { margin-left: 0 !important; }
  .card { box-shadow: none !important; border: 1px solid #ccc !important; }
  body { background: #fff !important; color: #000 !important; }
}
