/* ==========================================================================
   GLOBAL.CSS — DubaiTripHub Provider Portal
   Shared styles used across all pages
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS CUSTOM PROPERTIES (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
  --orange: #ff5b00;
  --orange-hover: #e05200;
  --orange-soft: #FFF4EB;
  --blue: #1A6DE0;
  --blue-hover: #1459B8;
  --blue-dark: #0E3F82;
  --blue-soft: #EBF2FC;

  --bg: #F0F1F3;
  --white: #FFFFFF;
  --offwhite: #F8F8F9;
  --sidebar-bg: #FAFAFA;
  --sidebar-border: #D0D3D9;

  --border: #B8BCC5;
  --border-light: #D0D3D9;
  --border-heavy: #9BA0AB;

  /* Dark text system — no light grays */
  --text: #111318;
  --text-mid: #1D2028;
  --text-sec: #2E3138;
  --text-dim: #3D424D;
  --text-note: #4A4F5A;

  --red: #D6302A;
  --red-soft: #FDECEB;
  --orange-soft-bg: #FFF6EE;

  --sidebar-w: 260px;
  --sidebar-cw: 64px;
  --header-h: 58px;

  --r-xs: 2px;
  --r-sm: 4px;
  --r-md: 6px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .06);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, .08);
  --shadow-lg: 0 6px 24px rgba(0, 0, 0, .12);

  --font-en: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-ar: 'Noto Kufi Arabic', sans-serif;
  --transition: .2s ease;
}

/* --------------------------------------------------------------------------
   RESET & BASE
   -------------------------------------------------------------------------- */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--orange) rgba(0, 0, 0, 0.1);
}


*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-en);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  border-radius: 8px;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
  background-color: var(--orange);
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3);
}

/* --------------------------------------------------------------------------
   LAYOUT SHELL
   -------------------------------------------------------------------------- */
.shell {
  /* display: flex;
  min-height: 100vh; */
}

/* --------------------------------------------------------------------------
   SIDEBAR
   -------------------------------------------------------------------------- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: width var(--transition);
  /* overflow: hidden; */
}

.sidebar.collapsed {
  width: var(--sidebar-cw);
}

/* Sidebar — Brand */
.sb-brand {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

.sb-mark {
  width: 34px;
  height: 34px;
  background: var(--orange);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}

.sb-brand-text {
  white-space: nowrap;
  transition: opacity .15s;
}

.sidebar.collapsed .sb-brand-text {
  opacity: 0;
  pointer-events: none;
  width: 0;
}

.sb-brand-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.3px;
  line-height: 1.2;
}

.sb-brand-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sec);
  letter-spacing: .6px;
  text-transform: uppercase;
}

.sb-toggle {
  position: absolute;
  top: 17px;
  right: -13px;
  width: 26px;
  height: 26px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-sec);
  z-index: 5;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.sb-mob-close {
  display: none;
  position: absolute;
  top: 17px;
  right: 14px;
  width: 26px;
  height: 26px;
  background: var(--red-soft);
  border: 1px solid var(--border);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-sec);
  z-index: 5;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}


.sb-toggle:hover {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.sb-mob-close:hover {
  background-color: var(--red);
  color: #fff;
  border-color: var(--red);
}

/* Sidebar — Nav */
.sb-nav {
  flex: 1;
  padding: 16px 10px;
  overflow-y: auto;
  overflow-x: hidden;
}

.sb-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 0 10px;
  margin-bottom: 8px;
  white-space: nowrap;
  transition: opacity .15s;
}

.sidebar.collapsed .sb-label {
  opacity: 0;
}

.sb-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: var(--r-sm);
  color: var(--text-mid);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
  transition: all .15s;
  white-space: nowrap;
  position: relative;
  width: 100%;
  text-align: left;
}

.sb-link:hover {
  background: var(--offwhite);
  color: var(--text);
}

.sb-link.active {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 700;
}

.sb-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--orange);
  border-radius: 0 2px 2px 0;
}


.sb-link.off {
  opacity: .42;
  pointer-events: none;
}

