:root{
  /* Material-ish palette (light) */
  --primary: #053680;
  --primary-600: #da0d0d;
  --accent: #00a3a3;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #d7e0ea;
  --danger: #c62828;
  --success: #2e7d32;

  /* 8dp spacing scale */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s7: 32px;

  /* Radius */
  --r1: 10px;
  --r2: 14px;
  --r3: 18px;

  /* Elevation (dp-like) */
  --e0: 0 0 0 rgba(0,0,0,0);
  --e1: 0 1px 2px rgba(15,23,42,.08), 0 1px 3px rgba(15,23,42,.06);
  --e2: 0 6px 18px rgba(15,23,42,.10), 0 2px 6px rgba(15,23,42,.06);
  --e3: 0 14px 30px rgba(15,23,42,.14), 0 6px 12px rgba(15,23,42,.08);

  /* Touch target */
  --tap: 44px;

  /* Motion */
  --dur: 220ms;
  --ease: cubic-bezier(.2,.8,.2,1);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a{ color:inherit; text-decoration:none; }
.muted{ color: var(--muted); }
.hide-sm{ display:inline; }
@media(max-width:720px){ .hide-sm{ display:none; } }

/* Typography scale */
h1{ font-size: 22px; font-weight: 800; margin: 0 0 var(--s3); letter-spacing: -.01em; }
h2{ font-size: 16px; font-weight: 750; margin: 0 0 var(--s3); }
h3{ font-size: 14px; font-weight: 700; margin: 0 0 var(--s2); }
.small{ font-size: 12px; color: var(--muted); }
kbd{
  font: inherit;
  font-size: 12px;
  padding: 2px 6px;
  border:1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}

.app{ min-height:100%; }

/* Top App Bar */
.topbar{
  position: sticky; top:0; z-index: 60;
  display:flex; align-items:center; justify-content:space-between;
  padding: var(--s3) var(--s4);
  background: linear-gradient(to bottom, #1260d5, #053680); /* Gradient from pink to yellow-orange */
  border-bottom: 1px solid var(--border);
  box-shadow: var(--e1);
}
.brand{ font-weight: 900; letter-spacing: -.01em; color:#fff;}
.topbar-right{ display:flex; gap: var(--s2); align-items:center; }

/* Layout */
.main{
  display:flex;
  min-height: calc(100vh - 58px);
}

/* Sidebar (desktop) */
.sidebar{
  width: 270px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: var(--s3);
}
.nav{ display:flex; flex-direction:column; gap: 6px; }
.nav-section{
  margin-top: var(--s3);
  font-size: 11px;
  color: #fff600;
  text-transform: uppercase;
  letter-spacing: .10em;
  padding: 0 var(--s2);
}
.nav-item{
  display:flex;
  align-items:center;
  gap: 12px;
  min-height: var(--tap);
  padding: 10px 12px;
  border-radius: var(--r2);
  border-bottom: 2px solid #fff600;
  position: relative;
  overflow: hidden;
}
.nav-ico{
  width: 20px; height: 20px;
  flex: 0 0 20px;
  color: #fff600;
}
.nav-item:hover{ background: rgba(30,136,229,.08); }
.nav-item.active{
  background: rgba(218,13,13,.90);
  border-color: rgba(245,236,1,.70);
}
.nav-item.active .nav-ico{ color: #fff600; }
.nav-item.disabled{ opacity:.55; cursor:not-allowed; }

/* Content */
.content{ flex:1; padding: var(--s4); }
.container{ max-width: 1200px; margin: 0 auto; }

/* Surfaces */
.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r3);
  box-shadow: var(--e2);
  padding: var(--s4);
}
.card.compact{ padding: var(--s3); }

.grid{ display:grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
@media(max-width:920px){ .grid{ grid-template-columns: 1fr; } }

/* Buttons */
.btn, .icon-btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap: 10px;
  min-height: var(--tap);
  padding: 10px 14px;
  border-radius: var(--r2);
  border: 1px solid transparent;
  cursor:pointer;
  font-weight: 700;
  user-select: none;
  position: relative;
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn:active, .icon-btn:active{ transform: translateY(1px); }
.btn-sm{ min-height: 38px; padding: 8px 12px; border-radius: var(--r1); font-size: 13px; }
.btn-primary{ background: var(--primary); color:#fff; box-shadow: var(--e1); }
.btn-primary:hover{ background: var(--primary-600); box-shadow: var(--e2); }
.btn-outline{ background: transparent; border-color: var(--border); }
.icon-btn{
  background: transparent;
  border-color: var(--border);
  width: var(--tap);
  padding: 0;
}
.icon-btn svg{ width: 22px; height: 22px; }

/* Inputs */
input, select, textarea{
  width: 100%;
  padding: 12px 12px;
  border-radius: var(--r2);
  border: 1px solid var(--border);
  background: #fff;
  outline: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  min-height: var(--tap);
}
input:focus, select:focus, textarea:focus{
  border-color: rgba(30,136,229,.55);
  box-shadow: 0 0 0 4px rgba(30,136,229,.14);
}

/* Badges */
.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(30,136,229,.12);
  /* color: #fff; */
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .04em;
}

/* Table */
.table-wrap{ overflow:auto; border-radius: var(--r3); border:1px solid var(--border); background: var(--surface); box-shadow: var(--e1); }
table{ width:100%; border-collapse: collapse; }
th,td{ padding: 12px 12px; border-bottom: 1px solid var(--border); text-align:left; white-space: nowrap; }
thead th{
  position: sticky;
  top: 0;
  background: #f9fafb;
  z-index: 5;
}
tr:hover td{ background: rgba(15,23,42,.02); }

/* Toasts */
.toast-host{
  position: fixed;
  right: var(--s4);
  top: calc(58px + var(--s4));
  display:flex;
  flex-direction:column;
  gap: var(--s2);
  z-index: 200;
}
.toast{
  min-width: 260px;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r3);
  box-shadow: var(--e3);
  padding: var(--s3) var(--s4);
}
.toast.success{ border-left: 4px solid var(--success); }
.toast.error{ border-left: 4px solid var(--danger); }

/* Ripple */
.ripple{
  position:absolute;
  border-radius: 999px;
  transform: translate(-50%,-50%) scale(0);
  opacity: .20;
  pointer-events:none;
  background: currentColor;
  animation: ripple var(--dur) var(--ease);
}
@keyframes ripple{
  to{
    transform: translate(-50%,-50%) scale(1);
    opacity: 0;
  }
}

/* FAB */
.fab{
  position: fixed;
  right: var(--s5);
  bottom: var(--s5);
  z-index: 120;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: var(--e3);
  border: none;
  cursor: pointer;
  overflow:hidden;
}
.fab svg{ width: 24px; height: 24px; }
@media(min-width:1100px){
  .fab{ right: 40px; bottom: 40px; }
}

/* Backdrops */
.backdrop{
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.35);
  z-index: 90;
  display:none;
}
.backdrop.show{ display:block; }

/* Bottom Sheet */
.sheet{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 110;
  transform: translateY(110%);
  transition: transform var(--dur) var(--ease);
  display:flex;
  justify-content:center;
  padding: 0 var(--s4) var(--s4);
}
.sheet.open{ transform: translateY(0); }
.sheet-card{
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--e3);
  overflow: hidden;
}
.sheet-handle{
  height: 5px; width: 44px;
  background: rgba(15,23,42,.15);
  border-radius: 999px;
  margin: var(--s3) auto var(--s2);
}
.sheet-head{
  padding: 0 var(--s4) var(--s2);
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.sheet-title{ font-weight: 900; }
.sheet-body{ padding: var(--s2) var(--s4) var(--s4); }
.sheet-actions{ display:grid; grid-template-columns: 1fr; gap: var(--s2); }
.sheet-link{
  display:flex; align-items:center; justify-content:space-between;
  min-height: var(--tap);
  padding: 12px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r2);
  background: #fff;
  position: relative;
  overflow:hidden;
}
.sheet-link:hover{ background: rgba(15,23,42,.03); }
.sheet-link .left{ display:flex; align-items:center; gap: 12px; }
.sheet-link svg{ width: 20px; height: 20px; color: var(--primary-600); }

