/* ============================================================
   RUNR ADMIN — REDESIGN CSS
   Font: Montserrat | Primary: #3673d7 | Sidebar: #0f1724
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

/* ── ROOT VARIABLES ─────────────────────────────────────── */
:root {
  --primary: #3673d7;
  --primary-dark: #204789;
  --primary-light: #deeafd;
  --primary-xs: #f0f6ff;
  --success: #28c76f;
  --success-light: #edfaf4;
  --danger: #ea5455;
  --danger-light: #fce8e8;
  --warning: #ff9f43;
  --warning-light: #fff4e5;
  --info: #00cfe8;
  --info-light: #e5fafd;
  --white: #ffffff;
  --body-bg: #f0f2f7;
  --card-bg: #ffffff;
  --border: #e8eaf0;
  --border-dark: #d0d4e0;
  --text-primary: #1a1d2e;
  --text-secondary: #5a6282;
  --text-muted: #9aa0bb;
  --sidebar-bg: #0f1724;
  --sidebar-hover: #1a2640;
  --sidebar-text: #8a9bc2;
  --sidebar-w: 240px;
  --sidebar-mini: 68px;
  --font: 'Montserrat', sans-serif;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, .06);
  --shadow: 0 2px 12px rgba(0, 0, 0, .08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, .12);
  --tr: all .22s ease;
  --header-h: 60px;
}

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

html {
  scroll-behavior: smooth;
}

html::-webkit-scrollbar {
  width: 5px;
}

html::-webkit-scrollbar-thumb {
  background: #ccd0e0;
  border-radius: 3px;
}

body {
  font-family: var(--font);
  font-size: 13px;
  color: var(--text-primary);
  background: var(--body-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font);
  font-weight: 600;
  line-height: 1.3;
}

h1 {
  font-size: 22px
}

h2 {
  font-size: 18px
}

h3 {
  font-size: 16px
}

h4 {
  font-size: 15px
}

h5 {
  font-size: 14px
}

h6 {
  font-size: 13px
}

p {
  margin-bottom: 12px;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--tr);
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── LAYOUT ─────────────────────────────────────────────── */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  transition: margin-left .25s ease;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.sidebar-mini .main-content {
  margin-left: var(--sidebar-mini);
}

/* ── SIDEBAR ────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transition: width .25s ease, transform .25s ease;
  overflow: hidden;
  transform: translateX(0);
}

.sidebar-mini .sidebar {
  width: var(--sidebar-mini);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  height: var(--header-h);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  flex-shrink: 0;
  text-decoration: none;
}

.sidebar-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.sidebar-logo-text {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  white-space: nowrap;
  opacity: 1;
  transition: opacity .2s;
}

.sidebar-logo-text span {
  color: var(--primary);
}

.sidebar-mini .sidebar-logo-text {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 0;
}

.sidebar-nav::-webkit-scrollbar {
  width: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .1);
  border-radius: 2px;
}

.nav-section-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .25);
  /* padding: 16px 20px 6px; */
  padding: 16px 13px 6px;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity .2s;
}

.sidebar-mini .nav-section-label {
  opacity: 1;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 500;
  transition: var(--tr);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  position: relative;
}

.nav-link:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.nav-link.active {
  background: rgba(54, 115, 215, .18);
  color: var(--primary);
  font-weight: 600;
}

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

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.nav-label {
  flex: 1;
  font-size: 13px;
  opacity: 1;
  transition: opacity .2s;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-mini .nav-label,
.sidebar-mini .nav-arrow {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.sidebar-mini .nav-link:hover::after {
  content: attr(data-title);
  position: absolute;
  left: calc(var(--sidebar-mini) + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: #1a2640;
  color: #fff;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  z-index: 300;
  box-shadow: var(--shadow);
  pointer-events: none;
}

.nav-sub {
  overflow: hidden;
  max-height: 0;
  transition: max-height .3s ease;
}

.nav-sub.open {
  max-height: 400px;
}

.nav-sub .nav-link {
  padding-left: 50px;
  font-size: 12.5px;
}

.nav-arrow {
  margin-left: auto;
  flex-shrink: 0;
  transition: transform .25s ease;
  color: var(--sidebar-text);
}

.nav-link.open .nav-arrow {
  transform: rotate(180deg);
}

.nav-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  margin-left: auto;
}

.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, .06);
  padding: 12px 18px;
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-user-name {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 10px;
  color: var(--sidebar-text);
  white-space: nowrap;
}

.sidebar-mini .sidebar-user-info {
  display: none;
}

/* ── HEADER ─────────────────────────────────────────────── */
.admin-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.header-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--tr);
  flex-shrink: 0;
}

.header-toggle:hover {
  background: var(--body-bg);
  color: var(--primary);
}

.header-toggle svg {
  width: 18px;
  height: 18px;
}

/* Hamburger hidden on desktop — shown only on mobile via media query */
.header-hamburger {
  display: none;
}

.header-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.header-breadcrumb .current {
  color: var(--text-primary);
  font-weight: 600;
}

.header-spacer {
  flex: 1;
}

.header-search {
  display: none !important;
  /* removed per design */
  position: relative;
  display: flex;
  align-items: center;
}

.header-search input {
  width: 220px;
  padding: 7px 12px 7px 34px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 12px;
  background: var(--body-bg);
  color: var(--text-primary);
  transition: var(--tr);
  outline: none;
}

.header-search input:focus {
  border-color: var(--primary);
  background: var(--white);
  width: 260px;
  box-shadow: 0 0 0 3px rgba(54, 115, 215, .1);
}

.header-search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  pointer-events: none;
  width: 15px;
  height: 15px;
}

.header-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--tr);
  position: relative;
  flex-shrink: 0;
}

.header-icon-btn:hover {
  background: var(--primary-xs);
  color: var(--primary);
  border-color: var(--primary-light);
}

.header-icon-btn svg {
  width: 17px;
  height: 17px;
}

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

.header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  border: 2px solid var(--primary-light);
  transition: var(--tr);
}

.header-avatar:hover {
  border-color: var(--primary);
}

/* ── PAGE ───────────────────────────────────────────────── */
.page-content {
  padding: 20px 24px 40px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.page-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
}

.page-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin: 2px 0 0;
  font-weight: 400;
}

/* ── CARD ───────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.card-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  margin: 1px 0 0;
  font-weight: 400;
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: #fafbfd;
}

.card-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

/* ── STAT CARDS ─────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
  .stat-grid-4,
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .stat-grid-4,
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--tr);
  cursor: default;
}

.stat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.stat-icon.primary {
  background: var(--primary-light);
  color: var(--primary);
}

.stat-icon.success {
  background: var(--success-light);
  color: var(--success);
}

.stat-icon.warning {
  background: var(--warning-light);
  color: var(--warning);
}

.stat-icon.danger {
  background: var(--danger-light);
  color: var(--danger);
}

.stat-icon.info {
  background: var(--info-light);
  color: var(--info);
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 3px;
}

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: var(--tr);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}

.btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

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

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

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-dark);
}

.btn-outline:hover {
  background: var(--body-bg);
  color: var(--text-primary);
}

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

.btn-danger:hover {
  background: #d43f40;
  border-color: #d43f40;
  color: #fff;
}

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

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--body-bg);
  color: var(--text-primary);
}

.btn-sm {
  padding: 5px 11px;
  font-size: 11px;
}

.btn-sm svg {
  width: 13px;
  height: 13px;
}

.btn-lg {
  padding: 10px 22px;
  font-size: 13px;
}

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  justify-content: center;
  flex-shrink: 0;
}

.btn-icon.btn-sm {
  width: 28px;
  height: 28px;
}

/* ── TABLE ──────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrapper::-webkit-scrollbar {
  height: 5px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: #ccd0e0;
  border-radius: 3px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 600px;
}

.admin-table thead tr {
  background: #f7f8fc;
  border-bottom: 2px solid var(--border);
}

.admin-table thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  white-space: nowrap;
  border-right: 1px solid var(--border);
}

.admin-table thead th:last-child {
  border-right: none;
}

.admin-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}

.admin-table tbody tr:last-child {
  border-bottom: none;
}

.admin-table tbody tr:hover {
  background: #f7f9ff;
}

.admin-table tbody td {
  padding: 10px 14px;
  color: var(--text-secondary);
  vertical-align: middle;
  border-right: 1px solid rgba(0, 0, 0, .03);
}

.admin-table tbody td:last-child {
  border-right: none;
}

.td-primary {
  font-weight: 600;
  color: var(--text-primary);
}

.td-num {
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
}

.td-center {
  text-align: center;
}

.row-actions {
  display: flex;
  gap: 4px;
}

.table-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ── FILTER BAR ─────────────────────────────────────────── */
.filter-bar {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 12px 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.filter-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-search {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.filter-search input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 12px;
  color: var(--text-primary);
  background: var(--body-bg);
  outline: none;
  transition: var(--tr);
}

.filter-search input:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(54, 115, 215, .1);
}

.filter-search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  width: 14px;
  height: 14px;
}

.filter-pills {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 5px 11px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--tr);
  white-space: nowrap;
  font-family: var(--font);
}

.filter-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-pill.active {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--white);
}

.filter-tab-toggle {
  display: flex;
  background: var(--body-bg);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}

.filter-tab-btn {
  padding: 5px 12px;
  border-radius: 5px;
  border: none;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--tr);
}

.filter-tab-btn.active {
  background: var(--primary);
  color: var(--white);
}