.sb-link-ico {
  width: 20px;
  text-align: center;
  font-size: 17px;
  flex-shrink: 0;
}

.sb-link-txt {
  flex: 1;
  transition: opacity .15s;
}

.sidebar.collapsed .sb-link-txt,
.sidebar.collapsed .sb-pill {
  opacity: 0;
  pointer-events: none;
}

.sb-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-xs);
  flex-shrink: 0;
  transition: opacity .15s;
}

.sb-pill.ct {
  background: var(--orange);
  color: #fff;
}

.sb-pill.ph {
  background: var(--offwhite);
  color: var(--text-dim);
  border: 1px solid var(--border-light);
  font-size: 10px;
}

.sb-foot {
  padding: 10px 10px 14px;
  border-top: 1px solid var(--sidebar-border);
}

/* --------------------------------------------------------------------------
   MAIN CONTENT AREA
   -------------------------------------------------------------------------- */
.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  transition: margin var(--transition);
}


.sidebar.collapsed~.main {
  margin-left: var(--sidebar-cw);
}

/* --------------------------------------------------------------------------
   TOP BAR
   -------------------------------------------------------------------------- */
.topbar {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.tb-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tb-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tb-ham {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-mid);
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* Topbar — Search */
.tb-search {
  position: relative;
  width: 280px;
}

.tb-search input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  background: var(--offwhite);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
  transition: all .15s;
}

.tb-search input::placeholder {
  color: var(--text-dim);
  font-size: 12px;
}

.tb-search input:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--white);
  box-shadow: 0 0 0 2px rgba(26, 109, 224, .12);
}

.tb-search-ico {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 15px;
  pointer-events: none;
}


/* Topbar — Icon buttons */
.tb-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  position: relative;
  transition: all .15s;
}

.tb-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.tb-btn.on {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.tb-notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  background: var(--orange);
  border-radius: 50%;
  border: 1.5px solid var(--white);
}

/* Topbar — Language toggle */
.tb-lang {
  padding: 7px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-mid);
  transition: all .15s;
}

.tb-lang:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* Topbar — Avatar */
.tb-avatar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--white);
  transition: all .15s;
}

.tb-avatar:hover {
  border-color: var(--blue);
}

.tb-avatar-circle {
  width: 32px;
  height: 32px;
  background: var(--blue);
  border-radius: var(--r-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}

.tb-avatar-meta {
  text-align: left;
}


.tb-avatar-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.tb-avatar-role {
  font-size: 11px;
  color: var(--text-sec);
  font-weight: 600;
}

.tb-caret {
  font-size: 10px;
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   DROPDOWN PANELS
   -------------------------------------------------------------------------- */
.dd-wrap {
  position: relative;
}

.dd {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 300px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all .15s;
}


.dd.on {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dd-hd {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
}

.dd-hd-t {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.dd-bd {
  padding: 4px;
  max-height: 300px;
  overflow-y: auto;
}

.dd-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-xs);
  transition: background .1s;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-mid);
  border: none;
  background: none;
}

.dd-row:hover {
  background: var(--offwhite);
}

.dd-row.danger {
  color: var(--red);
}

.dd-row.danger:hover {
  background: var(--red-soft);
}

.dd-row-ico {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.dd-sep {
  height: 1px;
  background: var(--border-light);
  margin: 4px 0;
}

/* Dropdown — Notification items */
.nf-row {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--r-xs);
  cursor: pointer;
  transition: background .1s;
}

.nf-row:hover {
  background: var(--offwhite);
}

.nf-row.ur {
  background: var(--blue-soft);
}

.nf-pip {
  width: 7px;
  height: 7px;
  background: var(--blue);
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.nf-msg {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.4;
  font-weight: 500;
}

.nf-when {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
  font-weight: 500;
}


.nf-view-all {
  display: block;
  text-align: center;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  border-top: 1px solid var(--notif-border);
  margin-top: 8px;
}

.nf-view-all:hover {
  color: var(--blue-hover);
}

/* Dropdown — Profile header */
.dd-ph {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 12px;
}

.dd-ph-av {
  width: 40px;
  height: 40px;
  background: var(--blue);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
}

.dd-ph-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.dd-ph-email {
  font-size: 12px;
  color: var(--text-sec);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   PAGE WRAPPER
   -------------------------------------------------------------------------- */
.page {
  padding: 24px;
  max-width: 1360px;
  margin: 0 auto;
}

/* Page Header */
.pg-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.pg-hd-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pg-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.3px;
}

.pg-sub {
  font-size: 14px;
  color: var(--text-sec);
  font-weight: 500;
  margin-top: 3px;
}

.pg-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
  margin-bottom: 6px;
}

.pg-breadcrumb a {
  color: var(--blue);
  font-weight: 600;
}

.pg-breadcrumb a:hover {
  text-decoration: underline;
}

.pg-breadcrumb .sep {
  color: var(--border-heavy);
}

.pg-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   TABS
   -------------------------------------------------------------------------- */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-light);
  background: var(--white);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--r-md) var(--r-md) 0 0;
  overflow-x: auto;
}

