/* =========================================================
   SMART KITCHEN INVENTORY SYSTEM
   PREMIUM ROYAL BLUE + GREY THEME
   ========================================================= */

/* =========================
   1. COLOUR VARIABLES
   ========================= */

:root {
  --primary: #2457d6;
  --primary-hover: #1947b8;
  --primary-dark: #153a91;
  --primary-soft: #eef3ff;

  --navy: #08152f;
  --navy-light: #132653;
  --navy-soft: #1b3267;

  --grey-50: #f8fafc;
  --grey-100: #f1f5f9;
  --grey-200: #e2e8f0;
  --grey-300: #cbd5e1;
  --grey-400: #94a3b8;
  --grey-500: #64748b;
  --grey-600: #475569;
  --grey-700: #334155;
  --grey-800: #1e293b;
  --grey-900: #0f172a;

  --success: #15956f;
  --danger: #dc4c64;
  --warning: #e9a23b;
  --info: #3385d6;

  --bg: #f4f7fb;
  --card: #ffffff;

  --text: #17233b;
  --muted: #6b778c;
  --border: #e1e7ef;

  --glass: rgba(255, 255, 255, 0.9);

  --sidebar-width: 272px;

  --radius-small: 8px;
  --radius-medium: 14px;
  --radius-large: 20px;

  --shadow-small:
    0 2px 8px rgba(15, 37, 87, 0.05);

  --shadow-medium:
    0 12px 32px rgba(15, 37, 87, 0.09);

  --shadow-large:
    0 26px 65px rgba(15, 37, 87, 0.16);

  --primary-color: var(--primary);
  --secondary-color: var(--muted);
  --bg-color: var(--bg);
  --card-bg: var(--card);
  --text-primary: var(--text);
  --text-muted: var(--muted);
  --border-color: var(--border);
  --accent-color: var(--primary-soft);
  --glass-bg: var(--glass);
}

/* =========================
   2. DARK MODE
   ========================= */

[data-theme="dark"] {
  --primary: #6f93ff;
  --primary-hover: #8aa8ff;
  --primary-dark: #5278e8;
  --primary-soft: rgba(111, 147, 255, 0.14);

  --bg: #0b1220;
  --card: #111c2f;

  --text: #edf2fa;
  --muted: #9aa8bc;
  --border: #25344c;

  --glass: rgba(17, 28, 47, 0.9);

  --shadow-small:
    0 2px 8px rgba(0, 0, 0, 0.18);

  --shadow-medium:
    0 12px 30px rgba(0, 0, 0, 0.26);

  --shadow-large:
    0 24px 60px rgba(0, 0, 0, 0.38);
}

/* =========================
   3. GLOBAL RESET
   ========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;

  background:
    radial-gradient(
      circle at 95% 0%,
      rgba(36, 87, 214, 0.07),
      transparent 30rem
    ),
    radial-gradient(
      circle at 5% 100%,
      rgba(100, 116, 139, 0.04),
      transparent 26rem
    ),
    var(--bg);

  color: var(--text);

  font-family:
    "Segoe UI",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;

  font-size: 0.925rem;
  line-height: 1.55;

  -webkit-font-smoothing: antialiased;

  transition:
    background-color 0.25s ease,
    color 0.25s ease;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-hover);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text);
  letter-spacing: -0.02em;
}

.text-muted {
  color: var(--muted) !important;
}

.text-primary {
  color: var(--primary) !important;
}

.text-indigo {
  color: #6d5bd0 !important;
}

.cursor-pointer {
  cursor: pointer;
}

/* =========================
   4. LOGIN BACKGROUND
   ========================= */

.glass-wrapper {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 100vh;
  padding: 2rem 1rem;

  overflow: hidden;

  background:
    radial-gradient(
      circle at 15% 15%,
      rgba(79, 116, 232, 0.28),
      transparent 28rem
    ),
    radial-gradient(
      circle at 90% 85%,
      rgba(148, 163, 184, 0.14),
      transparent 28rem
    ),
    linear-gradient(
      135deg,
      #07142e 0%,
      #0d245b 50%,
      #153b92 100%
    );
}

