
/* ====================================================================
   ANIMATED LOGO LOADING SPLASH SCREEN
==================================================================== */
#splash-screen {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #0f172a 0%, #020617 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  color: white;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s ease;
}

#splash-screen.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-logo-wrapper {
  position: relative;
  width: 96px;
  height: 96px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-logo-glow {
  position: absolute;
  inset: -18px;
  background: radial-gradient(circle, rgba(225, 29, 72, 0.6) 0%, rgba(234, 88, 12, 0.3) 50%, rgba(225, 29, 72, 0) 70%);
  border-radius: 50%;
  animation: pulseGlow 2s infinite ease-in-out;
}

.splash-logo-img {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 28px rgba(225, 29, 72, 0.5);
  position: relative;
  z-index: 2;
  animation: floatLogo 3s ease-in-out infinite;
}

.splash-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #ffffff;
  margin-bottom: 6px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.splash-subtitle {
  font-size: 12px;
  font-weight: 700;
  color: #fb7185;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 32px;
}

.splash-progress-bar {
  width: 220px;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.splash-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ea580c, #e11d48, #f43f5e);
  border-radius: 9999px;
  animation: fillProgress 1.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.sahyogg-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(225, 29, 72, 0.18);
  border-top-color: #e11d48;
  border-right-color: #ea580c;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

.sahyogg-gradient-btn {
  background: linear-gradient(135deg, #ea580c 0%, #e11d48 50%, #be123c 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.35) !important;
}

.sahyogg-gradient-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.25); opacity: 1; }
}

@keyframes floatLogo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes fillProgress {
  0% { width: 0%; }
  50% { width: 65%; }
  100% { width: 100%; }
}

/* SAHYOGG OS - ENTERPRISE MODERN SAAS THEME (PLUS JAKARTA SANS + OUTFIT) */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap');

:root {
  --bg-main: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-hover: #f1f5f9;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-focus: #0284c7;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  --primary-dark: #075985;
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --indigo: #6366f1;
  --indigo-light: #e0e7ff;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --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);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .sidebar-title, .view-header h2 {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif !important;
  letter-spacing: -0.02em;
}

.mono-num, .badge-purple, .badge-primary, .custom-table td strong {
  font-feature-settings: 'tnum' on, 'lnum' on;
}

body {
  background-color: var(--bg-subtle);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Layout */
#app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

#sidebar {
  width: 264px;
  background-color: var(--bg-main);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 1px 0 3px rgba(0, 0, 0, 0.02);
}

.sidebar-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
}

.sidebar-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.sidebar-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.sidebar-nav {
  padding: 14px 10px;
  overflow-y: auto;
  flex: 1;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 14px 12px 6px 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: #334155;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 2px;
  text-decoration: none;
}

.nav-item span {
  display: inline-block;
  font-size: 13.5px;
  font-weight: 600;
  color: inherit;
  flex: 1;
  line-height: 1.25;
}

.nav-item:hover {
  background-color: var(--bg-hover);
  color: var(--primary);
  transform: translateX(2px);
}

.nav-item.active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  border-left: 3px solid var(--primary);
}

.nav-item svg, .nav-item i {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  background: #f8fafc;
  margin-top: auto;
}

.btn-sidebar-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-sidebar-logout:hover {
  background: #fecaca;
}

/* Main Content Area */
#main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-width: 0;
  overflow: hidden;
  background-color: #f8fafc;
}

#top-header {
  height: 64px;
  background-color: var(--bg-main);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.header-search {
  position: relative;
  width: 420px;
}

.header-search input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  font-size: 13.5px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: #f8fafc;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
}