.tab {
  padding: 16px 24px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dim);
  cursor: pointer;
  transition: all .15s;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.tab:hover {
  color: var(--text);
  background: var(--offwhite);
}

.tab.active {
  color: var(--blue);
  border-bottom-color: var(--orange);
  background: var(--white);
}

.tab-ico {
  font-size: 16px;
}

.tab-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--r-xs);
  background: var(--red);
  color: #fff;
}

.tab-badge.ok {
  background: var(--green);
}

/* Tab Content */
.tab-content {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--r-md) var(--r-md);
  padding: 28px;
  margin-bottom: 24px;
}

.page-content {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--r-md) var(--r-md);
  padding: 28px;
  margin-bottom: 24px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* --------------------------------------------------------------------------
   FORM SECTIONS
   -------------------------------------------------------------------------- */
.form-section {
  /* margin-bottom: 28px;
  padding-bottom: 28px; */
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 24px;
}

.form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.form-section-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.form-section-desc {
  font-size: 13px;
  color: var(--text-sec);
  font-weight: 500;
  margin-bottom: 20px;
}

/* --------------------------------------------------------------------------
   FORM LAYOUT
   -------------------------------------------------------------------------- */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-row.full {
  grid-template-columns: 1fr;
}

.form-row.three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* --------------------------------------------------------------------------
   FORM LABELS
   -------------------------------------------------------------------------- */
.form-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-mid);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.form-label .req {
  color: var(--red);
  font-weight: 800;
}

.form-label .lang-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--r-xs);
  margin-left: 6px;
}


.form-label .lang-tag.en {
  background: var(--blue-soft);
  color: var(--blue);
}

.form-label .lang-tag.ar {
  background: var(--orange-soft);
  color: var(--orange);
}

.field-validation-error {
  color: var(--red);
  font-size: 12px;
}

/* --------------------------------------------------------------------------
   FORM INPUTS
   -------------------------------------------------------------------------- */
.form-input {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
  background: var(--white);
  transition: all .15s;
  height: 40px;
}

.form-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(26, 109, 224, .12);
}

.form-input.error {
  border-color: var(--red);
  background: var(--red-soft);
}

.form-input.error:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(214, 48, 42, .12);
}

.form-input::placeholder {
  color: var(--text-dim);
  font-size: 12px;
}

/* Arabic text inputs */
.form-input.ar-input {
  direction: rtl;
  font-family: var(--font-ar);
  /* font-size: 12px;
  line-height: 1.45; */
}


.form-input.ar-input::placeholder {
  font-family: var(--font-ar);
  font-size: 12px;
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
  /* height: auto; */
}

/* Select custom arrow */
select.form-input,
.filter-select {
  height: 40px;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  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='%233D424D' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  font-size: 14px;
}

select.form-input option,
.filter-select option {
  font-size: 14px;
}


.form-hint {
  font-size: 12px;
  color: var(--text-note);
  font-weight: 500;
  margin-top: 4px;
}