.glass-wrapper::before {
  content: "";

  position: absolute;
  inset: 0;

  opacity: 0.08;

  background-image:
    linear-gradient(
      rgba(255, 255, 255, 0.15) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.15) 1px,
      transparent 1px
    );

  background-size: 48px 48px;

  pointer-events: none;
}

.login-bg {
  min-height: 100vh;

  background:
    linear-gradient(
      135deg,
      #07142e,
      #153b92
    );
}

/* =========================
   5. LOGIN BLOBS
   ========================= */

.glass-blob {
  position: absolute;

  border-radius: 50%;

  filter: blur(90px);
  opacity: 0.22;

  pointer-events: none;

  animation:
    floatOrb 14s infinite alternate ease-in-out;
}

.blob-1 {
  width: 380px;
  height: 380px;

  top: -150px;
  left: -100px;

  background: #3d6be3;
}

.blob-2 {
  width: 340px;
  height: 340px;

  right: -120px;
  bottom: -150px;

  background: #94a3b8;

  animation-delay: -7s;
}

.blob-3 {
  width: 240px;
  height: 240px;

  top: 38%;
  left: 52%;

  background: #6388ee;

  animation-delay: -3s;
}

@keyframes floatOrb {
  from {
    transform:
      translate3d(0, 0, 0)
      scale(1);
  }

  to {
    transform:
      translate3d(30px, -20px, 0)
      scale(1.06);
  }
}

/* =========================
   6. LOGIN CARD
   ========================= */

.glass-card {
  position: relative;
  z-index: 2;

  overflow: hidden;

  border:
    1px solid
    rgba(255, 255, 255, 0.16);

  border-radius: 22px;

  background:
    linear-gradient(
      145deg,
      rgba(17, 31, 67, 0.9),
      rgba(7, 19, 44, 0.84)
    );

  box-shadow:
    0 30px 80px
    rgba(0, 0, 0, 0.4);

  color: #ffffff;

  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
}

.glass-card::before {
  content: "";

  position: absolute;
  inset: 0 0 auto 0;

  height: 3px;

  background:
    linear-gradient(
      90deg,
      transparent,
      #7fa0ff,
      #d8dfed,
      #7fa0ff,
      transparent
    );
}

.glass-panel {
  border: 1px solid var(--border);
  border-radius: 12px;

  background: var(--glass);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* =========================
   7. LOGIN LOGO
   ========================= */

img.brand-logo-img {
  width: 76px !important;
  height: 76px !important;

  min-width: 76px !important;
  min-height: 76px !important;

  max-width: 76px !important;
  max-height: 76px !important;

  display: inline-block !important;

  border:
    2px solid
    rgba(126, 160, 255, 0.75) !important;

  border-radius: 50% !important;

  object-fit: cover !important;

  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.25),
    0 0 0 4px rgba(255, 255, 255, 0.05),
    0 0 24px rgba(74, 115, 236, 0.16) !important;
}

.auth-kicker {
  color: #adc1ff;

  font-size: 0.68rem;
  font-weight: 750;

  letter-spacing: 0.16em;

  text-transform: uppercase;
}

/* =========================
   8. LOGIN INPUTS
   ========================= */

.glass-input,
.glass-input-text,
.glass-select {
  min-height: 46px;

  border-color:
    rgba(255, 255, 255, 0.15) !important;

  background:
    rgba(255, 255, 255, 0.065) !important;

  color: #ffffff !important;

  box-shadow: none !important;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.glass-input::placeholder {
  color:
    rgba(255, 255, 255, 0.4) !important;
}

.glass-input-text {
  color:
    rgba(255, 255, 255, 0.65) !important;
}

.glass-input:hover,
.glass-select:hover {
  border-color:
    rgba(145, 173, 255, 0.32) !important;
}

.glass-input:focus,
.glass-select:focus {
  border-color:
    rgba(123, 157, 255, 0.9) !important;

  background:
    rgba(255, 255, 255, 0.1) !important;

  box-shadow:
    0 0 0 4px
    rgba(81, 119, 231, 0.18) !important;
}

.glass-select option,
select.glass-input option {
  background: #101e42;
  color: #ffffff;
}

.glass-btn {
  min-height: 46px;

  border:
    1px solid
    rgba(255, 255, 255, 0.12);

  border-radius: 10px;

  background:
    linear-gradient(
      135deg,
      #3767e6,
      #204bbe
    );

  box-shadow:
    0 11px 24px
    rgba(22, 61, 164, 0.38);

  color: #ffffff;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.glass-btn:hover,
.glass-btn:focus {
  transform: translateY(-1px);

  background:
    linear-gradient(
      135deg,
      #4b78ee,
      #244fc4
    );

  box-shadow:
    0 15px 30px
    rgba(22, 61, 164, 0.48);

  color: #ffffff;
}

.glass-badge {
  border:
    1px solid
    rgba(255, 255, 255, 0.14);

  background:
    rgba(255, 255, 255, 0.09);

  color: #e9efff;
}

/* =========================
   9. MAIN LAYOUT
   ========================= */

#wrapper {
  display: flex;

  width: 100%;
  min-height: 100vh;
}

#page-content {
  display: flex;
  flex: 1;
  flex-direction: column;

  min-width: 0;
}