.filter-tab-btn:not(.active) {
  background: transparent;
  color: var(--text-muted);
}

.filter-tab-btn:not(.active):hover {
  color: var(--text-primary);
}

.filter-advanced {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 150px;
}

.filter-field label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.filter-field select,
.filter-field input[type="date"] {
  padding: 7px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 12px;
  color: var(--text-primary);
  background: var(--body-bg);
  outline: none;
  transition: var(--tr);
}

.filter-field select:focus,
.filter-field input[type="date"]:focus {
  border-color: var(--primary);
  background: var(--white);
}

.filter-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: var(--danger);
  color: #fff;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  margin-left: 4px;
}

/* ── FORM ───────────────────────────────────────────────── */
.form-group {
  margin-bottom: 16px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 5px;
}

.form-label .required {
  color: var(--danger);
}

.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  color: var(--text-primary);
  background: var(--white);
  outline: none;
  transition: var(--tr);
  resize: vertical;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(54, 115, 215, .1);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:disabled {
  background: var(--body-bg);
  cursor: not-allowed;
  opacity: .7;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239aa0bb' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.input-group {
  position: relative;
}

.input-group .form-control {
  padding-left: 36px;
}

.input-group-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  width: 15px;
  height: 15px;
}

/* ── BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .3px;
  white-space: nowrap;
}

.badge-primary {
  background: var(--primary-light);
  color: var(--primary);
}

.badge-success {
  background: var(--success-light);
  color: var(--success);
}

.badge-danger {
  background: var(--danger-light);
  color: var(--danger);
}

.badge-warning {
  background: var(--warning-light);
  color: var(--warning);
}

.badge-info {
  background: var(--info-light);
  color: var(--info);
}

.badge-gray {
  background: #f0f2f7;
  color: var(--text-muted);
}

/* ── AVATAR ─────────────────────────────────────────────── */
.avatar {
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.avatar-md {
  width: 36px;
  height: 36px;
  font-size: 13px;
}

.avatar-lg {
  width: 48px;
  height: 48px;
  font-size: 16px;
}

.avatar-blue {
  background: #deeafd;
  color: #3673d7;
}

.avatar-green {
  background: #ddf6e8;
  color: #28c76f;
}

.avatar-orange {
  background: #fff0e1;
  color: #ff9f43;
}

.avatar-red {
  background: #fce4e4;
  color: #ea5455;
}

.avatar-purple {
  background: #ede4f9;
  color: #9b59b6;
}

.avatar-teal {
  background: #d6f7fb;
  color: #00cfe8;
}

/* ── DRAWER (slide-in form) ─────────────────────────────── */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .3);
  z-index: 1000;
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  max-width: 95vw;
  background: var(--white);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4, 0, .2, 1);
}

.drawer.open {
  transform: translateX(0);
}

.drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafbfd;
  flex-shrink: 0;
}

.drawer-title {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
}

.drawer-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--tr);
}

.drawer-close:hover {
  background: var(--danger-light);
  color: var(--danger);
  border-color: var(--danger-light);
}

.drawer-close svg {
  width: 14px;
  height: 14px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.drawer-body::-webkit-scrollbar {
  width: 4px;
}

.drawer-body::-webkit-scrollbar-thumb {
  background: #ccd0e0;
  border-radius: 2px;
}

.drawer-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  background: #fafbfd;
}

/* ── MODAL ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 460px;
  transform: scale(.95) translateY(8px);
  transition: transform .22s cubic-bezier(.4, 0, .2, 1);
  overflow: hidden;
}

.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}

.modal-body {
  padding: 22px;
}

.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ── PAGINATION ─────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--white);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--tr);
}

.pagination-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
}

.pagination-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.pagination-btn svg {
  width: 13px;
  height: 13px;
}

/* ── MASTER CARDS ───────────────────────────────────────── */
.master-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.master-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--tr);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.master-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(54, 115, 215, .14);
  transform: translateY(-2px);
}

.master-card-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--tr);
}

.master-card:hover .master-card-icon {
  background: var(--primary);
  color: #fff;
}

.master-card-icon svg {
  width: 24px;
  height: 24px;
}

.master-card-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ── CHART GRID ─────────────────────────────────────────── */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.chart-col-12 {
  grid-column: span 12;
}

.chart-col-8 {
  grid-column: span 8;
}

.chart-col-6 {
  grid-column: span 6;
}

.chart-col-4 {
  grid-column: span 4;
}

.chart-container {
  height: 260px;
  width: 100%;
}

.chart-container-sm {
  height: 200px;
  width: 100%;
}

.chart-container-lg {
  height: 340px;
  width: 100%;
}

/* ══════════════════════════════════════════════════════════
   LOGIN PAGE
   Classes used in Login.jsx
   ══════════════════════════════════════════════════════════ */

/* ── Page wrapper ─────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: linear-gradient(145deg, #eef2ff 0%, #f8faff 50%, #e8f0fe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: var(--font);
  position: relative;
  overflow: hidden;
}

/* Subtle grid overlay */
.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(54, 115, 215, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(54, 115, 215, .06) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Glow blob — top right */
.login-page::after {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(54, 115, 215, .12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Glow blob — bottom left (separate element in JSX: .login-blob-bl) */
.login-blob-bl {
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(54, 115, 215, .08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Card ─────────────────────────────────────────────────── */
.login-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(54, 115, 215, .14), 0 2px 12px rgba(0, 0, 0, .06);
  padding: 36px 36px 28px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(54, 115, 215, .1);
  animation: loginFadeUp .4s ease both;
}

@keyframes loginFadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Logo section ─────────────────────────────────────────── */
.login-logo {
  text-align: center;
  margin-bottom: -28px;
}

.login-logo-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.login-logo-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #3673d7 0%, #204789 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(54, 115, 215, .35);
  flex-shrink: 0;
}

.login-logo-svg {
  display: block;
  margin: 0 auto;
}

.login-tagline {
  font-size: 12px;
  color: #9aa0bb;
  margin: 10px 0 0;
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* ── Divider ──────────────────────────────────────────────── */
.login-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, #e8eaf0, transparent);
  margin-bottom: 24px;
}

/* ── Form ─────────────────────────────────────────────────── */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-label {
  font-size: 11px;
  font-weight: 600;
  color: #5a6282;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.login-label svg {
  flex-shrink: 0;
}

/* Input wrapper (for eye toggle) */
.login-input-wrap {
  position: relative;
}

.login-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e8eaf0;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: #1a1d2e;
  background: #f8faff;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  box-sizing: border-box;
}

.login-input::placeholder {
  color: #b0b8d0;
  font-weight: 400;
}

.login-input:focus {
  border-color: #3673d7;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(54, 115, 215, .12);
}

/* Password field has extra right padding for the eye icon */
.login-input-wrap .login-input {
  padding-right: 42px;
}

/* Eye toggle button */
.login-eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #9aa0bb;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 4px;
  background: transparent;
  border: none;
  transition: color .15s ease;
  line-height: 0;
}

.login-eye-btn:hover {
  color: #3673d7;
}

/* ── Error box ────────────────────────────────────────────── */
.login-error {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #fce8e8;
  color: #ea5455;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid rgba(234, 84, 85, .2);
}

.login-error svg {
  flex-shrink: 0;
}

/* ── Submit button ────────────────────────────────────────── */
.login-btn {
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, #3673d7 0%, #204789 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
  box-shadow: 0 4px 14px rgba(54, 115, 215, .4);
  letter-spacing: 0.3px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #204789 0%, #0f2d5c 100%);
  box-shadow: 0 6px 20px rgba(54, 115, 215, .5);
  transform: translateY(-1px);
}

.login-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(54, 115, 215, .35);
}

.login-btn:disabled {
  background: #a0b8e8;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ── Spinner inside button ────────────────────────────────── */
.login-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: loginSpin .7s linear infinite;
  flex-shrink: 0;
}

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

/* ── Footer text ──────────────────────────────────────────── */
.login-footer {
  text-align: center;
  font-size: 11px;
  color: #c5cbe0;
  margin-top: 24px;
  font-weight: 500;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .login-card {
    padding: 28px 20px 22px;
    border-radius: 16px;
  }

  .login-logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .login-input {
    padding: 10px 12px;
    font-size: 12px;
  }

  .login-btn {
    padding: 11px 16px;
    font-size: 12px;
  }
}

/* ══════════════════════════════════════════════════════════
   LAYOUT OVERRIDES — removes old framework conflicts
   ══════════════════════════════════════════════════════════ */

/* Remove the insomniacs watermark that comes from old CSS */
body::before,
body::after,
.theme-wrapper::before,
.theme-wrapper::after,
.theme-content::before,
.theme-content::after {
  display: none !important;
  content: none !important;
}

/* Reset old theme-wrapper if still referenced */
.theme-wrapper {
  display: flex !important;
  min-height: 100vh !important;
  margin-left: 0 !important;
  background: var(--body-bg) !important;
}

/* Old theme-menu-wrapper — collapse it so new sidebar takes over */
.theme-menu-wrapper {
  display: none !important;
}

/* Old theme-header — hide it */
.theme-header:not(.admin-header) {
  display: none !important;
}

/* Old footer — let new footer show */
footer {
  position: static !important;
  left: auto !important;
}

/* Ensure admin-wrapper works correctly */
.admin-wrapper {
  background: var(--body-bg);
}

/* Hide mobile warning div from FootScripts */
.show-mobile {
  display: none;
}