/* Form image */

.form-image {
  width: 100%;
  max-width: 180px;
  height: 150px;
  background: var(--offwhite);
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  flex-direction: column;
  gap: 5px;
}

.form-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   CHECKBOX GRID
   -------------------------------------------------------------------------- */
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--offwhite);
  border: 1px solid var(--border-light);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all .12s;
}

.check-item:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.check-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
  cursor: pointer;
  flex-shrink: 0;
}

.check-item label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-mid);
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   MEDIA UPLOAD
   -------------------------------------------------------------------------- */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--r-md);
  padding: 40px 24px;
  text-align: center;
  background: var(--offwhite);
  transition: all .15s;
  cursor: pointer;
  margin-bottom: 15px;
}

.upload-zone:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.upload-ico {
  font-size: 36px;
  margin-bottom: 12px;
}

.upload-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.upload-desc {
  font-size: 13px;
  color: var(--text-sec);
  font-weight: 500;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 9px 20px;
  background: var(--blue);
  color: #fff;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all .12s;
}

.upload-btn:hover {
  background: var(--blue-hover);
}

/* Media grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.media-item {
  position: relative;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.media-item-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity .15s;
}

.media-item:hover .media-item-actions {
  opacity: 1;
}

.media-item-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--r-xs);
  background: rgba(0, 0, 0, .65);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  border: none;
  cursor: pointer;
  transition: background .12s;
}

.media-item-btn:hover {
  background: var(--red);
}

.media-item-btn.star:hover {
  background: var(--orange);
}

.media-item-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--r-xs);
  background: var(--orange);
  color: #fff;
}

.media-item-setdefault {
    position: absolute;
    top: 5px;
    right: 35px;
    width: 26px;
    height: 26px;
    background: rgb(35 157 72);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* --------------------------------------------------------------------------
   SCHEDULE
   -------------------------------------------------------------------------- */
.schedule-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.schedule-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--offwhite);
  border: 1px solid var(--border-light);
  border-radius: var(--r-sm);
}

.schedule-day {
  width: 100px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}

.schedule-toggle {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
  cursor: pointer;
  flex-shrink: 0;
}

.schedule-times {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
}

.schedule-time-input {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  width: max-content;
  background: var(--white);
}

.schedule-time-input:focus {
  outline: none;
  border-color: var(--blue);
}

.schedule-sep {
  font-size: 13px;
  color: var(--text-sec);
  font-weight: 600;
}

.schedule-note {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   STICKY BOTTOM BAR
   -------------------------------------------------------------------------- */
.sticky-bar {
  position: sticky;
  bottom: 0;
  z-index: 40;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, .06);
}

.sticky-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sticky-bar-status {
  font-size: 13px;
  color: var(--text-sec);
  font-weight: 500;
}

.sticky-bar-status b {
  color: var(--text);
  font-weight: 700;
}

.sticky-bar-right {
  display: flex;
  gap: 8px;
}


/* --------------------------------------------------------------------------
   CONFIRMATION MODAL
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.on {
  display: flex;
}

.modal {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  max-width: 420px;
  width: 100%;
  padding: 28px;
  animation: modalIn .15s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(.96) translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.modal-ico {
  font-size: 36px;
  margin-bottom: 14px;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.modal-desc {
  font-size: 14px;
  color: var(--text-sec);
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 8px;
}

.modal-item {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  padding: 10px 14px;
  background: var(--offwhite);
  border: 1px solid var(--border-light);
  border-radius: var(--r-sm);
  margin-bottom: 20px;
}

.modal-btns {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal-btn {
  /* padding: 10px 22px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 700;
  transition: all .12s; */
}

.modal-btn.cancel {
  background: var(--offwhite);
  border: 1px solid var(--border);
  color: var(--text-mid);
}

.modal-btn.cancel:hover {
  background: var(--bg);
  border-color: var(--border-heavy);
}

.modal-btn.confirm {
  background: var(--blue);
  color: #fff;
  border: none;
}