.header-search input:focus {
  border-color: var(--primary);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.header-search svg {
  position: absolute;
  left: 12px;
  top: 11px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

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

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  transition: all 0.15s ease;
}

.user-badge:hover {
  background: #f1f5f9;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
}

.user-info {
  line-height: 1.25;
}

.user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.user-role {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Content Container */
#content-area {
  flex: 1;
  padding: 28px;
  overflow-y: auto;
}

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

.view-header h2 {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.view-header p {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
}

/* Modern Elevated Cards & Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}

.stat-card {
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

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

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  color: var(--primary);
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.stat-footer {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ====================================================================
   DASHBOARD ENTERPRISE EXECUTIVE DESIGN SYSTEM (DESKTOP + MOBILE)
==================================================================== */
.dashboard-hero {
  background: radial-gradient(circle at 10% 20%, #1e293b 0%, #0f172a 100%);
  border-radius: 16px;
  padding: 22px 28px;
  color: white;
  margin-bottom: 22px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.35);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

.hero-profile-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
  flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.2);
}

.hero-name {
  font-size: 22px;
  font-weight: 900;
  margin: 0;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.hero-role {
  font-size: 12px;
  color: #38bdf8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

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

.hero-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  text-decoration: none;
}

.hero-action-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.hero-btn-sky {
  background: rgba(2, 132, 199, 0.25);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #e0f2fe;
}
.hero-btn-emerald {
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #ecfdf5;
}
.hero-btn-indigo {
  background: rgba(99, 102, 241, 0.22);
  border: 1px solid rgba(129, 140, 248, 0.4);
  color: #e0e7ff;
}
.hero-btn-amber {
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fef3c7;
}
.hero-btn-rose {
  background: rgba(239, 68, 68, 0.22);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #fee2e2;
}

/* Dashboard Desktop Grids */
.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
  width: 100%;
  box-sizing: border-box;
}

.dashboard-pipeline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
}

.workbench-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 22px;
  width: 100%;
  box-sizing: border-box;
  align-items: flex-start;
}

/* Data Tables */
.card-table, .table-container {
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.table-header-bar {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-main);
}

.table-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
}

.custom-table, .data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.custom-table th, .data-table th {
  background-color: #f8fafc;
  color: #475569;
  padding: 12px 18px;
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.custom-table td, .data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
}

.custom-table tr:hover td, .data-table tr:hover td {
  background-color: #f8fafc;
}

