/*
 * SANQUA Multi Internasional - Employee Evaluation System
 * Enterprise Mobile-Optimized Design System
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --font-main:       'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Primary Palette */
  --primary:         #1a56db;
  --primary-hover:   #1d4ed8;
  --primary-light:   #eff6ff;
  --primary-ring:    rgba(26, 86, 219, 0.18);
  
  /* Neutral Slate Palette */
  --bg-page:         #f8fafc;
  --bg-card:         #ffffff;
  --border-subtle:   #e2e8f0;
  --border-card:     #e2e8f0;
  
  /* Text Colors */
  --text-main:       #0f172a;
  --text-muted:      #64748b;
  --text-subtle:     #94a3b8;
  
  /* Dark Slate Sidebar */
  --sidebar-bg:      #0b1329;
  --sidebar-border:  rgba(255, 255, 255, 0.08);
  --sidebar-text:    #94a3b8;
  --sidebar-active:  #1a56db;
  
  /* Status Colors */
  --success:         #10b981;
  --warning:         #f59e0b;
  --danger:          #ef4444;
  --info:            #06b6d4;

  /* Shadows & Radius */
  --shadow-card:     0 1px 3px 0 rgba(15, 23, 42, 0.04), 0 4px 12px -2px rgba(15, 23, 42, 0.05);
  --shadow-hover:    0 10px 25px -5px rgba(15, 23, 42, 0.1);
  --radius-sm:       0.375rem;
  --radius-md:       0.625rem;
  --radius-lg:       0.875rem;
  --radius-xl:       1.25rem;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-main);
  font-size: 0.9125rem;
  color: var(--text-main);
  background-color: var(--bg-page);
  margin: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ============================================================
   SIDEBAR (Desktop & Mobile Drawer)
   ============================================================ */
.sidebar {
  width: 260px;
  min-height: 100vh;
  background: var(--sidebar-bg);
  position: fixed;
  top: 0; left: 0;
  display: flex;
  flex-direction: column;
  z-index: 1050;
  border-right: 1px solid var(--sidebar-border);
  transition: transform 0.3s ease-in-out;
}

.sidebar-logo {
  padding: 1.25rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-logo .logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, #1a56db 0%, #1d4ed8 100%);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.15rem; font-weight: 800;
  box-shadow: 0 4px 12px rgba(26, 86, 219, 0.4);
}

.sidebar-logo .logo-text {
  font-weight: 800;
  font-size: 0.9rem;
  color: white;
  line-height: 1.2;
}

.sidebar-logo .logo-text small {
  font-weight: 500;
  font-size: 0.7rem;
  color: var(--sidebar-text);
  display: block;
}

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

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #475569;
  padding: 1rem 0.75rem 0.35rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all 0.15s ease-in-out;
  margin-bottom: 0.15rem;
}

.nav-link:hover { background: rgba(255, 255, 255, 0.06); color: #f1f5f9; }
.nav-link.active {
  background: var(--primary);
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(26, 86, 219, 0.35);
}
.nav-link .nav-icon { font-size: 1rem; width: 1.15rem; text-align: center; }

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--sidebar-border);
  background: rgba(0,0,0,0.2);
}

.user-card { display: flex; align-items: center; gap: 0.65rem; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.15); }
.user-info .user-name { font-size: 0.825rem; font-weight: 600; color: white; }
.user-info .user-role { font-size: 0.7rem; color: var(--sidebar-text); }

/* ============================================================
   MAIN WRAPPER & TOPBAR
   ============================================================ */
.main-wrapper {
  margin-left: 260px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s ease-in-out;
}

.topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.page-content { padding: 1.5rem; flex: 1; }

