/* ====================================================================
   Barpeta Polytechnic - Shared Styles
   Royal Blue + Saffron . Modern Sans-Serif
==================================================================== */
:root {
  --royal: #1E3A8A;
  --royal-dark: #152C6B;
  --royal-light: #2952C8;
  --saffron: #F59E0B;
  --saffron-deep: #D97706;
  --saffron-light: #FCD34D;
  --ashoka-blue: #0F2E7E;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --ink: #0F172A;
  --muted: #64748B;
  --line: #E2E8F0;
  --line-strong: #CBD5E1;
  --success: #059669;
  --danger: #DC2626;
  --warning: #D97706;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
}
.display { font-family: 'Outfit', sans-serif; letter-spacing: -0.02em; }

/* ===== Top govt strip ===== */
.top-strip {
  background: var(--royal-dark); color: rgba(255,255,255,0.85);
  font-size: 12px; padding: 6px 32px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 2px solid var(--saffron);
}
.tri-stripe { display: inline-flex; gap: 2px; margin-right: 10px; vertical-align: middle; }
.tri-stripe span { display: inline-block; width: 14px; height: 8px; }
.tri-stripe span:nth-child(1) { background: var(--saffron); }
.tri-stripe span:nth-child(2) { background: #fff; }
.tri-stripe span:nth-child(3) { background: #138808; }

/* ===== Header / Top bar ===== */
.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 14px 32px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 1px 3px rgba(15,23,42,0.04);
  position: sticky; top: 0; z-index: 50;
}
.app-brand { display: flex; align-items: center; gap: 14px; }
.logo {
  width: 48px; height: 48px; border-radius: 11px;
  background: linear-gradient(135deg, var(--royal), var(--ashoka-blue));
  position: relative; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(30,58,138,0.25);
  display: flex; align-items: center; justify-content: center;
}
.logo::before {
  content: ''; position: absolute; inset: 3px;
  border: 1.5px solid var(--saffron); border-radius: 9px;
}
.logo-text {
  font-family: 'Outfit', sans-serif; font-weight: 800;
  font-size: 17px; color: var(--saffron); letter-spacing: 0.4px;
  position: relative; z-index: 1;
}
.app-title {
  font-family: 'Outfit', sans-serif; font-weight: 700;
  font-size: 16px; color: var(--royal); line-height: 1.1;
}
.app-sub {
  font-size: 10px; color: var(--muted);
  letter-spacing: 1.5px; text-transform: uppercase;
  font-weight: 700; margin-top: 3px;
}
.user-chip {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 14px 6px 6px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 999px;
}
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--royal), var(--royal-light));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 12px;
}
.user-meta { font-size: 12px; line-height: 1.2; }
.user-meta .uname { font-weight: 700; color: var(--ink); }
.user-meta .urole { color: var(--muted); font-size: 10px; letter-spacing: 0.5px; text-transform: uppercase; font-weight: 700; }
.btn-logout {
  background: none; border: none; color: var(--muted);
  cursor: pointer; padding: 6px 10px; border-radius: 6px;
  font-size: 12px; font-weight: 700;
}
.btn-logout:hover { color: var(--danger); background: rgba(220,38,38,0.06); }

/* ===== Page Containers ===== */
.page { max-width: 1280px; margin: 0 auto; padding: 32px; }
.page-title {
  font-family: 'Outfit', sans-serif; font-weight: 800;
  font-size: 28px; letter-spacing: -0.02em; color: var(--ink);
  margin-bottom: 6px;
}
.page-subtitle { color: var(--muted); margin-bottom: 28px; font-size: 14px; }

/* ===== Cards ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
}
.card-h {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.card-title {
  font-family: 'Outfit', sans-serif; font-weight: 700;
  font-size: 17px; color: var(--ink);
}
.card-sub { font-size: 12px; color: var(--muted); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 18px;
  border-radius: 8px; border: none; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 13px;
  transition: all 0.2s; text-decoration: none;
}
.btn-primary {
  background: var(--royal); color: #fff;
  box-shadow: 0 2px 6px rgba(30,58,138,0.2);
}
.btn-primary:hover { background: var(--saffron); color: var(--royal-dark); }
.btn-saffron { background: var(--saffron); color: var(--royal-dark); }
.btn-saffron:hover { background: var(--saffron-deep); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--royal);
  border: 1.5px solid var(--royal);
}
.btn-ghost:hover { background: var(--royal); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ===== Forms ===== */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 11px; font-weight: 800;
  color: var(--ink); margin-bottom: 6px;
  letter-spacing: 1px; text-transform: uppercase;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px; border-radius: 8px;
  border: 1.5px solid var(--line); font-size: 14px;
  font-family: inherit; background: var(--surface);
  color: var(--ink); transition: all 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--royal);
  box-shadow: 0 0 0 3px rgba(30,58,138,0.1);
}
.field textarea { resize: vertical; min-height: 80px; }

