/* ============================================================
   CogFocus Campus - Production CSS
   Clean, Proportionate, Light Warm Orange & Natural Whites
   ============================================================ */

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

:root {
  /* Soft, Light Warm Citrus Orange (Not Overly Dark) */
  --primary: #F97316;
  --primary-dark: #EA580C;
  --primary-light: #FB923C;
  --primary-lighter: #FDBA74;
  --primary-50: #FFF7ED;
  --primary-100: #FFEDD5;
  --primary-200: #FED7AA;
  
  --grad-primary: linear-gradient(135deg, #FB923C 0%, #F97316 100%);
  --grad-card: linear-gradient(135deg, #FFFDFB 0%, #FFF7ED 100%);

  /* Neutrals */
  --white: #FFFFFF;
  --bg: #FFFDFB;
  --bg-card: #FFFFFF;
  --text-primary: #1C1917;
  --text-secondary: #57534E;
  --text-muted: #78716C;
  --border: #E7E5E4;
  --border-light: #F5F5F4;
  
  /* Semantics */
  --success: #22C55E;
  --success-bg: #F0FDF4;
  --warning: #EAB308;
  --warning-bg: #FEFCE8;
  --danger: #EF4444;
  --danger-bg: #FEF2F2;
  --info: #3B82F6;
  --info-bg: #EFF6FF;
  
  /* Sizing */
  --sidebar-width: 250px;
  --navbar-height: 60px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow: 0 4px 16px rgba(249,115,22,0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 14px;
  min-height: 100vh;
}

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

.sidebar {
  width: var(--sidebar-width);
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 16px 18px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
}
.sidebar-logo {
  width: 36px; height: 36px;
  background: var(--grad-primary);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: white; flex-shrink: 0;
}
.sidebar-brand-name { font-weight: 800; font-size: 15px; color: var(--text-primary); line-height: 1.2; }
.sidebar-brand-sub { font-size: 11px; color: var(--primary-dark); font-weight: 600; }

.sidebar-section { padding: 10px 12px; }
.sidebar-section-label {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  letter-spacing: 0.5px; text-transform: uppercase; padding: 4px 10px 6px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: var(--radius);
  color: var(--text-secondary); text-decoration: none;
  font-size: 13.5px; font-weight: 500;
  margin-bottom: 2px;
  transition: all 0.15s ease;
}
.nav-item:hover { background: var(--primary-50); color: var(--primary-dark); }
.nav-item.active { background: var(--primary-50); color: var(--primary-dark); font-weight: 600; }
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }

.sidebar-footer {
  margin-top: auto; padding: 14px;
  border-top: 1px solid var(--border-light);
}
.user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius);
  background: var(--primary-50);
}
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--grad-primary);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.user-name { font-size: 12.5px; font-weight: 600; color: var(--text-primary); }
.user-role { font-size: 11px; color: var(--primary-dark); font-weight: 600; text-transform: capitalize; }

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1; display: flex; flex-direction: column; min-width: 0;
}

.topbar {
  height: var(--navbar-height);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px; gap: 16px;
  position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-size: 16px; font-weight: 700; color: var(--text-primary); flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.page-content { padding: 24px; flex: 1; }
.page-header { margin-bottom: 20px; }
.page-title { font-size: 22px; font-weight: 800; color: var(--text-primary); }
.page-subtitle { font-size: 13.5px; color: var(--text-secondary); margin-top: 3px; }

/* Bento Cards */
.bento-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 20px;
}
.bento-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 18px 20px; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.bento-card:hover { border-color: var(--primary-200); box-shadow: var(--shadow); }

.bento-card-orange {
  background: var(--grad-primary); border: none; color: white;
}
.bento-card-orange .stat-label { color: rgba(255,255,255,0.9); }
.bento-card-orange .stat-value { color: white; }
.bento-card-orange .stat-icon { background: rgba(255,255,255,0.22); color: white; }

.stat-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--primary-50); color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.stat-label { font-size: 12.5px; color: var(--text-secondary); font-weight: 600; margin-bottom: 3px; }
.stat-value { font-size: 26px; font-weight: 800; color: var(--text-primary); line-height: 1.1; }
.stat-change { font-size: 12px; margin-top: 6px; font-weight: 500; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

.bento-card-lg { grid-column: span 2; }
.bento-card-xl { grid-column: span 3; }
.bento-card-full { grid-column: span 4; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 8px;
  font-weight: 600; font-size: 13.5px;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 6px rgba(249,115,22,0.25);
}
.btn-primary:hover { background: var(--primary-dark); color: white; }
.btn-secondary {
  background: var(--white); color: var(--primary-dark);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--primary-50); border-color: var(--primary-200); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--border-light); color: var(--text-primary); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 7px; }
.btn-lg { padding: 11px 22px; font-size: 14.5px; border-radius: 10px; }

/* Cards & Tables */
.card {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 14px 20px; border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.card-body { padding: 20px; }

.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-primary); margin-bottom: 5px; }
.form-control {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 13.5px; color: var(--text-primary); background: var(--white);
  outline: none; font-family: inherit;
}
.form-control:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(249,115,22,0.12);
}