.modal-btn.confirm:hover {
  background: var(--blue-hover);
}

.modal-btn.confirm-red {
  background: var(--red);
  color: #fff;
  border: none;
}

.modal-btn.confirm-red:hover {
  background: #BF2822;
}

.modal-btn.confirm-blue {
  background: var(--blue);
  color: #fff;
  border: none;
}

.modal-btn.confirm-blue:hover {
  background: var(--blue-hover);
}

.modal-btn.confirm-orange {
  background: var(--orange);
  color: #fff;
  border: none;
}

.modal-btn.confirm-orange:hover {
  background: var(--orange-hover);
}


/* ///////////////// Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 700;
  border: none;
  color: #fff;
  transition: all .15s;
}

.btn-primary {
  background: var(--orange);
  box-shadow: 0 2px 6px rgba(244, 123, 32, .25);
}

.btn-primary:hover {
  background: var(--orange-hover);
  box-shadow: 0 4px 12px rgba(244, 123, 32, .35);
}

.btn-cta {
  background: var(--orange);
  box-shadow: 0 2px 8px rgba(244, 123, 32, .3);
}

.btn-cta:hover {
  background: var(--orange-hover);
  box-shadow: 0 4px 14px rgba(244, 123, 32, .4);
}

.btn-secondary {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-mid);
}

.btn-secondary:hover {
  border-color: var(--blue);
}

.btn-outline-blue {
  border: 1px solid var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

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


/* --------------------------------------------------------------------------
   CARD COMPONENT
   -------------------------------------------------------------------------- */
.cd {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}

.cd+.cd {
  margin-top: 16px;
}

.cd-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px 0;
}

.cd-h {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .3px;
}

.cd-lk {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  transition: color .1s;
}

.cd-lk:hover {
  color: var(--blue-hover);
}

.cd-bd {
  padding: 16px 20px;
}

/* --------------------------------------------------------------------------
   MOBILE OVERLAY
   -------------------------------------------------------------------------- */
.mob-ov {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  z-index: 99;
}

.mob-ov.on {
  display: block;
}

/* --------------------------------------------------------------------------
   STATUS BADGES
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--r-xs);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.badge.active {
  background: var(--blue-soft);
  color: var(--blue);
}

.badge.active .badge-dot {
  background: var(--blue);
}

.badge.draft {
  background: var(--offwhite);
  color: var(--text-dim);
  border: 1px solid var(--border-light);
}

.badge.draft .badge-dot {
  background: var(--text-dim);
}

.badge.paused {
  background: var(--orange-soft);
  color: var(--orange);
}

.badge.paused .badge-dot {
  background: var(--orange);
}

.badge.review {
  background: var(--blue-soft);
  color: var(--blue);
}

.badge.review .badge-dot {
  background: var(--blue);
}

/* Quick ACtions */
.page-qa {
  margin-bottom: 24px;
}

.page-qa .qa {
  grid-template-columns: 1fr 1fr 1fr 1fr !important;
}

.page-qa .cd-bd {
  padding-top: 0px;
}

/* Alert Messages */
.validation-summary-errors {
  padding: 12px 16px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  display: none;
}

.validation-summary-errors.show {
  display: block;
}

.validation-summary-errors.error {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid var(--red);
}

.delete-icon-btn {
  background: transparent;
  border: none;
  color: var(--red);
  /* red for delete */
  cursor: pointer;
  font-size: 18px;
  margin-left: 8px;
  vertical-align: middle;
  transition: color 0.2s ease;
}

.delete-icon-btn:hover {
  color: #a82420;
  /* darker red on hover */
}

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */


@media (max-width:992px) {
  .page-qa .qa {
    grid-template-columns: 1fr 1fr !important;
  }

}