/* ════════════════════════════════════════════════════════════════════════════
   TABLE COMPONENT CLASSES
   Used by: SalesTable, SalesClientTable, SMMTable, CreatorTable,
            ClientTable, SalespersonTable
   ════════════════════════════════════════════════════════════════════════════ */

/* ── theme-table (replaces admin-table in page JSX) ─────────────────────── */
.theme-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.theme-table thead tr {
  background: #f7f8fc;
  border-bottom: 2px solid var(--border);
}

.theme-table thead th {
  padding: 11px 16px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  white-space: nowrap;
}

.theme-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}

.theme-table tbody tr:last-child {
  border-bottom: none;
}

.theme-table tbody tr:hover {
  background: #f4f7ff;
}

.theme-table tbody td {
  padding: 11px 16px;
  color: var(--text-secondary);
  vertical-align: middle;
}

/* ── theme-scrollbar-horizontal ─────────────────────────────────────────── */
.theme-scrollbar-horizontal {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.theme-scrollbar-horizontal::-webkit-scrollbar {
  height: 5px;
}

.theme-scrollbar-horizontal::-webkit-scrollbar-thumb {
  background: #ccd0e0;
  border-radius: 3px;
}

/* ── theme-scrollbar (vertical, used in sidebars) ────────────────────────── */
.theme-scrollbar {
  overflow-y: auto;
}

.theme-scrollbar::-webkit-scrollbar {
  width: 4px;
}

.theme-scrollbar::-webkit-scrollbar-thumb {
  background: #ccd0e0;
  border-radius: 2px;
}

/* ── tag-rounded — person chip (avatar + name in a pill) ─────────────────── */
.tag-rounded-wrapper {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tag-rounded {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 500;
  width: fit-content;
  /* shrinks to content — no stretching */
  max-width: 220px;
  /* cap for very long names */
  min-width: 0;
  overflow: hidden;
}

.tag-rounded-gray {
  background: #f0f2f7;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.tag-rounded b {
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  /* critical — allows ellipsis inside flex */
  flex: 1;
}

/* ── avatar sizes & colors ───────────────────────────────────────────────── */
/* Base already defined above — adding missing sizes + mw-unset override */
.avatar-md {
  width: 32px !important;
  height: 32px !important;
  font-size: 12px !important;
}

.mw-unset {
  max-width: unset !important;
}

/* Auto-color avatars based on first letter — applied via JS getNameAvtarSingle */
/* We rotate through colors by assigning one of these via inline or class */
.avatar {
  font-size: 12px;
  letter-spacing: -0.3px;
}

/* ── Deterministic avatar coloring: cycle via nth-child / sibling selectors  */
/* Each column gets a fixed color so same person always shows same hue       */

/* SMM column → blue */
.theme-table td:nth-child(2) .avatar {
  background: #deeafd;
  color: #3673d7;
}

/* Sales Person column → orange/green */
.theme-table td:nth-child(3) .avatar {
  background: #fff0e1;
  color: #ff9f43;
}

/* Creator column → purple */
.theme-table td:nth-child(4) .avatar {
  background: #ede4f9;
  color: #9b59b6;
}

/* Client column → teal */
.theme-table td:nth-child(6) .avatar {
  background: #d6f7fb;
  color: #00b4cc;
}

/* Team members column — shoot/edit/thumb use distinct colors */
.theme-table td:nth-child(5) .tag-rounded:nth-child(1) .avatar,
.theme-table td.td-team-members .tag-rounded:nth-child(1) .avatar {
  background: #ddf6e8;
  color: #28c76f;
}

.theme-table td:nth-child(5) .tag-rounded:nth-child(2) .avatar,
.theme-table td.td-team-members .tag-rounded:nth-child(2) .avatar {
  background: #fff0e1;
  color: #ff9f43;
}

.theme-table td:nth-child(5) .tag-rounded:nth-child(3) .avatar,
.theme-table td.td-team-members .tag-rounded:nth-child(3) .avatar {
  background: #fce4e4;
  color: #ea5455;
}

/* ── theme-date-list — date display ─────────────────────────────────────── */
/* theme-date-list now uses horizontal cards — see .date-block above */
.theme-date-list {
  display: flex;
  flex-direction: row;
  gap: 6px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.theme-date-item {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-size: 11.5px;
  white-space: nowrap;
}

.theme-date-label {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  min-width: 52px;
}

.theme-date-value {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 12px;
}

/* Compact stacked date display (as seen in screenshot) */
/* ── Date card — image 2 style: day large, month+year below, bordered box ── */
.date-block {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  min-width: 44px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* Top section — day number */
.date-block .date-day {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  padding: 4px 8px 3px;
  width: 100%;
  text-align: center;
}

/* Bottom section — month + year */
.date-block .date-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 2px 6px 3px;
  border-top: 1px solid var(--border);
  background: #f7f8fc;
  gap: 0px;
}

.date-block .date-month {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--text-secondary);
  line-height: 1.2;
}

.date-block .date-year {
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.2;
}

/* Multiple dates stacked */
.theme-date-list {
  display: flex;
  flex-direction: row;
  gap: 6px;
  flex-wrap: wrap;
  align-items: flex-start;
}

/* ── table-actions — edit / delete icon buttons ──────────────────────────── */
.table-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.table-actions a,
.table-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--tr);
  text-decoration: none;
}

.table-actions a:hover,
.table-actions button:hover {
  background: var(--primary-xs);
  color: var(--primary);
  border-color: var(--primary-light);
}

.table-actions a:last-child:hover,
.table-actions button:last-child:hover {
  background: var(--danger-light);
  color: var(--danger);
  border-color: #f5c6c2;
}

.table-actions a svg,
.table-actions button svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* ── view-value — link button in table ───────────────────────────────────── */
.view-value {
  display: inline-flex;
  align-items: center;
}

.view-value a {
  text-decoration: none;
}

/* ── tag / tag-primary — link icon chip ──────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  transition: var(--tr);
}

.tag svg {
  width: 16px;
  height: 16px;
  display: block;
}

.tag-primary {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(54, 115, 215, .2);
}

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

/* ── theme-sidebar — slide-in drawer ─────────────────────────────────────── */
.theme-sidebar {
  position: fixed;
  top: 0;
  right: -440px;
  bottom: 0;
  width: 400px;
  max-width: 96vw;
  background: var(--white);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transition: right .28s cubic-bezier(.4, 0, .2, 1);
}

.theme-sidebar.active {
  right: 0;
}

.theme-sidebar-sm {
  width: 380px;
}

.theme-sidebar-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.theme-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: #fafbfd;
  flex-shrink: 0;
}

.theme-sidebar-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.theme-sidebar-action {
  display: flex;
  align-items: center;
  gap: 8px;
}

.close-sidebar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  transition: var(--tr);
  line-height: 1;
}

.close-sidebar:hover {
  background: var(--danger-light);
  color: var(--danger);
  border-color: #f5c6c2;
}

.theme-sidebar-detail {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.theme-sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
}

/* ── Page header row (px-5 py-4 pattern) ─────────────────────────────────── */
.px-5 {
  padding-left: 20px;
  padding-right: 20px;
}

.py-4 {
  padding-top: 16px;
  padding-bottom: 16px;
}

.mb-5 {
  margin-bottom: 20px;
}

.mb-4 {
  margin-bottom: 16px;
}

/* ── Flexbox utilities (Bulma-style) ─────────────────────────────────────── */
.is-flex {
  display: flex;
}

.is-align-items-center {
  align-items: center;
}

.is-justify-content-space-between {
  justify-content: space-between;
}

.is-justify-content-end {
  justify-content: flex-end;
}

.is-gap-4 {
  gap: 16px;
}

.is-gap-3 {
  gap: 12px;
}

.d-flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.flex-grow-1 {
  flex: 1;
}

/* ── Bulma columns ───────────────────────────────────────────────────────── */
.columns {
  display: flex;
  flex-wrap: wrap;
  margin-left: -8px;
  margin-right: -8px;
}

.columns.is-multiline {
  flex-wrap: wrap;
}

.column {
  padding: 8px;
  flex: 1;
  min-width: 0;
}

.is-12,
.column.is-12 {
  flex: 0 0 100%;
  max-width: 100%;
}

.is-6,
.column.is-6 {
  flex: 0 0 50%;
  max-width: 50%;
}

.is-4,
.column.is-4 {
  flex: 0 0 33.3333%;
  max-width: 33.3333%;
}

.is-8,
.column.is-8 {
  flex: 0 0 66.6667%;
  max-width: 66.6667%;
}

.is-12-mobile {
  flex: 0 0 100%;
  max-width: 100%;
}

/* ── Breadcrumb ──────────────────────────────────────────────────────────── */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 5px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.breadcrumbs li::after {
  content: '/';
  margin-left: 5px;
  color: var(--border-dark);
}

.breadcrumbs li:last-child::after {
  display: none;
}

.breadcrumbs li a {
  color: var(--primary);
}

.breadcrumbs li.active {
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── Typography helpers ──────────────────────────────────────────────────── */
.fs-5 {
  font-size: 15px;
}

.fw-600 {
  font-weight: 600;
}

.lh-1 {
  line-height: 1;
}

.mt-1 {
  margin-top: 4px;
}

.w-100 {
  width: 100%;
}

/* ── col-form spacing inside sidebars ────────────────────────────────────── */
.col-form {
  margin-bottom: 14px;
}

.col-form:last-child {
  margin-bottom: 0;
}

/* ── Pagination row ──────────────────────────────────────────────────────── */
.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: #fafbfd;
  flex-wrap: wrap;
  gap: 8px;
}

