:root {
  --primary-color: #004d40;
  --secondary-color: #00796b;
  --accent-color: #4caf50;
  --light-color: #e6f3fa;
  --dark-color: #00251a;
}

/* Base */
body {
  font-family: 'Noto Serif Devanagari', serif;
  background: linear-gradient(to bottom, var(--light-color), #d1e8f0);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navbar */
.navbar {
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Header */
header {
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 2rem 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  margin-top: 56px;
}
.header-content {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: .5rem;
}
.header-content img { height: 80px; }
.header-content h1 { font-size: 2rem; font-weight: 700; margin: 0; }
.header-content p { font-size: 1.05rem; margin: 0; }

/* Cards */
.card { border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); border: none; }
.card-header { background: linear-gradient(to right, var(--primary-color), var(--secondary-color)); color: #fff; border-radius: 15px 15px 0 0 !important; }

/* Buttons */
.btn-primary { background-color: var(--secondary-color); border-color: var(--secondary-color); }
.btn-primary:hover { background-color: var(--primary-color); border-color: var(--primary-color); }
.btn-outline-primary { color: var(--secondary-color); border-color: var(--secondary-color); }
.btn-outline-primary:hover { background-color: var(--secondary-color); color:#fff; }
.btn-login { background: linear-gradient(to right, var(--primary-color), var(--secondary-color)); color:#fff; border:none; width:100%; padding:.75rem; font-weight:600; border-radius:50px; }
.btn-login:hover { opacity:.9; }

/* Loader */
.loader {
  display: none; position: fixed; inset: 0; background: rgba(255,255,255,0.95); z-index: 9999;
  flex-direction: column; justify-content: center; align-items: center;
}
.road { position: absolute; bottom: 20%; width: 100%; height: 120px; background: #2d3748; overflow: hidden; }
.road::before {
  content: ""; position: absolute; top: 50%; width: 100%; height: 12px;
  background: repeating-linear-gradient(to right, #fff, #fff 40px, transparent 40px, transparent 80px);
  animation: move-road .8s linear infinite;
}
@keyframes move-road { from { background-position: 0; } to { background-position: -80px; } }
.tempo { width: 140px; position: absolute; bottom: 30%; left: -140px; animation: move-tempo 2s linear infinite; }
@keyframes move-tempo { from { left: -140px; } to { left: 100%; } }
.loading-text { margin-top: 260px; font-size: 22px; font-weight: 700; color: var(--primary-color); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }

/* Footer */
footer { background: var(--dark-color); color: white; padding: 1.25rem 1rem; margin-top: 3rem; }
footer a { color: #a7ffeb; text-decoration: underline; }

/* Suggestions */
#suggestions {
  position: absolute; z-index: 1000; width: 100%; max-height: 220px; overflow-y: auto;
  background: white; border: 1px solid #ccc; border-radius: 0 0 5px 5px; box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.suggestion-item { padding: 10px; cursor: pointer; border-bottom: 1px solid #eee; }
.suggestion-item:hover { background-color: #f0f0f0; }

/* Panels */
.panel { margin-top: .5rem; }
.d-none { display: none !important; }
.btn-back { margin-top: .5rem; }

/* Menu Cards (dashboard) */
.menu-card {
  background: #fff; border-radius: 18px; padding: 24px; text-align: center; cursor: pointer; height: 100%;
  box-shadow: 0 10px 24px rgba(0,0,0,.08); transition: transform .15s ease, box-shadow .15s ease;
}
.menu-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0,0,0,.12); }
.menu-icon { font-size: 36px; color: var(--secondary-color); margin-bottom: 10px; }
.menu-card h5 { font-weight: 700; }
.menu-card p { margin: 0; color: #334155; }

/* Login page */
.login-page {
  background: linear-gradient(-45deg, #004d40, #00796b, #004d40, #00251a);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  display:flex; align-items:center; justify-content:center; min-height:100vh; padding:2rem;
}
@keyframes gradientBG {
  0% { background-position:0% 50%; } 50% { background-position:100% 50%; } 100% { background-position:0% 50%; }
}
.login-container { max-width: 1000px; width: 100%; display:flex; flex-wrap:wrap; justify-content: space-between; gap:2rem; }
.login-card { flex:1; min-width:320px; background: rgba(255,255,255,.95); border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,.3); overflow:hidden; padding:1rem; }
.login-header { background: linear-gradient(to right, var(--primary-color), var(--secondary-color)); color:#fff; text-align:center; padding:1.5rem; border-radius: 15px 15px 0 0; }
.login-form { padding:1.5rem; }
.info-section { flex:1; min-width:320px; background: rgba(255,255,255,.9); border-radius:20px; padding:1.5rem; display:flex; flex-direction:column; justify-content:center; }
.info-section h4 { color:var(--primary-color); text-align:center; margin-bottom:1rem; }
.form-floating { margin-bottom: 1rem; }
.shake { animation: shake .5s ease-in-out; }
@keyframes shake {
  0%,100%{ transform: translateX(0); }
  10%,30%,50%,70%,90% { transform: translateX(-5px); }
  20%,40%,60%,80% { transform: translateX(5px); }
}

/* Splash (Intro) */
.splash-overlay {
  position: fixed; inset: 0; background: radial-gradient( circle at 30% 30%, #e9f7fb, #cfe8f1 ); z-index: 2000;
  display: flex; align-items: center; justify-content: center;
}
.splash-card {
  background: #ffffff; border-radius: 24px; box-shadow: 0 20px 50px rgba(0,0,0,.15);
  padding: 28px 24px; max-width: 560px; width: 92%; text-align: center;
  border: 1px solid #e6edf0;
}
.splash-logo { height: 68px; margin-bottom: 10px; }
.splash-card h1 { font-family: 'Noto Sans Devanagari', sans-serif; font-size: 1.4rem; font-weight: 700; color: #0f172a; margin: 8px 0 6px; }
.splash-card p { color: #334155; margin: 0 0 14px; }
.splash-anim { position: relative; height: 110px; overflow: hidden; background: #0b2239; border-radius: 14px; }
.roadline { position:absolute; left:0; right:0; top:54%; height:8px; background: repeating-linear-gradient(to right, #fff, #fff 28px, transparent 28px, transparent 56px); animation: move-road 0.9s linear infinite; opacity:.9; }
.splash-tempo { width: 90px; position: absolute; bottom: 28%; left: -140px; animation: move-tempo 2.4s linear infinite; }

/* Responsive tweaks */
@media (max-width: 768px) {
  .header-content h1 { font-size: 1.6rem; }
  .header-content p { font-size: .95rem; }
  .menu-card { padding: 18px; }
}

/* Navbar font सुधार */
.navbar-brand {
  font-family: 'Noto Serif Devanagari', serif;
  font-size: 1.2rem;
  font-weight: 700;
}

/* Add these to your existing style.css */

/* Login Styles */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.login-card {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  width: 100%;
  max-width: 400px;
}

/* Ensure main system is properly hidden initially */
.d-none {
  display: none !important;
}

/* Add to style.css */
.suggestions-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
}

.suggestion-item {
  padding: 10px 15px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background-color 0.2s;
}

.suggestion-item:hover {
  background-color: #f8f9fa;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item strong {
  display: block;
  margin-bottom: 2px;
}

.suggestion-item small {
  color: #666;
  font-size: 0.85em;
}

.position-relative {
  position: relative;
}

/* Suggestions styling */
#suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
}

.suggestions-list {
  padding: 5px 0;
}

.suggestion-item {
  padding: 10px 15px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background-color 0.2s;
}

.suggestion-item:hover {
  background-color: #f8f9fa;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item strong {
  display: block;
  margin-bottom: 2px;
  color: #333;
}

.suggestion-item small {
  color: #666;
  font-size: 0.85em;
}

.position-relative {
  position: relative;
}

.letterhead {
  width: 100%;
  text-align: center;
  margin: 0 auto;
}

.letterhead-img {
  width: 100%;
  height: auto; /* natural aspect ratio */
  display: block;
  margin: 0 auto;
}
.a4-page {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  background: white;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
  position: relative;
}

.content-area {
  padding: 25mm;
  padding-top: 0; /* ensures text starts right below letterhead */
}