/* =========================
   10. SIDEBAR
   ========================= */

#sidebar {
  position: sticky;
  top: 0;

  display: flex;
  flex:
    0
    0
    var(--sidebar-width);
  flex-direction: column;

  width: var(--sidebar-width);
  height: 100vh;

  overflow-y: auto;

  color: #ffffff;

  background:
    radial-gradient(
      circle at 10% 0%,
      rgba(76, 115, 232, 0.24),
      transparent 18rem
    ),
    linear-gradient(
      180deg,
      #132653 0%,
      #0c1938 48%,
      #071126 100%
    );

  box-shadow:
    8px 0 30px
    rgba(15, 23, 42, 0.12);

  z-index: 1040;

  transition:
    transform 0.28s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;

  min-height: 74px;

  padding:
    0.85rem
    1.15rem;

  border-bottom:
    1px solid
    rgba(255, 255, 255, 0.075);
}

img.sidebar-logo-img {
  width: 38px !important;
  height: 38px !important;

  min-width: 38px !important;
  min-height: 38px !important;

  max-width: 38px !important;
  max-height: 38px !important;

  flex:
    0
    0
    38px;

  display: block !important;

  border:
    2px solid
    rgba(126, 160, 255, 0.7) !important;

  border-radius: 50% !important;

  object-fit: cover !important;

  box-shadow:
    0 4px 12px
    rgba(0, 0, 0, 0.22) !important;
}

.sidebar-brand-title {
  color: #ffffff;

  font-size: 0.95rem;
  font-weight: 750;

  line-height: 1.15;
  letter-spacing: 0.02em;
}

.sidebar-brand-subtitle {
  color: #9caac7;

  font-size: 0.62rem;
  font-weight: 600;

  letter-spacing: 0.1em;

  text-transform: uppercase;
}

.sidebar-section-label {
  margin:
    1.15rem
    1.25rem
    0.35rem;

  color:
    rgba(191, 205, 235, 0.44);

  font-size: 0.61rem;
  font-weight: 750;

  letter-spacing: 0.15em;

  text-transform: uppercase;
}

#sidebar .nav-link {
  position: relative;

  display: flex;
  align-items: center;

  gap: 0.75rem;

  min-height: 43px;

  margin:
    0.16rem
    0.75rem;

  padding:
    0.68rem
    0.9rem;

  border:
    1px solid
    transparent;

  border-radius: 10px;

  color:
    rgba(219, 228, 246, 0.68);

  font-size: 0.86rem;
  font-weight: 560;

  text-decoration: none;

  transition:
    color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease,
    border-color 0.18s ease;
}

#sidebar .nav-link:hover {
  color: #ffffff;

  background:
    rgba(94, 132, 236, 0.1);

  border-color:
    rgba(126, 155, 235, 0.07);

  transform:
    translateX(2px);
}

#sidebar .nav-link.active {
  color: #ffffff;

  background:
    linear-gradient(
      90deg,
      rgba(61, 103, 226, 0.34),
      rgba(55, 84, 164, 0.14)
    );

  box-shadow:
    inset 3px 0 0
    #7fa0ff,
    0 6px 22px
    rgba(9, 22, 57, 0.16);
}

