/* ================================================================
   main.css – Bar Council of Telangana Registration App
   ================================================================ */

/* ── Variables ──────────────────────────────────────────────── */
:root {
  --maroon:  #8B0000;
  --dark:    #1a1a2e;
  --navy:    #16213e;
  --gold:    #c9a84c;
  --gold-lt: #e8c97a;
  --cream:   #fdf8f0;
}

* { box-sizing: border-box; }

body {
  font-family: 'Open Sans', sans-serif;
  background: var(--cream);
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

/* ── Site Header ────────────────────────────────────────────── */
header {
  background: #ffffff;
  padding: 12px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.hdr-logo img {
  height: 70px;
  max-width: 260px;
  object-fit: contain;
  display: block;
}
.hdr-right { color: #333; font-size: .8rem; text-align: right; }
.hdr-label {
  font-size: .78rem;
  color: #555;
  text-transform: uppercase;
  letter-spacing: .6px;
  display: block;
}
.slot-big {
  font-family: 'EB Garamond', serif;
  font-size: 1.5rem;
  color: var(--maroon);
  font-weight: 700;
  display: block;
}
.small-status { font-size: .82rem; }

/* ── Navbar ─────────────────────────────────────────────────── */
nav.main-nav { background: #111111; }
nav.main-nav .nav-link {
  color: #ffffff !important;
  font-size: .87rem;
  font-weight: 600;
  letter-spacing: .4px;
  padding: 10px 16px !important;
  text-transform: uppercase;
  transition: .2s;
}
nav.main-nav .nav-link:hover,
nav.main-nav .nav-link.active-link {
  background: var(--maroon);
  color: #fff !important;
  border-radius: 3px;
}
nav.main-nav .navbar-toggler { border-color: #fff; }
nav.main-nav .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ── Page Banner ────────────────────────────────────────────── */
.page-banner {
  background: linear-gradient(90deg, var(--maroon), #6b0000);
  color: var(--gold-lt);
  padding: 12px 0;
  font-family: 'EB Garamond', serif;
  font-size: 1.3rem;
  border-bottom: 2px solid var(--gold);
}
.page-banner .breadcrumb-item,
.page-banner .breadcrumb-item a { color: #ddd; font-size: .79rem; font-family: 'Open Sans', sans-serif; }
.page-banner .breadcrumb-item.active { color: var(--gold-lt); }

/* ── Main content area ──────────────────────────────────────── */
main { flex: 1; padding: 28px 0 48px; }

/* ── Sidebar ────────────────────────────────────────────────── */
.side-card {
  background: #fff;
  border-left: 4px solid var(--gold);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  padding: 16px;
  margin-bottom: 18px;
}
.side-card h6 {
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  color: var(--maroon);
  font-weight: 700;
  border-bottom: 1px solid #ece0d0;
  padding-bottom: 7px;
  margin-bottom: 10px;
}
.side-card ul { padding-left: 1rem; font-size: .83rem; color: #555; }
.side-card ul li { margin-bottom: 5px; }

.prog-wrap {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  padding: 14px;
  margin-bottom: 18px;
}
.prog-wrap .lbl {
  font-size: .81rem;
  color: #555;
  display: flex;
  justify-content: space-between;
}
.prog-bg { background: #e9ecef; border-radius: 20px; height: 11px; margin: 7px 0 3px; }
.prog-fill {
  height: 11px;
  border-radius: 20px;
  background: linear-gradient(90deg, #28a745, #85c85f);
  transition: width 1s ease;
}
.prog-fill.warn { background: linear-gradient(90deg, #fd7e14, #ffc107); }
.prog-fill.dngr { background: linear-gradient(90deg, #dc3545, #e96a75); }

/* ── Tabs ───────────────────────────────────────────────────── */
.nav-tabs .nav-link { font-weight: 600; font-size: .9rem; color: #555; }
.nav-tabs .nav-link.active { color: var(--maroon); border-bottom: 2px solid var(--maroon); }

/* ── Form Card ──────────────────────────────────────────────── */
.uppercase { text-transform: uppercase; }
.form-card {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 3px 16px rgba(0,0,0,.1);
  overflow: hidden;
}
.card-hdr {
  background: linear-gradient(90deg, var(--dark), var(--navy));
  color: var(--gold);
  font-family: 'EB Garamond', serif;
  font-size: 1.15rem;
  padding: 13px 20px;
  border-bottom: 2px solid var(--gold);
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-hdr.blue { background: linear-gradient(90deg, #0d4f8c, #1565c0); }
.card-body-p { padding: 22px; }
.form-label { font-size: .86rem; font-weight: 600; color: #444; margin-bottom: 3px; }
.req { color: var(--maroon); }
.form-control, .form-select {
  border: 1.5px solid #dee0e3;
  border-radius: 4px;
  font-size: .89rem;
  padding: 8px 12px;
  transition: .2s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,.18);
  outline: none;
}
.sec-title {
  font-family: 'EB Garamond', serif;
  font-size: .98rem;
  color: var(--maroon);
  font-weight: 700;
  border-bottom: 1.5px solid #f0d9d9;
  padding-bottom: 5px;
  margin-bottom: 14px;
}
.caste-radio .form-check-input:checked { background-color: var(--maroon); border-color: var(--maroon); }
#photoPreview {
  width: 96px;
  height: 116px;
  object-fit: cover;
  border: 2px solid var(--gold);
  border-radius: 3px;
  display: none;
}
.photo-wrap { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }

/* Submit button */
.btn-submit {
  background: linear-gradient(135deg, var(--maroon), #6b0000);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  padding: 11px 34px;
  border: none;
  border-radius: 4px;
  transition: .15s;
  cursor: pointer;
}
.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(139,0,0,.4);
  color: #fff;
}

/* Admin maroon button */
.btn-tbc { background: var(--maroon); color: #fff; border: none; }
.btn-tbc:hover { background: #6b0000; color: #fff; }

/* Phone duplicate warning */
#phoneDupWarn { display: none; color: #dc3545; font-size: .8rem; margin-top: 4px; }

/* ── Search card ────────────────────────────────────────────── */
.search-card {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 3px 16px rgba(0,0,0,.1);
  overflow: hidden;
  margin-bottom: 20px;
}

/* ── Slots-full / Registrations-closed banner ───────────────── */
.slots-banner {
  background: #fff3cd;
  border: 1.5px solid #ffc107;
  border-left: 5px solid #fd7e14;
  border-radius: 4px;
  padding: 20px 24px;
  text-align: center;
}
.closed-banner {
  background: #fce4e4;
  border: 1.5px solid #e57373;
  border-left: 5px solid var(--maroon);
  border-radius: 4px;
  padding: 30px 24px;
  text-align: center;
}

/* ── Admin – Stat Cards ─────────────────────────────────────── */
.stat-card {
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  background: #fff;
  padding: 14px 18px;
}
.stat-card .lbl {
  font-size: .78rem;
  color: #777;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
}
.stat-card .num {
  font-size: 1.9rem;
  font-weight: 700;
  font-family: 'EB Garamond', serif;
  line-height: 1.1;
}

/* ── Admin – Toggle switch ──────────────────────────────────── */
.form-switch .form-check-input { width: 3em; height: 1.5em; cursor: pointer; }
.form-switch .form-check-input:checked { background-color: #28a745; border-color: #28a745; }
.form-switch .form-check-input:not(:checked) { background-color: #dc3545; border-color: #dc3545; }

/* ── Admin – DataTable ──────────────────────────────────────── */
.table th { background: var(--dark); color: var(--gold); font-size: .8rem; white-space: nowrap; }
.table td { font-size: .83rem; vertical-align: middle; }
.thumb { width: 44px; height: 52px; object-fit: cover; border: 1px solid #ccc; border-radius: 2px; }
#recordsTable { width: 100% !important; }
.dataTables_wrapper .dataTables_length select {
  width: auto;
  display: inline-block;
  padding: 4px 2rem 4px 8px; /* right padding keeps text clear of native arrow */
  font-size: .85rem;
  border: 1.5px solid #dee0e3;
  border-radius: 4px;
  appearance: auto;
  -webkit-appearance: auto;
}

/* ── Admin – Export card ────────────────────────────────────── */
.export-card {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  padding: 16px 20px;
  margin-bottom: 20px;
  border-left: 4px solid var(--gold);
}

/* ── Admin – Login card ─────────────────────────────────────── */
.login-card { border-radius: 8px; overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,.15); }
.login-hdr {
  background: var(--dark);
  color: var(--gold);
  font-family: 'EB Garamond', serif;
  font-size: 1.15rem;
  padding: 16px 20px;
  border-bottom: 2px solid var(--gold);
}

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  background: var(--dark);
  color: #a0a8b8;
  border-top: 4px solid var(--gold);
  padding: 38px 0 0;
  font-size: .84rem;
}
footer h6 {
  color: var(--gold);
  font-family: 'EB Garamond', serif;
  font-size: 1.03rem;
  font-weight: 700;
  margin-bottom: 13px;
}
footer a { color: #a0a8b8; text-decoration: none; transition: .2s; }
footer a:hover { color: var(--gold-lt); }
footer ul { list-style: none; padding: 0; }
footer ul li { margin-bottom: 6px; }
footer ul li::before { content: "›"; color: var(--gold); margin-right: 6px; }
.foot-btm {
  background: #111;
  margin-top: 28px;
  padding: 13px 0;
  text-align: center;
  font-size: .77rem;
  color: #777;
}
.foot-btm span { color: var(--gold-lt); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 767px) {
  .hdr-logo img { height: 48px; }
  .hdr-right { text-align: left; margin-top: 6px; }
  .export-card .d-flex { flex-wrap: wrap; }
}

/* ── DataTables overrides (admin) ───────────────────────────── */
.dataTables_wrapper .dataTables_filter input {
  border: 1.5px solid #dee0e3;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: .85rem;
}
.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 3px rgba(201,168,76,.18);
}