.pagination-info {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.login-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: loginSpin .7s linear infinite;
  flex-shrink: 0;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {

  .theme-sidebar,
  .theme-sidebar-sm {
    width: 100%;
    max-width: 100%;
  }

  .theme-table {
    font-size: 12px;
  }

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

  .is-flex.is-justify-content-space-between {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 10px;
  }

  .is-flex.is-align-items-center.is-justify-content-end {
    flex-wrap: wrap;
  }

  .is-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   SIDEBAR FOOTER — Notification + User + Logout
   ════════════════════════════════════════════════════════════════════════════ */

/* Override the old sidebar-footer padding to make room for the new rows */
.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, .07);
  padding: 6px 0 10px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Each row (Notification / User) */
.sidebar-footer-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 18px;
  cursor: pointer;
  transition: background .15s ease;
  border-radius: 0;
  text-decoration: none;
}

.sidebar-footer-row:hover {
  background: rgba(255, 255, 255, .06);
}

/* Clickable user link inside footer row */
.sidebar-user-link {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  cursor: pointer;
  transition: opacity .15s;
}

.sidebar-user-link:hover {
  opacity: .85;
}

/* Leading icon circle */
.sidebar-footer-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .7);
  flex-shrink: 0;
  transition: all .15s ease;
}

.sidebar-footer-row:hover .sidebar-footer-icon {
  border-color: rgba(255, 255, 255, .3);
  color: #fff;
}

/* Label text */
.sidebar-footer-label {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, .75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .15s ease;
}

.sidebar-footer-row:hover .sidebar-footer-label {
  color: #fff;
}

/* Username specifically */
.sidebar-footer-username {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, .85);
}

/* Notification count badge — red pill */
.sidebar-notif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ea5455;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  flex-shrink: 0;
  line-height: 1;
}

/* Thin separator between notification row and user row */
.sidebar-footer-divider {
  height: 1px;
  background: rgba(255, 255, 255, .06);
  margin: 2px 18px;
}

/* Logout icon button (right side of user row) */
.sidebar-logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: rgba(255, 255, 255, .45);
  transition: all .15s ease;
  flex-shrink: 0;
  padding: 0;
}

.sidebar-logout-btn:hover {
  background: rgba(234, 84, 85, .18);
  color: #ea5455;
}

/* Hide the old .sidebar-user styles that conflict */
.sidebar-user {
  display: none !important;
}

/* Mini sidebar — hide labels but keep icons */
.sidebar-mini .sidebar-footer-label,
.sidebar-mini .sidebar-notif-badge,
.sidebar-mini .sidebar-logout-btn {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.sidebar-mini .sidebar-footer-row {
  padding: 10px 14px;
  justify-content: center;
}

.sidebar-mini .sidebar-footer-divider {
  margin: 2px 8px;
}


/* ════════════════════════════════════════════════════════════════════════════
   LAYOUT FIX — footer always at bottom
   ════════════════════════════════════════════════════════════════════════════ */

/* main-content is flex column — header + main (flex:1) + footer */
.main-content>main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ════════════════════════════════════════════════════════════════════════════
   ADMIN FOOTER
   ════════════════════════════════════════════════════════════════════════════ */
.admin-footer {
  padding: 12px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--white);
  font-family: var(--font);
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
  /* never shrink — always stays at the bottom */
  margin-top: auto;
  /* push to bottom when content is short */
}

.admin-footer-copy {
  display: flex;
  align-items: center;
  gap: 4px;
}

.admin-footer-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: var(--tr);
}

.admin-footer-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.admin-footer-made {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
}

.admin-footer-flag {
  display: inline-block;
  border-radius: 2px;
  flex-shrink: 0;
  vertical-align: middle;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .08);
}

/* Responsive */
@media (max-width: 480px) {
  .admin-footer {
    flex-direction: column;
    gap: 4px;
    padding: 10px 16px;
    text-align: center;
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   HEADER — hamburger only on mobile
   ════════════════════════════════════════════════════════════════════════════ */

/* Hide search box completely */
.header-search {
  display: none !important;
}

/* Breadcrumb separator */
.header-breadcrumb-sep {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0 1px;
}

/* ════════════════════════════════════════════════════════════════════════════
   SIDEBAR LOGO — image file replaces icon + text
   ════════════════════════════════════════════════════════════════════════════ */

/* Override the old logo layout to center the image */
.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  height: var(--header-h);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  flex-shrink: 0;
  text-decoration: none;
}

/* The actual logo image */
.sidebar-logo-img {
  width: auto;
  height: 230%;
  object-fit: contain;
  display: block;
  /* Transition for mini sidebar */
  transition: all .22s ease;
  max-width: 140px;
}

/* Hide the old icon box and text (they're removed in JSX but just in case) */
.sidebar-logo-icon,
.sidebar-logo-text {
  display: none !important;
}

/* Mini sidebar — shrink logo to just the icon portion */
.sidebar-mini .sidebar-logo {
  padding: 0 12px;
  justify-content: center;
}

.sidebar-mini .sidebar-logo-img {
  height: 22px;
  max-width: 40px;
  /* Show only the leftmost part of the logo (the icon mark) */
  object-position: left center;
}

/* ════════════════════════════════════════════════════════════════════════════
   LOGIN — Toast notification
   ════════════════════════════════════════════════════════════════════════════ */

.login-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 500;
  min-width: 240px;
  max-width: 360px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .14);
  /* Hidden by default */
  opacity: 0;
  transform: translateX(calc(100% + 32px));
  transition: opacity .3s ease, transform .3s cubic-bezier(.34, 1.56, .64, 1);
  pointer-events: none;
}

/* Slide-in when visible */
.login-toast.login-toast-show {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

/* Success variant */
.login-toast-success {
  background: #ffffff;
  border: 1.5px solid #28c76f;
  color: #1a1d2e;
}

/* Error variant */
.login-toast-error {
  background: #ffffff;
  border: 1.5px solid #ea5455;
  color: #1a1d2e;
}

/* Icon circle */
.login-toast-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.login-toast-icon-success {
  background: #edfaf4;
  color: #28c76f;
}

.login-toast-icon-error {
  background: #fce8e8;
  color: #ea5455;
}

.login-toast-msg {
  flex: 1;
  line-height: 1.4;
}

/* Mobile: toast full-width at bottom */
@media (max-width: 480px) {
  .login-toast {
    top: auto;
    bottom: 20px;
    right: 12px;
    left: 12px;
    transform: translateY(calc(100% + 32px));
    max-width: unset;
    min-width: unset;
  }

  .login-toast.login-toast-show {
    transform: translateY(0);
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   PAGE LOADER — Dark overlay with circular spinner
   Matches screenshot: semi-transparent dark bg + white/orange ring
   ════════════════════════════════════════════════════════════════════════════ */

/* Dark dim overlay — covers entire viewport */
.page-loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(20, 24, 38, 0.65);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: loaderOverlayIn .2s ease;
}

@keyframes loaderOverlayIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* The ring itself — matches screenshot exactly:
   dark circle track + bright white arc with orange tip */
.page-loader-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, .12);
  border-top-color: #ffffff;
  border-right-color: #ff9f43;
  animation: pageLoaderSpin .75s linear infinite;
  position: relative;
}

@keyframes pageLoaderSpin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATION — top-right slide-in
   ════════════════════════════════════════════════════════════════════════════ */

.app-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100000;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 500;
  min-width: 250px;
  max-width: 360px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .18);
  /* Hidden state */
  opacity: 0;
  transform: translateX(calc(100% + 28px));
  transition: opacity .28s ease, transform .28s cubic-bezier(.34, 1.56, .64, 1);
  pointer-events: none;
}

.app-toast.app-toast-visible {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

/* Success */
.app-toast-success {
  background: #ffffff;
  border-left: 4px solid #28c76f;
  color: #1a1d2e;
}

/* Error */
.app-toast-error {
  background: #ffffff;
  border-left: 4px solid #ea5455;
  color: #1a1d2e;
}

/* Icon bubble */
.app-toast-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-toast-icon-success {
  background: #edfaf4;
  color: #28c76f;
}

.app-toast-icon-error {
  background: #fce8e8;
  color: #ea5455;
}

.app-toast-body {
  flex: 1;
}

.app-toast-title {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.3;
  color: #1a1d2e;
}

.app-toast-msg {
  font-size: 12px;
  color: #5a6282;
  margin-top: 2px;
  line-height: 1.4;
}

/* Mobile */
@media (max-width: 480px) {
  .app-toast {
    top: auto;
    bottom: 16px;
    right: 12px;
    left: 12px;
    max-width: unset;
    min-width: unset;
    transform: translateY(calc(100% + 24px));
  }

  .app-toast.app-toast-visible {
    transform: translateY(0);
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   PAGE LOADER OVERLAY  —  rl = runr-loader
   Dark dim overlay + theme-blue ring (no orange, matches --primary: #3673d7)
   ════════════════════════════════════════════════════════════════════════════ */
.rl-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 36, 0.62);
  /* same dark as sidebar */
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: rlFadeIn .18s ease;
}

@keyframes rlFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Ring — white arc + theme-blue leading edge */
.rl-ring {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, .15);
  /* dim track */
  border-top-color: #ffffff;
  /* white arc */
  border-right-color: #3673d7;
  /* blue tip (theme primary) */
  animation: rlSpin .75s linear infinite;
}

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

/* ════════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATION  —  rl-toast
   Slides in from top-right, green for success, red for error
   ════════════════════════════════════════════════════════════════════════════ */
.rl-toast {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 100000;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 12px;
  border-radius: 10px;
  background: #ffffff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 240px;
  max-width: 340px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .16);
  /* hidden → slide-in transition */
  opacity: 0;
  transform: translateX(calc(100% + 28px));
  transition: opacity .28s ease, transform .28s cubic-bezier(.34, 1.56, .64, 1);
  pointer-events: none;
}