/* Badges & Status Pills */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.badge-blue { background-color: var(--primary-light); color: var(--primary-dark); }
.badge-green { background-color: var(--success-light); color: #065f46; }
.badge-yellow { background-color: var(--warning-light); color: #92400e; }
.badge-red { background-color: var(--danger-light); color: #991b1b; }
.badge-indigo { background-color: var(--indigo-light); color: #3730a3; }
.badge-gray { background-color: #f1f5f9; color: #475569; }

/* 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 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-outline {
  background-color: var(--bg-main);
  border-color: var(--border-color);
  color: #334155;
}

.btn-outline:hover {
  background-color: var(--bg-subtle);
  border-color: #cbd5e1;
}

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

/* Modals & Dialogs */
.modal-backdrop, #modal-container {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-card {
  background-color: var(--bg-main);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xl);
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #f8fafc;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

/* Form Inputs */
.input, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], select, textarea {
  font-family: inherit;
  font-size: 13.5px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  transition: all 0.15s ease;
}

.input:focus, input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

/* Tabs Navigation */
.tabs-header {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
  padding-bottom: 2px;
}

.tab-btn {
  padding: 10px 16px;
  border: none;
  background: none;
  font-size: 13.5px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  color: var(--primary);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Organization Tree / Reporting Hierarchy Styling */
.org-tree {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.org-node-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease;
}

.org-node-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.org-subordinates {
  margin-left: 36px;
  border-left: 2px dashed #cbd5e1;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}




/* ====================================================================
   ULTRA-PREMIUM ENTERPRISE AUTH & LOGIN STYLES
==================================================================== */
.auth-page-bg {
  min-height: 100vh;
  background: radial-gradient(circle at 50% 0%, #1e293b 0%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 16px;
  position: relative;
}

.auth-page-bg::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 550px;
  height: 350px;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.18) 0%, rgba(2, 132, 199, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
  padding: 40px 34px;
  position: relative;
  z-index: 10;
  animation: authCardPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authCardPop {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-logo-box {
  text-align: center;
  margin-bottom: 26px;
}

.auth-logo-img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 10px 25px rgba(244, 63, 94, 0.3), 0 2px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 14px;
  transition: transform 0.2s ease;
}

.auth-logo-img:hover {
  transform: scale(1.05);
}

.auth-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.auth-subtitle {
  font-size: 13px;
  color: #64748b;
}

/* FORM ELEMENTS - 100% PURE AND UNAMBIGUOUS */
.form-group {
  display: flex !important;
  flex-direction: column !important;
  margin-bottom: 18px !important;
  width: 100% !important;
  text-align: left !important;
}

.form-label {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: #334155 !important;
  margin-bottom: 6px !important;
  letter-spacing: 0.01em !important;
}

.input-with-icon {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
}

.input-with-icon i[data-lucide],
.input-with-icon .input-icon-left {
  position: absolute !important;
  left: 14px !important;
  width: 18px !important;
  height: 18px !important;
  color: #94a3b8 !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

.form-input, .input {
  width: 100% !important;
  box-sizing: border-box !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  color: #0f172a !important;
  background-color: #f8fafc !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 11px 14px !important;
  outline: none !important;
  transition: all 0.15s ease-in-out !important;
  display: block !important;
}

.input-with-icon .form-input {
  padding-left: 42px !important;
  padding-right: 42px !important;
}

.form-input:focus, .input:focus {
  background-color: #ffffff !important;
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12) !important;
}

.btn-toggle-eye {
  position: absolute !important;
  right: 12px !important;
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  padding: 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 3 !important;
  border-radius: 6px !important;
}

.btn-toggle-eye:hover {
  color: #0284c7 !important;
  background: #f1f5f9 !important;
}

.btn-auth-submit {
  width: 100% !important;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 14.5px !important;
  padding: 12px !important;
  border-radius: 10px !important;
  border: none !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35) !important;
  transition: all 0.15s ease !important;
  margin-top: 6px !important;
}

.btn-auth-submit:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45) !important;
  transform: translateY(-1px) !important;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 22px 0 16px 0;
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.auth-divider span {
  padding: 0 12px;
}

/* ====================================================================
   NATIVE MOBILE APP SLIDE-DRAWER & RESPONSIVE SUITE (PHONE, TAB, LAPTOP)
==================================================================== */

html, body, #app-container, #main-wrapper, #content-area, .auth-page-bg, #login-screen, #setup-screen {
  max-width: 100vw !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

/* Sidebar Backdrop for Mobile Slide Drawer */
#sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(2px);
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.btn-mobile-menu {
  display: none;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  width: 38px;
  height: 38px;
  color: #0f172a;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s;
}

.btn-mobile-menu:hover {
  background: #e2e8f0;
}

.mobile-brand-title {
  display: none;
  align-items: center;
  gap: 8px;
}

.btn-sidebar-close {
  display: none;
  align-items: center;
  justify-content: center;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  cursor: pointer;
}

/* 1. Mobile Phones & Small Tablets (Screens <= 1024px) */
@media (max-width: 1024px) {
  body {
    position: relative !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }

  #app-container {
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100vw !important;
    height: auto !important;
    min-height: 100vh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  /* Slide-Over Drawer Sidebar on Mobile */
  #sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 290px !important;
    max-width: 84vw !important;
    height: 100vh !important;
    z-index: 100000 !important;
    background: #ffffff !important;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.35) !important;
    transform: translateX(-105%) !important;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    border-right: 1px solid #e2e8f0 !important;
  }

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

  .btn-sidebar-close {
    display: flex !important;
  }

  .btn-mobile-menu {
    display: flex !important;
  }

  .mobile-brand-title {
    display: flex !important;
  }

  .sidebar-header {
    padding: 14px 16px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
  }

  .sidebar-nav {
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    width: 100% !important;
    padding: 12px 10px !important;
    gap: 2px !important;
  }

  .nav-section-title {
    font-size: 11px !important;
    color: #94a3b8 !important;
    padding: 14px 12px 4px 12px !important;
    text-transform: uppercase !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em !important;
  }

  .nav-item {
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    padding: 10px 14px !important;
    font-size: 13.5px !important;
    border-radius: 8px !important;
    color: #334155 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: left !important;
    border-left: none !important;
    margin-bottom: 2px !important;
  }

  .nav-item.nav-hidden,
  .nav-item[style*="display: none"],
  .nav-section-title.nav-hidden,
  .nav-section-title[style*="display: none"] {
    display: none !important;
  }

  .nav-item span {
    display: inline-block !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: inherit !important;
    line-height: 1.25 !important;
    flex: 1 !important;
    text-align: left !important;
    white-space: normal !important;
  }

  .nav-item svg, .nav-item i {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
  }

  .nav-item.active {
    background-color: var(--primary-light) !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
    border-left: 3px solid var(--primary) !important;
  }

  /* Fixed Clean Single-Row Mobile Header */
  #top-header {
    height: 56px !important;
    padding: 0 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 999 !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  .header-search {
    display: none !important;
  }

  #btn-quick-export {
    display: none !important;
  }

  .user-info {
    display: none !important;
  }

  #btn-logout {
    display: none !important;
  }

  .header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: auto !important;
  }

  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  #app-container {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  #main-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    box-sizing: border-box !important;
    flex: 1 !important;
  }

  #content-area {
    padding: 10px 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .auth-card {
    width: calc(100vw - 20px) !important;
    max-width: 420px !important;
    margin: 14px auto !important;
    padding: 22px 16px !important;
    box-sizing: border-box !important;
  }

  /* Executive Responsive System for Dashboard Elements */
  .dashboard-hero {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 16px 14px !important;
    gap: 14px !important;
  }

  .hero-profile-side {
    width: 100% !important;
  }

  .hero-actions-side {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .hero-action-btn {
    padding: 10px 8px !important;
    font-size: 12px !important;
    width: 100% !important;
  }

  .dashboard-stats-grid,
  .dashboard-pipeline-grid,
  .stats-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    gap: 8px !important;
    box-sizing: border-box !important;
    margin-bottom: 18px !important;
  }

  .stat-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 12px 10px !important;
    border-radius: 12px !important;
  }

  .workbench-grid,
  .mobile-stack,
  div[style*="grid-template-columns"]:not(.stats-grid):not(.dashboard-stats-grid):not(.dashboard-pipeline-grid):not(.quick-actions-grid):not(.mobile-2col) {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    gap: 14px !important;
  }

  .workbench-grid > div,
  .mobile-stack > div {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  div[style*="border-radius"],
  div[style*="background: #ffffff"],
  div[style*="background: rgb(255, 255, 255)"],
  div[style*="background: white"] {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .modal-content, .modal-box, .passport-modal-content {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    margin: 8px auto !important;
    padding: 16px 14px !important;
    max-height: 94vh !important;
    overflow-y: auto !important;
    border-radius: 12px !important;
  }

  /* Mobile Horizontal Table Scroll & Container Suite */
  .table-responsive,
  .card-table {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
    border-radius: 12px !important;
    display: block !important;
    margin-bottom: 16px !important;
    position: relative !important;
  }

  .table-responsive table,
  .card-table table,
  .custom-table,
  .data-table {
    min-width: 650px !important;
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 12px !important;
  }

  .custom-table th,
  .custom-table td,
  .data-table th,
  .data-table td {
    padding: 10px 12px !important;
    white-space: nowrap !important;
  }

  /* Action Buttons & Touch Targets on Mobile */
  .form-input, .btn, button, select {
    font-size: 13.5px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .btn, button {
    min-height: 40px !important;
    touch-action: manipulation !important;
  }

  .view-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    width: 100% !important;
    margin-bottom: 18px !important;
  }

  .view-header h2 {
    font-size: 18px !important;
    line-height: 1.3 !important;
  }

  .tabs-header {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    white-space: nowrap !important;
    gap: 6px !important;
    padding-bottom: 6px !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  .tab-btn {
    flex-shrink: 0 !important;
    padding: 6px 14px !important;
    font-size: 12.5px !important;
  }

  /* Universal Role Hero Banners on Mobile */
  div[style*="linear-gradient(135deg"] {
    padding: 18px 16px !important;
    border-radius: 12px !important;
    margin-bottom: 18px !important;
  }

  div[style*="linear-gradient(135deg"] h1 {
    font-size: 20px !important;
    line-height: 1.25 !important;
  }

  div[style*="linear-gradient(135deg"] p {
    font-size: 12.5px !important;
    line-height: 1.4 !important;
  }

  div[style*="linear-gradient(135deg"] div[style*="display: flex; gap:"] {
    width: 100% !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  div[style*="linear-gradient(135deg"] div[style*="display: flex; gap:"] .btn {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* 2. Laptops & Wide Desktop Displays (Screens >= 1025px) */
@media (min-width: 1025px) {
  #sidebar {
    width: 260px !important;
    position: static !important;
    transform: none !important;
    height: 100vh !important;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  }

  #content-area {
    padding: 24px 28px !important;
  }
}