#sidebar .nav-link i {
  width: 20px;

  color:
    rgba(192, 206, 238, 0.6);

  text-align: center;

  font-size: 0.98rem;
}

#sidebar .nav-link.active i {
  color: #9ab4ff;
}

.sidebar-footer-card {
  margin:
    auto
    0.75rem
    0.85rem;

  padding: 0.9rem;

  border:
    1px solid
    rgba(255, 255, 255, 0.075);

  border-radius: 12px;

  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.055),
      rgba(255, 255, 255, 0.025)
    );
}

/* =========================
   11. TOP NAVBAR
   ========================= */

.top-navbar {
  position: sticky;
  top: 0;

  z-index: 1020;

  min-height: 68px;

  padding:
    0.7rem
    1.5rem;

  border-bottom:
    1px solid
    rgba(218, 225, 236, 0.92);

  background:
    rgba(255, 255, 255, 0.88);

  box-shadow:
    0 5px 20px
    rgba(15, 37, 87, 0.035);

  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

[data-theme="dark"] .top-navbar {
  border-bottom:
    1px solid
    var(--border);

  background:
    rgba(17, 28, 47, 0.88);
}

.top-search {
  width:
    min(
      340px,
      28vw
    );
}

.top-search .form-control {
  height: 41px;

  border:
    1px solid
    var(--border) !important;

  background:
    #f7f9fc !important;

  color: var(--text);
}

[data-theme="dark"] .top-search .form-control {
  background:
    rgba(255, 255, 255, 0.04) !important;
}

.top-search .form-control:focus {
  border-color:
    rgba(36, 87, 214, 0.4) !important;

  box-shadow:
    0 0 0 4px
    rgba(36, 87, 214, 0.1);
}

.icon-btn {
  display: inline-grid;
  place-items: center;

  width: 40px;
  height: 40px;

  padding: 0;

  border:
    1px solid
    var(--border);

  border-radius: 10px;

  background: var(--card);

  color: var(--grey-500);

  box-shadow:
    0 2px 7px
    rgba(15, 37, 87, 0.035);

  transition:
    all 0.2s ease;
}

.icon-btn:hover {
  transform:
    translateY(-1px);

  border-color:
    rgba(36, 87, 214, 0.25);

  background:
    var(--primary-soft);

  color:
    var(--primary);

  box-shadow:
    0 6px 14px
    rgba(36, 87, 214, 0.1);
}

.user-avatar {
  display: grid;
  place-items: center;

  width: 38px;
  height: 38px;

  border-radius: 10px;

  background:
    linear-gradient(
      145deg,
      #3d6eea,
      #1e48b5
    );

  box-shadow:
    0 7px 18px
    rgba(36, 87, 214, 0.28);

  color: #ffffff;

  font-weight: 750;
}

/* =========================
   12. MAIN CONTENT
   ========================= */

main {
  width: 100%;
  max-width: 1720px;

  margin-inline: auto;
}

main
  > .d-flex.justify-content-between.align-items-center.mb-4 {
  gap: 1rem;

  padding-bottom: 1rem;

  border-bottom:
    1px solid
    var(--border);
}

.breadcrumb {
  --bs-breadcrumb-divider-color:
    var(--muted);
}

.breadcrumb-item a {
  color: var(--primary);

  text-decoration: none;
}

.breadcrumb-item.active {
  color: var(--muted);
}

/* =========================
   13. CARDS
   ========================= */

.card-custom {
  overflow: hidden;

  border:
    1px solid
    rgba(222, 228, 238, 0.95);

  border-radius:
    var(--radius-medium);

  background:
    var(--card);

  box-shadow:
    0 3px 14px
    rgba(15, 37, 87, 0.045);

  color:
    var(--text);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.card-custom:hover {
  transform:
    translateY(-2px);

  border-color:
    rgba(36, 87, 214, 0.2);

  box-shadow:
    0 14px 34px
    rgba(15, 37, 87, 0.09);
}

.card-custom .card-header {
  min-height: 54px;

  padding-inline: 1.2rem;

  border-bottom:
    1px solid
    var(--border) !important;

  background:
    linear-gradient(
      180deg,
      rgba(248, 250, 252, 0.8),
      rgba(255, 255, 255, 0)
    );
}

[data-theme="dark"] .card-custom .card-header {
  background:
    rgba(255, 255, 255, 0.015);
}

.card-custom .card-body {
  padding: 1.2rem;
}

/* =========================
   14. IMAGE FIX
   ========================= */

.card-custom img {
  max-width: 100%;
  height: auto;

  object-fit: cover;

  border-radius: 10px;
}

.dashboard-image {
  width: 100%;
  max-height: 220px;

  object-fit: cover;

  border-radius: 12px;
}

.card-image-small {
  width: 70px;
  height: 70px;

  object-fit: cover;

  border-radius: 10px;
}

.card-image-medium {
  width: 120px;
  height: 90px;

  object-fit: cover;

  border-radius: 10px;
}

.profile-image {
  width: 44px;
  height: 44px;

  object-fit: cover;

  border-radius: 50%;
}

/* =========================
   15. KPI CARDS
   ========================= */

.kpi-card {
  position: relative;

  min-height: 118px;

  padding: 1.05rem;

  overflow: hidden;

  border-left: 0 !important;

  background:
    linear-gradient(
      145deg,
      #ffffff 0%,
      #fbfcff 100%
    );
}

[data-theme="dark"] .kpi-card {
  background:
    linear-gradient(
      145deg,
      #111c2f,
      #101a2b
    );
}

.kpi-card::before {
  content: "";

  position: absolute;

  top: -45px;
  right: -45px;

  width: 120px;
  height: 120px;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(36, 87, 214, 0.1),
      transparent 70%
    );

  pointer-events: none;
}

.kpi-card::after {
  content: "";

  position: absolute;

  inset:
    auto
    0
    0;

  height: 3px;

  opacity: 0.75;

  background:
    linear-gradient(
      90deg,
      #2457d6,
      #7c9cf0 55%,
      transparent
    );
}

.kpi-card h3 {
  font-size: 1.55rem;
}

.kpi-icon {
  display: grid;
  place-items: center;

  width: 44px;
  height: 44px;

  flex:
    0
    0
    44px;

  border:
    1px solid
    rgba(36, 87, 214, 0.09);

  border-radius: 12px;

  background:
    linear-gradient(
      145deg,
      #eef3ff,
      #e4ebff
    ) !important;

  color:
    #2457d6 !important;

  box-shadow:
    0 7px 18px
    rgba(36, 87, 214, 0.1);

  font-size: 1.1rem;
}

[data-theme="dark"] .kpi-icon {
  border-color:
    rgba(110, 146, 255, 0.15);

  background:
    rgba(110, 146, 255, 0.12) !important;

  color:
    #89a7ff !important;
}

.ai-card {
  padding: 1.05rem;

  border:
    1px solid
    rgba(36, 87, 214, 0.14);

  border-radius: 12px;

  background:
    linear-gradient(
      135deg,
      rgba(238, 243, 255, 0.96),
      rgba(247, 249, 253, 0.65)
    );

  box-shadow:
    0 8px 25px
    rgba(36, 87, 214, 0.045);
}

[data-theme="dark"] .ai-card {
  background:
    linear-gradient(
      135deg,
      rgba(71, 109, 221, 0.12),
      rgba(17, 28, 47, 0.55)
    );
}

/* =========================
   16. TABLE
   ========================= */

.table-custom {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);

  color: var(--text);
}