.rl-toast.rl-toast-in {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

/* Coloured left border */
.rl-toast-success {
  border-left: 4px solid var(--success);
}

.rl-toast-error {
  border-left: 4px solid var(--danger);
}

/* Icon dot */
.rl-toast-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rl-toast-dot-success {
  background: var(--success-light);
  color: var(--success);
}

.rl-toast-dot-error {
  background: var(--danger-light);
  color: var(--danger);
}

.rl-toast-msg {
  flex: 1;
  line-height: 1.45;
}

/* Mobile — slide up from bottom */
@media (max-width: 480px) {
  .rl-toast {
    top: auto;
    bottom: 16px;
    right: 12px;
    left: 12px;
    max-width: unset;
    min-width: unset;
    transform: translateY(calc(100% + 24px));
  }

  .rl-toast.rl-toast-in {
    transform: translateY(0);
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   LOGIN LOGO — img file replaces inline SVG
   ════════════════════════════════════════════════════════════════════════════ */

/* Override the logo div to center the image properly */
.login-logo {
  text-align: center;
  margin-bottom: -28px;
}

/* Logo image — sized to look clean on the login card */
.login-logo-img {
  width: 70%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Hide old SVG if it somehow still renders */
.login-logo-svg {
  display: none !important;
}

/* ════════════════════════════════════════════════════════════════════════════
   PAGE LOADER OVERLAY  (rl = runr-loader) — blue theme ring
   ════════════════════════════════════════════════════════════════════════════ */
.rl-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 36, 0.62);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: rlFadeIn .18s ease;
}

@keyframes rlFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.rl-ring {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, .15);
  border-top-color: #ffffff;
  border-right-color: #3673d7;
  animation: rlSpin .75s linear infinite;
}

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

/* ════════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATION
   ════════════════════════════════════════════════════════════════════════════ */
.rl-toast {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 100000;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 12px;
  border-radius: 10px;
  background: #ffffff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 240px;
  max-width: 340px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .16);
  opacity: 0;
  transform: translateX(calc(100% + 28px));
  transition: opacity .28s ease, transform .28s cubic-bezier(.34, 1.56, .64, 1);
  pointer-events: none;
}

