/* =========================
   DOTS Postal UI Kit
   - Class-only utilities
   - Theme via data-theme on <body>:
       <body data-theme="dark"> or "light"
   ========================= */

/* --- overflow + sizing safety --- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg, video, canvas { max-width: 100%; }
.u-grid, .u-flex, .c-card, .c-panel { min-width: 0; }
.f-input, .f-textarea, .f-select, .btn { min-width: 0; }

:root {
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(0,0,0,.10);
  --shadow-strong: 0 18px 52px rgba(0,0,0,.22);
  --ring: 0 0 0 3px rgba(56,189,248,.25); /* sky */
  --ring2: 0 0 0 3px rgba(236,72,153,.22); /* pink */
  --transition: 180ms ease;

  /* Light defaults */
  --bg: #ffffff;
  --bg2: #fbf7ff;
  --text: #111827;
  --muted: rgba(17, 24, 39, .65);
  --card: rgba(255,255,255, .78);
  --card2: rgba(240,240,240, .64);
  --card-solid: rgb(255, 255, 255);
  --border: rgba(17, 24, 39, .12);

  --primary: #ec4899;      /* pink */
  --primary2: #a855f7;     /* violet */
  --accent: #7c3aed;       /* deeper violet */
  --info: #2563eb;         /* blue */
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #ef4444;

  --grad-page: radial-gradient(1200px 700px at 15% 10%, rgba(236,72,153,.18), transparent 55%),
               radial-gradient(1000px 650px at 80% 20%, rgba(168,85,247,.16), transparent 55%),
               linear-gradient(135deg, #ffffff 0%, #fff7fb 35%, #f7f0ff 100%);
  --grad-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary2) 100%);

  /* Input/button solids (light) */
  --input-bg: rgba(255,255,255,.92);
  --input-border: rgba(17,24,39,.16);
  --btn-bg: rgba(255,255,255,.92);
  --btn-border: rgba(17,24,39,.16);
  --placeholder: rgba(17,24,39,.55);
}

body[data-theme="dark"] {
  --bg: #070a12;
  --bg2: #0b1222;
  --text: #e5e7eb;
  --muted: rgba(229,231,235,.65);
  --card: rgba(10, 18, 34, .68);
  --card2: rgb(38, 51, 78, .52);
  --card-solid: rgb(10, 18, 34);
  --border: rgba(226,232,240,.14);

  --primary: #38bdf8;     /* sky */
  --primary2: #60a5fa;    /* light blue */
  --accent: #22d3ee;      /* cyan */
  --info: #38bdf8;
  --success: #22c55e;
  --warning: #fbbf24;
  --danger: #fb7185;

  --grad-page: radial-gradient(1200px 700px at 15% 10%, rgba(56,189,248,.20), transparent 55%),
               radial-gradient(1000px 650px at 80% 20%, rgba(34,211,238,.12), transparent 55%),
               linear-gradient(135deg, #050711 0%, #071026 45%, #030817 100%);
  --grad-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary2) 100%);

  /* Input/button solids (dark) */
  --input-bg: rgba(10,18,34,.88);
  --input-border: rgba(226,232,240,.16);
  --btn-bg: rgba(10,18,34,.82);
  --btn-border: rgba(226,232,240,.16);
  --placeholder: rgba(226,232,240,.55);
}

/* =========================
   Base utility classes
   ========================= */
.ui {
  font-family: var(--font);
  color: var(--text);
  background: var(--grad-page);
  min-height: 100vh;
}

.u-container { max-width: 1120px; margin: 0 auto; padding: 28px 16px; }
.u-center { display: grid; place-items: center; }

.u-flex { display: flex; }
.u-flex-col { display: flex; flex-direction: column; }
.u-flex-wrap { flex-wrap: wrap; }

.u-items-center { align-items: center; }
.u-justify-between { justify-content: space-between; }
.u-justify-center { justify-content: center; }
.u-justify-end { justify-content: flex-end; }

.u-jd-flex { display: flex; gap: 6px; justify-content: flex-end;}

.u-gap   { gap: 6px; }
.u-gap-1 { gap: 8px; }
.u-gap-2 { gap: 12px; }
.u-gap-3 { gap: 16px; }
.u-gap-4 { gap: 22px; }

.u-grid { display: grid; gap: 16px; }
.u-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.u-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.u-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 860px) {
  .u-grid-2, .u-grid-3, .u-grid-4 { grid-template-columns: 1fr; }
}