.table-custom thead th {
  padding:
    0.85rem
    1rem;

  border-bottom:
    1px solid
    var(--border);

  background:
    #f4f6fa;

  color:
    #637086;

  font-size: 0.7rem;
  font-weight: 750;

  letter-spacing: 0.06em;

  text-transform: uppercase;

  white-space: nowrap;
}

[data-theme="dark"] .table-custom thead th {
  background:
    rgba(255, 255, 255, 0.025);

  color:
    var(--muted);
}

.table-custom tbody td {
  padding:
    0.92rem
    1rem;

  border-bottom:
    1px solid
    var(--border);

  vertical-align: middle;
}

.table-custom tbody tr:last-child td {
  border-bottom: 0;
}

.table-custom tbody tr {
  transition:
    background-color 0.16s ease;
}

.table-custom tbody tr:hover {
  background:
    rgba(36, 87, 214, 0.045);
}

[data-theme="dark"] .table-custom tbody tr:hover {
  background:
    rgba(110, 146, 255, 0.07);
}

/* =========================
   17. BADGES
   ========================= */

.badge {
  border-radius: 999px;

  padding:
    0.42em
    0.72em;

  font-weight: 650;

  letter-spacing: 0.01em;
}

.bg-primary {
  background:
    linear-gradient(
      135deg,
      #376ae9,
      #2457d6
    ) !important;
}