/* ===== Tables ===== */
table.data {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}
table.data thead th {
  background: var(--royal); color: #fff;
  padding: 12px 14px; text-align: left;
  font-size: 11px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
}
table.data tbody td {
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.data tbody tr:hover { background: var(--bg); }
table.data tbody tr:nth-child(even) { background: rgba(248,250,252,0.5); }
table.data tbody tr:nth-child(even):hover { background: var(--bg); }

/* ===== Badges ===== */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.3px;
}
.badge-success { background: rgba(5,150,105,0.1); color: var(--success); }
.badge-danger  { background: rgba(220,38,38,0.1); color: var(--danger); }
.badge-warning { background: rgba(217,119,6,0.12); color: var(--warning); }
.badge-info    { background: rgba(30,58,138,0.1); color: var(--royal); }
.badge-muted   { background: var(--bg); color: var(--muted); }

/* ===== Toast / Alert ===== */
.alert {
  padding: 12px 16px; border-radius: 8px;
  margin-bottom: 16px; font-size: 13px;
  display: flex; align-items: center; gap: 10px;
}
.alert-info    { background: rgba(30,58,138,0.06); border: 1px solid rgba(30,58,138,0.15); color: var(--royal); }
.alert-success { background: rgba(5,150,105,0.08); border: 1px solid rgba(5,150,105,0.2); color: var(--success); }
.alert-danger  { background: rgba(220,38,38,0.06); border: 1px solid rgba(220,38,38,0.2); color: var(--danger); }
.alert-warn    { background: rgba(217,119,6,0.08); border: 1px solid rgba(217,119,6,0.2); color: var(--warning); }

/* ===== Stat tiles ===== */
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; margin-bottom: 24px;
}
.stat-tile {
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px;
  position: relative; overflow: hidden;
}
.stat-tile::before {
  content: ''; position: absolute; top: 0; left: 0; bottom: 0;
  width: 4px; background: var(--royal);
}
.stat-tile.saffron::before { background: var(--saffron); }
.stat-tile.success::before { background: var(--success); }
.stat-tile-label {
  font-size: 10px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 1.5px;
  font-weight: 700; margin-bottom: 4px;
}
.stat-tile-value {
  font-family: 'Outfit', sans-serif; font-weight: 800;
  font-size: 28px; color: var(--ink); line-height: 1; margin-bottom: 4px;
}
.stat-tile-sub { font-size: 11px; color: var(--muted); }

/* ===== Spinner ===== */
.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--royal);
  animation: spin 0.9s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Loading state ===== */
.loading {
  padding: 40px 0; text-align: center; color: var(--muted);
}

/* ===== Empty state ===== */
.empty {
  padding: 60px 0; text-align: center; color: var(--muted);
}
.empty-icon { font-size: 48px; opacity: 0.4; margin-bottom: 12px; }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,0.5);
  display: none; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface); border-radius: 14px;
  width: 100%; max-width: 600px; max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(15,23,42,0.25);
  border-top: 4px solid var(--saffron);
}
.modal-h {
  padding: 20px 24px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
}
.modal-h h3 { font-family: 'Outfit', sans-serif; font-size: 18px; color: var(--ink); }
.modal-x {
  background: none; border: none; font-size: 24px; cursor: pointer;
  color: var(--muted); padding: 0; width: 32px; height: 32px;
  border-radius: 6px;
}
.modal-x:hover { background: var(--bg); color: var(--ink); }
.modal-b { padding: 24px; }
.modal-f { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }

/* ===== Sidebar (admin) ===== */
.admin-layout {
  display: grid; grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 110px);
}
.sidebar {
  background: var(--surface); border-right: 1px solid var(--line);
  padding: 24px 0; min-height: 100%;
}
.sidebar a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 24px; color: var(--ink);
  text-decoration: none; font-size: 13px; font-weight: 600;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}
.sidebar a:hover { background: var(--bg); color: var(--royal); }
.sidebar a.active {
  background: rgba(30,58,138,0.06); color: var(--royal);
  border-left-color: var(--saffron);
}
.sidebar a .icon { font-size: 16px; opacity: 0.8; }
.sidebar-section {
  padding: 18px 24px 6px; font-size: 10px;
  color: var(--muted); letter-spacing: 1.5px;
  text-transform: uppercase; font-weight: 800;
}

/* ===== Responsive ===== */
@media (max-width: 800px) {
  .top-strip { padding: 6px 14px; font-size: 11px; }
  .app-header { padding: 12px 14px; }
  .app-title { font-size: 14px; }
  .page { padding: 18px; }
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar {
    display: flex; overflow-x: auto;
    padding: 8px; gap: 4px;
    border-right: none; border-bottom: 1px solid var(--line);
    min-height: auto;
  }
  .sidebar a {
    border-left: none; border-bottom: 3px solid transparent;
    padding: 8px 12px; white-space: nowrap; font-size: 12px;
  }
  .sidebar a.active { border-bottom-color: var(--saffron); border-left-color: transparent; }
  .sidebar-section { display: none; }
  .user-meta { display: none; }
}



/* === Brand logo image (Barpeta Polytechnic) === */

.logo-img {

  max-width: 100%;

  max-height: 100%;

  width: auto;

  height: auto;

  object-fit: contain;

  display: block;

}

.logo {

  padding: 4px;

  background: #fff;

}