.u-col-span-1 { grid-column: span 1; }
.u-col-span-2 { grid-column: span 2; }
.u-col-span-full { grid-column: 1 / -1; }

.u-mt-1 { margin-top: 8px; }
.u-mt-2 { margin-top: 12px; }
.u-mt-3 { margin-top: 16px; }
.u-mt-4 { margin-top: 22px; }
.u-mb-1 { margin-bottom: 8px; }
.u-mb-2 { margin-bottom: 12px; }
.u-mb-3 { margin-bottom: 16px; }
.u-mb-4 { margin-bottom: 22px; }



.u-ml--1 { margin-left: 4px; }
.u-mr--1 { margin-right: 4px; }

.u-ml-1 { margin-left: 8px; }
.u-ml-2 { margin-left: 12px; }
.u-ml-3 { margin-left: 16px; }
.u-ml-4 { margin-left: 22px; }
.u-ml-auto { margin-left: auto; }

.u-mr-1 { margin-right: 8px; }
.u-mr-2 { margin-right: 12px; }
.u-mr-3 { margin-right: 16px; }
.u-mr-4 { margin-right: 22px; }
.u-mr-auto { margin-right: auto; }


.u-my-1 { margin-top: 8px; margin-bottom: 8px; }
.u-my-2 { margin-top: 12px; margin-bottom: 12px; }
.u-my-3 { margin-top: 16px; margin-bottom: 16px; }
.u-my-4 { margin-top: 22px; margin-bottom: 22px; }

.u-mx-1 { margin-left: 8px; margin-right: 8px; }
.u-mx-2 { margin-left: 12px; margin-right: 12px; }
.u-mx-3 { margin-left: 16px; margin-right: 16px; }
.u-mx-4 { margin-left: 22px; margin-right: 22px; }


.u-p-1 { padding: 10px; }
.u-p-2 { padding: 14px; }
.u-p-3 { padding: 18px; }
.u-p-4 { padding: 24px; }

.u-pl-1 { padding-left: 8px; }
.u-pl-2 { padding-left: 12px; }
.u-pl-3 { padding-left: 16px; }
.u-pl-4 { padding-left: 22px; }


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

.u-hidden { display: none !important; }
.u-w-5 { width: 5%; }
.u-w-10 { width: 10%; }
.u-w-15 { width: 15%; }
.u-w-20 { width: 20%; }
.u-w-25 { width: 25%; }
.u-w-50 { width: 50%; }
.u-w-75 { width: 75%; }
.u-w-100 { width: 100%; }

.u-w-xxs { width: 240px !important; }
.u-w-xs  { width: 320px !important; }
.u-w-sm  { width: 420px !important; }
.u-w-md  { width: 560px !important; }

.u-min-w-xxs { min-width: 240px !important; }
.u-min-w-xs  { min-width: 320px !important; }
.u-min-w-sm  { min-width: 420px !important; }
.u-min-w-md  { min-width: 560px !important; }

.u-max-w-xxs { max-width: 240px; }
.u-max-w-xs  { max-width: 320px; }
.u-max-w-sm  { max-width: 420px; }
.u-max-w-md  { max-width: 560px; }

.u-muted { color: var(--muted); }
.u-title { font-size: 28px; letter-spacing: .2px; }
.u-subtitle { font-size: 15px; color: var(--muted); line-height: 1.5; }
.u-h1 { font-size: 34px; letter-spacing: .2px; }
.u-h2 { font-size: 22px; letter-spacing: .2px; }
.u-h3 { font-size: 18px; letter-spacing: .2px; }

.u-divider { height: 1px; background: var(--border); width: 100%; }

/* =========================
   Surfaces
   ========================= */
.c-card {
  background: var(--card);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.c-panel {
  background: var(--card2);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
}

/* =========================
   Navbar
   ========================= */
.c-navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,.60);
  border-bottom: 1px solid var(--border);
}
body[data-theme="dark"] .c-navbar { background: rgba(5,10,20,.60); }

.c-nav-inner { max-width: 98%; margin: 0 auto; padding: 14px 16px; }
.c-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: .3px;
}
.c-brand-badge {
  width: 34px; height: 34px;
  border-radius: 12px;
  background: var(--grad-primary);
  box-shadow: var(--shadow);
}

/* =========================
   Inputs
   ========================= */