.bg-success {
  background-color:
    var(--success) !important;
}

.bg-danger {
  background-color:
    var(--danger) !important;
}

.bg-warning {
  background-color:
    var(--warning) !important;
}

/* =========================
   18. BUTTONS
   ========================= */

.btn {
  border-radius: 9px;

  font-size: 0.85rem;
  font-weight: 600;

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.btn:hover {
  transform:
    translateY(-1px);
}

.btn-primary {
  border-color:
    #2457d6;

  background:
    linear-gradient(
      135deg,
      #3164e5,
      #2457d6
    );

  color: #ffffff;

  box-shadow:
    0 5px 13px
    rgba(36, 87, 214, 0.15);
}

.btn-primary:hover,
.btn-primary:focus {
  border-color:
    #1947b8;

  background:
    linear-gradient(
      135deg,
      #2859d5,
      #1947b8
    );

  box-shadow:
    0 9px 20px
    rgba(36, 87, 214, 0.25);

  color: #ffffff;
}

.btn-light {
  border-color:
    var(--border);

  background:
    var(--card);

  color:
    var(--grey-600);
}

.btn-light:hover {
  border-color:
    rgba(36, 87, 214, 0.2);

  background:
    var(--primary-soft);

  color:
    var(--primary);
}

.btn-outline-secondary {
  border-color:
    #d5dce6;

  color:
    #64748b;
}

.btn-outline-secondary:hover {
  border-color:
    #2457d6;

  background:
    #2457d6;

  color:
    #ffffff;
}

/* =========================
   19. FORMS
   ========================= */

.form-control,
.form-select {
  min-height: 42px;

  border:
    1px solid
    #dde4ed;

  border-radius: 9px;

  background:
    #ffffff;

  color:
    #1e293b;

  font-size: 0.89rem;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.form-control:hover,
.form-select:hover {
  border-color:
    #c9d3e2;
}

.form-control:focus,
.form-select:focus {
  border-color:
    rgba(36, 87, 214, 0.62);

  background:
    #ffffff;

  color:
    var(--text);

  box-shadow:
    0 0 0 4px
    rgba(36, 87, 214, 0.1);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  border-color:
    var(--border);

  background:
    #111c2f;

  color:
    var(--text);
}

.form-control::placeholder {
  color:
    var(--muted);

  opacity: 0.65;
}

.form-label {
  color:
    var(--text);
}

.form-check-input:checked {
  border-color:
    #2457d6;

  background-color:
    #2457d6;
}

.form-check-input:focus {
  border-color:
    #5278e8;

  box-shadow:
    0 0 0 4px
    rgba(36, 87, 214, 0.12);
}

/* =========================
   20. DROPDOWN
   ========================= */

.dropdown-menu {
  padding: 0.45rem;

  border:
    1px solid
    var(--border) !important;

  border-radius: 12px;

  background:
    var(--card);

  box-shadow:
    var(--shadow-large) !important;

  color:
    var(--text);
}

.dropdown-item {
  padding:
    0.62rem
    0.75rem;

  border-radius: 8px;

  color:
    var(--text);

  font-size: 0.86rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background:
    var(--primary-soft);

  color:
    var(--primary);
}

.dropdown-divider {
  border-color:
    var(--border);
}

/* =========================
   21. MODAL
   ========================= */

.modal-content {
  overflow: hidden;

  border:
    1px solid
    var(--border) !important;

  border-radius: 16px;

  background:
    var(--card);

  box-shadow:
    0 30px 90px
    rgba(15, 23, 42, 0.22);

  color:
    var(--text);
}

.modal-header,
.modal-footer {
  padding:
    1rem
    1.25rem;

  border-color:
    var(--border);
}

.modal-header {
  background:
    linear-gradient(
      180deg,
      #fafbfd,
      #ffffff
    );
}

[data-theme="dark"] .modal-header {
  background:
    rgba(255, 255, 255, 0.015);
}

.modal-body {
  padding: 1.25rem;
}

/* =========================
   22. OTHER COMPONENTS
   ========================= */

.alert {
  border-radius: 11px;
}

.alert-primary {
  border:
    1px solid
    rgba(36, 87, 214, 0.16);

  background:
    #eef3ff;

  color:
    #173d9c;
}

[data-theme="dark"] .alert-primary {
  background:
    rgba(110, 146, 255, 0.1);

  color:
    #b7c7ff;
}

.list-group-item {
  border-color:
    var(--border);

  background:
    transparent;

  color:
    var(--text);
}

footer {
  border-color:
    var(--border) !important;

  background:
    transparent !important;

  color:
    var(--muted) !important;
}

/* =========================
   23. LOADER
   ========================= */

#loader-overlay {
  position: fixed;
  inset: 0;

  display: grid;
  place-items: center;

  z-index: 9999;

  background:
    var(--bg);

  transition:
    opacity 0.25s ease;
}

#loader-overlay .spinner-border {
  color:
    var(--primary) !important;
}

