/* ============================================================
   SPRING EDUCATION & VISA SERVICES — Mock Interview Platform
   Brand colours extracted directly from official logo:
   Deep green #1b6a16, Leaf green #85c344, Gold #e6bb43
   ============================================================ */

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

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

:root {
  /* Spring EVS official palette */
  --spring-green:      #1b6a16;  /* deep forest green — primary */
  --spring-green-dark: #145010;  /* darker shade for hover states */
  --spring-green-deep: #0e3a0b;  /* deepest shade */
  --spring-leaf:        #85c344; /* bright leaf green — secondary accent */
  --spring-gold:         #e6bb43; /* gold/amber — tertiary accent */
  --spring-gold-dark:    #c99f30;

  --spring-green-soft: rgba(27,106,22,0.12);
  --spring-green-glow: rgba(27,106,22,0.20);
  --spring-leaf-soft:  rgba(133,195,68,0.14);
  --spring-gold-soft:  rgba(230,187,67,0.16);

  /* Neutrals */
  --bg:       #0a120a;
  --surface:  #101c0f;
  --surface2: #172616;
  --surface3: #1e301c;
  --border:   rgba(255,255,255,0.07);
  --border2:  rgba(255,255,255,0.13);

  /* Text */
  --text:  #f0f5ee;
  --text2: #93ab8d;
  --text3: #54684f;

  /* Accents */
  --amber:      #e6bb43;
  --amber-soft: rgba(230,187,67,0.14);
  --red:        #ef4444;
  --red-soft:   rgba(239,68,68,0.12);
  --blue:       #3b82f6;
  --blue-soft:  rgba(59,130,246,0.12);

  /* Radius */
  --radius:    13px;
  --radius-sm: 8px;
  --radius-xs: 6px;
}

html, body { height: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ---- Shared sidebar ---- */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: 224px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 1.25rem 0; z-index: 10;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 0 1.25rem 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}
.spring-logo-icon {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.spring-logo-icon img { width: 100%; height: 100%; object-fit: contain; }
.sidebar-logo-text .logo-name  { font-size: 13px; font-weight: 700; line-height: 1.2; letter-spacing: 0.2px; }
.sidebar-logo-text .logo-tagline { font-size: 9.5px; color: var(--text2); line-height: 1.3; margin-top: 1px; text-transform: uppercase; letter-spacing: 0.4px; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 1.25rem; margin: 1px 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 13.5px; color: var(--text2);
  cursor: pointer; transition: all 0.15s;
  text-decoration: none;
}
.nav-item:hover  { background: var(--surface2); color: var(--text); }
.nav-item.active { background: var(--spring-green-soft); color: var(--spring-leaf); box-shadow: inset 2px 0 0 var(--spring-gold); }
.nav-item svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; flex-shrink: 0; }

.sidebar-bottom {
  margin-top: auto;
  padding: 0.75rem 0.5rem 0;
  border-top: 1px solid var(--border);
}
.user-row {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 0.75rem; border-radius: var(--radius-sm);
}
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--spring-leaf-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: var(--spring-leaf); flex-shrink: 0;
}
.user-name  { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-email { font-size: 11px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Shared main area ---- */
.main { margin-left: 224px; padding: 2rem 2.5rem; }

/* ============================================================
   GLOBAL MOBILE RESPONSIVE — sidebar collapses to a top bar
   ============================================================ */
@media (max-width: 880px) {
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 0.75rem 1rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    white-space: nowrap;
  }
  .sidebar-logo {
    padding: 0 0.75rem 0 0;
    border-bottom: none;
    border-right: 1px solid var(--border);
    margin-bottom: 0;
    flex-shrink: 0;
  }
  .sidebar-logo-text .logo-tagline { display: none; }
  .nav-item {
    padding: 8px 12px;
    margin: 0 2px;
    flex-shrink: 0;
  }
  .nav-item span, .nav-item { font-size: 12.5px; }
  .sidebar-bottom {
    margin-top: 0;
    margin-left: auto;
    padding: 0 0 0 0.75rem;
    border-top: none;
    border-left: 1px solid var(--border);
    flex-shrink: 0;
  }
  .user-row { padding: 4px 0.5rem; }
  .user-email { display: none; }

  .main {
    margin-left: 0;
    padding: 1.25rem 1rem;
  }
}

@media (max-width: 480px) {
  .nav-item { padding: 7px 9px; font-size: 11.5px; }
  .nav-item svg { width: 14px; height: 14px; }
  .sidebar-logo-text .logo-name { font-size: 12px; }
  .main { padding: 1rem 0.85rem; }
}

/* ---- Buttons ---- */
.btn-green {
  background: var(--spring-green); color: #fff; border: none;
  border-radius: var(--radius-sm); font-family: inherit;
  font-size: 14px; font-weight: 500; cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.btn-green:hover  { background: var(--spring-green-dark); }
.btn-green:active { transform: scale(0.97); }
.btn-green:disabled { opacity: 0.45; cursor: default; transform: none; }

.btn-ghost {
  background: var(--surface2); border: 1px solid var(--border2);
  color: var(--text2); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all 0.15s; display: inline-flex; align-items: center; gap: 6px;
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.2); color: var(--text); }

/* ---- Cards ---- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ---- Badges ---- */
.badge { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 500; }
.badge-green  { background: var(--spring-leaf-soft); color: var(--spring-leaf); }
.badge-gold   { background: var(--spring-gold-soft); color: var(--spring-gold); }
.badge-amber  { background: var(--amber-soft); color: var(--amber); }
.badge-red    { background: var(--red-soft); color: var(--red); }
.badge-blue   { background: var(--blue-soft); color: var(--blue); }

/* ---- Form inputs ---- */
label { display: block; font-size: 13px; font-weight: 500; color: var(--text2); margin-bottom: 6px; }
input[type="email"],
input[type="text"],
input[type="password"],
textarea {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-family: inherit;
  font-size: 14px; padding: 10px 14px; outline: none; transition: border-color 0.15s;
}
input:focus, textarea:focus { border-color: var(--spring-green); }
input::placeholder, textarea::placeholder { color: var(--text3); }

/* ---- Spinner ---- */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 2px; }