.rl-toast.rl-toast-in {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.rl-toast-success {
  border-left: 4px solid var(--success);
}

.rl-toast-error {
  border-left: 4px solid var(--danger);
}

.rl-toast-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rl-toast-dot-success {
  background: var(--success-light);
  color: var(--success);
}

.rl-toast-dot-error {
  background: var(--danger-light);
  color: var(--danger);
}

.rl-toast-msg {
  flex: 1;
  line-height: 1.45;
}

@media (max-width: 480px) {
  .rl-toast {
    top: auto;
    bottom: 16px;
    right: 12px;
    left: 12px;
    max-width: unset;
    min-width: unset;
    transform: translateY(calc(100% + 24px));
  }

  .rl-toast.rl-toast-in {
    transform: translateY(0);
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile sidebar + hamburger (single authoritative block)
   ════════════════════════════════════════════════════════════════════════════ */

/* Hamburger — hidden on desktop by default */
.header-hamburger {
  display: none !important;
}

/* ── Mobile ≤ 768px ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Show the 3-line hamburger */
  .header-hamburger {
    display: flex !important;
  }

  /* Sidebar slides in from left — hidden off-screen by default */
  .sidebar {
    transform: translateX(-100%) !important;
    width: var(--sidebar-w) !important;
    transition: transform .28s cubic-bezier(.4, 0, .2, 1) !important;
  }

  /* Sidebar open state — triggered by .mobile-open class from MasterLayout */
  .sidebar.mobile-open {
    transform: translateX(0) !important;
    box-shadow: 6px 0 28px rgba(0, 0, 0, .35);
  }

  /* Main content takes full width — no left margin */
  .main-content {
    margin-left: 0 !important;
  }

  /* Sidebar mini mode has no effect on mobile */
  .sidebar-mini .main-content {
    margin-left: 0 !important;
  }

  /* Dark overlay behind open sidebar */
  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 199;
    animation: overlayFadeIn .2s ease;
  }

  @keyframes overlayFadeIn {
    from {
      opacity: 0;
    }

    to {
      opacity: 1;
    }
  }

  /* Page header row — stack on small screens */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* Filter bar pills wrap */
  .filter-pills {
    gap: 6px;
  }

  /* Table full width scroll */
  .table-wrapper,
  .theme-scrollbar-horizontal {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Drawer full width on mobile */
  .drawer,
  .theme-sidebar,
  .theme-sidebar-sm {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Pagination center on mobile */
  #pagination {
    justify-content: center !important;
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
}

/* ── Desktop ≥ 769px ─────────────────────────────────────────────────────── */
@media (min-width: 769px) {

  /* Hamburger always hidden on desktop */
  .header-hamburger {
    display: none !important;
  }

  /* Sidebar always visible on desktop — not off-canvas */
  .sidebar {
    transform: translateX(0) !important;
  }

  /* Overlay never shown on desktop */
  .sidebar-overlay {
    display: none !important;
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   SIDEBAR COLLAPSE TOGGLE
   ════════════════════════════════════════════════════════════════════════════ */

/* Logo row — logo on left, collapse btn on right */
.sidebar-logo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  flex-shrink: 0;
  padding: 0 6px 0 0;
  transition: padding .25s ease;
}

/* Keep existing sidebar-logo styles but remove its border-bottom (now on row) */
.sidebar-logo-row .sidebar-logo {
  border-bottom: none;
  height: 100%;
  flex: 1;
  min-width: 0;
}

/* ── Collapse button ─────────────────────────────────────────────────────── */
.sidebar-collapse-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: transparent;
  cursor: pointer;
  color: rgba(255, 255, 255, .5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .2s ease;
  padding: 0;
  margin-right: 8px;
}

.sidebar-collapse-btn:hover {
  background: rgba(255, 255, 255, .1);
  color: #fff;
  border-color: rgba(255, 255, 255, .25);
}

/* Mini state — hide the logo image text portion, center the btn */
.sidebar-mini .sidebar-logo-row {
  padding: 0;
  justify-content: center;
  flex-direction: column;
  gap: 0;
  height: auto;
  padding-top: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.sidebar-mini .sidebar-logo-row .sidebar-logo {
  height: 36px;
  padding: 0;
  justify-content: center;
}

.sidebar-mini .sidebar-collapse-btn {
  margin: 6px auto 0;
  display: flex;
}

/* Logo image sizing */
.sidebar-logo-img {
  width: auto;
  height: 215%;
  object-fit: contain;
  display: block;
  transition: all .22s ease;
}

.sidebar-mini .sidebar-logo-img {
  height: 71px;
  max-width: 78px;
  object-position: left center;
}

/* Hide collapse button on mobile — not needed there */
@media screen and (max-width: 768px) {
  .sidebar-collapse-btn {
    display: none;
  }

  .sidebar-logo-row {
    flex-direction: row;
    height: var(--header-h);
    padding: 0;
  }

  .sidebar-logo-row .sidebar-logo {
    padding: 0 18px;
    height: 100%;
    justify-content: flex-start;
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   RESPONSIVE LAYOUT — Mobile sidebar + hamburger
   ════════════════════════════════════════════════════════════════════════════ */

/* Hamburger — hidden on desktop */
.header-hamburger {
  display: none;
}

/* Overlay — hidden by default */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 199;
  cursor: pointer;
}

/* ── Mobile ≤ 768px ──────────────────────────────────────────────────────── */
@media screen and (max-width: 768px) {

  .header-hamburger {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
    color: var(--text-secondary);
    flex-shrink: 0;
  }

  .sidebar {
    transform: translateX(-100%) !important;
    width: var(--sidebar-w) !important;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 500;
    transition: transform .28s cubic-bezier(.4, 0, .2, 1) !important;
  }

  .sidebar.mobile-open {
    transform: translateX(0) !important;
    box-shadow: 8px 0 32px rgba(0, 0, 0, .4);
  }

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

  .sidebar-mini .main-content {
    margin-left: 0 !important;
  }

  .sidebar-overlay {
    display: block;
  }
}

/* ── Desktop ≥ 769px ─────────────────────────────────────────────────────── */
@media screen and (min-width: 769px) {
  .header-hamburger {
    display: none !important;
  }

  .sidebar {
    transform: translateX(0) !important;
  }

  .sidebar-overlay {
    display: none !important;
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   PAGE LOADER + TOAST
   ════════════════════════════════════════════════════════════════════════════ */
.rl-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 36, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: rlFadeIn .18s ease;
}

@keyframes rlFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.rl-ring {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, .15);
  border-top-color: #fff;
  border-right-color: #3673d7;
  animation: rlSpin .75s linear infinite;
}

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

.rl-toast {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 100000;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 12px;
  border-radius: 10px;
  background: #fff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 240px;
  max-width: 340px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .16);
  opacity: 0;
  transform: translateX(calc(100% + 28px));
  transition: opacity .28s ease, transform .28s cubic-bezier(.34, 1.56, .64, 1);
  pointer-events: none;
}

.rl-toast.rl-toast-in {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.rl-toast-success {
  border-left: 4px solid var(--success);
}

.rl-toast-error {
  border-left: 4px solid var(--danger);
}

.rl-toast-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rl-toast-dot-success {
  background: var(--success-light);
  color: var(--success);
}

.rl-toast-dot-error {
  background: var(--danger-light);
  color: var(--danger);
}

.rl-toast-msg {
  flex: 1;
  line-height: 1.45;
}

/* ════════════════════════════════════════════════════════════════════════════
   HEADER — DESKTOP hidden, MOBILE only
   On desktop: sidebar handles navigation, page titles are in page content
   On mobile: header shows hamburger + current page name
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Desktop: hide header completely ─────────────────────────────────────── */
@media screen and (min-width: 769px) {
  .admin-header {
    display: none !important;
  }

  /* Remove the top spacing that the header was occupying */
  .main-content {
    padding-top: 0;
  }
}

/* ── Mobile: show header — clean strip with hamburger + page name ─────────── */
@media screen and (max-width: 768px) {

  .admin-header {
    display: flex !important;
    position: sticky;
    top: 0;
    z-index: 100;
    height: 52px;
    background: var(--sidebar-bg);
    /* dark — matches sidebar for continuity */
    border-bottom: none;
    padding: 0 16px;
    gap: 10px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, .25);
  }

  /* Hamburger on mobile header — white icon on dark bg */
  .header-hamburger {
    display: inline-flex !important;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, .15);
    background: transparent;
    cursor: pointer;
    color: rgba(255, 255, 255, .85);
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .15s ease;
  }

  .header-hamburger:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
  }

  /* Breadcrumb on dark mobile header */
  .header-breadcrumb {
    color: rgba(255, 255, 255, .55);
    font-size: 12px;
  }

  .header-breadcrumb .current {
    color: #fff;
    font-weight: 700;
  }

  .header-breadcrumb-sep {
    color: rgba(255, 255, 255, .3);
  }

  /* Main content — no top offset since header is sticky */
  .main-content {
    margin-left: 0 !important;
  }

  .sidebar-mini .main-content {
    margin-left: 0 !important;
  }

  /* Sidebar off-canvas */
  .sidebar {
    transform: translateX(-100%) !important;
    width: var(--sidebar-w) !important;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 500;
    transition: transform .28s cubic-bezier(.4, 0, .2, 1) !important;
  }

  .sidebar.mobile-open {
    transform: translateX(0) !important;
    box-shadow: 8px 0 32px rgba(0, 0, 0, .4);
  }

  /* Overlay */
  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 199;
    cursor: pointer;
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   BUTTON ICON ALIGNMENT — icons inside buttons sit inline with text
   ════════════════════════════════════════════════════════════════════════════ */

/* All buttons with SVG inside get proper icon+text alignment */
.btn svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* btn-secondary alias → same as btn-outline */
.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border-dark);
}

.btn-secondary:hover {
  background: var(--body-bg);
  color: var(--text-primary);
}

/* ════════════════════════════════════════════════════════════════════════════
   HEADER — DESKTOP hidden, MOBILE only
   ════════════════════════════════════════════════════════════════════════════ */
@media screen and (min-width: 769px) {
  .admin-header {
    display: none !important;
  }
}

@media screen and (max-width: 768px) {
  .admin-header {
    display: flex !important;
    position: sticky;
    top: 0;
    z-index: 100;
    height: 52px;
    background: var(--sidebar-bg);
    border-bottom: none;
    padding: 0 16px;
    gap: 10px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, .25);
  }

  .header-hamburger {
    display: inline-flex !important;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, .15);
    background: transparent;
    cursor: pointer;
    color: rgba(255, 255, 255, .85);
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .header-breadcrumb {
    color: rgba(255, 255, 255, .55);
    font-size: 12px;
  }

  .header-breadcrumb .current {
    color: #fff;
    font-weight: 700;
  }

  .header-breadcrumb-sep {
    color: rgba(255, 255, 255, .3);
  }

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

  .sidebar-mini .main-content {
    margin-left: 0 !important;
  }

  .sidebar {
    transform: translateX(-100%) !important;
    width: var(--sidebar-w) !important;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 500;
    transition: transform .28s cubic-bezier(.4, 0, .2, 1) !important;
  }

  .sidebar.mobile-open {
    transform: translateX(0) !important;
    box-shadow: 8px 0 32px rgba(0, 0, 0, .4);
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 199;
    cursor: pointer;
  }
}

@media screen and (min-width: 769px) {
  .header-hamburger {
    display: none !important;
  }

  .sidebar {
    transform: translateX(0) !important;
  }

  .sidebar-overlay {
    display: none !important;
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   TABLE SKELETON LOADER — shimmer rows while data is fetching
   ════════════════════════════════════════════════════════════════════════════ */

@keyframes shimmer {
  0% {
    background-position: -600px 0;
  }

  100% {
    background-position: 600px 0;
  }
}

/* Base shimmer class */
.skeleton {
  display: inline-block;
  border-radius: 5px;
  background: linear-gradient(90deg, #f0f2f7 25%, #e4e7ef 50%, #f0f2f7 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

/* Table wrapper */
.table-skeleton {
  width: 100%;
  border-collapse: collapse;
}

.table-skeleton thead tr {
  background: #f7f8fc;
  border-bottom: 2px solid var(--border);
}

.table-skeleton thead th {
  padding: 11px 16px;
}

.table-skeleton tbody tr {
  border-bottom: 1px solid var(--border);
}

.table-skeleton tbody td {
  padding: 13px 16px;
  vertical-align: middle;
}

/* Darker shimmer for thead */
.sk-th {
  height: 9px;
  border-radius: 4px;
  display: block;
  background: linear-gradient(90deg, #e4e7ef 25%, #d8dce8 50%, #e4e7ef 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

/* Plain text line */
.sk-line {
  height: 11px;
  border-radius: 5px;
  display: block;
}

/* Avatar circle */
.sk-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: block;
}

/* Chip pill (avatar + text) */
.sk-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: #f0f2f7;
  border: 1px solid var(--border);
}

.sk-chip-text {
  height: 10px;
  border-radius: 4px;
  display: block;
}

/* Date block */
.sk-date {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sk-date-top {
  height: 9px;
  width: 28px;
  border-radius: 3px;
  display: block;
}

.sk-date-mid {
  height: 18px;
  width: 24px;
  border-radius: 4px;
  display: block;
}

.sk-date-bot {
  height: 9px;
  width: 28px;
  border-radius: 3px;
  display: block;
}

/* Icon box (action buttons) */
.sk-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: block;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */
.table-loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 52px 20px;
  min-height: 180px;
}

.table-loading-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  font-family: var(--font);
}

/* ════════════════════════════════════════════════════════════════════════════
   DATE PAIR — compact side-by-side Created / Updated dates in table
   ════════════════════════════════════════════════════════════════════════════ */

/* Wrapper — two cards side by side */
.date-pair {
  display: flex;
  flex-direction: row;
  gap: 6px;
  align-items: flex-start;
}

/* Each card + its label stacked */
.date-pair-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

/* Small label above each card */
.date-pair-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Make date-block smaller when inside a pair */
.date-pair .date-block {
  min-width: 38px;
}

.date-pair .date-block .date-day {
  font-size: 12px;
  padding: 3px 6px 2px;
}

.date-pair .date-block .date-bottom {
  padding: 2px 6px 3px;
}

.date-pair .date-block .date-month {
  font-size: 8px;
}

.date-pair .date-block .date-year {
  font-size: 8px;
}

/* ════════════════════════════════════════════════════════════════════════════
   DRAWER FOOTER BAR — pinned action buttons at bottom of all sidebars
   ════════════════════════════════════════════════════════════════════════════ */

.drawer-footer-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: #fafbfd;
  flex-shrink: 0;
}

.drawer-footer-bar .btn {
  min-width: 90px;
  justify-content: center;
}

/* Remove old w-100 stretch if any remain */
.theme-sidebar-content .btn.w-100,
.theme-sidebar-content .btn-primary.w-100,
.theme-sidebar-content .btn-danger.w-100 {
  width: auto !important;
}

.error-text {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--danger, #ea5455);
  font-family: var(--font);
  line-height: 1.4;
}

/* Red border on invalid input/select/textarea */
.form-control.is-invalid {
  border-color: var(--danger, #ea5455) !important;
  background-color: #fff8f8;
}

.form-control.is-invalid:focus {
  border-color: var(--danger, #ea5455) !important;
  box-shadow: 0 0 0 3px rgba(234, 84, 85, .12);
  outline: none;
}

/* ════════════════════════════════════════════════════════════════════════════
   SIDEBAR FORM SCROLL — content scrolls, footer always pinned at bottom
   ════════════════════════════════════════════════════════════════════════════ */

/* Sidebar always full viewport height */
.theme-sidebar,
.theme-sidebar-sm {
  top: 0;
  bottom: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Card fills full height */
.theme-sidebar-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header — fixed at top, never shrinks */
.theme-sidebar-header {
  flex-shrink: 0;
}

/* Detail — fills remaining height between header and footer */
.theme-sidebar-detail {
  flex: 1;
  min-height: 0;
  /* critical — allows flex child to shrink below content size */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Form fills the detail area */
.theme-sidebar-detail .form,
.theme-sidebar-detail form {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Scrollable content area */
.theme-sidebar-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px;
  -webkit-overflow-scrolling: touch;
  /* smooth scroll on iOS */
}

/* Custom scrollbar for sidebar content */
.theme-sidebar-content::-webkit-scrollbar {
  width: 4px;
}

.theme-sidebar-content::-webkit-scrollbar-track {
  background: transparent;
}

.theme-sidebar-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, .12);
  border-radius: 4px;
}

.theme-sidebar-content::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, .22);
}

/* Footer — always pinned at bottom, never scrolls */
.drawer-footer-bar {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: #fafbfd;
}

.drawer-footer-bar .btn {
  min-width: 90px;
  justify-content: center;
}

/* ── Responsive — mobile full width drawer ───────────────────────────────── */
@media screen and (max-width: 768px) {

  .theme-sidebar,
  .theme-sidebar-sm {
    width: 100% !important;
    max-width: 100% !important;
    right: -100% !important;
  }

  .theme-sidebar.active,
  .theme-sidebar-sm.active {
    right: 0 !important;
  }

  .theme-sidebar-content {
    padding: 14px;
  }

  .drawer-footer-bar {
    padding: 12px 14px;
  }
}



/* ══════════════════════════════════════════════════════════════════
   SALESPERSON + SMM DASHBOARD CSS
   sp- prefix = shared between both dashboards
   ══════════════════════════════════════════════════════════════════ */

/* ── Main wrapper ────────────────────────────────────────────────── */
.sp-dashboard {
  padding: 20px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ── Welcome Banner ──────────────────────────────────────────────── */
.sp-welcome {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
  border-radius: 12px;
  padding: 20px 24px;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 102, 204, 0.3);
}

.sp-welcome-smm {
  background: linear-gradient(135deg, #0e7490 0%, #0b5e74 100%);
  box-shadow: 0 4px 16px rgba(14, 116, 144, 0.3);
}

.sp-welcome-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.sp-welcome-avatar-smm {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.sp-welcome-name {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
  color: #fff;
}

.sp-welcome-role {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Stat Grid ───────────────────────────────────────────────────── */
.sp-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.sp-stat-grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

.sp-stat-card {
  background: #fff;
  border: 1px solid #dde1e9;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.15s, transform 0.15s;
}

.sp-stat-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.sp-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sp-stat-icon svg {
  width: 18px;
  height: 18px;
}

.sp-icon-blue {
  background: #e6f0fb;
  color: #0066cc;
}

.sp-icon-green {
  background: #e3fcef;
  color: #00875a;
}

.sp-icon-purple {
  background: #ede4f9;
  color: #7c3aed;
}

.sp-icon-orange {
  background: #fef3c7;
  color: #b45309;
}

.sp-icon-teal {
  background: #e0f2fe;
  color: #0e7490;
}

.sp-stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8a94a6;
  margin-bottom: 4px;
}

.sp-stat-value {
  font-size: 26px;
  font-weight: 700;
  color: #1a1f2e;
  line-height: 1;
  font-family: 'IBM Plex Mono', monospace;
}

/* ── Card ────────────────────────────────────────────────────────── */
.sp-card {
  background: #fff;
  border: 1px solid #dde1e9;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.sp-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #eef0f4;
}

.sp-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #1a1f2e;
}

.sp-card-badge {
  background: #e6f0fb;
  color: #0066cc;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
}

.sp-card-body {
  padding: 16px 18px;
}

/* ── Row layouts ─────────────────────────────────────────────────── */
.sp-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.sp-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

.sp-card-chart-lg {
  grid-column: span 1;
}

/* ── Bar Chart ───────────────────────────────────────────────────── */
.sp-bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 8px;
  height: 160px;
  padding: 0 8px;
}

.sp-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.sp-bar-track {
  width: 100%;
  max-width: 48px;
  height: 120px;
  background: #f3f5f8;
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.sp-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, #0066cc, #3388dd);
  border-radius: 6px 6px 0 0;
  transition: height 0.6s ease;
  min-height: 4px;
}

.sp-bar-fill-smm {
  background: linear-gradient(180deg, #0e7490, #17a2b8);
}

.sp-bar-count {
  font-size: 11px;
  font-weight: 600;
  color: #4a5568;
}

.sp-bar-label {
  font-size: 10px;
  color: #8a94a6;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ── Top List ────────────────────────────────────────────────────── */
.sp-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f5f8;
}

.sp-top-row:last-child {
  border-bottom: none;
}

.sp-top-rank {
  font-size: 11px;
  font-weight: 700;
  color: #8a94a6;
  width: 24px;
  text-align: right;
  flex-shrink: 0;
}

.sp-top-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0066cc;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.sp-top-name {
  flex: 1;
  font-size: 13px;
  color: #1a1f2e;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp-top-count {
  font-size: 13px;
  font-weight: 700;
  color: #0066cc;
  font-family: 'IBM Plex Mono', monospace;
  flex-shrink: 0;
}

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

.sp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.sp-table thead tr {
  background: #f8f9fb;
  border-bottom: 1.5px solid #dde1e9;
}

.sp-table thead th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: #8a94a6;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.sp-table tbody tr {
  border-bottom: 1px solid #eef0f4;
  transition: background 0.1s;
}

.sp-table tbody tr:last-child {
  border-bottom: none;
}

.sp-table tbody tr:hover td {
  background: #f8f9fb;
}

.sp-table tbody td {
  padding: 10px 16px;
  color: #1a1f2e;
  vertical-align: middle;
}

.sp-td-num {
  color: #8a94a6 !important;
  font-size: 12px !important;
  font-weight: 600;
  width: 40px;
}

.sp-td-date {
  color: #4a5568 !important;
  font-size: 12.5px !important;
  white-space: nowrap;
}

.sp-table-empty {
  text-align: center;
  padding: 40px !important;
  color: #8a94a6;
  font-size: 13px;
}

/* ── Chip ────────────────────────────────────────────────────────── */
.sp-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.sp-chip-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #0066cc;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.sp-chip-green {
  background: #00875a !important;
}

.sp-chip-purple {
  background: #7c3aed !important;
}

.sp-chip-teal {
  background: #0e7490 !important;
}

.sp-chip-orange {
  background: #b45309 !important;
}

/* ── Link ────────────────────────────────────────────────────────── */
.sp-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #0066cc;
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  padding: 3px 8px;
  background: #e6f0fb;
  border-radius: 4px;
  transition: all 0.15s;
}

.sp-link:hover {
  background: #0066cc;
  color: #fff;
}

/* ── Skeleton ────────────────────────────────────────────────────── */
@keyframes shimmer {
  0% {
    background-position: -600px 0;
  }

  100% {
    background-position: 600px 0;
  }
}

.sp-skeleton-val {
  display: inline-block;
  width: 50px;
  height: 22px;
  border-radius: 4px;
  background: linear-gradient(90deg, #eef0f4 25%, #e4e7ef 50%, #eef0f4 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

.sp-skeleton-line {
  display: block;
  height: 11px;
  border-radius: 5px;
  background: linear-gradient(90deg, #eef0f4 25%, #e4e7ef 50%, #eef0f4 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  width: 80%;
}

.sp-skeleton-chart {
  height: 160px;
  border-radius: 6px;
  background: linear-gradient(90deg, #eef0f4 25%, #e4e7ef 50%, #eef0f4 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

/* ── Error / Empty ───────────────────────────────────────────────── */
.sp-error {
  background: #fdecea;
  color: #c0392b;
  border: 1px solid rgba(192, 57, 43, 0.2);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
}

.sp-empty {
  text-align: center;
  padding: 32px 20px;
  color: #8a94a6;
  font-size: 13px;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .sp-stat-grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }

  .sp-row-3 {
    grid-template-columns: 1fr 1fr;
  }

  .sp-card-chart-lg {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  .sp-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sp-stat-grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }

  .sp-row-2 {
    grid-template-columns: 1fr;
  }

  .sp-row-3 {
    grid-template-columns: 1fr;
  }

  .sp-card-chart-lg {
    grid-column: span 1;
  }
}

@media (max-width: 480px) {
  .sp-dashboard {
    padding: 14px 14px 32px;
  }

  .sp-welcome {
    flex-direction: column;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    text-align: left;
    padding: 16px;
    gap: 10px;
  }

  .sp-stat-grid,
  .sp-stat-grid-5 {
    grid-template-columns: 1fr 1fr;
  }

  .sp-welcome-name {
    font-size: 15px;
  }

  .sp-row-2 {
    grid-template-columns: 1fr;
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   SALESCLIENTTABLE — Design Fixes
   ════════════════════════════════════════════════════════════════════════════ */

/* ── 1. Date blocks — smaller, compact ──────────────────────────────────────── */
.date-block {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  background: var(--white) !important;
  min-width: 36px !important;
  max-width: 44px !important;
  overflow: hidden !important;
  box-shadow: none !important;
}

.date-block .date-day {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  line-height: 1 !important;
  padding: 3px 6px 2px !important;
  width: 100% !important;
  text-align: center !important;
}

.date-block .date-bottom {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
  padding: 1px 4px 2px !important;
  border-top: 1px solid var(--border) !important;
  background: #f7f8fc !important;
  gap: 0 !important;
}

.date-block .date-month {
  font-size: 8px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .3px !important;
  color: var(--text-secondary) !important;
  line-height: 1.2 !important;
}

.date-block .date-year {
  font-size: 7px !important;
  color: var(--text-muted) !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
}

/* Date list — horizontal, compact */
.theme-date-list {
  display: flex !important;
  flex-direction: row !important;
  gap: 4px !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
}

/* ── 2. Payment Status badges ────────────────────────────────────────────────── */
.badge-pending {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: var(--warning-light);
  color: var(--warning);
  white-space: nowrap;
}

.badge-partial {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: var(--info-light);
  color: var(--info);
  white-space: nowrap;
}

.badge-paid {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: var(--success-light);
  color: var(--success);
  white-space: nowrap;
}

/* ── 3. Amount cell — compact multi-line display ─────────────────────────────── */
.amount-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  white-space: nowrap;
}

.amount-cell .amount-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.amount-cell .amount-label {
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 600;
  min-width: 60px;
}

.amount-cell .amount-value {
  font-weight: 600;
  color: var(--text-primary);
}

.amount-cell .amount-received {
  color: var(--success);
}

.amount-cell .amount-pending {
  color: var(--danger);
}

/* ── 4. Actions column — stack vertically, clean buttons ─────────────────────── */
.deal-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
}

.deal-actions .btn {
  padding: 4px 10px !important;
  font-size: 11px !important;
  white-space: nowrap;
}

/* ── 5. Activity button ───────────────────────────────────────────────────────── */
.activity-hover-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-activity {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  background: var(--primary-xs);
  color: var(--primary);
  border: 1px solid var(--primary-light);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--tr);
  text-decoration: none;
}

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

/* ── 6. Deal type badge ──────────────────────────────────────────────────────── */
.deal-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: var(--primary-xs);
  color: var(--primary);
  white-space: nowrap;
}

/* ── 7. Table column widths for SalesClient ──────────────────────────────────── */
.theme-table th:nth-child(1) {
  width: 48px;
}

/* ID */
.theme-table th:nth-child(2) {
  min-width: 140px;
}

/* Client */
.theme-table th:nth-child(3) {
  min-width: 90px;
}

/* Deal Type */
.theme-table th:nth-child(4) {
  min-width: 160px;
}

/* Amount */
.theme-table th:nth-child(5) {
  min-width: 100px;
}

/* Payment Mode */
.theme-table th:nth-child(6) {
  min-width: 100px;
}

/* Payment Status */
.theme-table th:nth-child(7) {
  min-width: 110px;
}

/* Activity */
.theme-table th:nth-child(8) {
  min-width: 60px;
}

/* Start Date */
.theme-table th:nth-child(9) {
  min-width: 60px;
}

/* End Date */
.theme-table th:nth-child(10) {
  min-width: 80px;
}

/* Payment Date */
.theme-table th:nth-child(11) {
  min-width: 80px;
}

/* Date */
.theme-table th:nth-child(12) {
  min-width: 110px;
}

/* Actions */

/* ── 8. Remove mt-20-percent utility ─────────────────────────────────────────── */
.mt-20-percent {
  margin-top: 0 !important;
}
/* ══════════════════════════════════════════════════════════════════════
   MEETING TABLE — RESPONSIVE CARDS (mobile ≤ 768px)
══════════════════════════════════════════════════════════════════════ */

/* Desktop: show table, hide cards */
.meeting-table-desktop { display: block; }
.meeting-cards-mobile  { display: none;  }

/* ── Meeting Card ─────────────────────────────────────────────────── */
.meeting-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 0 16px 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}
.meeting-card:hover { box-shadow: var(--shadow); }

.meeting-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: #fafbfd;
  gap: 10px;
}

.meeting-card-body {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.meeting-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f0f2f7;
  gap: 12px;
}
.meeting-card-row:last-child { border-bottom: none; }

.meeting-card-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.meeting-card-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  text-align: right;
}