/* =========================
   24. SIDEBAR OVERLAY
   ========================= */

.sidebar-backdrop {
  display: none;
}

/* =========================
   25. DARK MODE FIX
   ========================= */

[data-theme="dark"] .bg-white,
[data-theme="dark"] .bg-light {
  background-color:
    var(--card) !important;
}

[data-theme="dark"] .text-dark {
  color:
    var(--text) !important;
}

[data-theme="dark"] .border,
[data-theme="dark"] .border-top,
[data-theme="dark"] .border-bottom {
  border-color:
    var(--border) !important;
}

[data-theme="dark"] .table {
  --bs-table-color:
    var(--text);
}

[data-theme="dark"] .btn-close {
  filter:
    invert(1)
    grayscale(100%)
    brightness(180%);
}

/* =========================
   26. SCROLLBAR
   ========================= */

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background:
    transparent;
}

::-webkit-scrollbar-thumb {
  border-radius:
    999px;

  background:
    #cbd4e3;
}

::-webkit-scrollbar-thumb:hover {
  background:
    #9aa8be;
}

#sidebar::-webkit-scrollbar {
  width: 5px;
}

#sidebar::-webkit-scrollbar-thumb {
  background:
    rgba(255, 255, 255, 0.14);
}

/* =========================
   27. SELECTION
   ========================= */

::selection {
  background:
    rgba(36, 87, 214, 0.2);

  color:
    inherit;
}

/* =========================
   28. UTILITIES
   ========================= */

.page-title {
  color:
    #17233b;

  font-weight:
    750;

  letter-spacing:
    -0.03em;
}

[data-theme="dark"] .page-title {
  color:
    var(--text);
}

.section-title {
  color:
    #26354f;

  font-weight:
    700;
}

[data-theme="dark"] .section-title {
  color:
    var(--text);
}

.text-royal {
  color:
    #2457d6 !important;
}

.bg-royal {
  background:
    #2457d6 !important;

  color:
    #ffffff !important;
}

.bg-royal-soft {
  background:
    #eef3ff !important;

  color:
    #2457d6 !important;
}

.border-royal {
  border-color:
    rgba(36, 87, 214, 0.25) !important;
}


/* =========================
   REORDER BADGE
   ========================= */

.reorder-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;

  min-width: 88px;
  padding: 0.46rem 0.72rem;

  border: 1px solid rgba(36, 87, 214, 0.22);
  border-radius: 999px;

  background: #eef3ff;
  color: #1947b8;

  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;

  box-shadow: 0 2px 8px rgba(36, 87, 214, 0.08);
}

.reorder-badge i {
  color: #2457d6;
  font-size: 0.72rem;
}

[data-theme="dark"] .reorder-badge {
  border-color: rgba(111, 147, 255, 0.28);
  background: rgba(111, 147, 255, 0.14);
  color: #a8bdff;
}

[data-theme="dark"] .reorder-badge i {
  color: #8aa8ff;
}

.text-success {
  color:
    #11966b !important;
}