.f-group { display: grid; gap: 8px; }
.f-label { font-size: 13px; color: var(--muted); }

.f-input, .f-textarea, .f-select {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  outline: none;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}

.f-input[type="number"] {
  padding-right: 2px;
}

.f-input::placeholder, .f-textarea::placeholder { color: var(--placeholder); }

.f-input:focus, .f-textarea:focus, .f-select:focus {
  border-color: rgba(56,189,248,.55);
  box-shadow: var(--ring);
}
body[data-theme="light"] .f-input:focus,
body[data-theme="light"] .f-textarea:focus,
body[data-theme="light"] .f-select:focus {
  border-color: rgba(236,72,153,.55);
  box-shadow: var(--ring2);
}

.f-input-sm, .f-select-sm {
  padding: 6px 12px;
  border-radius: 10px;
}

.f-textarea { min-height: 90px; resize: vertical; }

.f-help { font-size: 12px; color: var(--muted); }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 860px) { .f-row { grid-template-columns: 1fr; } }

.is-disabled { opacity: .55; pointer-events: none; }

/* =========================
   Buttons
   ========================= */
.btn {
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--text);
  padding: 11px 14px;
  border-radius: 14px;
  font-weight: 800;
  letter-spacing: .15px;
  cursor: pointer;
  user-select: none;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 41px;

  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
}

.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0px); box-shadow: none; }

.btn-primary {
  border: none;
  background: var(--grad-primary);
  color: #0b1220;
}
body[data-theme="light"] .btn-primary { color: #fff; }

.a-ghost { text-decoration: none; color: inherit; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);

}

.btn-danger {
  border: none;
  background: linear-gradient(135deg, rgba(239,68,68,1), rgba(251,113,133,1));
  color: #fff;
}

.btn-sm { padding: 8px 10px; border-radius: 12px; font-size: 13px; min-height: 38px; }
.btn-xs { padding: 4px 8px; border-radius: 8px; font-size: 12px;  min-height: 28px; line-height: 1.1; }
.btn-lg { padding: 13px 16px; border-radius: 16px; font-size: 15px; min-height: 48px; }
.btn-block { width: 100%; }

.btn-icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 14px;
}

