/* ==========================================================================
   RAILSAATHI - DASHBOARD HOME & MENU STYLES
   css/sections/home-menu.css
   ========================================================================== */
/* ── Dashboard home cards ── */
#home-section {
  padding: 24px 16px;
}

#home-section .dash-grid {
  padding-bottom: 24px;
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  #home-section {
    padding: 14px 10px 24px;
  }

  .dash-home-header {
    margin-bottom: 18px;
    padding: 18px 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(14px);
  }

  .dash-home-header h2 {
    font-size: 1.12rem;
    line-height: 1.3;
  }

  .dash-home-header p {
    font-size: 0.76rem;
  }

  .dash-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

.dash-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s, box-shadow 0.18s;
  border: none;
  background: none;
  width: 100%;
  text-align: center;
}

@media (max-width: 640px) {
  .dash-card {
    aspect-ratio: 1 / 1;
    border-radius: 14px;
  }

  .dash-card-body {
    padding: 8px;
  }

  .dash-card-icon {
    font-size: 1.7rem;
    margin-bottom: 5px;
  }

  .dash-card-title-hi {
    font-size: 0.82rem;
  }

  .dash-card-title-en {
    font-size: 0.62rem;
    letter-spacing: 0.04em;
  }
}

.dash-card:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.dash-card:active {
  transform: scale(0.97);
}

.dash-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.55);
  transition: filter 0.2s;
}

.dash-card:hover .dash-card-bg {
  filter: brightness(0.7);
}

.dash-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(15, 40, 90, 0.45) 0%, rgba(0, 80, 160, 0.55) 100%);
}

.dash-card-body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 12px;
}

.dash-card-icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

.dash-card-title-hi {
  font-family: 'Noto Sans Devanagari', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.dash-card-title-en {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.dash-home-header {
  text-align: center;
  margin-bottom: 28px;
}

.dash-home-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.04em;
}

.dash-home-header p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 4px;
}

.meta-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 3px;
}

.lbl {
  white-space: nowrap;
  font-weight: 500;
}

.field {
  display: flex;
  align-items: center;
  min-width: 40px;
  border-bottom: 1px dotted #000;
  padding: 0 4px;
  margin: 0 4px;
}

.field.fixed {
  flex: 0 0 auto;
}

.field.stretch {
  flex: 1;
}

.lead-dots {
  flex: 1;
  border-bottom: 1px dotted #000;
  margin-right: 6px;
}

#preview-section,
#attendance-preview-section,
/* ==========================================================================
   COMPACT HOME PAGE REDESIGN
   ========================================================================== */
#home-section {
  padding: 8px 8px 16px;
  max-width: 100%;
  margin: 0 auto;
}

.rail-home-banner {
  position: relative;
  height: 130px;
  margin: 0 0 12px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
  background: #1e3a8a;
}

.rail-home-banner-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rail-home-banner-text {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 16px;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.62) 0%, rgba(15, 23, 42, 0.18) 55%, rgba(15, 23, 42, 0) 100%);
}

.rail-home-banner-text h2 {
  margin: 0;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.rail-home-banner-text p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-width: 100%;
  margin: 0 auto 12px;
}

.dash-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  height: 74px;
  min-height: 64px;
  max-height: 82px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s, box-shadow 0.18s;
  border: none;
  background: #1e3a8a;
  width: 100%;
  text-align: center;
  aspect-ratio: auto;
}

.dash-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}

.dash-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  z-index: 1;
  pointer-events: none;
}

.dash-card-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 8px;
  color: #ffffff;
}

.dash-card-title-en {
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.quick-action-subtitle,
.dash-card-maintenance {
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 2px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

.dash-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}

.dash-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  z-index: 1;
  pointer-events: none;
}

.dash-card-body {
  display: none;
}

.quick-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.quick-action-icon svg {
  width: 26px;
  height: 26px;
  stroke: #ffffff;
}

.dash-card-title-en {
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  text-align: center;
}

.quick-action-subtitle,
.dash-card-maintenance {
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 2px;
}

.quick-action-ta {
  background: linear-gradient(135deg, #2563eb, #1e40af) !important;
}
.quick-action-night { 
  background: linear-gradient(135deg, #1e3a8a, #1e40af) !important;
}
.quick-action-keyman { 
  background: linear-gradient(135deg, #d97706, #b45309) !important;
}
.quick-action-attendance { 
  background: linear-gradient(135deg, #059669, #047857) !important;
}

.dashboard-news-card {
  margin: 12px auto 16px;
  padding: 16px 18px;
  border-radius: 22px;
  max-width: 440px;
  background: #ffffff;
  border: 1px solid rgba(30, 58, 138, 0.12);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.dashboard-news-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.dashboard-news-heading h3 {
  font-size: 16px;
  margin: 0;
  color: #1e293b;
  font-weight: 800;
}

.dashboard-news-heading p {
  margin: 2px 0 0;
  color: #64748b;
  font-size: 11px;
}

.dashboard-news-heading button {
  border: 1px solid rgba(30, 58, 138, 0.15);
  border-radius: 10px;
  padding: 6px 10px;
  background: #f8fafc;
  color: #1e3a8a;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.dashboard-news-heading button:hover {
  background: #eff6ff;
  border-color: rgba(30, 58, 138, 0.25);
}

.dashboard-news-item {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  text-decoration: none;
  color: #1e293b;
  margin-bottom: 8px;
  border: 1px solid rgba(30, 58, 138, 0.08);
  transition: all 0.2s;
}

.dashboard-news-item:hover {
  background: #eff6ff;
  border-color: rgba(30, 58, 138, 0.18);
}

.dashboard-news-item strong {
  font-size: 13px;
  display: block;
}

.dashboard-news-meta {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
}

.dashboard-news-state {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.dashboard-news-retry {
  margin-top: 8px;
  border: 1px solid rgba(30, 58, 138, 0.15);
  border-radius: 10px;
  padding: 6px 12px;
  background: #f8fafc;
  color: #1e3a8a;
  font-weight: 700;
  cursor: pointer;
  font-size: 12px;
}

@media (max-width: 430px) {
  .rail-home-banner {
    height: 120px;
    padding: 12px 14px;
  }
  .dash-card {
    height: 60px;
  }
}

@media (max-width: 360px) {
  .dash-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
  }
  .dash-card {
    height: 58px;
  }
}

@media (min-width: 768px) {
  #home-section {
    max-width: 100%;
  }
  .dash-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 100%;
  }
  .dash-card {
    height: 90px;
  }
  .dashboard-news-card {
    max-width: 480px;
  }
}