/* =====================================================================
   Premium Surgical & Medical Supplies
   base.css - design tokens, grid and shared components.

   Implements the Bootstrap 5 class names used across the project so the
   markup stays idiomatic while everything is served from this origin
   (no external CDN, which the Content-Security-Policy forbids).
   ===================================================================== */

:root {
  /* Healthcare palette */
  --brand:        #0d6e8c;
  --brand-dark:   #08536b;
  --brand-darker: #06394a;
  --brand-light:  #e6f4f8;
  --brand-tint:   #f4fafc;

  --teal:         #12a19a;
  --teal-dark:    #0c7d78;
  --teal-light:   #e4f7f6;

  --green:        #1c9d63;
  --green-light:  #e6f6ee;

  --ink:          #17303f;
  --body:         #3d5666;
  --muted:        #6b8494;
  --faint:        #9bb0bd;

  --line:         #dfe8ee;
  --line-soft:    #edf3f6;
  --surface:      #ffffff;
  --surface-alt:  #f6fafb;
  --canvas:       #f2f7f9;

  --danger:       #d64550;
  --danger-light: #fdecee;
  --warning:      #d98324;
  --warning-light:#fdf3e6;
  --info:         #2f7fbf;
  --info-light:   #eaf3fb;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-xs: 0 1px 2px rgba(16, 51, 68, .06);
  --shadow-sm: 0 2px 8px rgba(16, 51, 68, .07);
  --shadow:    0 6px 20px rgba(16, 51, 68, .09);
  --shadow-lg: 0 18px 44px rgba(16, 51, 68, .13);

  /* Bengali faces are listed after the Latin ones. A browser walks the
     stack per character, so Latin text still renders in Segoe UI while
     Bengali glyphs fall through to the first Bengali font installed.
     No webfont is downloaded: the Content-Security-Policy blocks
     third-party hosts, and a self-hosted Bengali face is 300KB+, which
     is a poor trade on a Bangladeshi mobile connection. Every current
     Windows, Android, iOS and macOS build ships at least one of these. */
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial,
          "Noto Sans Bengali", "Noto Sans Bengali UI", "Nirmala UI",
          "Shonar Bangla", "SolaimanLipi", "Kalpurush", "Vrinda",
          "Bangla Sangam MN", sans-serif;

  --header-h: 74px;
}

/* ---------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--body);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .6em;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.25;
}
h1 { font-size: clamp(1.85rem, 3.4vw, 2.7rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); letter-spacing: -.015em; }
h3 { font-size: clamp(1.2rem, 1.8vw, 1.45rem); }
h4 { font-size: 1.12rem; }
h5 { font-size: 1rem; }
h6 { font-size: .92rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand); text-decoration: none; transition: color .16s ease; }
a:hover { color: var(--brand-dark); text-decoration: underline; }

img { max-width: 100%; height: auto; vertical-align: middle; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }

small, .small { font-size: .845rem; }
strong, b { font-weight: 600; color: var(--ink); }

ul, ol { margin: 0 0 1rem; padding-left: 1.3rem; }
li { margin-bottom: .35rem; }

code, pre { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .88em; }
code { background: var(--surface-alt); padding: .12em .4em; border-radius: 4px; color: var(--brand-dark); }

:focus-visible {
  outline: 3px solid rgba(13, 110, 140, .38);
  outline-offset: 2px;
  border-radius: 3px;
}

::selection { background: var(--brand-light); color: var(--brand-darker); }

/* ------------------------------------------------------------- layout */
.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 20px;
}
.container-narrow { max-width: 860px; }
.container-fluid { width: 100%; padding-inline: 20px; }

.row {
  display: flex;
  flex-wrap: wrap;
  margin-inline: -12px;
}
.row > * { padding-inline: 12px; width: 100%; }

.g-0 { margin-inline: 0; }
.g-0 > * { padding-inline: 0; }

[class*="col-"] { flex: 0 0 auto; }
.col { flex: 1 0 0%; }
.col-auto { flex: 0 0 auto; width: auto; }

