/* Modern CSS with Glassmorphism and variables */
:root {
  --primary: #1a237e;
  --primary-hover: #283593;
  --secondary: #00897b;
  --secondary-hover: #00695c;
  --accent: #f50057;
  --background: #f4f7f6;
  --text: #333333;
  --card-bg: rgba(255, 255, 255, 0.85);
  --border: #e0e0e0;
  --danger: #d32f2f;
  --success: #2e7d32;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Anek Gujarati', 'Inter', sans-serif;
}

body {
  background-color: var(--background);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Background animated shapes */
.bg-shape {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.6;
}
.shape1 { width: 400px; height: 400px; background: #ffeb3b; top: -100px; right: -100px; animation: float 10s ease-in-out infinite; }
.shape2 { width: 300px; height: 300px; background: #03a9f4; bottom: -50px; left: -50px; animation: float 12s ease-in-out infinite reverse; }

@keyframes float {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(30px, 50px) rotate(10deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

/* Base Classes */
.container { max-width: 1500px; width: 95%; margin: 0 auto; padding: 20px; }
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  padding: 24px;
}

/* Typography */
.main-title { font-size: 28px; font-weight: 800; color: var(--primary); text-align: center; margin-bottom: 5px; }
.subtitle { font-size: 16px; color: #666; text-align: center; margin-bottom: 20px; }
.section-title { font-size: 22px; font-weight: 700; color: var(--primary); border-bottom: 2px solid var(--primary); padding-bottom: 8px; margin-bottom: 20px; }
.section-divider { background: #e0f7fa; padding: 10px; border-radius: 8px; font-size: 16px; font-weight: bold; color: var(--secondary); margin: 20px 0 10px 0; }
.gradient-text { background: linear-gradient(90deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.text-sm { font-size: 14px; color: #555; }

/* Buttons */
button { cursor: pointer; border: none; font-weight: 600; font-family: inherit; transition: all 0.2s ease; border-radius: 8px; }
.primary-btn { background: var(--primary); color: white; padding: 12px 20px; box-shadow: 0 4px 10px rgba(26, 35, 126, 0.3); }
.primary-btn:hover { background: var(--primary-hover); transform: translateY(-2px); }
.secondary-btn { background: var(--secondary); color: white; padding: 12px 20px; box-shadow: 0 4px 10px rgba(0, 137, 123, 0.3); }
.secondary-btn:hover { background: var(--secondary-hover); transform: translateY(-2px); }
.success-btn { background: var(--success); color: white; padding: 12px 20px; box-shadow: 0 4px 10px rgba(46, 125, 50, 0.3); }
.success-btn:hover { background: #1b5e20; transform: translateY(-2px); }
.danger-btn { background: var(--danger); color: white; padding: 8px 16px; font-size: 14px; }
.ghost-btn { background: transparent; border: 2px solid var(--secondary); color: var(--secondary); padding: 10px; }
.ghost-btn:hover { background: var(--secondary); color: white; }

.micro-btn { background: #ff9800; color: white; font-size: 11px; padding: 3px 6px; border-radius: 4px; float: right; margin-top: 2px; }
.micro-btn:hover { background: #f57c00; }

.w-full { width: 100%; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mb-2 { margin-bottom: 20px; }

/* Forms */
.input-group { margin-bottom: 15px; display: flex; flex-direction: column; text-align: left;}
.input-group label { font-size: 14px; font-weight: 600; margin-bottom: 6px; color: #444; }
.input-group input, .input-group select { padding: 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; background: rgba(255,255,255,0.9); outline: none; transition: border 0.3s; }
.input-group input:focus, .input-group select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1); }
.file-input { border: 2px dashed var(--secondary); padding: 20px; text-align: center; background: #f0fdfa; border-radius: 8px; cursor: pointer; }

/* Layouts */
.grid-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.grid-3-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }

/* Dashboard Specific */
.dashboard-header { display: none; } /* REPLACED BY TOP NAVBAR */
.badge { background: #e0e0e0; color: #555; padding: 4px 8px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.action-card { text-align: center; transition: transform 0.3s ease; display: flex; flex-direction: column; height: 100%; justify-content: space-between; }
.action-card p { flex-grow: 1; margin-bottom: 10px;}
.action-card:hover { transform: translateY(-5px); }
.action-card .icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 15px auto;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  color: #0970a7;
  transition: transform 0.3s ease;
}
.action-card:hover .icon {
  transform: scale(1.08) rotate(-3deg);
}
.action-card .icon .material-icons {
  font-size: 40px;
  line-height: 1;
}

/* Per-card color variants */
.action-card .icon.icon-lc        { background: linear-gradient(135deg, #dbeafe, #93c5fd); color: #1e40af; }
.action-card .icon.icon-profile   { background: linear-gradient(135deg, #e0e7ff, #a5b4fc); color: #4338ca; }
.action-card .icon.icon-accounts  { background: linear-gradient(135deg, #fef3c7, #fcd34d); color: #b45309; }
.action-card .icon.icon-balvatika { background: linear-gradient(135deg, #fce7f3, #f9a8d4); color: #be185d; }
.action-card .icon.icon-std1      { background: linear-gradient(135deg, #d1fae5, #6ee7b7); color: #047857; }
.action-card .icon.icon-install   { background: linear-gradient(135deg, #dcfce7, #86efac); color: #166534; }

/* ========================================================
   DASHBOARD SIDEBAR & NAVBAR LAYOUT
   ======================================================== */
.app-layout {
  height: 100vh !important;
  width: 100vw !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  background: var(--background);
}

.view.app-layout.active-view {
  display: flex !important;
}

.sidebar {
  width: 260px;
  background: #021a36;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  z-index: 60;
}

.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  position: relative;
  background: #f4f7f6;
}

.top-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 10px 25px;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  z-index: 50;
  height: 70px;
  flex-shrink: 0;
  width: 100%;
}

.nav-left { display: flex; align-items: center; gap: 15px; }
.menu-toggle { display: none; background: transparent; color: var(--primary); font-size: 24px; padding: 5px; }

/* Dashboard button style from image */
.dash-badge {
  background: #e1f5fe;
  color: #0277bd;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
  margin-right: 15px;
  border: 1px solid #b3e5fc;
}

/* Dropdown Navbar Right */
.nav-right.dropdown-container {
  position: relative;
  display: flex;
  align-items: center;
}

.school-dropdown-btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(40,167,69,0.3);
}
.school-dropdown-btn:hover { background: #218838; }

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: white;
  min-width: 200px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  border: 1px solid #e0e0e0;
  z-index: 100;
  overflow: hidden;
  animation: slideDown 0.2s ease;
}

.dropdown-menu.show { display: block; }
.dropdown-menu .dropdown-header {
  padding: 12px 15px;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
  font-size: 12px;
  color: #666;
  font-weight: bold;
}
.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
}
.dropdown-menu a:hover { background: #f8f9fa; color: var(--primary); }
.dropdown-menu a.text-danger { color: var(--danger); }
.dropdown-menu a.text-danger:hover { background: #fef2f2; color: var(--danger); }
.dropdown-menu .dropdown-icon {
  font-size: 20px;
  vertical-align: middle;
  color: inherit;
  flex-shrink: 0;
}

.sidebar-brand {
  padding: 25px 20px;
  background: #021a36;
  text-align: left;
  flex-shrink: 0;
}

.brand-title {
  color: white;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 5px;
}

.brand-subtitle {
  color: #6a8caf;
  font-size: 11px;
  font-weight: 600;
}

.sidebar-menu {
  list-style: none;
  padding: 15px;
  margin: 0;
  overflow-y: auto;
  flex-grow: 1;
}

.sidebar-menu::-webkit-scrollbar { width: 5px; }
.sidebar-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 5px; }

.sidebar-menu li {
  padding: 12px 15px;
  margin-bottom: 5px;
  border-radius: 6px;
  background: transparent;
  color: #b0c4de;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-menu li:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}

.sidebar-menu .sidebar-icon {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1;
}

.dashboard-main-content {
  flex: 1;
  width: 100%;
  overflow-y: auto;
  padding: 20px 30px;
  background: #f4f7f6;
  position: relative;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 80;
}

@media screen and (max-width: 900px) {
  .app-layout { flex-direction: column; }
  .menu-toggle { display: block; }
  .dash-badge { display: none; } /* Hide dashboard badge on mobile */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    z-index: 90;
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.active { display: block; }
}

/* Views Toggle */
.view { display: none; margin: 40px auto; max-width: 800px; animation: fadeIn 0.4s ease-out; }
.view.active-view { display: block; }
#authView { max-width: 400px; text-align: center;}
.icon-header { font-size: 50px; margin-bottom: 10px; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Modals */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 100; backdrop-filter: blur(4px); overflow-y: auto; }
.modal-content { margin: 5% auto; width: 90%; max-width: 700px; position: relative; animation: slideDown 0.3s ease; }
.close-btn { position: absolute; right: 20px; top: 15px; font-size: 28px; cursor: pointer; color: #888; transition: color 0.2s; }
.close-btn:hover { color: var(--danger); }
@keyframes slideDown { from { transform: translateY(-30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-child { z-index: 200 !important; }

/* Auth Tabs */
.tabs { display: flex; margin-bottom: 20px; border-radius: 8px; overflow: hidden; background: #e0e0e0; }
.tab-btn { flex: 1; padding: 12px; background: transparent; color: #666; border-radius: 0; }
.tab-btn.active { background: var(--primary); color: white; }

/* Toast Notification */
.toast { position: fixed; bottom: -100px; left: 50%; transform: translateX(-50%); background: #333; color: white; padding: 12px 24px; border-radius: 30px; font-weight: 600; transition: bottom 0.4s ease; z-index: 1000; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.toast.show { bottom: 30px; }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }


/* ========================================================
   A4 LC TEMPLATE EXACT MATCH CSS 
   ======================================================== */
.lc-a4-page {
  /* A4 Dimensions at 96 DPI: width: 794px, height: 1123px */
  width: 794px;
  height: 1123px;
  background-color: #f7ede2; /* Base soft background like certificate */
  padding: 10px;
  box-sizing: border-box;
  font-family: inherit;
}

.lc-border {
  border: 3px solid #0970a7; /* Deep Blue border */
  height: 100%;
  padding: 15px;
  background: white;
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.lc-header {
  text-align: center;
  color: #0970a7;
  margin-bottom: 10px;
}
.school-name-en { font-size: 26px; font-weight: 800; letter-spacing: 1px; color: #0970a7; }
.school-name-gu { font-size: 30px; font-weight: 800; color: #fa8a10; margin-top: 5px; }

.lc-sub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.gr-box {
  border: 1px solid #7bcec6;
  background: #f4faf9;
  padding: 5px 15px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 4px;
  color: #0970a7;
}

.cert-title {
  background-color: #0970a7; /* Deep Blue */
  color: white;
  padding: 10px 30px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}
.cert-title .eng-title { font-size: 16px; font-weight: 700; letter-spacing: 1px; }
.cert-title .guj-title { font-size: 16px; border-top: 1px solid rgba(255,255,255,0.3); margin-top: 3px; padding-top: 3px; }

.lc-footer {
  margin-top: auto;
  text-align: center;
}
.certify-text { font-size: 12px; font-weight: 700; margin-bottom: 50px; color: #333; }
.signs { display: flex; justify-content: space-between; padding: 0 40px; margin-bottom: 10px; }
.sign-block { font-weight: 700; border-top: 1px dashed #333; padding-top: 5px; width: 220px; font-size: 14px; }
.warning-text-footer { font-size: 10px; font-weight: 700; color: #c0392b; border-top: 1px solid #ccc; padding-top: 5px; margin-top: 5px; }

/* Table Rows for Form */
.lc-form { margin-top: 5px; }
.row-flex {
  display: flex;
  margin-bottom: 2px;
  font-size: 11px;
  align-items: stretch;
}
.col-lbl {
  width: 40%;
  background-color: rgba(123, 206, 198, 0.25); /* Aqua pastel mix */
  padding: 3px 6px;
  font-weight: 700;
  border: 1px solid #7bcec6;
  color: #0970a7;
  display: flex;
  align-items: center;
}
.col-val {
  width: 60%;
  background-color: #ffffff; /* White input */
  padding: 3px 6px;
  border: 1px solid #7bcec6;
  border-left: none;
  font-weight: 600;
  color: #2eae8f;
  display: flex;
  align-items: center;
}
.val-text { color: #0970a7; font-size: 15px; }

/* Action Icon Buttons for Register Table */
.action-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 16px;
  border: 1px solid #e0e0e0;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 0 2px;
  color: #555;
}
.action-icon-btn .material-icons {
  font-size: 18px;
  line-height: 1;
}
.action-icon-btn:hover { transform: scale(1.15); }
.action-icon-btn.edit-btn { color: #2196f3; }
.action-icon-btn.edit-btn:hover { background: #e3f2fd; border-color: #2196f3; }
.action-icon-btn.download-btn { color: #4caf50; }
.action-icon-btn.download-btn:hover { background: #e8f5e9; border-color: #4caf50; }
.action-icon-btn.delete-btn { color: #f44336; }
.action-icon-btn.delete-btn:hover { background: #ffebee; border-color: #f44336; }
.action-icon-btn.eng-edit-btn { color: #ff9800; }
.action-icon-btn.eng-edit-btn:hover { background: #fff3e0; border-color: #ff9800; }

/* Heading icon inside inline-module headers (<h2>) */
.inline-mod-header h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.header-icon {
  font-size: 28px !important;
  color: var(--primary);
  line-height: 1;
  flex-shrink: 0;
}

/* Small icons inside buttons */
.btn-icon {
  font-size: 18px !important;
  vertical-align: middle;
  margin-right: 6px;
  line-height: 1;
  position: relative;
  top: -1px;
}

/* Button Spinner State */
.btn-spinner {
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@media screen and (max-width: 600px) {
  .grid-2-col, .grid-3-col { grid-template-columns: 1fr; }
}

/* ============================================
   MOBILE RESPONSIVE � Card Layout & Full-Screen
   ============================================ */
@media screen and (max-width: 768px) {

  /* --- Full-Screen Modals --- */
  .modal-content {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100vh;
    border-radius: 0 !important;
    padding: 16px !important;
  }
  .modal { padding: 0 !important; }
  .close-btn {
    right: 12px !important;
    top: 8px !important;
    font-size: 32px !important;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
  }

  /* --- Sticky Action Bar in Modals --- */
  .modal-action-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: white;
    padding: 8px 0 12px 0;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
    border-bottom: 1px solid #e0e0e0;
  }

  /* --- Table ? Card Layout --- */
  .register-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
  }
  .register-table thead {
    display: none !important;
  }
  .register-table tbody tr {
    display: block !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 14px !important;
    margin-bottom: 12px !important;
    padding: 14px 16px !important;
    background: linear-gradient(135deg, #fafbfc 0%, #f0f4f8 100%) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06) !important;
    border-bottom: none !important;
  }
  .register-table tbody tr:active {
    transform: scale(0.99);
    box-shadow: 0 1px 4px rgba(0,0,0,0.1) !important;
  }
  .register-table tbody td {
    display: flex !important;
    align-items: center !important;
    text-align: left !important;
    padding: 3px 0 !important;
    border-bottom: none !important;
    font-size: 14px !important;
    white-space: normal !important;
  }
  /* Add labels before content via CSS */
  .register-table tbody td::before {
    font-weight: 700;
    color: #888;
    font-size: 12px;
    min-width: 85px;
    flex-shrink: 0;
  }

  /* LC Register labels */
  #listTableBody tr td:nth-child(1)::before { content: "ક્રમ: "; }
  #listTableBody tr td:nth-child(2)::before { content: "GR No: "; }
  #listTableBody tr td:nth-child(3) { font-size: 15px !important; font-weight: 700 !important; }
  #listTableBody tr td:nth-child(3)::before { content: ""; min-width: 0 !important; }
  #listTableBody tr td:nth-child(4)::before { content: "ધોરણ: "; }
  #listTableBody tr td:nth-child(5)::before { content: "જન્મ તા.: "; }
  #listTableBody tr td:nth-child(6)::before { content: ""; min-width: 0 !important; }

  /* Balvatika Register labels */
  #balListTableBody tr td:nth-child(1)::before { content: "ક્રમ: "; }
  #balListTableBody tr td:nth-child(2)::before { content: "વાલી સર્ટિ નં: "; }
  #balListTableBody tr td:nth-child(3) { font-size: 15px !important; font-weight: 700 !important; }
  #balListTableBody tr td:nth-child(3)::before { content: ""; min-width: 0 !important; }
  #balListTableBody tr td:nth-child(4)::before { content: "જન્મ તા.: "; }
  #balListTableBody tr td:nth-child(5)::before { content: ""; min-width: 0 !important; }

  /* Std1 Register labels */
  #std1ListTableBody tr td:nth-child(1)::before { content: "ક્રમ: "; }
  #std1ListTableBody tr td:nth-child(2)::before { content: "વાલી સર્ટિ નં: "; }
  #std1ListTableBody tr td:nth-child(3) { font-size: 15px !important; font-weight: 700 !important; }
  #std1ListTableBody tr td:nth-child(3)::before { content: ""; min-width: 0 !important; }
  #std1ListTableBody tr td:nth-child(4)::before { content: "જન્મ તા.: "; }
  #std1ListTableBody tr td:nth-child(5)::before { content: ""; min-width: 0 !important; }

  /* Action buttons row in cards */
  .register-table tbody td:last-child {
    display: flex !important;
    gap: 10px !important;
    justify-content: flex-start !important;
    margin-top: 10px !important;
    padding-top: 12px !important;
    border-top: 1px solid #e0e0e0 !important;
    flex-wrap: wrap !important;
  }

  /* Larger touch-friendly action buttons */
  .action-icon-btn {
    width: 42px !important;
    height: 42px !important;
    font-size: 18px !important;
    border-radius: 10px !important;
  }

  /* --- Modal Top Button Bar --- */
  .modal-content h2 {
    font-size: 18px !important;
    padding-right: 40px;
  }
  .modal-content .primary-btn,
  .modal-content .secondary-btn,
  .modal-content .success-btn,
  .modal-content .ghost-btn {
    padding: 10px 14px !important;
    font-size: 13px !important;
    min-width: auto !important;
    max-width: none !important;
    flex: 1 1 calc(50% - 8px) !important;
  }

  /* --- Forms inside modals --- */
  .grid-2-col { grid-template-columns: 1fr !important; }
  .input-group input, .input-group select {
    font-size: 16px !important;
    padding: 14px !important;
  }
  .input-group label { font-size: 13px !important; }

  /* --- Dashboard Cards --- */
  .grid-3-col { grid-template-columns: 1fr !important; }
  .dashboard-header {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  .main-title { font-size: 22px !important; }

  /* --- General Mobile Spacing --- */
  .container { padding: 10px !important; width: 100% !important; }
  .glass-card { padding: 16px !important; }
}

    /* Absolute overrides to bypass browser caching of style.css on file:// protocol */
    #lcTemplate { font-size: 11.5px !important; }
    .lc-border { border: 3px solid #0970a7 !important; padding: 10px 15px !important; }
    .lc-header { color: #0970a7 !important; margin-bottom: 5px !important; }
    .school-name-en { color: #0970a7 !important; }
    .school-name-gu { color: #fa8a10 !important; }
    .lc-sub-header { margin-bottom: 3px !important; }
    .cert-title { background-color: #0970a7 !important; padding: 4px 20px !important; }
    .gr-box { border: 1px solid #7bcec6 !important; background: #f4faf9 !important; color: #0970a7 !important; }
    .row-flex { margin-bottom: 1px !important; }
    .col-lbl { background-color: rgba(123, 206, 198, 0.25) !important; border: 1px solid #7bcec6 !important; color: #0970a7 !important; padding: 2px 4px !important; }
    .col-val { background-color: #ffffff !important; border: 1px solid #7bcec6 !important; border-left: none !important; color: #2eae8f !important; padding: 2px 4px !important; }
    .val-text { color: #0970a7 !important; }

    /* ============================================
       ENROLMENT FORM TEMPLATE — LC-Style Design
       ============================================ */
    .pill-page { color: #000; background: #f7ede2; width: 210mm; height: 297mm; padding: 8px; box-sizing: border-box; font-family: 'Anek Gujarati', sans-serif; }
    .pill-page-border { border: 3px solid #0970a7; height: 100%; padding: 12px 15px; box-sizing: border-box; display: flex; flex-direction: column; background: white; position: relative; }
    .pill-page-content { flex: 1; }
    .pill-page-footer { margin-top: auto; }
    .pill-header-box { margin-bottom: 8px; padding-bottom: 6px; border-bottom: 2px solid #0970a7; }
    .pill-header-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
    .pill-header-center { text-align: center; flex: 1; }
    .pill-school-name-en { font-size: 16px; font-weight: 800; color: #0970a7; letter-spacing: 0.5px; }
    .pill-school-name-gu { font-size: 14px; font-weight: 800; color: #fa8a10; margin-top: 2px; }
    .pill-school-addr { font-size: 10px; color: #333; margin-top: 2px; font-weight: 600; }
    .pill-info-row { display: flex; align-items: center; font-size: 11px; font-weight: 700; color: #0970a7; margin-bottom: 4px; gap: 6px; flex-wrap: wrap; }
    .pill-info-label { white-space: nowrap; }
    .pill-digit-box { display: inline-flex; gap: 0; }
    .pill-digit-box span { display: inline-block; width: 18px; height: 20px; border: 1px solid #0970a7; text-align: center; line-height: 20px; font-size: 12px; font-weight: 700; color: red; background: #fff; }
    .pill-medium-box { border: 1px solid #0970a7; padding: 2px 12px; font-weight: 700; color: #fa8a10; font-size: 12px; background: #fffde7; }
    .pill-main-title { text-align: center; color: #0970a7; font-size: 15px; font-weight: 800; margin: 6px 0 2px 0; }
    .pill-sub-title { text-align: center; color: #fa8a10; font-size: 11px; font-weight: bold; margin-bottom: 8px; text-transform: uppercase; }
    .pill-row { display: flex; align-items: stretch; margin-bottom: 1px; }
    .pill-label { width: 40%; background-color: rgba(123, 206, 198, 0.25); padding: 3px 6px; font-weight: 700; border: 1px solid #7bcec6; color: #0970a7; display: flex; align-items: center; font-size: 10px; border-radius: 0; white-space: normal; line-height: 1.3; }
    .pill-value { width: 60%; background-color: #ffffff; padding: 3px 6px; border: 1px solid #7bcec6; border-left: none; font-weight: 600; color: #0970a7; flex-grow: 1; display: flex; align-items: center; font-size: 11px; border-radius: 0; }
    .lbl-w1 { width: 45%; }
    .lbl-w2a { width: 22%; }
    .lbl-w2b { width: 22%; }
    .pill-dec-title { text-align: center; color: #c0392b; font-size: 18px; font-weight: 800; margin: 15px 0 15px 0; }
    .pill-dec-text { font-size: 14px; line-height: 2.2; text-align: justify; font-weight: bold; padding: 0 10px; }
    .pill-ul { border-bottom: 1px solid #777; padding: 0 5px; color: #0970a7; font-weight: bold; }
    .pill-certify-text { font-size: 10px; font-weight: 700; text-align: center; color: #333; margin-bottom: 8px; line-height: 1.5; padding: 0 10px; }
    .pill-signs { display: flex; justify-content: space-between; padding: 0 20px; margin-bottom: 8px; }
    .pill-sign-block { font-weight: 700; border-top: 1px dashed #333; padding-top: 5px; width: 180px; font-size: 11px; text-align: center; }
    .pill-warning-text { font-size: 8px; font-weight: 700; color: #c0392b; border-top: 1px solid #ccc; padding-top: 4px; margin-top: 4px; text-align: center; line-height: 1.4; }




/* Back to Dashboard button */
.back-to-dash-btn {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 700;
  margin-bottom: 20px;
  cursor: pointer;
  transition: all 0.2s;
}
.back-to-dash-btn:hover {
  background: var(--primary);
  color: white;
}

/* Inline module content styling */
.inline-module {
  animation: fadeIn 0.3s ease-out;
}

/* Active sidebar menu item highlight */
.sidebar-menu li.active {
  background: rgba(255,255,255,0.15);
  color: white;
}

/* ============================================
   TRANSPORTATION PORTAL — MODULE CSS
   ============================================ */

/* Internal Tab Navigation */
.tp-tab-nav {
  display: flex;
  gap: 0;
  overflow-x: auto;
  border-bottom: 2px solid #e0e0e0;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
}
.tp-tab-btn {
  flex-shrink: 0;
  padding: 10px 16px;
  background: transparent;
  color: #666;
  font-weight: 600;
  font-size: 13px;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.tp-tab-btn:hover { color: #1565c0; background: #e3f2fd; }
.tp-tab-btn.active {
  color: #1565c0;
  border-bottom-color: #1565c0;
  background: #e3f2fd;
  font-weight: 700;
}
.tp-tab-btn .material-icons { font-size: 18px; }

/* Tab Content Panels */
.tp-tab-panel { display: none; animation: fadeIn 0.3s ease-out; }
.tp-tab-panel.active { display: block; }

/* Vehicle Selector Bar */
.tp-vehicle-selector {
  background: #e3f2fd;
  border: 1px solid #90caf9;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.tp-vehicle-selector label {
  font-weight: 700;
  font-size: 13px;
  color: #1565c0;
  white-space: nowrap;
}
.tp-vehicle-selector select {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid #90caf9;
  border-radius: 6px;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  background: white;
  outline: none;
}
.tp-vehicle-selector select:focus { border-color: #1565c0; box-shadow: 0 0 0 2px rgba(21,101,192,0.15); }

/* Vehicle Cards */
.tp-vehicle-card {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  transition: all 0.2s;
  background: white;
}
.tp-vehicle-card.active-vehicle { border-color: #1565c0; background: #e3f2fd; }
.tp-vehicle-card .tp-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  margin-right: 6px;
}
.tp-badge-blue { background: #e3f2fd; color: #1565c0; }
.tp-badge-green { background: #e8f5e9; color: #2e7d32; }

/* Warning Alert */
.tp-warning-box {
  background: #fff3e0;
  border: 1px solid #ffcc80;
  color: #e65100;
  padding: 14px 16px;
  border-radius: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 14px;
}
.tp-warning-box .material-icons { font-size: 22px; flex-shrink: 0; margin-top: 2px; }

/* Form Section in Transport */
.tp-form-section {
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}
.tp-form-section h3 {
  font-size: 15px;
  font-weight: 700;
  color: #1565c0;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e0e0e0;
}

/* Checklist Items */
.tp-checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  transition: all 0.15s;
  background: white;
}
.tp-checklist-item:hover { background: #f5f5f5; }
.tp-checklist-item.checked { background: #e8f5e9; border-color: #a5d6a7; }
.tp-checklist-item.checked span { opacity: 0.8; color: #2e7d32; font-weight: 600; }
.tp-checklist-item input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; cursor: pointer; }

/* Student Profile Card Grid */
.tp-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.tp-profile-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.2s;
}
.tp-profile-card:hover { border-color: #90caf9; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.tp-profile-card-body { padding: 14px; }
.tp-profile-card-footer {
  padding: 10px 14px;
  background: #f5f5f5;
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: flex-end;
}

/* Attendance Table */
.tp-att-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tp-att-table th {
  background: #e8eaf6;
  color: #283593;
  padding: 10px 8px;
  border: 1px solid #c5cae9;
  font-size: 12px;
  text-align: center;
}
.tp-att-table td {
  padding: 8px;
  border: 1px solid #e0e0e0;
  vertical-align: middle;
}
.tp-att-table tr:hover { background: #f5f5f5; }
.tp-att-input {
  width: 60px;
  text-align: center;
  padding: 4px;
  border: 1px solid #bdbdbd;
  border-radius: 4px;
  font-family: inherit;
  font-weight: 600;
}
.tp-att-input:focus { border-color: #1565c0; outline: none; box-shadow: 0 0 0 2px rgba(21,101,192,0.15); }
.tp-pct-good { color: #2e7d32; font-weight: 700; }
.tp-pct-bad { color: #d32f2f; font-weight: 700; }

/* ============================================
   TRANSPORTATION PORTAL — PRINT STYLES
   ============================================ */
.tp-print-area { display: none; }

@media print {
  .tp-print-area { display: block !important; }
  .tp-print-area .tp-print-page {
    background: white;
    padding: 15mm;
    font-family: 'Anek Gujarati', sans-serif;
    color: black;
    page-break-after: always;
  }
  .tp-print-area .tp-print-page:last-child { page-break-after: auto; }
  .tp-print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
  }
  .tp-print-table th, .tp-print-table td {
    border: 1px solid black;
    padding: 6px 8px;
  }
  .tp-print-table th {
    background: #e0e0e0 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    font-weight: 700;
  }
}

/* Transport icon color variant */
.action-card .icon.icon-transport { background: linear-gradient(135deg, #e3f2fd, #90caf9); color: #1565c0; }

@media screen and (max-width: 768px) {
  .tp-tab-nav { gap: 0; }
  .tp-tab-btn { padding: 8px 10px; font-size: 11px; }
  .tp-vehicle-selector { flex-direction: column; align-items: stretch; }
  .tp-vehicle-selector select { min-width: 100%; }
  .tp-profile-grid { grid-template-columns: 1fr; }
}

/* ============================================
   PDF GENERATION STYLES
   ============================================ */
.tp-pdf-page {
  width: 210mm;
  height: 296mm;
  padding: 10mm;
  background: white;
  color: black;
  font-family: 'Anek Gujarati', sans-serif;
  box-sizing: border-box;
  page-break-after: always;
  position: relative;
  overflow: hidden;
}
.tp-pdf-page:last-child { page-break-after: auto; }
.tp-pdf-border {
  border: 2px solid black;
  width: 100%;
  height: 100%;
  padding: 8mm;
  box-sizing: border-box;
}
.tp-pdf-header {
  text-align: center;
  margin-bottom: 5mm;
}
.tp-pdf-header h2 { font-size: 20px; font-weight: 700; margin: 0 0 4px 0; }
.tp-pdf-header h3 { font-size: 16px; font-weight: 600; margin: 0; }
.tp-pdf-content { font-size: 13px; line-height: 1.6; }
.tp-pdf-line { display: inline-block; border-bottom: 1px dotted black; }
.tp-pdf-photo-box {
  position: absolute;
  top: 25mm;
  right: 25mm;
  width: 30mm;
  height: 40mm;
  border: 1px solid black;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 11px;
  padding: 5px;
}
.tp-pdf-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 3mm;
  font-size: 12px;
}
.tp-pdf-table th, .tp-pdf-table td {
  border: 1px solid black;
  padding: 3px 5px;
  text-align: left;
}
.tp-pdf-table th { font-weight: 700; }
.tp-pdf-sign-area {
  display: flex;
  justify-content: space-between;
  margin-top: 10mm;
  font-weight: 700;
  text-align: center;
  font-size: 13px;
}