.table-wrapper { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted); background: var(--bg); border-bottom: 1px solid var(--border);
}
.table td {
  padding: 12px 14px; border-bottom: 1px solid var(--border-light); color: var(--text-secondary);
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--primary-50); }

.badge {
  display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 100px;
  font-size: 11px; font-weight: 700;
}
.badge-orange { background: var(--primary-100); color: var(--primary-dark); }
.badge-success { background: var(--success-bg); color: #15803D; }
.badge-danger { background: var(--danger-bg); color: #DC2626; }
.badge-warning { background: var(--warning-bg); color: #92400E; }
.badge-info { background: var(--info-bg); color: #1D4ED8; }

.alert { padding: 10px 14px; border-radius: var(--radius); font-size: 13.5px; font-weight: 500; margin-bottom: 14px; }
.alert-success { background: var(--success-bg); color: #15803D; border: 1px solid #BBF7D0; }
.alert-danger { background: var(--danger-bg); color: #DC2626; border: 1px solid #FECACA; }
.alert-info { background: var(--info-bg); color: #1D4ED8; border: 1px solid #BFDBFE; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state-icon { margin-bottom: 10px; display: inline-flex; }
.empty-state-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }

/* Notice item */
.notice-item { padding: 12px 0; border-bottom: 1px solid var(--border-light); display: flex; gap: 12px; }
.notice-item:last-child { border-bottom: none; }
.notice-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); margin-top: 6px; flex-shrink: 0; }
.notice-date { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }

/* Auth page */
.auth-page {
  min-height: 100vh; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 16px;
}
.auth-card {
  background: var(--white); border-radius: var(--radius-xl);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  padding: 32px; width: 100%; max-width: 440px;
}
.auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; justify-content: center; }
.auth-logo-icon {
  width: 40px; height: 40px; background: var(--grad-primary);
  border-radius: 10px; display: flex; align-items: center; justify-content: center; color: white;
}
.auth-logo-text { font-size: 19px; font-weight: 800; color: var(--text-primary); }
.auth-logo-text span { color: var(--primary); }
.auth-title { font-size: 20px; font-weight: 800; color: var(--text-primary); text-align: center; }
.auth-subtitle { font-size: 13px; color: var(--text-muted); text-align: center; margin-top: 4px; margin-bottom: 20px; }

.role-select-grid { display: grid; gap: 10px; }
.role-select-card {
  padding: 14px; border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; background: var(--white); display: flex; align-items: center; gap: 12px;
  transition: all 0.15s ease;
}
.role-select-card:hover { border-color: var(--primary); background: var(--primary-50); }
.role-icon-box {
  width: 38px; height: 38px; border-radius: 9px;
  background: var(--primary-50); color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.role-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.role-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

/* Landing Page (Proportionate Fit) */
.landing-body { background: #FFFFFF; }
.landing-header {
  height: 64px; border-bottom: 1px solid var(--border); background: var(--white);
  position: sticky; top: 0; z-index: 100;
}
.landing-header-container {
  max-width: 1200px; height: 100%; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.landing-brand-link { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.landing-nav-menu { display: flex; align-items: center; gap: 28px; }
.landing-nav-link { color: var(--text-secondary); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.landing-nav-link:hover { color: var(--primary-dark); }
.landing-nav-actions { display: flex; align-items: center; gap: 10px; }

.landing-hero {
  padding: 48px 24px 56px;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.landing-hero-container {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  align-items: center; gap: 40px;
}

.hero-quote-box {
  background: var(--white); border: 1px solid var(--border);
  border-left: 4px solid var(--primary); padding: 12px 16px;
  border-radius: 0 10px 10px 0; margin-bottom: 18px;
}
.hero-quote-text { font-size: 14px; font-weight: 600; color: var(--text-primary); font-style: italic; }
.hero-quote-author { font-size: 11px; font-weight: 700; color: var(--primary-dark); margin-top: 4px; text-transform: uppercase; }

.hero-headline {
  font-size: 40px; font-weight: 900; line-height: 1.18; color: var(--text-primary); margin-bottom: 16px;
}
.hero-headline span { color: var(--primary); }
.hero-subhead { font-size: 15.5px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 24px; }
.hero-actions-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.hero-image-wrapper {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; box-shadow: var(--shadow);
  max-height: 380px; display: flex; align-items: center; justify-content: center;
}
.hero-image-wrapper img { width: 100%; height: 100%; max-height: 380px; object-fit: cover; display: block; }

.feature-box { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; }
.feature-icon-box {
  width: 42px; height: 42px; border-radius: 10px; background: var(--primary-50); color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}

@media (max-width: 992px) {
  .landing-hero-container { grid-template-columns: 1fr; }
  .hero-image-wrapper { max-height: 300px; }
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-card-full, .bento-card-xl, .bento-card-lg { grid-column: span 2; }
}

@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  .landing-nav-menu { display: none; }
  .hero-headline { font-size: 30px; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-card-full, .bento-card-xl, .bento-card-lg { grid-column: span 1; }
}