.btn-create{
    border: none;
    background: linear-gradient(135deg, #0f5685 0%,
 color-mix(in srgb, #7331ae, #ffffff 20%) 100%);
    color: #f8f8f8;
}

.btn-secondary {
    border: none;
    background: linear-gradient(135deg, #674cc4 0%,
 color-mix(in srgb, #b07b5c, #ffffff 20%) 100%);
    color: #f8f8f8;
}

body[data-theme="dark"] .btn-create {
  background: linear-gradient(
    135deg,
    #38bdf8 0%,
    color-mix(in srgb, #7c3aed, #000000 20%) 100%
  );
  color: #020617;
}

.btn-create:hover {
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.35);
}

body[data-theme="dark"] .btn-create:hover {
  box-shadow: 0 12px 36px rgba(56, 189, 248, 0.45);
}

.btn-create:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.btn-success {
  border: none;
  background: linear-gradient(
    135deg,
    var(--success) 0%,
    color-mix(in srgb, var(--success), #ffffff 20%) 100%
  );
  color: #06210f;
}

body[data-theme="light"] .btn-success {
  color: #ffffff;
}


.btn-dark {
  border: 1px solid var(--border);
  background: linear-gradient(
    135deg,
    rgba(17,24,39,.92),
    rgba(55,65,81,.92)
  );
  color: #ffffff;
}

body[data-theme="dark"] .btn-dark {
  background: linear-gradient(
    135deg,
    rgba(2,6,23,.9),
    rgba(15,23,42,.9)
  );
  border-color: rgba(226,232,240,.18);
}

.btn:disabled,
.btn[disabled] {
  opacity: .55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}


.btn.is-loading {
  pointer-events: none;
  opacity: .75;
}

.btn.is-loading::after {
  content: "";
  width: 16px;
  height: 16px;
  margin-left: 8px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.6);
  border-top-color: transparent;
  animation: spin .6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


.btn-remove-tagged {
  border: none;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  font-size: 14px;
}


.btn-outline {
  background: transparent !important;
  box-shadow: none;
}

/* PRIMARY OUTLINE */
.btn-primary-outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}

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

/* SUCCESS OUTLINE */
.btn-success-outline {
  background: transparent;
  border: 1px solid var(--success);
  color: var(--success);
}

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

/* DANGER OUTLINE */
.btn-danger-outline {
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
}

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

/* SECONDARY OUTLINE */
.btn-secondary-outline {
  background: transparent;
  border: 1px solid #674cc4;
  color: #674cc4;
}

.btn-secondary-outline:hover {
  background: #674cc4;
  color: #fff;
}

/* CREATE OUTLINE */
.btn-create-outline {
  background: transparent;
  border: 1px solid #0f5685;
  color: #0f5685;
}

body[data-theme="dark"] .btn-create-outline {
  border-color: #38bdf8;
  color: #38bdf8;
}

.btn-create-outline:hover {
  background: #0f5685;
  color: #fff;
}

body[data-theme="dark"] .btn-create-outline:hover {
  background: #38bdf8;
  color: #020617;
}

/* DARK OUTLINE */
.btn-dark-outline {
  background: transparent;
  border: 1px solid rgba(17,24,39,.92);
  color: rgba(17,24,39,.92);
}

body[data-theme="dark"] .btn-dark-outline {
  border-color: rgba(226,232,240,.8);
  color: rgba(226,232,240,.9);
}

.btn-dark-outline:hover {
  background: rgba(17,24,39,.92);
  color: #fff;
}

body[data-theme="dark"] .btn-dark-outline:hover {
  background: rgba(226,232,240,.9);
  color: #020617;
}


#checkoutCashChange {
  margin-top: 5px;
  color: #ff0000;
  font-weight: 600;
}






/* =========================
   Badges / Alerts
   ========================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.55);
}
body[data-theme="dark"] .badge { background: rgba(10,18,34,.55); }

.badge-ok { color: var(--success); border-color: rgba(34,197,94,.35); }
.badge-bad { color: var(--danger); border-color: rgba(251,113,133,.35); }
.badge-info { color: var(--primary); border-color: rgba(56,189,248,.35); }

.alert {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 12px 14px;
  background: rgba(255,255,255,.62);
}
body[data-theme="dark"] .alert { background: rgba(10,18,34,.62); }

.alert-ok { border-color: rgba(34,197,94,.35); }
.alert-bad { border-color: rgba(251,113,133,.35); }
.alert-info { border-color: rgba(56,189,248,.35); }

/* =========================
   Theme toggle
   ========================= */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.55);
}
body[data-theme="dark"] .theme-toggle { background: rgba(10,18,34,.55); }

.theme-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--grad-primary);
  box-shadow: var(--shadow);
}
.theme-label { font-size: 13px; color: var(--muted); font-weight: 800; }


/* small helper: zip row for input + verify button */
.u-zip-row { grid-template-columns: 2fr 1fr; gap: 12px; }
@media (max-width: 520px) { .u-zip-row { grid-template-columns: 1fr; } }



/* =========================
   Modal (Label preview)
   ========================= */
.modal { 
  position: fixed; 
  inset: 0; 
  z-index: 999; 
  padding: 16px; 
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
}

/* --- Modal polish --- */
.modal-card {
  position: relative;
  max-width: 980px;
  margin: 5vh auto;
  width: calc(100% - 24px);
  max-height: 88vh;
  overflow: auto;
  box-shadow: var(--shadow-strong);
}

/* Preview image */
.label-preview-img {
  width: 100%;
  max-width: 520px;
  border: 1px solid var(--border);
}

/* details summary look nicer */
details.c-panel > summary {
  list-style: none;
  user-select: none;
}
details.c-panel > summary::-webkit-details-marker { display: none; }
details.c-panel > summary::after {
  content: "▾";
  font-weight: 900;
  color: var(--muted);
  margin-left: auto;
}
details[open].c-panel > summary::after { content: "▴"; }


.label-preview-ups{ 
  max-width: 750px !important;
  transform: rotate(90deg);
  padding: 1rem;
}