@media (max-width: 768px) {

  .sidebar {
    transform: translateX(-100%);
  }

  .sb-toggle {
    display: none;
  }

  .sb-mob-close {
    display: flex;
  }

  .sidebar.mob {
    transform: translateX(0);
    width: 100%;
  }

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

  .topbar {
    padding: 0 14px;
    height: 54px;
  }

  .tb-ham {
    display: flex;
  }

  .tb-search {
    display: none;
  }

  .tb-avatar-meta {
    display: none;
  }

  .tb-avatar {
    padding: 4px;
  }

  .page {
    padding: 14px;
  }

  .dd {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    min-width: 100%;
    border-radius: var(--r-md) var(--r-md) 0 0;
    max-height: 60vh;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, .15);
  }

  .btn {
    padding: 7px 12px;
    font-size: 12px;
    white-space: nowrap;
  }

  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab {
    padding: 14px 16px;
    font-size: 13px;
  }

  .tab-content,
  .page-content {
    padding: 18px 14px;
  }


  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .pg-hd {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .pg-actions {
    width: 100%;
  }

  .pg-actions .btn-primary,
  .pg-actions .btn-secondary {
    flex: 1;
    justify-content: center;
  }

  .schedule-row {
    flex-wrap: wrap;
  }

  .schedule-day {
    width: 65px;
    font-size: 12px;
  }

  .schedule-times {
    flex-wrap: wrap;
  }

  .schedule-time-input {
    padding: 5px 7px;
    font-size: 12px;
  }

  .sticky-bar {
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
  }

  .sticky-bar-right {
    width: 100%;
  }

  .sticky-bar-right button {
    flex: 1;
    justify-content: center;
  }

  .form-row,
  .form-row.three {
    grid-template-columns: 1fr;
  }

  .check-grid {
    grid-template-columns: 1fr;
  }
}



@media (max-width:400px) {
  .sticky-bar-right {
    flex-wrap: wrap;
  }

  .sticky-bar-right .btn-primary {
    order: 1;
    flex: 1;
    text-align: center;
    justify-content: center;
  }

  .sticky-bar-right .btn-secondary {
    order: 3;
  }

  .sticky-bar-right .btn-outline-blue {
    order: 2;
  }

}




/* ==========================================================================
   SWEETALERT CUSTOMIZATION
   ========================================================================== */

/* Main alert container */
.swal2-popup {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  border: 1px solid #D0D3D9;
}