.meeting-card-footer {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: #fafbfd;
}

/* Mobile: hide table, show cards */
@media (max-width: 768px) {
  .meeting-table-desktop { display: none !important; }
  .meeting-cards-mobile  { display: block; padding-top: 12px; }
}

/* ════════════════════════════════════════════════════════════════════════════
   DASHBOARD REDESIGN — Welcome Banner, Enhanced Stat Cards, Section Headers
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Welcome Banner ──────────────────────────────────────────────────────── */
.welcome-banner {
  background: linear-gradient(135deg, #3673d7 0%, #1a4fa8 100%);
  border-radius: var(--radius-lg);
  padding: 22px 28px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 4px 20px rgba(54, 115, 215, .3);
  position: relative;
  overflow: hidden;
}

.welcome-banner::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  pointer-events: none;
}

.welcome-banner::before {
  content: '';
  position: absolute;
  bottom: -40px;
  right: 80px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .04);
  pointer-events: none;
}

.welcome-left {
  position: relative;
  z-index: 1;
}

.welcome-greeting {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
  line-height: 1.2;
}

.welcome-date {
  font-size: 12px;
  color: rgba(255, 255, 255, .72);
  font-weight: 400;
}

.welcome-right {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.welcome-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  backdrop-filter: blur(4px);
}

