/* ==========================================================================
   Local design layer on top of the Star Admin (free) template.
   Kept as targeted overrides of the Bootstrap classes actually in use here,
   rather than a rewrite of the 14k-line compiled vendor stylesheet.
   ========================================================================== */

:root {
  --brand: #00b3a0;
  --brand-600: #00a594;
  --brand-700: #045d54;
  --brand-soft: rgba(0, 179, 160, 0.1);
  --ink: #16241f;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 2px 8px rgba(15, 35, 30, 0.06);
  --shadow-md: 0 10px 26px rgba(15, 35, 30, 0.1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
  background: #f4f7f6;
}

/* ==========================================================================
   Sidebar — brand gradient + the critical mobile fix.

   The template ships with its off-canvas responsive CSS entirely commented
   out (see demo_1/style.css around "style for off-canvas menu"), so the
   180px sidebar was permanently visible and full-height on every screen
   size, including phones — a hand-rolled JS toggle (#sidebar_kick) was the
   only thing that could ever hide it, and only after the user tapped it.
   This restores a real default: hidden off-canvas below 992px, opened as an
   overlay by the existing toggle (its logic already branches correctly off
   whichever state the sidebar starts in).
   ========================================================================== */

.sidebar {
  background: linear-gradient(to top, #045d54, #00b3a0) !important;
  box-shadow: var(--shadow-md);
}

.sidebar .nav-link {
  border-radius: var(--radius-sm);
  margin: 0.15rem 0.6rem;
  transition: background-color 0.2s var(--ease), padding-right 0.2s var(--ease);
}

.sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.12);
}

.sidebar .nav-link.show_off {
  background: rgba(255, 255, 255, 0.18);
  font-weight: 600;
  box-shadow: inset 3px 0 0 #fff;
}

@media (max-width: 991px) {
  .sidebar {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    z-index: 1050;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.35);
  }

  .main-panel {
    margin-right: 0 !important;
  }
}

/* ==========================================================================
   Top navbar
   ========================================================================== */

.navbar.default-layout {
  box-shadow: var(--shadow-sm);
}

.navbar .navbar-toggler {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), opacity 0.15s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn-success {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%);
  border-color: transparent;
}

.btn-success:hover,
.btn-success:focus {
  background: linear-gradient(135deg, var(--brand-600) 0%, #033f38 100%);
  box-shadow: 0 8px 20px rgba(0, 133, 119, 0.35);
}

.btn-info {
  background: linear-gradient(135deg, #29b6f6 0%, #0288d1 100%);
  border-color: transparent;
}

.btn.btn-sm {
  border-radius: var(--radius-sm);
}

.btn-block.submit-btn {
  padding: 0.7rem 1rem;
}

/* ==========================================================================
   Cards / page content
   ========================================================================== */

.content-wrapper {
  background: #f4f7f6;
}

.page-title-header {
  margin-bottom: 0.5rem;
}

.page-title .page-title {
  margin: 0;
}

/* ==========================================================================
   Tables — wrap the raw list tables in a card-like surface
   ========================================================================== */

.table-responsive {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 0.25rem;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.table.tbl_center {
  background: transparent !important;
  margin-bottom: 0;
}

.table.tbl_center th {
  background: var(--brand-soft);
  color: var(--brand-700);
  font-weight: 700;
  border: 0;
  white-space: nowrap;
  padding: 0.85rem 0.75rem;
}

.table.tbl_center td {
  vertical-align: middle;
  padding: 0.7rem 0.75rem;
  border-color: rgba(0, 0, 0, 0.06);
}

.table.tbl_center.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 179, 160, 0.035);
}

.table.tbl_center.table-hover tbody tr:hover {
  background-color: var(--brand-soft);
}

.table td img {
  object-fit: cover;
  transition: transform 0.2s var(--ease);
}

.table td a:hover img {
  transform: scale(1.04);
}

/* status / action pill buttons rendered inside table cells */
.table .btn.btn-sm {
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-control {
  border-radius: var(--radius-sm);
  border-color: rgba(0, 0, 0, 0.12);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.form-control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

/* Generic admin form "card" wrapper used across add/edit screens */
.admin-form-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.04);
  padding: 1.75rem clamp(1rem, 4vw, 2.25rem);
  max-width: 960px;
}

.admin-field {
  margin-bottom: 1.1rem;
}

.admin-field label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: #4a5a55;
  margin-bottom: 0.35rem;
}

.admin-field .form-control {
  width: 100%;
}

/* ==========================================================================
   Media gallery (config.php — header slider photos / videos)
   ========================================================================== */

.media-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.25rem 0;
}

.media-gallery-item {
  position: relative;
  width: 220px;
  max-width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.media-gallery-item img,
.media-gallery-item video {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
  background: #000;
}

.media-gallery-remove {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(220, 53, 69, 0.92);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.media-gallery-remove:hover {
  background: #c82333;
  color: #fff;
}

/* ==========================================================================
   Badges / counters
   ========================================================================== */

.abdge,
.badge {
  border-radius: 999px !important;
}

/* ==========================================================================
   Alerts / msgbox
   ========================================================================== */

#msgbox {
  border-radius: var(--radius-md);
  border: 0;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Page header (title + row count + optional search)
   ========================================================================== */

.page-title-header .page-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-search-form {
  margin-right: auto;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
}

.page-search-form .form-control {
  min-width: 0;
}

@media (max-width: 767px) {
  .page-title-header .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-search-form {
    margin-right: 0;
    width: 100%;
  }
}

/* ==========================================================================
   Login page
   ========================================================================== */

.auth.theme-one {
  background: radial-gradient(circle at 50% 0%, #0c3c36 0%, #04211d 60%, #021512 100%);
  min-height: 100vh;
}

.auth .auto-form-wrapper {
  background: rgba(255, 255, 255, 0.97);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem clamp(1rem, 4vw, 2rem);
}

.auth img[alt="logo"] {
  max-height: 64px;
}

.auth .label {
  font-weight: 600;
  font-size: 0.85rem;
  color: #4a5a55;
}

.auth .btn.submit-btn {
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%);
  border: 0;
}
