/* ==========================================================================
   Tamilnadu Temples — Admin panel 2026 theme
   CSS-only modernization. Class names + sidebar collapse mechanics are kept
   identical to the original so no Blade/JS changes are required.
   ========================================================================== */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap");

:root {
  --brand: #c4501d;          /* terracotta (matches the mobile app) */
  --brand-dark: #a53f12;
  --brand-soft: #fbe7dc;
  --gold: #c98a18;
  --green: #3f7a4e;
  --navy: #29445e;
  --danger: #d9463e;

  --bg: #f6f2ec;             /* warm app background */
  --surface: #ffffff;
  --surface-2: #fbf7f1;
  --sidebar: #201c19;        /* warm charcoal */
  --sidebar-2: #2a2521;
  --ink: #23201d;
  --muted: #6c645d;
  --line: #e7ddd0;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(40, 30, 20, 0.08);
  --shadow-sm: 0 2px 8px rgba(40, 30, 20, 0.06);
  --sidebar-w: 16.5rem;
  --nav-h: 3.5rem;
}

* { font-family: "Inter", "Poppins", system-ui, -apple-system, sans-serif; }

body {
  background-color: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  height: auto;                /* original hard-coded 1000px removed */
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

/* legacy colour tokens kept (used as class names in markup) --------------- */
.bg-mattBlackLight { background-color: var(--sidebar) !important; }
.bg-mattBlackDark { background-color: var(--bg) !important; }
.bg-mattGray { background-color: #878d8d; }
.bg-mattRed { background-color: var(--brand); }
.text-mattBlackLight { color: var(--ink); }
.text-mattBlackDark { color: var(--ink); }
.text-mattGray { color: var(--muted); }
.text-mattRed { color: #fff; }

/* ---------------------------- top navbar -------------------------------- */
.navbar.bg-mattBlackLight {
  background: var(--sidebar) !important;
  height: var(--nav-h);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 16px rgba(0, 0, 0, 0.18);
  padding: 0 1rem;
}
.navbar .navbar-brand {
  font-weight: 700;
  letter-spacing: .2px;
  color: #fff !important;
  font-size: 1.15rem;
}
.navbar .navbar-brand::before {
  content: "🛕";
  margin-right: .5rem;
}
.navbar .dropdown-menu {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: .35rem;
}
.navbar .dropdown-item { border-radius: 8px; padding: .5rem .75rem; font-size: .9rem; }
.navbar .dropdown-item:hover { background: var(--brand-soft); color: var(--brand-dark); }

/* ------------------------------ layout ---------------------------------- */
.wrapper { margin-top: var(--nav-h); }

.wrapper .sideMenu {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  margin: var(--nav-h) auto auto;
  width: var(--sidebar-w);
  background: var(--sidebar) !important;
  transition: all ease .25s;
  transform: translateX(-100%);
  z-index: 2000;
  overflow-y: auto;
  padding: .5rem .75rem 1.5rem;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}
.wrapper .sideMenu::-webkit-scrollbar { width: 8px; }
.wrapper .sideMenu::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 8px; }

.wrapper .content {
  width: 100%;
  margin-left: 0;
  transition: all ease .25s;
  padding: 1.25rem;
}
.wrapper.active .sideMenu { transform: translateX(0); }

/* sidebar brand image */
.sideMenu img {
  border-radius: 14px;
  width: 100% !important;
  height: 132px !important;
  max-height: 132px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  margin: .25rem 0 .5rem;
}
.sideMenu .navbar-nav { width: 100%; margin: 0 !important; }

/* sidebar nav items */
.sideMenu .nav-item { width: 100%; margin-top: .15rem !important; }
.nav-link {
  align-items: center;
  display: flex;
  white-space: nowrap;
  gap: .15rem;
  color: #d8d0c8;
  border-radius: 12px;
  padding: .6rem .8rem !important;
  transition: background .15s ease, color .15s ease;
}
.nav-link .icon {
  margin-right: .35rem;
  font-size: 1.4rem;
  height: 1.9rem; width: 1.9rem;
  display: inline-flex;
  justify-content: center; align-items: center;
  color: #b8afa6 !important;
}
.nav-link .text { font-size: .92rem; font-weight: 500; color: #e9e3dc !important; }

.nav-link:hover { background: rgba(196, 80, 29, 0.16); }
.nav-link:hover .icon, .nav-link:hover .text { color: #fff !important; }
.nav-link.active { background: var(--brand); }
.nav-link.active .icon, .nav-link.active .text { color: #fff !important; }

/* collapsed (icon-only) + desktop rules ---------------------------------- */
@media (min-width: 992px) {
  .wrapper .sideMenu { transform: translateX(0); }
  .wrapper .content { margin-left: var(--sidebar-w); }
  .wrapper.active .sideMenu { width: 5rem; }
  .wrapper.active .sideMenu .nav-link { text-align: center; justify-content: center; }
  .wrapper.active .sideMenu .nav-link .icon { margin-right: 0; }
  .wrapper.active .sideMenu .nav-link .text,
  .wrapper.active .sideMenu img { display: none; }
  .wrapper.active .content { margin-left: 5rem; }
}

/* ------------------------- page content shell --------------------------- */
.content h1, .content h2, .content h3, .content h4 { font-weight: 700; color: var(--ink); }
.content > h2, .content > h1 { margin-bottom: 1rem; }

/* cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card + .card { margin-top: 1rem; }
.card-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: 1.02rem;
  padding: 1rem 1.25rem;
}
.card-body { padding: 1.25rem; }

/* dashboard stat cards */
.stat-row { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.1rem; }
.stat-ico {
  width: 52px; height: 52px; border-radius: 14px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
}
.stat-ico .material-icons { font-size: 1.7rem; }
.stat-brand { background: var(--brand-soft); color: var(--brand); }
.stat-gold  { background: #fbeecb; color: var(--gold); }
.stat-green { background: #e0f0e5; color: var(--green); }
.stat-navy  { background: #e2e9f2; color: var(--navy); }
.stat-num { font-size: 1.8rem; font-weight: 700; line-height: 1; color: var(--ink); }
.stat-lbl { font-size: .85rem; color: var(--muted); font-weight: 500; margin-top: .2rem; }

/* tables */
.table {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0;
}
.table thead th {
  background: var(--surface-2);
  color: var(--muted);
  text-transform: uppercase;
  font-size: .74rem;
  letter-spacing: .5px;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  border-top: 0;
  padding: .85rem 1rem;
}
.table td { padding: .8rem 1rem; vertical-align: middle; border-top: 1px solid var(--line); }
.table-hover tbody tr:hover { background: var(--brand-soft); }
.table-responsive, table {
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.table img { border-radius: 8px; object-fit: cover; }

/* buttons */
.btn {
  border-radius: 10px;
  font-weight: 600;
  padding: .5rem 1rem;
  border: none;
  transition: transform .05s ease, filter .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary, .btn-info { background: var(--brand); color: #fff; }
.btn-primary:hover, .btn-info:hover { background: var(--brand-dark); color: #fff; }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #356b43; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-secondary { background: #6c645d; color: #fff; }
.btn-warning { background: var(--gold); color: #fff; }
.btn-outline-primary { border: 1.5px solid var(--brand); color: var(--brand); background: transparent; }
.btn-outline-primary:hover { background: var(--brand); color: #fff; }
.btn-lg { padding: .7rem 1.25rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* forms */
label, .col-form-label { font-weight: 500; color: var(--ink); }
.form-group { margin-bottom: 1rem; }
.form-control, .custom-select, select.form-control, textarea.form-control {
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: .6rem .85rem;
  background: var(--surface);
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
  box-shadow: none;
}
.form-control:focus, .custom-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(196, 80, 29, .15);
}
.textarea { resize: none; overflow-y: auto; height: 300px; }
.ck-editor__editable { min-height: 200px; border-radius: 0 0 10px 10px !important; }
.ck.ck-toolbar { border-radius: 10px 10px 0 0 !important; }

/* --- consistency overrides for legacy inline styles (old templates) --- */
/* the old forms wrapped fields in blue-tinted, fixed-height boxes */
.h-25.form-group { background-color: transparent !important; height: auto !important; }
/* old Bootstrap dark table headers -> themed light header */
.table .thead-dark th, .table thead.thead-dark th {
  background: var(--surface-2) !important;
  color: var(--muted) !important;
  border-color: var(--line) !important;
}

/* badges / chips */
.badge {
  border-radius: 999px;
  padding: .4em .7em;
  font-weight: 600;
  font-size: .72rem;
}
.badge-success, .badge-primary { background: var(--green); color: #fff; }
.badge-danger { background: var(--danger); color: #fff; }
.badge-warning { background: var(--gold); color: #fff; }
.badge-secondary { background: #cfc6bc; color: #4a4038; }

/* featured / trending toggle chips (temple list) */
a.badge { text-decoration: none; }
.flag-on, .flag-off { margin-right: .25rem; display: inline-block; }
.flag-on { background: var(--brand); color: #fff !important; }
.flag-off { background: transparent; color: var(--muted) !important; border: 1px solid var(--line); }
.flag-off:hover { border-color: var(--brand); color: var(--brand) !important; }
.flag-on:hover { background: var(--brand-dark); color: #fff !important; }

/* alerts */
.alert { border-radius: var(--radius-sm); border: 1px solid var(--line); }
.alert-success { background: #e6f2ea; color: #245c34; border-color: #cfe6d7; }
.alert-danger { background: #fbe6e5; color: #8f2e2a; border-color: #f2cecb; }

/* ------------------------------- login ---------------------------------- */
.textarea { resize: none; overflow-y: auto; height: 300px; }

.login-page, #app > main {
  min-height: 100vh;
}
.login-page {
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1200px 600px at 20% -10%, #fff3e9 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 120%, #f6e7d2 0%, transparent 55%),
    var(--bg);
}
/* the default Laravel login card, modernized */
#app .card, .login-page .card {
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  max-width: 460px;
  margin: 3rem auto;
}
#app .card .card-header, .login-page .card .card-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
  padding: 1.25rem;
}

/* legacy login classes kept + modernized */
.container-login {
  width: 100%; min-height: 100vh;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  padding: 15px;
  background: var(--bg);
}
.wrap-login {
  width: 100%; max-width: 460px; background: var(--surface);
  border-radius: 20px; box-shadow: var(--shadow); padding: 40px;
}
.login-form { width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; }
.login-form-title {
  width: 100%; display: block; font-size: 28px; font-weight: 700;
  color: var(--ink); text-align: center; line-height: 1.2; margin-bottom: 1rem;
}

/* modern stacked login form */
.login-card { width: 100%; max-width: 440px; margin: auto; }
.login-card .card { margin: 0 auto; width: 100%; }
.login-title { font-size: 1.5rem; font-weight: 700; color: var(--ink); margin: .8rem 0 .15rem; }
.login-sub { color: var(--muted); font-size: .95rem; margin: 0; }
.login-page .form-group { margin-bottom: 1.1rem; }
.login-page label { font-weight: 600; color: var(--ink); font-size: .9rem; margin-bottom: .4rem; }
.login-page .form-control { padding: .72rem .9rem; height: auto; }
.login-page .form-check { padding-left: 1.7rem; }
.login-page .form-check-label { color: var(--muted); }
.login-link { color: var(--brand); font-size: .9rem; text-decoration: none; }
.login-link:hover { color: var(--brand-dark); text-decoration: underline; }

/* responsive tweaks */
@media (max-width: 991.98px) {
  .wrapper .content { padding: 1rem; }
}

/* ===================== 2026 polish layer (friendly) ===================== */
body {
  background:
    radial-gradient(900px 460px at 100% -5%, #fff2e6 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

/* cards feel alive on hover */
.card { transition: transform .18s ease, box-shadow .18s ease; }
.card:hover { box-shadow: var(--shadow); }

/* accent bar on admin card headers (not the login card) */
.content .card-header { display: flex; align-items: center; }
.content .card-header::before {
  content: ""; flex: 0 0 auto;
  width: 4px; height: 18px; border-radius: 4px;
  background: var(--brand); margin-right: .6rem;
}

/* buttons: soft depth + hover glow */
.btn { box-shadow: 0 1px 2px rgba(40, 30, 20, .06); }
.btn-primary:hover, .btn-info:hover { box-shadow: 0 8px 18px rgba(196, 80, 29, .28); }
.btn-success:hover { box-shadow: 0 8px 18px rgba(63, 122, 78, .25); }

/* sidebar active item pops */
.nav-link.active { box-shadow: 0 6px 14px rgba(196, 80, 29, .30); }

/* gradient stat tiles */
.stat-brand { background: linear-gradient(135deg, #fbe7dc, #f7d2c0); }
.stat-gold  { background: linear-gradient(135deg, #fbeecb, #f6e2ad); }
.stat-green { background: linear-gradient(135deg, #e0f0e5, #cbe7d4); }
.stat-navy  { background: linear-gradient(135deg, #e2e9f2, #d0dcec); }
.stat-ico   { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .03); }
.stat-num   { letter-spacing: -.5px; }

/* friendlier inputs + rounded table corners */
.form-control { padding: .65rem .9rem; }
.form-control::placeholder { color: #b3a89d; }
.table thead th:first-child { border-top-left-radius: var(--radius); }
.table thead th:last-child  { border-top-right-radius: var(--radius); }

/* soft custom scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #dcccbb; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #c9b6a2; }

/* rounded toast notifications */
#toast-container > div { border-radius: 12px !important; box-shadow: var(--shadow) !important; opacity: 1; }

/* small niceties */
a { transition: color .15s ease; }
.badge { letter-spacing: .2px; }
.wrapper .content { padding-top: 1.5rem; }