.text-danger {
  color:
    #d73d51 !important;
}

.text-warning {
  color:
    #d88b1f !important;
}

.text-info {
  color:
    #3974d9 !important;
}

/* =========================
   29. TABLET RESPONSIVE
   ========================= */

@media (max-width: 1199.98px) {
  .kpi-card {
    min-height: 110px;
  }
}

/* =========================
   30. MOBILE SIDEBAR
   ========================= */

@media (max-width: 991.98px) {
  #sidebar {
    position: fixed;
    left: 0;

    transform:
      translateX(-100%);
  }

  #sidebar.toggled {
    transform:
      translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;

    display: block;

    z-index: 1035;

    background:
      rgba(4, 10, 24, 0.68);

    opacity: 0;
    visibility: hidden;

    backdrop-filter:
      blur(3px);

    transition:
      opacity 0.25s ease,
      visibility 0.25s ease;
  }

  .sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
  }

  .top-navbar {
    padding-inline: 1rem;
  }

  main {
    padding: 1.25rem !important;
  }
}

/* =========================
   31. PHONE RESPONSIVE
   ========================= */

@media (max-width: 767.98px) {
  .glass-wrapper {
    align-items:
      flex-start;

    padding-block:
      1rem;
  }

  .glass-card {
    border-radius:
      18px;
  }

  img.brand-logo-img {
    width: 68px !important;
    height: 68px !important;

    min-width: 68px !important;
    min-height: 68px !important;

    max-width: 68px !important;
    max-height: 68px !important;
  }

  img.sidebar-logo-img {
    width: 36px !important;
    height: 36px !important;

    min-width: 36px !important;
    min-height: 36px !important;

    max-width: 36px !important;
    max-height: 36px !important;

    flex-basis:
      36px;
  }

  .dashboard-image {
    max-height:
      180px;
  }

  .top-search {
    display:
      none !important;
  }

  .top-navbar {
    min-height:
      64px;
  }

  main
    > .d-flex.justify-content-between.align-items-center.mb-4 {
    align-items:
      flex-start !important;

    flex-direction:
      column;
  }

  main
    > .d-flex.justify-content-between.align-items-center.mb-4
    > .d-flex,
  main
    > .d-flex.justify-content-between.align-items-center.mb-4
    > button {
    width:
      100%;
  }

  main
    > .d-flex.justify-content-between.align-items-center.mb-4
    > .d-flex
    .btn {
    flex:
      1;
  }

  .card-custom {
    border-radius:
      11px;
  }

  .table-custom thead th,
  .table-custom tbody td {
    padding-inline:
      0.8rem;
  }
}

/* =========================
   32. SMALL PHONE
   ========================= */

@media (max-width: 575.98px) {
  body {
    font-size:
      0.88rem;
  }

  main {
    padding:
      1rem !important;
  }

  .kpi-card {
    min-height:
      103px;

    padding:
      0.9rem;
  }

  .kpi-card h3 {
    font-size:
      1.35rem;
  }

  .kpi-icon {
    width:
      40px;

    height:
      40px;

    flex-basis:
      40px;
  }

  .dashboard-image {
    max-height:
      150px;
  }

  .card-image-medium {
    width:
      95px;

    height:
      70px;
  }

  .card-image-small {
    width:
      58px;

    height:
      58px;
  }
}

/* =========================
   33. REDUCED MOTION
   ========================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration:
      0.01ms !important;

    animation-iteration-count:
      1 !important;

    transition-duration:
      0.01ms !important;
  }
}

/* =========================
   34. PRINT REPORT
   ========================= */

@media print {
  #sidebar,
  .top-navbar,
  footer,
  .btn,
  #loader-overlay,
  .sidebar-backdrop {
    display:
      none !important;
  }

  #page-content,
  main {
    width:
      100% !important;

    max-width:
      none !important;

    padding:
      0 !important;
  }

  body,
  .card-custom {
    background:
      #ffffff !important;

    color:
      #111111 !important;

    box-shadow:
      none !important;
  }

  .card-custom {
    border:
      1px solid
      #d9d9d9 !important;
  }

  .table-custom thead th {
    background:
      #f1f3f6 !important;

    color:
      #374151 !important;
  }
}