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

:root {
  --bg:        #0d1117;
  --surface:   #161b22;
  --surface2:  #21262d;
  --border:    #30363d;
  --accent:    #c9a84c;
  --accent2:   #e8c97b;
  --text:      #e6edf3;
  --muted:     #8b949e;
  --danger:    #f85149;
  --success:   #3fb950;
  --radius:    12px;
  --shadow:    0 8px 32px rgba(0,0,0,0.5);
}

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

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  min-height: 100vh;
  line-height: 1.6;
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(201,168,76,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(201,168,76,0.04) 0%, transparent 50%);
}

/* ── HEADER ─────────────────────────────── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 72px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.site-header .logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.site-header .logo-mark {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: #0d1117;
  flex-shrink: 0;
}

.site-header .college-name {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.site-header .college-name span {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.header-spacer { flex: 1; }

.header-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.header-user strong { color: var(--text); }
.header-user .avatar {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #0d1117;
}

/* ── LAYOUT ─────────────────────────────── */
.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.page-subtitle {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

/* ── CARD ────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.card-sm {
  max-width: 480px;
  margin: 0 auto;
}

/* ── FORM ────────────────────────────────── */
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}
.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}
.form-control[readonly] {
  opacity: 0.6;
  cursor: not-allowed;
}
select.form-control option { background: var(--surface2); }
textarea.form-control { resize: vertical; min-height: 90px; }

.form-control-file {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: var(--surface2);
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 0.2s;
}
.form-control-file:hover { border-color: var(--accent); color: var(--text); }

/* ── BUTTONS ─────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #0d1117;
  font-weight: 600;
}
.btn-primary:hover { opacity: 0.9; box-shadow: 0 4px 16px rgba(201,168,76,0.3); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface2); color: var(--text); }

.btn-danger {
  background: rgba(248,81,73,0.1);
  color: var(--danger);
  border: 1px solid rgba(248,81,73,0.3);
}
.btn-danger:hover { background: rgba(248,81,73,0.2); }

.btn-row {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ── ADMIN PANEL GRID ─────────────────────── */
.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.panel-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.panel-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0;
  transition: opacity 0.25s;
}
.panel-tile:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,0.4); }
.panel-tile:hover::before { opacity: 1; }

.tile-icon {
  width: 44px; height: 44px;
  background: rgba(201,168,76,0.1);
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 1.3rem;
}
.tile-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
}
.tile-desc { font-size: 0.8rem; color: var(--muted); }

/* ── LOGIN ──────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.login-brand {
  text-align: center;
  margin-bottom: 2rem;
}
.login-brand .mark {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 16px;
  display: grid; place-items: center;
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: #0d1117;
  margin: 0 auto 1rem;
}
.login-brand h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
}
.login-brand p { font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; }

/* ── ALERTS ─────────────────────────────── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.alert-success { background: rgba(63,185,80,0.1); border: 1px solid rgba(63,185,80,0.3); color: var(--success); }
.alert-error   { background: rgba(248,81,73,0.1);  border: 1px solid rgba(248,81,73,0.3);  color: var(--danger); }

/* ── DIVIDER ────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* ── NAV BREADCRUMB ─────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--border); }

/* ── SECTION HEADER ─────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.section-header .icon {
  width: 36px; height: 36px;
  background: rgba(201,168,76,0.1);
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 600;
}
.section-header p { font-size: 0.8rem; color: var(--muted); }

/* ── FOOTER ─────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.75rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* ── NOTICE ─────────────────────────────── */
.info-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.2);
  color: var(--accent2);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
}

/* ── RESPONSIVE ─────────────────────────── */
@media (max-width: 600px) {
  .site-header { padding: 0 1rem; }
  .page-wrap { padding: 1.5rem 1rem; }
  .card { padding: 1.25rem; }
  .panel-grid { grid-template-columns: 1fr 1fr; }
  .college-name { display: none; }
}