.col-1  { width: 8.3333%; }  .col-2  { width: 16.6667%; }
.col-3  { width: 25%; }      .col-4  { width: 33.3333%; }
.col-5  { width: 41.6667%; } .col-6  { width: 50%; }
.col-7  { width: 58.3333%; } .col-8  { width: 66.6667%; }
.col-9  { width: 75%; }      .col-10 { width: 83.3333%; }
.col-11 { width: 91.6667%; } .col-12 { width: 100%; }

@media (min-width: 576px) {
  .col-sm-3 { width: 25%; } .col-sm-4 { width: 33.3333%; }
  .col-sm-6 { width: 50%; } .col-sm-12 { width: 100%; }
}
@media (min-width: 768px) {
  .col-md-2 { width: 16.6667%; } .col-md-3 { width: 25%; }
  .col-md-4 { width: 33.3333%; } .col-md-5 { width: 41.6667%; }
  .col-md-6 { width: 50%; }      .col-md-7 { width: 58.3333%; }
  .col-md-8 { width: 66.6667%; } .col-md-9 { width: 75%; }
  .col-md-12 { width: 100%; }
}
@media (min-width: 992px) {
  .col-lg-2 { width: 16.6667%; } .col-lg-3 { width: 25%; }
  .col-lg-4 { width: 33.3333%; } .col-lg-5 { width: 41.6667%; }
  .col-lg-6 { width: 50%; }      .col-lg-7 { width: 58.3333%; }
  .col-lg-8 { width: 66.6667%; } .col-lg-9 { width: 75%; }
  .col-lg-10 { width: 83.3333%; } .col-lg-12 { width: 100%; }
}
@media (min-width: 1200px) {
  .col-xl-2 { width: 16.6667%; } .col-xl-3 { width: 25%; }
  .col-xl-4 { width: 33.3333%; } .col-xl-6 { width: 50%; }
  .col-xl-8 { width: 66.6667%; } .col-xl-9 { width: 75%; }
}

/* utility grid used for cards */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