/* Mobile Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1040;
}

/* ============================================================
   CARDS & STATS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  background: transparent;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
  display: flex; align-items: center; gap: 0.5rem;
}

.card-body { padding: 1.25rem; }

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-card);
}

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

.stat-icon.primary { background: #eff6ff; color: #1a56db; }
.stat-icon.success { background: #ecfdf5; color: #10b981; }
.stat-icon.warning { background: #fffbeb; color: #f59e0b; }
.stat-icon.info    { background: #ecfeff; color: #0891b2; }

.stat-value { font-size: 1.6rem; font-weight: 800; color: var(--text-main); line-height: 1.1; }
.stat-label { font-size: 0.775rem; font-weight: 500; color: var(--text-muted); margin-top: 0.2rem; }

/* ============================================================
   TABLES
   ============================================================ */
.table-responsive {
  border-radius: var(--radius-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table { font-size: 0.85rem; margin-bottom: 0; }
.table thead th {
  background: #f8fafc;
  font-weight: 700;
  color: #475569;
  font-size: 0.725rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  white-space: nowrap;
}
.table tbody td { padding: 0.85rem 1rem; vertical-align: middle; border-bottom: 1px solid #f1f5f9; }

/* ============================================================
   BADGES & BUTTONS
   ============================================================ */
.badge { font-size: 0.725rem; font-weight: 600; padding: 0.3em 0.7em; border-radius: 9999px; }
.badge-kontrak { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-promosi { background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; }

.btn { font-weight: 600; font-size: 0.85rem; border-radius: var(--radius-md); padding: 0.5rem 1rem; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: white; }

/* ============================================================
   LOGIN PAGE (Mobile Optimized Glassmorphism)
   ============================================================ */
.login-wrapper {
  min-height: 100vh;
  background: radial-gradient(circle at top right, #1e293b 0%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
}

.login-card {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  padding: 2.25rem 1.75rem;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.login-logo {
  width: 54px; height: 54px;
  background: linear-gradient(135deg, #1a56db 0%, #1d4ed8 100%);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: white; font-weight: 800;
  margin: 0 auto 1rem;
  box-shadow: 0 6px 16px rgba(26, 86, 219, 0.35);
}

.login-title { font-size: 1.3rem; font-weight: 800; color: #0f172a; margin-bottom: 0.3rem; }
.login-subtitle { font-size: 0.825rem; color: #64748b; margin-bottom: 1.5rem; line-height: 1.4; }

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.8rem 1.25rem;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  color: #1e293b;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

svg { max-width: 100%; }
.google-icon {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  min-height: 20px !important;
  max-height: 20px !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
}

/* Status Pages (404, 500, Success) */
.status-page { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.status-card { background: white; border-radius: var(--radius-xl); padding: 2.25rem 1.5rem; max-width: 440px; width: 100%; text-align: center; box-shadow: var(--shadow-hover); }
.status-icon { width: 68px; height: 68px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; margin: 0 auto 1.25rem; }

/* ============================================================
   RESPONSIVE MEDIA QUERIES (MOBILE PHONE FIXES)
   ============================================================ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.show {
    transform: translateX(0);
  }
  .sidebar-overlay.show {
    display: block;
  }
  .main-wrapper {
    margin-left: 0 !important;
  }
  .topbar {
    padding: 0.75rem 1rem;
  }
  .page-content {
    padding: 1rem;
  }
  
  .login-card {
    padding: 1.75rem 1.25rem;
  }
  .login-title {
    font-size: 1.15rem;
  }
  
  .stat-card {
    padding: 0.85rem 1rem;
    gap: 0.75rem;
  }
  .stat-icon {
    width: 40px; height: 40px;
    font-size: 1.1rem;
  }
  .stat-value {
    font-size: 1.35rem;
  }
  .stat-label {
    font-size: 0.725rem;
  }

  .aspect-card {
    padding: 0.85rem;
  }
  .aspect-name {
    font-size: 0.875rem;
  }
  .aspect-desc {
    font-size: 0.775rem;
  }

  .score-input {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  body { font-size: 0.85rem; }
  .btn { padding: 0.45rem 0.85rem; font-size: 0.8rem; }
  .topbar h1 { font-size: 0.95rem !important; }
}