/* Mobile drawer */
@media(max-width: 920px){
  .sidebar{
    position: fixed;
    left: 0;
    top: 58px;
    height: calc(100vh - 58px);
    transform: translateX(-105%);
    transition: transform var(--dur) var(--ease);
    z-index: 100;
    box-shadow: var(--e3);
  }
  .sidebar.open{ transform: translateX(0); }
  .content{ padding: var(--s3); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; animation: none !important; }
}

/* 1) Sidebar fixed, content scrollable */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 250px;
  overflow-y: auto;
}

.content {
  margin-left: 250px;
  padding: 20px;
  overflow-y: auto;
  /* height: 100vh; */
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
  }
  .content {
    margin-left: 0;
    padding: 10px;
  }
}

/* 2) Horizontal scroll for tables */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  min-width: 100%;
}

th, td {
  white-space: nowrap;
}

.table-wrap::-webkit-scrollbar {
  height: 8px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background-color: #ddd;
  border-radius: 4px;
}

.table-wrap::-webkit-scrollbar-track {
  background-color: #f1f1f1;
}

/* 3) Colorful UI for buttons and forms */
button, .btn {
  transition: all 0.3s ease;
}

button:hover, .btn:hover {
  transform: translateY(-4px);
  background-color: #da0d0d;
  color: #fff;
  border:1px solid #f5ec01;
}