@media (max-width: 991px) {
  .grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .grid-4, .grid-3 { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ spacing */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

.flex-wrap { flex-wrap: wrap; }
.flex-column { flex-direction: column; }
.flex-grow-1 { flex-grow: 1; }
.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.justify-content-end { justify-content: flex-end; }
.gap-1 { gap: .3rem; } .gap-2 { gap: .6rem; } .gap-3 { gap: 1rem; } .gap-4 { gap: 1.5rem; }

.text-center { text-align: center; }
.text-end, .text-right { text-align: right; }
.text-start, .text-left { text-align: left; }
.text-muted { color: var(--muted) !important; }
.text-faint { color: var(--faint) !important; }
.text-brand { color: var(--brand) !important; }
.text-success { color: var(--green) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-white { color: #fff !important; }
.text-nowrap { white-space: nowrap; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-uppercase { text-transform: uppercase; letter-spacing: .06em; }
.fw-bold { font-weight: 700; }
.fw-semi { font-weight: 600; }
.fw-normal { font-weight: 400; }
.fs-sm { font-size: .87rem; }
.fs-xs { font-size: .78rem; }
.fs-lg { font-size: 1.1rem; }

.w-100 { width: 100%; } .h-100 { height: 100%; }
.mw-100 { max-width: 100%; }

.m-0 { margin: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }  .mb-1 { margin-bottom: .3rem !important; }
.mb-2 { margin-bottom: .6rem !important; } .mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; } .mb-5 { margin-bottom: 2.4rem !important; }
.mt-0 { margin-top: 0 !important; }     .mt-1 { margin-top: .3rem !important; }
.mt-2 { margin-top: .6rem !important; } .mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; } .mt-5 { margin-top: 2.4rem !important; }
.me-1 { margin-right: .3rem; } .me-2 { margin-right: .6rem; } .me-3 { margin-right: 1rem; }
.ms-1 { margin-left: .3rem; }  .ms-2 { margin-left: .6rem; }  .ms-3 { margin-left: 1rem; }
.ms-auto { margin-left: auto; } .me-auto { margin-right: auto; }
.mx-auto { margin-inline: auto; }

.p-0 { padding: 0 !important; } .p-2 { padding: .6rem !important; }
.p-3 { padding: 1rem !important; } .p-4 { padding: 1.5rem !important; }
.py-2 { padding-block: .6rem !important; } .py-3 { padding-block: 1rem !important; }
.py-4 { padding-block: 1.5rem !important; } .py-5 { padding-block: 2.6rem !important; }
.px-3 { padding-inline: 1rem !important; }

.section { padding: 72px 0; }
.section-sm { padding: 48px 0; }
.section-alt { background: var(--surface-alt); }
.section-tint { background: var(--brand-tint); }

@media (max-width: 767px) {
  .section { padding: 48px 0; }
  .section-sm { padding: 34px 0; }
}

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .68rem 1.35rem;
  font-size: .95rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.3;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .12s ease, box-shadow .16s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-primary  { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover  { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; box-shadow: var(--shadow-sm); }

.btn-teal     { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }

.btn-success  { background: var(--green); border-color: var(--green); color: #fff; }
.btn-success:hover { background: #157a4d; border-color: #157a4d; color: #fff; }

.btn-danger   { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #b8323d; border-color: #b8323d; color: #fff; }

.btn-warning  { background: var(--warning); border-color: var(--warning); color: #fff; }
.btn-warning:hover { background: #bb6d17; color: #fff; }

.btn-outline  { background: transparent; border-color: var(--brand); color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }

.btn-outline-secondary { background: transparent; border-color: var(--line); color: var(--body); }
.btn-outline-secondary:hover { background: var(--surface-alt); border-color: var(--muted); color: var(--ink); }

.btn-outline-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-outline-danger:hover { background: var(--danger); color: #fff; }

.btn-light    { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-light:hover { background: var(--surface-alt); color: var(--ink); }

.btn-white    { background: #fff; border-color: #fff; color: var(--brand-dark); }
.btn-white:hover { background: var(--brand-light); color: var(--brand-darker); }

.btn-ghost    { background: transparent; border-color: transparent; color: var(--muted); padding: .4rem .6rem; }
.btn-ghost:hover { background: var(--surface-alt); color: var(--ink); }

.btn-link     { background: none; border: none; color: var(--brand); padding: 0; font-weight: 600; }
.btn-link:hover { text-decoration: underline; }

.btn-sm  { padding: .42rem .85rem; font-size: .845rem; }
.btn-xs  { padding: .28rem .6rem;  font-size: .78rem; border-radius: 5px; }
.btn-lg  { padding: .9rem 1.9rem;  font-size: 1.03rem; }
.btn-block, .btn-full { width: 100%; }
.btn-icon { padding: .5rem; width: 36px; height: 36px; }
.btn-round { border-radius: 999px; }

.btn-group { display: inline-flex; gap: 0; }
.btn-group .btn { border-radius: 0; }
.btn-group .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.btn-group .btn:last-child  { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.btn-group .btn + .btn { margin-left: -1.5px; }

/* -------------------------------------------------------------- cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.card-header h1, .card-header h2, .card-header h3,
.card-header h4, .card-header h5 { margin: 0; font-size: 1.02rem; }
.card-body { padding: 1.25rem; }
.card-footer {
  padding: .9rem 1.25rem;
  border-top: 1px solid var(--line-soft);
  background: var(--surface-alt);
  border-radius: 0 0 var(--radius) var(--radius);
}
.card-flush .card-body { padding: 0; }

/* ------------------------------------------------------------- badges */
.badge {
  display: inline-block;
  padding: .3em .62em;
  font-size: .74rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
  border-radius: 5px;
  white-space: nowrap;
  vertical-align: middle;
}
.bg-primary   { background: var(--brand-light);  color: var(--brand-dark); }
.bg-secondary { background: #e9eff3;             color: #5a7183; }
.bg-success   { background: var(--green-light);  color: #14724a; }
.bg-danger    { background: var(--danger-light); color: #a82b36; }
.bg-warning   { background: var(--warning-light);color: #a5651a; }
.bg-info      { background: var(--info-light);   color: #23628f; }
.bg-teal      { background: var(--teal-light);   color: var(--teal-dark); }
.bg-dark      { background: var(--ink);          color: #fff; }

.badge-solid.bg-primary { background: var(--brand); color: #fff; }
.badge-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; padding: 0; }

/* ------------------------------------------------------------- alerts */
.alert {
  position: relative;
  padding: .9rem 2.6rem .9rem 1.1rem;
  border: 1px solid transparent;
  border-left-width: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: .92rem;
}
.alert-success { background: var(--green-light);  border-color: #b6e3cd;  border-left-color: var(--green);  color: #14724a; }
.alert-danger  { background: var(--danger-light); border-color: #f5c6cb;  border-left-color: var(--danger); color: #9c2831; }
.alert-warning { background: var(--warning-light);border-color: #f3ddb8;  border-left-color: var(--warning);color: #96601a; }
.alert-info    { background: var(--info-light);   border-color: #c3ddf2;  border-left-color: var(--info);   color: #235d87; }

.btn-close {
  position: absolute;
  top: 50%;
  right: .7rem;
  transform: translateY(-50%);
  width: 26px; height: 26px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 0;
  border-radius: 5px;
  opacity: .55;
}
.btn-close::before {
  content: "\00d7";
  font-size: 21px;
  line-height: 1;
  color: currentColor;
}
.btn-close:hover { opacity: 1; background: rgba(0, 0, 0, .05); }

/* -------------------------------------------------------------- forms */
.form-label {
  display: block;
  margin-bottom: .35rem;
  font-size: .845rem;
  font-weight: 600;
  color: var(--ink);
}
.form-label .req { color: var(--danger); margin-left: 2px; }

.form-control, .form-select {
  display: block;
  width: 100%;
  padding: .62rem .85rem;
  font-family: inherit;
  font-size: .93rem;
  line-height: 1.45;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .16s ease, box-shadow .16s ease;
  appearance: none;
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13, 110, 140, .12);
  outline: none;
}
.form-control::placeholder { color: var(--faint); }
.form-control:disabled, .form-select:disabled { background: var(--surface-alt); color: var(--muted); }
.form-control[readonly] { background: var(--surface-alt); }

.form-select {
  padding-right: 2.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b8494' d='M6 8 0 1.4 1.4 0 6 4.6 10.6 0 12 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .8rem center;
}

textarea.form-control { min-height: 110px; resize: vertical; }

.form-control-sm, .form-select-sm { padding: .38rem .6rem; font-size: .85rem; }

.form-group, .mb-form { margin-bottom: 1.1rem; }
.form-text { display: block; margin-top: .3rem; font-size: .8rem; color: var(--muted); }
.invalid-feedback { display: block; margin-top: .3rem; font-size: .8rem; color: var(--danger); }
.is-invalid { border-color: var(--danger) !important; }
.is-invalid:focus { box-shadow: 0 0 0 3px rgba(214, 69, 80, .13) !important; }

.form-check { display: flex; align-items: flex-start; gap: .55rem; margin-bottom: .5rem; }
.form-check input[type="checkbox"], .form-check input[type="radio"] {
  width: 17px; height: 17px;
  margin-top: 2px;
  accent-color: var(--brand);
  cursor: pointer;
  flex-shrink: 0;
}
.form-check label { font-size: .9rem; cursor: pointer; margin: 0; }

.input-group { display: flex; }
.input-group .form-control { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.input-group-text {
  display: flex; align-items: center;
  padding: 0 .8rem;
  background: var(--surface-alt);
  border: 1.5px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}
.input-group > .input-group-text:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); border-right: 0; }
.input-group > .input-group-text:first-child + .form-control { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.table th, .table td {
  padding: .78rem .85rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line-soft);
}
.table thead th {
  background: var(--surface-alt);
  color: var(--muted);
  font-size: .77rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.table tbody tr:hover { background: var(--brand-tint); }
.table tbody tr:last-child td { border-bottom: 0; }
.table-sm th, .table-sm td { padding: .5rem .6rem; }
.table-flush thead th:first-child, .table-flush tbody td:first-child { padding-left: 1.25rem; }
.table-flush thead th:last-child,  .table-flush tbody td:last-child  { padding-right: 1.25rem; }

.th-sort { color: inherit; text-decoration: none; }
.th-sort:hover { color: var(--brand); text-decoration: none; }

.table-empty {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--muted);
}
.table-empty strong { display: block; color: var(--ink); margin-bottom: .3rem; font-size: 1.02rem; }

/* --------------------------------------------------------- pagination */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
}
.pagination li { margin: 0; }
.page-link {
  display: block;
  min-width: 36px;
  padding: .42rem .68rem;
  text-align: center;
  font-size: .87rem;
  font-weight: 600;
  color: var(--body);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.page-link:hover { background: var(--brand-light); border-color: var(--brand); color: var(--brand-dark); text-decoration: none; }
.page-item.active .page-link { background: var(--brand); border-color: var(--brand); color: #fff; }
.page-item.disabled .page-link { opacity: .45; pointer-events: none; }

/* ------------------------------------------------------------- modals */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1050;
  overflow-y: auto;
  background: rgba(16, 42, 56, .55);
  backdrop-filter: blur(2px);
  padding: 24px 16px;
}
.modal.show { display: block; animation: fadeIn .16s ease; }
.modal-dialog {
  max-width: 540px;
  margin: 3vh auto;
  animation: slideUp .22s cubic-bezier(.2, .8, .3, 1);
}
.modal-lg { max-width: 860px; }
.modal-xl { max-width: 1120px; }
.modal-content {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.35rem;
  border-bottom: 1px solid var(--line-soft);
}
.modal-header h5, .modal-title { margin: 0; font-size: 1.05rem; }
.modal-header .btn-close { position: static; transform: none; }
.modal-body { padding: 1.35rem; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: .6rem; flex-wrap: wrap;
  padding: 1rem 1.35rem;
  border-top: 1px solid var(--line-soft);
  background: var(--surface-alt);
}
body.modal-open { overflow: hidden; }

@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------- dropdowns */
.dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 1000;
  min-width: 200px;
  padding: .4rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  list-style: none;
  margin: 0;
}
.dropdown-menu.show { display: block; animation: slideUp .14s ease; }
.dropdown-menu.dropdown-start { right: auto; left: 0; }
.dropdown-menu li { margin: 0; }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  width: 100%;
  padding: .52rem .7rem;
  font-size: .88rem;
  color: var(--body);
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}
.dropdown-item:hover { background: var(--brand-tint); color: var(--brand-dark); text-decoration: none; }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: var(--danger-light); }
.dropdown-divider { height: 1px; margin: .35rem .2rem; background: var(--line-soft); }
.dropdown-header { padding: .5rem .7rem .3rem; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 700; }

/* --------------------------------------------------------------- tabs */
.nav-tabs {
  display: flex;
  gap: 2px;
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.nav-tabs li { margin: 0; }
.nav-tabs .nav-link {
  display: block;
  padding: .7rem 1.1rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
  border: 0;
  border-bottom: 2.5px solid transparent;
  background: none;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.nav-tabs .nav-link:hover { color: var(--brand); text-decoration: none; }
.nav-tabs .nav-link.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeIn .18s ease; }

/* ------------------------------------------------------------- toasts */
.toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1090;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(380px, calc(100vw - 36px));
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  padding: .85rem 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-size: .9rem;
  animation: slideInRight .22s ease;
}
.toast.success { border-left-color: var(--green); }
.toast.error   { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.hiding  { animation: fadeOutRight .2s ease forwards; }

@keyframes slideInRight { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes fadeOutRight { to { opacity: 0; transform: translateX(24px); } }

/* ------------------------------------------------------------ spinner */
.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.is-loading { position: relative; pointer-events: none; opacity: .7; }

/* ------------------------------------------------------- misc helpers */
.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow); }
.border { border: 1px solid var(--line); }
.border-top { border-top: 1px solid var(--line); }
.border-bottom { border-bottom: 1px solid var(--line); }
.bg-white { background: #fff; }
.bg-light { background: var(--surface-alt); }
.bg-tint { background: var(--brand-tint); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1200;
  padding: .8rem 1.2rem;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}
.skip-link:focus { left: 8px; top: 8px; color: #fff; }

@media print {
  .no-print, .site-header, .site-footer, .admin-sidebar, .admin-topbar,
  .sticky-contact, .breadcrumb-bar { display: none !important; }
  body { background: #fff; font-size: 12px; }
  .card { border: 1px solid #ccc; box-shadow: none; }
  a { color: inherit; text-decoration: none; }
  .container { max-width: none; padding: 0; }
}

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