/* Alert title */
.swal2-title {
  color: #111318;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

/* Alert description text */
.swal2-html-container {
  color: #2E3138;
  font-size: 14px;
  line-height: 1.5;
}

/* Alert icon container */
.swal2-icon {
  border-color: #D0D3D9;
}

/* Error icon styling */
.swal2-icon.swal2-error {
  border-color: #D6302A;
  background-color: #FDECEB;
}

.swal2-icon.swal2-error .swal2-icon-content {
  color: #D6302A;
}

/* Success icon styling */
.swal2-icon.swal2-success {
  border-color: #1A6DE0;
  background-color: #EBF2FC;
}

.swal2-icon.swal2-success .swal2-icon-content {
  color: #1A6DE0;
}

/* Warning icon styling */
.swal2-icon.swal2-warning {
  border-color: #ff5b00;
  background-color: #FFF4EB;
}

.swal2-icon.swal2-warning .swal2-icon-content {
  color: #ff5b00;
}

/* Info icon styling */
.swal2-icon.swal2-info {
  border-color: #1A6DE0;
  background-color: #EBF2FC;
}

.swal2-icon.swal2-info .swal2-icon-content {
  color: #1A6DE0;
}

/* Question icon styling */
.swal2-icon.swal2-question {
  border-color: #1A6DE0;
  background-color: #EBF2FC;
}

.swal2-icon.swal2-question .swal2-icon-content {
  color: #1A6DE0;
}

/* Confirm button (primary action) */
.swal2-confirm {
  background-color: #ff5b00;
  border-color: #ff5b00;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 24px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.swal2-confirm:hover {
  background-color: #e05200;
  border-color: #e05200;
  box-shadow: 0 4px 12px rgba(255, 91, 0, 0.2);
}

.swal2-confirm:focus {
  box-shadow: 0 0 0 3px rgba(255, 91, 0, 0.25);
}

/* Cancel button (secondary action) */
.swal2-cancel {
  background-color: #F8F8F9;
  border-color: #D0D3D9;
  color: #1D2028;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 24px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.swal2-cancel:hover {
  background-color: #F0F1F3;
  border-color: #B8BCC5;
  color: #1D2028;
}

.swal2-cancel:focus {
  box-shadow: 0 0 0 3px rgba(26, 109, 224, 0.12);
}

/* Deny button */
.swal2-deny {
  background-color: #F8F8F9;
  border-color: #D0D3D9;
  color: #1D2028;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 24px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.swal2-deny:hover {
  background-color: #F0F1F3;
  border-color: #B8BCC5;
}

/* Input fields inside alerts */
.swal2-input {
  border-color: #D0D3D9;
  color: #111318;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.swal2-input:focus {
  border-color: #1A6DE0;
  box-shadow: 0 0 0 2px rgba(26, 109, 224, 0.12);
}

/* Select dropdowns */
.swal2-select {
  border-color: #D0D3D9;
  color: #111318;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 14px;
  border-radius: 6px;
}

.swal2-select:focus {
  border-color: #1A6DE0;
  box-shadow: 0 0 0 2px rgba(26, 109, 224, 0.12);
}

/* Radios and checkboxes */
.swal2-radio,
.swal2-checkbox {
  accent-color: #ff5b00;
}

/* Progress steps */
.swal2-progress-steps {
  font-size: 14px;
  color: #2E3138;
}

.swal2-progress-step {
  background-color: #F8F8F9;
  border-color: #D0D3D9;
  color: #3D424D;
}

.swal2-progress-step.swal2-active-progress-step {
  background-color: #1A6DE0;
  border-color: #1A6DE0;
  color: #FFFFFF;
}

.swal2-progress-step.swal2-active-progress-step~.swal2-progress-step {
  background-color: #F8F8F9;
  border-color: #D0D3D9;
  color: #3D424D;
}

/* Success ring */
.swal2-success-ring {
  border-color: #1A6DE0;
}

/* Backdrop */
.swal2-backdrop {
  background-color: rgba(0, 0, 0, 0.35);
}

/* Close button */
.swal2-close {
  color: #3D424D;
  font-size: 28px;
}

.swal2-close:hover {
  color: #1D2028;
}

/* Custom color variants */

/* Orange variant (warning/info) */
.swal2-popup.swal-orange .swal2-confirm,
.swal2-popup.swal-orange .swal2-title {
  color: #ff5b00;
}

.swal2-popup.swal-orange .swal2-confirm {
  background-color: #ff5b00;
  border-color: #ff5b00;
  color: #FFFFFF;
}

.swal2-popup.swal-orange .swal2-confirm:hover {
  background-color: #e05200;
  border-color: #e05200;
}

/* Blue variant (primary) */
.swal2-popup.swal-blue .swal2-confirm {
  background-color: #1A6DE0;
  border-color: #1A6DE0;
  color: #FFFFFF;
}

.swal2-popup.swal-blue .swal2-confirm:hover {
  background-color: #1459B8;
  border-color: #1459B8;
}

/* Red variant (error/danger) */
.swal2-popup.swal-red .swal2-confirm {
  background-color: #D6302A;
  border-color: #D6302A;
  color: #FFFFFF;
}

.swal2-popup.swal-red .swal2-confirm:hover {
  background-color: #b8261f;
  border-color: #b8261f;
}

/* Ensure proper spacing and alignment */
.swal2-actions {
  gap: 8px;
}

.swal2-html-container+.swal2-input {
  margin-top: 16px;
}

/* Media query for smaller screens */
@media (max-width: 768px) {
  .swal2-popup {
    width: 90%;
    padding: 20px 16px;
  }

  .swal2-title {
    font-size: 16px;
  }

  .swal2-html-container {
    font-size: 14px;
  }

  .swal2-confirm,
  .swal2-cancel,
  .swal2-deny {
    padding: 9px 16px;
    font-size: 13px;
  }
}