.welcome-stat-pill svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ── Enhanced Stat Cards ─────────────────────────────────────────────────── */
.stat-card {
  position: relative;
  overflow: hidden;
  flex-direction: column;
  padding: 0;
}

.stat-top-bar {
  height: 3px;
  width: 100%;
  border-radius: 0;
}

.stat-top-bar.primary { background: var(--primary); }
.stat-top-bar.success { background: var(--success); }
.stat-top-bar.info    { background: var(--info);    }
.stat-top-bar.warning { background: var(--warning); }
.stat-top-bar.danger  { background: var(--danger);  }

.stat-card-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px 10px;
}

.stat-info {
  flex: 1;
  min-width: 0;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  margin-top: 2px;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.stat-view-link {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  padding: 8px 18px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  text-decoration: none;
  transition: var(--tr);
  background: #fafbfd;
}

.stat-view-link svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.stat-view-link:hover {
  color: var(--primary);
  background: var(--primary-xs);
}

/* ── Section Header ──────────────────────────────────────────────────────── */
.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.dash-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.dash-section-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Chart Card Icon ─────────────────────────────────────────────────────── */
.dash-chart-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-chart-icon svg {
  width: 18px;
  height: 18px;
}

.dash-chart-icon.primary { background: var(--primary-light); color: var(--primary); }
.dash-chart-icon.success { background: var(--success-light); color: var(--success); }
.dash-chart-icon.info    { background: var(--info-light);    color: var(--info);    }
.dash-chart-icon.warning { background: var(--warning-light); color: var(--warning); }
.dash-chart-icon.danger  { background: var(--danger-light);  color: var(--danger);  }

/* ── Mobile: welcome banner stacks ──────────────────────────────────────── */
@media (max-width: 640px) {
  .welcome-greeting { font-size: 16px; }
  .welcome-right    { display: none; }
  .stat-value       { font-size: 22px; }
}

/* ── Chart grid responsive ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  .chart-col-6,
  .chart-col-8,
  .chart-col-4 {
    grid-column: span 12;
  }
  .chart-container-lg {
    height: 280px;
  }
  .chart-container {
    height: 220px;
  }
}

@media (max-width: 480px) {
  .chart-container-lg {
    height: 220px;
  }
  .chart-container {
    height: 200px;
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   USER PROFILE PAGE
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Layout ──────────────────────────────────────────────────────────────── */
.profile-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  align-items: start;
}

.profile-main { min-width: 0; }

/* ── Avatar Card ─────────────────────────────────────────────────────────── */
.profile-avatar-card { overflow: visible; }

.profile-avatar-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 14px;
}

.profile-avatar-img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-light);
  display: block;
}

.profile-avatar-initials {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -1px;
  border: 3px solid var(--primary-light);
}

.profile-avatar-change-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--tr);
  padding: 0;
}

.profile-avatar-change-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

.profile-avatar-change-btn svg {
  width: 14px;
  height: 14px;
}

.profile-display-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.profile-info-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.profile-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
}

.profile-info-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.profile-info-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Form Grid ───────────────────────────────────────────────────────────── */
.profile-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.profile-pw-grid {
  grid-template-columns: 1fr 1fr;
}

/* ── Password Input ──────────────────────────────────────────────────────── */
.profile-input-wrap {
  position: relative;
}

.profile-input-wrap .form-control {
  padding-right: 38px;
}

.profile-eye-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 4px;
  transition: color .15s;
  line-height: 0;
}

.profile-eye-btn:hover { color: var(--primary); }

/* ── Password Error ──────────────────────────────────────────────────────── */
.profile-pw-error {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--danger-light);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid rgba(234, 84, 85, .2);
  margin-top: 8px;
}

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.profile-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rlSpin .7s linear infinite;
  flex-shrink: 0;
}

.profile-spinner-dark {
  border-color: rgba(0, 0, 0, .2);
  border-top-color: var(--text-primary);
}

/* ── Warning Button ──────────────────────────────────────────────────────── */
.btn-warning {
  background: var(--warning);
  color: #fff;
  border-color: var(--warning);
}

.btn-warning:hover {
  background: #e88e30;
  border-color: #e88e30;
  color: #fff;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .profile-layout       { grid-template-columns: 1fr; }
  .profile-pw-grid      { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .profile-form-grid    { grid-template-columns: 1fr; }
  .profile-pw-grid      { grid-template-columns: 1fr; }
}