/* ------------------------------
   Table Wrapper
--------------------------------*/
.c-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 10px;
  background: var(--panel-bg, #fff);
  border: 1px solid var(--border-color, #e5e7eb);
}

/* ------------------------------
   Table Base
--------------------------------*/
.c-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

/* ------------------------------
   Table Header
--------------------------------*/
.c-table thead th {
  text-align: left;
  font-weight: 600;
  padding: 12px 14px;
  background: var(--table-head-bg, #f9fafb);
  color: var(--text-muted, #6b7280);
  border-bottom: 1px solid var(--border-color, #e5e7eb);
  white-space: nowrap;
}

/* ------------------------------
   Table Body
--------------------------------*/
.c-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color, #f1f5f9);
  vertical-align: middle;
}

.c-table.c-table-sm tbody td {
  padding: 5px 5px;
}

/* Hover row */
.c-table tbody tr:hover {
  background: var(--row-hover-bg, #f8fafc);
}

/* Last row no border */
.c-table tbody tr:last-child td {
  border-bottom: none;
}

/* ------------------------------
   Text helpers
--------------------------------*/
.c-table strong {
  font-weight: 600;
}

.c-table .u-muted {
  color: #9ca3af;
}

/* ------------------------------
   Right aligned column
--------------------------------*/
.c-table .u-text-right {
  text-align: right;
}

/* ------------------------------
   Badges inside table
--------------------------------*/
.c-table .badge {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  text-transform: capitalize;
}

/* ------------------------------
   Empty / loading state
--------------------------------*/
.c-table .table-empty {
  text-align: center;
  padding: 24px;
  color: #9ca3af;
}

/* ------------------------------
   Mobile friendly
--------------------------------*/
@media (max-width: 768px) {
  .c-table {
    font-size: 13px;
  }

  .c-table thead {
    display: none;
  }

  .c-table tbody tr {
    display: block;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    padding: 10px 0;
  }

  .c-table tbody td {
    display: flex;
    justify-content: space-between;
    padding: 8px 14px;
    border: none;
  }

  .c-table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-muted, #6b7280);
  }
}


.btn.secondary {
  background: #eee;
  color: #333;
  margin-top: 10px;
}



.carrier-icon {
  width: 60px;
  max-height: 28px;
  object-fit: contain;
}

.carrier-fallback {
  font-weight: 700;
  font-size: 12px;
}


.contact-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f1f3f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 16px;
}




.autocomplete-box {
  position: absolute;
  background: var(--card-bg, #fff);
  border: 1px solid #ddd;
  border-radius: 6px;
  z-index: 9999;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

.autocomplete-item {
  padding: 8px 10px;
  cursor: pointer;
}

.autocomplete-item:hover {
  background: #f5f7fa;
}

.autocomplete-muted {
  font-size: 12px;
  color: #777;
}

/* =========================
   Tabs
========================= */

.u-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.u-tab {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted, #6b7280);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.u-tab:hover {
  color: var(--text, #111827);
}

.u-tab.active {
  color: var(--primary, #2563eb);
  border-bottom-color: var(--primary, #2563eb);
}

.u-tab-panel {
  animation: tabFade 0.15s ease;
}

@keyframes tabFade {
  from { opacity: 0; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

.c-pointer {
  cursor: pointer;
}




/* Loader wrapper */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

/* Dark overlay */
.loader-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

/* Loader box */
.loader-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* background: #fff; */
  padding: 28px 36px;
  border-radius: 12px;
  text-align: center;
  min-width: 280px;
  /* box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); */
}

/* Spinner */
.spinner {
  width: 64px;
  height: 64px;
  border: 6px solid #eee;
  border-top: 6px solid #a42b45;
  border-radius: 50%;
  margin: 15px auto 16px;
  animation: spin 0.9s linear infinite;
}

/* Text */
.loader-text {
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}



/* ===============================
   NAV MENU (LIGHT DEFAULT)
================================ */

.nav-menu-wrapper {
  position: relative;
  display: inline-block;
}

.nav-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 6px 10px;
  color: inherit;
}

.nav-menu-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-menu-name {
  font-weight: 600;
  font-size: 14px;
}

.nav-menu-dropdown {
  position: absolute;
  right: 0;
  top: 52px;
  width: 260px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.12);
  padding: 8px 0;
  z-index: 1000;
  overflow: hidden;
}

.nav-menu-user {
  text-align: center;
  padding: 14px 18px;
}

.nav-menu-fullname {
  font-weight: 600;
  font-size: 14px;
}

.nav-menu-email {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

.nav-menu-divider {
  height: 1px;
  background: #eee;
  margin: 8px 0;
}

.nav-menu-item {
  width: 100%;
  text-align: left;
  padding: 11px 18px;
  font-size: 14px;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  color: #111827;
  display: block;
  transition: background 0.15s ease;
}

.nav-menu-item:hover {
  background: #f3f4f6;
}

.nav-menu-danger {
  color: #dc2626;
}


/* ===============================
   NAV MENU DARK MODE
================================ */

body[data-theme="dark"] .nav-menu-dropdown {
  background: var(--card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  box-shadow: 0 25px 60px rgba(0,0,0,0.65);
}


body[data-theme="dark"] .nav-menu-fullname {
  color: var(--text);
}

body[data-theme="dark"] .nav-menu-email {
  color: var(--muted);
}

body[data-theme="dark"] .nav-menu-divider {
  background: var(--border);
}

body[data-theme="dark"] .nav-menu-item {
  color: var(--text);
}

body[data-theme="dark"] .nav-menu-item:hover {
  background: rgba(255,255,255,0.05);
}

body[data-theme="dark"] .nav-menu-danger {
  color: var(--danger);
}


body[data-theme="dark"] .nav-menu-dropdown {
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.95),
    rgba(10, 18, 34, 0.92)
  );
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
}


.tagged-users-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 0 10px 0;
}

.tagged-user-item {
  background: var(--card2);
  padding: 6px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.pull-left {  float: left; }
.pull-right { float: right; }


.c-table .cfy-thead-actions {
  width: 1%;
  white-space: nowrap;
}

.c-table .cfy-actions-inner {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}





.u-text-left { text-align: left; }
.u-text-right { text-align: right; }
.u-text-center { text-align: center; }


/* ===============================
   Checkout Drawer
================================ */

.checkout-trigger {
  position: fixed;
  right: 0;
  bottom: 20px; /* spacing from bottom */
  background: var(--grad-primary);
  color: #fff;
  padding: 12px 18px;
  cursor: pointer;
  border-radius: 8px 0 0 8px;
  z-index: 999;
  font-weight: 600;
}

.checkout-drawer {
  position: fixed;
  right: -40%;
  top: 0;
  width: 40%;
  height: 100vh;
  background: var(--card-solid);
  box-shadow: -5px 0 20px rgba(0,0,0,.15);
  transition: right .3s ease;
  display: flex;
  flex-direction: column;
  z-index: 1000;
}

.checkout-drawer.open {
  right: 0;
}

.checkout-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  font-weight: bold;
  display: flex;
  justify-content: space-between;
}

.checkout-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.checkout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}

.checkout-title {
  font-weight: 600;
}

.checkout-sub {
  font-size: 12px;
  opacity: .8;
}

.checkout-amount {
  text-align: center;
  width : 80px;
}


.checkout-amount-header {
  text-align: left;
  margin-right: 30px;
}


.checkout-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.checkout-total-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.checkout-grand {
  font-size: 18px;
  font-weight: bold;
}



.checkout-results {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card2);
}

.checkout-result-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

.checkout-result-item:hover {
  background: rgba(0,0,0,.05);
}

.checkout-result-title {
  font-weight: 600;
}

.checkout-result-sub {
  font-size: 12px;
  opacity: .75;
}




.checkout-details {
  width: 80%;
  margin-right: 10px;
}

.checkout-units-container {
  width: 70px;
  margin-left: auto;
  margin-right: 10px;
}

.checkout-item-remove {
  margin-left: 10px;
}

.checkout-row-header {
  align-items: unset;
}

.checkout-row-header input {
  margin-bottom: 5px;
}



/* ===============================
   Select2 Styling
================================ */

.f-select2 .select2-container--default .select2-selection--single, 
.f-select2-sm .select2-container--default .select2-selection--single,
.f-select2 .select2-dropdown, .f-select2-sm .select2-dropdown {
  border: 1px solid var(--input-border);
}


.f-select2 .select2-container .select2-selection--single, 
.f-select2 .select2-container .select2-dropdown {
  border-radius: 14px;  
}

.f-select2 .select2-container .select2-selection--single {
  height: 42px;
}

.f-select2 .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 38px;
}

.f-select2 .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 38px;
}


.f-select2-sm .select2-container .select2-selection--single {
  height: 32px;
}

.f-select2-sm .select2-container .select2-selection--single,
.f-select2-sm .select2-dropdown {
  border-radius: 10px;
}


.select2-container--open .select2-dropdown--below {
    border-top: none;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}






.c-no-label label {
  display: none;
}

.cfy-container--profiles tr:first-child th:first-child {
  width: 80%;
}