button:active, .btn:active {
  transform: translateY(2px);
  background-color: #da0d0d;
}
input[type="text"], input[type="password"], input[type="email"], select, textarea {
  border-radius: 10px;
  padding: 10px;
  border: 1px solid #ddd;
  font-size: 16px;
  width: 100%;
  transition: all 0.3s ease;
}

input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus, select:focus, textarea:focus {
  border-color: #da0d0d;
  outline: none;
}

input[type="submit"], .btn-primary {
  background-color: var(--primary);
  color: white;
  margin:5px;
}

input[type="submit"]:hover, .btn-primary:hover {
  background-color: var(--primary-600);
  border: 1px solid #f5ec01;
}
.btn-outline:hover{ 
  background-color: var(--primary-600);
  border: 1px solid #f5ec01;

}

input[type="submit"]:active, .btn-primary:active {
  background-color: #da0d0d;
}

form {
  margin: auto;
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h1 {
  font-size: 24px;
  font-weight: bold;
  color: #333;
}

.muted {
  color: #6c757d;
}

.no-print {
  display: none;
}

/* 1) Fix Header and Sidebar Overlapping (Mobile View Fix) */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: #fff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  height: 60px;
  padding: 10px 20px;
}

.content {
  /* margin-top: 60px; /* Add space below header */ */
}

@media (max-width: 768px) {
  .sidebar {
    position: absolute;
    top: 0;
    left: -250px; /* Initially hidden */
    width: 250px;
    /* height: 100vh; */
    background-color: #333;
    color: #fff;
    transition: left 0.3s ease;
  }

  .sidebar.active {
    left: 0; /* Show on mobile */
  }

  .content {
    margin-left: 0;
    padding: 10px;
  }

  .sidebar-toggle {
    display: block;
  }
}

/* 2) Mobile View and Sidebar Toggle */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 150;
  background-color: #333;
  color: #fff;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
}

@media (max-width: 768px) {
  .sidebar-toggle {
    display: block;
  }

}
.dashboard-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.dashboard-title {
  margin: 0;
}

.dashboard-welcome {
  margin-top: 6px;
}

.filter-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
}

.branch-select,
.batch-select {
  max-width: 220px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.dashboard-card {
  box-shadow: none;
  padding: var(--s4);
}

.dashboard-card-value {
  font-size: 28px;
  font-weight: 900;
}

.dashboard-card-stats {
  display: flex;
  gap: 14px;
  align-items: baseline;
  margin-top: 4px;
}

.dashboard-card-action {
  margin-top: 10px;
}

.dashboard-grid-small {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-grid-table {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 920px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid-small {
    grid-template-columns: 1fr;
  }

  .dashboard-grid-table {
    grid-template-columns: 1fr;
  }
}

.sidebar {
  position: fixed;
  top: 60px;
  left: 0;
  width: 250px;
  background: linear-gradient(to right, #1260d5, #053680); /* Gradient from pink to yellow-orange */
  color: #fff;
  /* height: 100%; */
  transition: left 0.3s ease;
}

.sidebar.active {
  left: 0;
}

.content {
  margin-left: 250px;
  padding: 20px;
  overflow-y: auto;
  /* height: 100vh; */
}

@media (max-width: 768px) {
  .content {
    margin-left: 0;
  }
}

/* Background with gradient only */
.login-page {
  background: linear-gradient(to right, #1260d5, #053680); /* Gradient from pink to yellow-orange */
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 0 20px;
}

/* Login card styling */
.login-card {
  background: rgba(255, 255, 255, 0.85); /* Slightly transparent background for card */
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-sizing: border-box;
}

.login-card h1 {
  margin-bottom: 20px;
  font-size: 24px;
  color: #333;
}

input[type="text"], input[type="password"], input[type="submit"] {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
}

/* Button styling */
input[type="submit"] {
  background-color: #ff7e5f;
  color: white;
  border: none;
  cursor: pointer;
}

input[type="submit"]:hover {
  background-color: #feb47b;
}

input[type="submit"]:active {
  background-color: #2C6C2F;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .login-page {
    padding: 20px;
  }
  .login-card {
    padding: 20px;
  }
}

/* Improved focus styles for inputs */
input[type="text"]:focus, input[type="password"]:focus, select:focus, textarea:focus {
  border-color: #da0d0d;
  outline: none;
}

/* Desktop view adjustments for the admission form */
@media (min-width: 768px) {
    .admission-form {
        display: grid;
        grid-template-columns: repeat(2, 1fr);  /* Two columns for desktop */
        gap: 20px;
    }
}
/* Responsive Form Layout for student admission form */
.responsive-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .responsive-form-row {
    grid-template-columns: 1fr;
  }
}