:root {
  color-scheme: light;
  --navy-950: #101d35;
  --navy-900: #162747;
  --navy-800: #20395f;
  --blue-700: #2458c6;
  --blue-600: #316ee8;
  --blue-100: #eaf1ff;
  --page-bg: #f4f7fc;
  --surface: #ffffff;
  --text-main: #17243b;
  --text-muted: #718096;
  --border: #e3eaf4;
  --radius: 16px;
  --shadow: 0 8px 28px rgba(25, 48, 88, .06);
}

* {
  box-sizing: border-box;
}

body.app-shell,
body.auth-shell {
  background: var(--page-bg);
  color: var(--text-main);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

body.app-shell .container-fluid {
  padding-left: 0;
  padding-right: 0;
}

.sidebar {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--navy-900), var(--navy-950));
  padding: 28px 18px !important;
  box-shadow: 5px 0 24px rgba(16, 29, 53, .08);
}

.sidebar .brand {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: .06em;
  padding: 8px 10px 20px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.sidebar .navlinks {
  display: grid;
  gap: 7px;
  margin-top: 20px;
}

.sidebar .navlinks a {
  color: #d6e2f7;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: .93rem;
  font-weight: 550;
  transition: background .18s ease, color .18s ease;
}

.sidebar .navlinks a:hover,
.sidebar .navlinks a:focus-visible {
  background: rgba(255,255,255,.10);
  color: #fff;
}

.sidebar form {
  padding: 0 8px;
}

body.app-shell main {
  min-width: 0;
  padding: 32px !important;
}

h1, h2, h3, h4, h5 {
  color: var(--text-main);
  font-weight: 750;
  letter-spacing: -.025em;
}

h2 {
  font-size: clamp(1.5rem, 2vw, 1.9rem);
}

.text-secondary,
.text-muted,
.muted {
  color: var(--text-muted) !important;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.btn {
  border-radius: 9px;
  font-weight: 600;
  padding: .58rem .9rem;
  transition: transform .15s ease, box-shadow .15s ease;
}

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

.btn-primary {
  background: var(--blue-700);
  border-color: var(--blue-700);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--blue-600);
  border-color: var(--blue-600);
}

.btn-success {
  background: #16845b;
  border-color: #16845b;
}

.btn-outline-primary {
  color: var(--blue-700);
  border-color: #b9cdfb;
}

.btn-outline-primary:hover {
  background: var(--blue-100);
  color: var(--navy-900);
  border-color: #b9cdfb;
}

.form-control,
.form-select {
  min-height: 42px;
  border: 1px solid #d9e2ef;
  border-radius: 9px;
  color: var(--text-main);
  background-color: #fff;
}

.form-control:focus,
.form-select:focus {
  border-color: #8eaff8;
  box-shadow: 0 0 0 .22rem rgba(49,110,232,.12);
}

.form-label {
  color: #33435c;
  font-weight: 650;
  margin-bottom: .45rem;
}

.table-responsive {
  border-radius: 12px;
}

.table {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: #f4f7ff;
  margin-bottom: 0;
}

.table thead th {
  background: #f5f8fd;
  color: #52627b;
  font-size: .76rem;
  font-weight: 750;
  letter-spacing: .035em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  padding: 14px 13px;
}

.table tbody td {
  padding: 13px;
  border-color: #edf1f7;
  color: #35445b;
  font-size: .86rem;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.badge {
  border-radius: 7px;
  font-weight: 650;
  padding: .4em .65em;
}

.alert {
  border: 0;
  border-radius: 12px;
}

body.auth-shell main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.auth-shell .card {
  border-radius: 20px;
  padding: 32px !important;
  box-shadow: 0 20px 60px rgba(25,48,88,.10);
}

body.auth-shell h3 {
  color: var(--navy-900);
}

@media (max-width: 767.98px) {
  .sidebar {
    min-height: auto;
    padding: 16px !important;
  }

  .sidebar .brand {
    padding-bottom: 12px;
  }

  .sidebar .navlinks {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
  }

  .sidebar .navlinks a {
    min-height: 38px;
    padding: 8px 10px;
    font-size: .84rem;
  }

  .sidebar form {
    padding: 0;
  }

  body.app-shell main {
    padding: 18px 14px !important;
  }

  .card {
    border-radius: 12px;
  }

  .table thead th,
  .table tbody td {
    padding: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* FIX: login layout */
body.auth-shell {
    min-height: 100vh;
    width: 100%;
    margin: 0;
}

body.auth-shell main {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    box-sizing: border-box;
}

body.auth-shell main .row {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    justify-content: center;
}

body.auth-shell main .row > div {
    width: 100%;
    max-width: 440px;
    flex: 0 0 100%;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
}

body.auth-shell .card {
    width: 100%;
    max-width: 440px;
    min-width: 0;
    box-sizing: border-box;
    padding: 28px !important;
    overflow-wrap: normal;
    word-break: normal;
}

body.auth-shell h3 {
    font-size: 1.5rem;
    line-height: 1.3;
    overflow-wrap: normal;
    word-break: normal;
}

body.auth-shell form,
body.auth-shell form > div {
    width: 100%;
    min-width: 0;
}

body.auth-shell .form-control,
body.auth-shell .btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

body.auth-shell .form-control {
    min-height: 42px;
}

body.auth-shell .btn {
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
}


/* ===== TAMORA DASHBOARD THEME ===== */
:root {
  --navy-900: #172554;
  --tamora-primary: #0f766e;
  --tamora-primary-hover: #115e59;
  --tamora-bg: #f0fdfa;
  --tamora-text: #1f2937;
}

body {
  background: var(--tamora-bg);
  color: var(--tamora-text);
}

body.auth-shell {
  background:
    radial-gradient(ellipse at top left, #ccfbf1 0%, transparent 48%),
    linear-gradient(135deg, #f0fdfa, #f8fafc);
}

body.auth-shell .card {
  background: #ffffff;
  border: 1px solid #d1fae5;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(15, 118, 110, 0.12);
}

body.auth-shell h3 {
  color: var(--navy-900);
  font-weight: 800;
  letter-spacing: -0.5px;
}

.btn-primary {
  background-color: var(--tamora-primary);
  border-color: var(--tamora-primary);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--tamora-primary-hover) !important;
  border-color: var(--tamora-primary-hover) !important;
}

.form-control {
  border-color: #cbd5e1;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
}

.form-control:focus {
  border-color: #14b8a6;
  box-shadow: 0 0 0 0.2rem rgba(20, 184, 166, 0.16);
}

.sidebar {
  background: linear-gradient(180deg, #134e4a, #172554) !important;
}

.sidebar a:hover {
  background: rgba(255, 255, 255, 0.14);
}

.brand {
  letter-spacing: 0.2px;
}


/* STAGE41C_NUSANET_DARK_NETWORK */

body.app-shell {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 15% 10%,
            rgba(0,158,50,.13), transparent 48%),
        radial-gradient(ellipse at 90% 85%,
            rgba(48,77,144,.22), transparent 55%),
        #061321 !important;
    background-attachment: fixed !important;
}

body.app-shell .sidebar {
    background: linear-gradient(
        165deg, #102a3a 0%, #081827 70%
    ) !important;
    border-right: 1px solid rgba(148,163,184,.15);
}

body.app-shell .sidebar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 750;
    color: #f8fafc;
    letter-spacing: .3px;
}

body.app-shell .sidebar .brand::before {
    content: "";
    display: block;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 7px;
    background:
        white url("../icons/nusanet.png")
        center / 90% no-repeat;
}

body.app-shell .sidebar a:hover {
    background: rgba(0,158,50,.16);
    color: #86efac;
}

body.app-shell main {
    background-color: transparent !important;
    background-image:
        repeating-linear-gradient(
            155deg,
            transparent 0px,
            transparent 80px,
            rgba(0,158,50,.055) 81px,
            transparent 82px,
            transparent 120px
        );
    min-height: 100vh;
}

body.app-shell main > h1,
body.app-shell main > h2,
body.app-shell main > h3 {
    color: #f1f5f9;
}

body.app-shell main > .text-secondary,
body.app-shell main > .muted {
    color: #a3b8ce !important;
}

body.app-shell main .card {
    border-radius: 13px;
    box-shadow: 0 5px 20px rgba(0,0,0,.14);
}

@media (max-width: 767px) {
    body.app-shell .sidebar {
        border-right: 0;
        border-bottom: 1px solid
            rgba(148,163,184,.15);
    }

    body.app-shell main {
        background-image: none;
    }
}


/* STAGE41D_CONTRAST_BRANDING */

/* Readable headings outside white panels */
body.app-shell main :is(h1,h2,h3,h4,h5,h6):not(.card *):not(.modal *):not(.alert *) {
    color: #f1f5f9 !important;
}

body.app-shell main :is(.text-secondary,.muted,.text-muted):not(.card *):not(.modal *):not(.alert *) {
    color: #b0c4d8 !important;
}

/* Sidebar branding */
body.app-shell .sidebar .brand {
    font-size: 15px;
    line-height: 1.5;
    letter-spacing: .4px;
    padding: 8px 4px 18px;
}

body.app-shell .sidebar .brand::before {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
    border-radius: 9px;
}

/* Sidebar navigation */
body.app-shell .sidebar .navlinks a,
body.app-shell .sidebar .navlinks summary {
    transition: background .2s ease, color .2s ease;
}

body.app-shell .sidebar .navlinks a:hover,
body.app-shell .sidebar .navlinks summary:hover {
    background: rgba(0,158,50,.15) !important;
    color: #86efac !important;
}

/* Subtle panel refinement */
body.app-shell main .card {
    box-shadow: 0 6px 24px rgba(0,0,0,.16);
}

@media (prefers-reduced-motion: reduce) {
    body.app-shell .sidebar .navlinks a,
    body.app-shell .sidebar .navlinks summary {
        transition: none;
    }
}


/* STAGE41D_R1_FINAL_CONTRAST */

body.app-shell main :is(h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6):not(.card *):not(.modal *):not(.alert *) {
    color: #f8fafc !important;
}

body.app-shell main :is(.text-secondary,.text-muted,.muted):not(.card *):not(.modal *):not(.alert *) {
    color: #cbd5e1 !important;
}
