*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --green-dark: #005C2F;
  --green-mid: #2E7D52;
  --green-light: #6BBF59;
  --green-lime: #B2FF59;
  --green-pale: #E8F5E9;
  --bg: #F5F6F8;
  --white: #FFFFFF;
  --text: #1A1A1A;
  --text-muted: #6C757D;
  --border: #E9ECEF;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-pill: 999px;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Watermark background */
.watermark {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background-color: #ffffff;
  background-image: url('../assets/tap2buy-watermark.png');
  background-repeat: repeat;
  background-position: top left;
  background-size: 920px auto;
}

.watermark span {
  display: none;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 32px 48px;
}

/* ── Navbar ── */
.navbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  margin-bottom: 36px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: center;
}

.nav-actions {
  justify-self: end;
}

.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-img {
  height: 90px;
  width: auto;
  display: block;
}

.nav-link {
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  transition: background 0.2s, color 0.2s;
}

.nav-link:hover {
  background: rgba(0, 92, 47, 0.06);
}

.nav-link.active {
  background: var(--green-dark);
  color: var(--white);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 8px 6px 14px;
  box-shadow: var(--shadow);
  justify-self: end;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  padding: 8px;
  border-radius: 50%;
  transition: background 0.2s;
}

.nav-menu {
  position: relative;
}

.nav-menu-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 168px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 200;
}

.nav-menu-dropdown[hidden] {
  display: none;
}

.nav-menu-item {
  display: block;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.nav-menu-item:hover {
  background: rgba(0, 92, 47, 0.06);
}

.nav-menu-item.active {
  background: var(--green-dark);
  color: var(--white);
}

.nav-menu-item.nav-menu-logout {
  width: 100%;
  margin-top: 6px;
  padding-top: 12px;
  border: none;
  border-top: 1px solid var(--border);
  border-radius: 8px;
  background: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: #dc3545;
  font-weight: 600;
}

.nav-menu-item.nav-menu-logout:hover {
  background: #fff0f0;
  color: #c82333;
}

.icon-btn:hover {
  background: var(--bg);
}

.search-btn {
  background: var(--green-dark);
  color: var(--white);
  width: 38px;
  height: 38px;
  padding: 0;
  margin: 0 4px;
}

.search-btn:hover {
  background: #004a26;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 8px;
  border-left: 1px solid var(--border);
  margin-left: 4px;
}

.avatar {
  flex-shrink: 0;
}

.store-avatar {
  width: 36px;
  height: 36px;
  position: relative;
  flex-shrink: 0;
}

.store-avatar-fallback,
.store-avatar-logo {
  position: absolute;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
}

.store-avatar-fallback {
  z-index: 1;
}

.store-avatar-logo {
  z-index: 2;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--green-dark);
  background: var(--white);
}

.store-avatar-fallback[hidden],
.store-avatar-logo[hidden] {
  display: none;
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-greeting {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--green-dark);
  background: var(--green-pale);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  width: fit-content;
}

/* ── Page Header ── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.select-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.select-wrapper select {
  appearance: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 10px 36px 10px 18px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow);
}

.select-wrapper select:focus {
  outline: 2px solid var(--green-dark);
  outline-offset: 2px;
}

.select-arrow {
  position: absolute;
  right: 14px;
  pointer-events: none;
  color: var(--text-muted);
}

.btn-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-dark);
  color: var(--white);
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px 22px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: var(--shadow);
}

.btn-filter:hover {
  background: #004a26;
}

/* ── Metric Cards ── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metric-revenue {
  background: var(--green-dark);
  color: var(--white);
}

.metric-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.metric-label {
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.9;
}

.metric-revenue .metric-label {
  color: rgba(255, 255, 255, 0.85);
}

.metric-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-light {
  background: rgba(255, 255, 255, 0.95);
  color: var(--green-dark);
}

.icon-dark {
  background: #1A1A1A;
}

.icon-green {
  background: var(--green-dark);
}

.metric-value {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.metric-value.accent {
  background: linear-gradient(90deg, #2196F3 0%, var(--green-lime) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.metric-change {
  font-size: 0.78rem;
  font-weight: 500;
}

.metric-revenue .metric-change {
  color: rgba(255, 255, 255, 0.75);
}

.metric-change.muted {
  color: var(--text-muted);
}

/* ── Charts ── */
.charts-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}

.chart-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow);
}

.chart-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.chart-container {
  position: relative;
  height: 280px;
}

.revenue-content {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 240px;
}

.revenue-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
}

.revenue-amount {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.btn-withdraw {
  background: var(--green-dark);
  color: var(--white);
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px 28px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  width: fit-content;
}

.btn-withdraw:hover {
  background: #004a26;
}

.store-live-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.store-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--green-dark);
  background: rgba(0, 92, 47, 0.08);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
}

.store-live-badge[hidden],
.btn-go-live[hidden],
.btn-offline[hidden] {
  display: none !important;
}

.store-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: store-live-pulse 2s ease-in-out infinite;
}

@keyframes store-live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.btn-go-live {
  background: var(--green-dark);
  color: var(--white);
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px 24px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-go-live:hover {
  background: #004a26;
}

.btn-offline {
  background: #C62828;
  color: var(--white);
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px 24px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-offline:hover {
  background: #B71C1C;
}

.revenue-chart-wrap {
  flex: 1;
  position: relative;
  height: 220px;
  min-width: 0;
}

/* ── FAB ── */
.fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--white);
  border: none;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: transform 0.2s, box-shadow 0.2s;
}

.fab:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.fab-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #E53935;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--white);
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page {
    padding: 16px;
  }

  .navbar {
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .user-greeting {
    display: none;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
  }

  .revenue-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .revenue-chart-wrap {
    width: 100%;
  }
}

/* ── Orders Page ── */
.orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.order-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.order-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.order-number {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--green-dark);
}

.order-time {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.status-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.status-pending { background: #FFF3E0; color: #E65100; }
.status-accepted { background: var(--green-pale); color: var(--green-dark); }
.status-rejected { background: #FFEBEE; color: #C62828; }
.status-fulfilled { background: #E3F2FD; color: #1565C0; }
.status-driver_accepted,
.status-driver_arrived,
.status-driver_on_way { background: #E8F5E9; color: var(--green-dark); }
.status-delivered { background: var(--green-dark); color: var(--white); }

.status-completed { background: var(--green-dark); color: var(--white); }
.status-submitted,
.status-under_review,
.status-approved,
.status-processing { background: #E3F2FD; color: #1565C0; }

.withdrawal-history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.history-card-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background 0.15s;
}

.history-card-header:hover {
  background: rgba(0, 92, 47, 0.04);
}

.history-card-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.history-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.history-amount {
  font-weight: 700;
  color: var(--green-dark);
  font-size: 0.95rem;
}

.history-chevron {
  transition: transform 0.2s;
  color: var(--text-muted);
}

.history-card.expanded .history-chevron {
  transform: rotate(180deg);
}

.history-card-body {
  padding: 0 20px 20px;
  border-top: 1px solid var(--border);
}

.history-timeline {
  margin: 20px 0;
  max-width: 100%;
}

.history-comments-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.history-comments {
  max-height: none;
}

.empty-history {
  text-align: center;
  color: var(--text-muted);
  padding: 32px;
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.order-customer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.customer-field,
.detail-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field-value {
  font-size: 0.95rem;
  font-weight: 500;
}

.field-value.large {
  font-size: 1.15rem;
  font-weight: 700;
}

.field-value.accent-green {
  color: var(--green-dark);
  font-size: 1.4rem;
  font-weight: 700;
}

.order-items .field-label {
  margin-bottom: 8px;
  display: block;
}

.items-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.items-list li {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.order-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1rem;
  padding-top: 10px;
  color: var(--green-dark);
}

.order-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.btn-accept,
.btn-reject,
.btn-fulfilled {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-accept,
.btn-fulfilled {
  background: var(--green-dark);
  color: var(--white);
}

.btn-accept:hover,
.btn-fulfilled:hover {
  background: #004a26;
}

.btn-reject {
  background: var(--white);
  color: #C62828;
  border: 1.5px solid #FFCDD2;
}

.btn-reject:hover {
  background: #FFEBEE;
}

.btn-fulfilled {
  flex: none;
  padding: 14px 36px;
  font-size: 1rem;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.empty-state h3 {
  margin: 16px 0 8px;
  font-size: 1.2rem;
}

.empty-state p {
  color: var(--text-muted);
}

.active-section {
  margin-top: 40px;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.section-title-rejected {
  color: #C62828;
}

.active-orders-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.active-order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}

.active-order-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.09);
}

.active-customer {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.rejected-order-row {
  cursor: default;
}

.rejected-order-row:hover {
  transform: none;
  box-shadow: var(--shadow);
}

.rejected-order-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rejected-items {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.rejected-time {
  font-size: 0.75rem;
  color: #C62828;
}

/* Modal */
.modal-overlay[hidden] {
  display: none;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 1.15rem;
  color: #C62828;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}

.modal-body {
  padding: 24px;
}

.modal-body p {
  margin-bottom: 12px;
  line-height: 1.5;
}

.modal-order-id {
  font-weight: 700;
  color: var(--green-dark);
  font-size: 1.1rem;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

.notification-preview {
  display: flex;
  gap: 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 16px;
}

.notification-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.notification-text strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.notification-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ── Order Detail Page ── */
.detail-page .page {
  max-width: none;
}

.detail-layout {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--green-dark);
}

.detail-main {
  flex: 1;
  padding: 32px 40px 48px;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.detail-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow);
}

.detail-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--green-dark);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.detail-field.full-width {
  grid-column: 1 / -1;
}

.table-wrap {
  overflow-x: auto;
}

.items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.items-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--border);
}

.items-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border);
}

.items-table tbody tr:last-child td {
  border-bottom: none;
}

.status-panel {
  text-align: center;
}

.status-panel h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.status-panel p {
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

.status-waiting {
  padding: 20px 0;
}

.waiting-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--green-dark);
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.driver-info {
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.driver-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: left;
  max-width: 400px;
  margin: 0 auto;
}

.timeline-step {
  display: flex;
  gap: 16px;
  position: relative;
  padding-bottom: 28px;
}

.timeline-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 11px;
  top: 24px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-step.completed:not(:last-child)::after {
  background: var(--green-dark);
}

.timeline-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--white);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.timeline-step.completed .timeline-dot {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.timeline-step.active .timeline-dot {
  border-color: var(--green-dark);
  box-shadow: 0 0 0 4px rgba(0, 92, 47, 0.15);
  animation: pulse 1.5s ease infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(0, 92, 47, 0.15); }
  50% { box-shadow: 0 0 0 8px rgba(0, 92, 47, 0.08); }
}

.timeline-label {
  font-weight: 600;
  font-size: 0.95rem;
  display: block;
}

.timeline-live {
  font-size: 0.78rem;
  color: var(--green-dark);
  font-weight: 500;
}

.timeline-done {
  font-size: 0.78rem;
  color: var(--green-dark);
  font-weight: 600;
}

@media (max-width: 768px) {
  .order-customer {
    grid-template-columns: 1fr;
  }

  .detail-header {
    padding: 16px 20px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .detail-main {
    padding: 20px 16px 40px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .order-actions {
    flex-direction: column;
  }
}

/* ── Inventory Page ── */
.last-sync {
  display: block;
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.last-sync strong {
  color: var(--green-dark);
}

.btn-sync {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-dark);
  color: var(--white);
  border: none;
  border-radius: var(--radius-pill);
  padding: 12px 24px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  box-shadow: var(--shadow);
}

.btn-sync:hover:not(:disabled) {
  background: #004a26;
}

.btn-sync:disabled {
  opacity: 0.85;
  cursor: wait;
}

.btn-sync.syncing {
  pointer-events: none;
}

.sync-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.inventory-stats .metric-card {
  min-height: 100px;
}

.stat-red {
  color: #C62828 !important;
}

.stat-green {
  color: var(--green-dark) !important;
}

.inventory-section {
  margin-top: 8px;
}

.inventory-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.inventory-tab {
  background: var(--white);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 12px 24px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.inventory-tab.active {
  background: var(--white);
  color: var(--green-dark);
  border-color: var(--border);
  box-shadow: 0 -2px 0 var(--green-dark) inset;
}

.inventory-table-card {
  background: var(--white);
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  padding: 0;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.inventory-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.inventory-table th {
  text-align: left;
  padding: 14px 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.inventory-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.inventory-table tbody tr:last-child td {
  border-bottom: none;
}

.inventory-table tbody tr:hover {
  background: rgba(0, 92, 47, 0.02);
}

.barcode-cell {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.name-cell {
  font-weight: 500;
}

.qty-cell {
  font-weight: 700;
  color: var(--green-dark);
}

.price-cell {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.edit-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.price-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--white);
}

.price-prefix {
  padding: 10px 12px;
  background: var(--bg);
  font-weight: 600;
  color: var(--green-dark);
  border-right: 1px solid var(--border);
}

.price-input-wrap input {
  flex: 1;
  border: none;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.9rem;
}

.price-input-wrap input:focus {
  outline: none;
}

.empty-table {
  text-align: center;
  color: var(--text-muted);
  padding: 40px !important;
}

.status-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}

.status-pill-available {
  background: var(--green-pale);
  color: var(--green-dark);
}

.status-pill-sold_out {
  background: #FFEBEE;
  color: #C62828;
}

.status-pill-available_soon {
  background: #E8F5E9;
  color: #2E7D32;
}

.status-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-status {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-sold-out {
  background: var(--white);
  color: #C62828;
  border-color: #FFCDD2;
}

.btn-sold-out:hover,
.btn-sold-out.active {
  background: #C62828;
  color: var(--white);
  border-color: #C62828;
}

.btn-available-soon {
  background: var(--white);
  color: var(--green-dark);
  border-color: #A5D6A7;
}

.btn-available-soon:hover,
.btn-available-soon.active {
  background: var(--green-dark);
  color: var(--white);
  border-color: var(--green-dark);
}

.sync-toast[hidden] {
  display: none;
}

.sync-toast {
  position: fixed;
  bottom: 100px;
  right: 28px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  max-width: 360px;
  width: calc(100% - 56px);
  z-index: 150;
  overflow: hidden;
  border-left: 4px solid var(--green-dark);
}

.sync-toast-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--green-dark);
}

.sync-toast-body {
  padding: 14px 18px;
  max-height: 200px;
  overflow-y: auto;
}

.sync-toast-body p {
  font-size: 0.85rem;
  margin-bottom: 8px;
  line-height: 1.4;
}

.sync-toast-body p:last-child {
  margin-bottom: 0;
}

.change-sold {
  color: #C62828;
  font-weight: 600;
}

.change-added {
  color: var(--green-dark);
  font-weight: 600;
}

/* Sync method modal */
.sync-modal {
  max-width: 520px;
}

.sync-modal-header h2 {
  color: var(--green-dark);
  font-size: 1.15rem;
}

.sync-modal-intro {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.sync-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sync-option-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  text-align: left;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.sync-option-card:hover {
  border-color: var(--green-dark);
  background: var(--green-pale);
  transform: translateY(-1px);
}

.sync-option-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.excel-icon {
  background: #E3F2FD;
  color: #1565C0;
}

.cloud-icon {
  background: var(--green-pale);
  color: var(--green-dark);
}

.sync-option-card strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: var(--text);
}

.sync-option-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

.sync-back-link {
  margin-bottom: 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

.sync-subtitle {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.cloud-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.cloud-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cloud-select,
.cloud-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--white);
}

.cloud-input {
  background: var(--bg);
  color: var(--text-muted);
}

.cloud-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 4px;
}

.cloud-sync-btn {
  width: 100%;
  justify-content: center;
}

.excel-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 20px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  text-align: center;
  margin-bottom: 16px;
  transition: border-color 0.2s, background 0.2s;
}

.excel-dropzone:hover,
.excel-dropzone.dragover,
.excel-dropzone.has-file {
  border-color: var(--green-dark);
  background: var(--green-pale);
}

.excel-dropzone span {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
}

.excel-dropzone small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.excel-error {
  color: #C62828;
  font-size: 0.82rem;
  margin-bottom: 12px;
}

@media (max-width: 768px) {
  .status-actions {
    flex-direction: column;
  }

  .inventory-table th:nth-child(4),
  .inventory-table td:nth-child(4) {
    display: none;
  }

  .inventory-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .item-edit-grid {
    grid-template-columns: 1fr;
  }

  .edit-field-row {
    grid-template-columns: 1fr;
  }
}

/* Inventory toolbar */
.inventory-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.inventory-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 220px;
}

.inventory-search-input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.875rem;
  background: var(--white);
  box-shadow: var(--shadow);
}

.inventory-search-input:focus {
  outline: 2px solid var(--green-dark);
  outline-offset: 2px;
}

.btn-inventory-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-dark);
  color: var(--white);
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-inventory-search:hover {
  background: #004a26;
}

.inventory-filter-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.inventory-row {
  cursor: pointer;
  transition: background 0.15s;
}

.inventory-row:hover {
  background: rgba(0, 92, 47, 0.05);
}

.inventory-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pagination-btns {
  display: flex;
  gap: 8px;
}

.btn-page {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--white);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-page:hover:not(:disabled) {
  border-color: var(--green-dark);
  background: var(--green-pale);
}

.btn-page:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Item edit modal */
.item-modal {
  max-width: 780px;
  max-height: 90vh;
  overflow-y: auto;
}

.item-modal-body {
  padding: 24px;
}

.item-edit-grid {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 24px;
  margin-bottom: 24px;
}

.edit-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.edit-field label,
.item-edit-images > label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.edit-field input,
.edit-field textarea,
.edit-field select {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
}

.edit-field select {
  background: var(--white);
}

.edit-field textarea {
  resize: vertical;
  min-height: 90px;
}

.sizes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.size-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.size-label {
  font-weight: 600;
  min-width: 80px;
  font-size: 0.88rem;
}

.size-qty-input {
  width: 70px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
}

.btn-remove-size,
.btn-remove-image {
  background: #FFEBEE;
  color: #C62828;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  margin-left: auto;
}

.add-size-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.add-size-row input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
}

.add-size-row input:first-child {
  flex: 1;
  min-width: 100px;
}

.add-size-row input:nth-child(2) {
  width: 70px;
}

.btn-add-size {
  padding: 8px 14px;
  background: var(--green-pale);
  color: var(--green-dark);
  border: 1px solid #A5D6A7;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.sizes-empty,
.images-empty {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 8px 0;
}

.images-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.image-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-thumb .btn-remove-image {
  position: absolute;
  top: 6px;
  right: 6px;
  margin-left: 0;
}

.image-upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--green-dark);
  transition: border-color 0.2s, background 0.2s;
}

.image-upload-btn:hover {
  border-color: var(--green-dark);
  background: var(--green-pale);
}

.item-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.btn-cancel-edit {
  padding: 12px 28px;
  background: var(--white);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-cancel-edit:hover {
  background: var(--bg);
}

.btn-update-item {
  padding: 12px 28px;
  background: var(--green-dark);
  color: var(--white);
  border: none;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-update-item:hover {
  background: #004a26;
}

/* ── Revenue Page ── */
.revenue-section {
  margin-top: 32px;
}

.withdrawal-tracker-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}

.wd-track-amount {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.wd-track-amount strong {
  color: var(--green-dark);
  font-size: 1.1rem;
}

.withdrawal-timeline {
  max-width: 100%;
  margin-bottom: 24px;
}

.comments-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 16px;
  padding: 4px;
}

.comment-bubble {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  max-width: 90%;
}

.comment-agent,
.comment-system {
  background: var(--green-pale);
  align-self: flex-start;
  border-left: 3px solid var(--green-dark);
}

.comment-user {
  background: var(--bg);
  align-self: flex-end;
  border-right: 3px solid var(--text-muted);
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 0.75rem;
}

.comment-meta strong {
  color: var(--green-dark);
  font-size: 0.82rem;
}

.comment-meta span {
  color: var(--text-muted);
}

.comment-bubble p {
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 0;
}

.comment-form {
  display: flex;
  gap: 10px;
}

.comment-form input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.88rem;
}

.withdraw-modal {
  max-width: 520px;
}

.wd-step h3 {
  text-align: center;
  margin-bottom: 8px;
}

.wd-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wd-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.4;
}

.wd-available {
  font-size: 0.95rem;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.wd-available strong {
  color: var(--green-dark);
  font-size: 1.15rem;
}

.bank-status-banner {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 16px;
}

.bank-ok {
  background: var(--green-pale);
  color: var(--green-dark);
}

.bank-error {
  background: #FFEBEE;
  color: #C62828;
}

.bank-pending {
  background: #FFF8E1;
  color: #F57F17;
  margin-bottom: 16px;
}

.drv-bank-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.drv-bank-status-header .section-title {
  margin-bottom: 0;
}

#drvBankStatusDetails {
  margin-bottom: 12px;
}

.bank-details-display {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bank-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.88rem;
}

.bank-detail-row span {
  color: var(--text-muted);
}

.bank-detail-row strong {
  text-align: right;
  color: var(--text);
}

.bank-verify-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bank-incorrect-btn {
  width: 100%;
  padding: 12px;
  color: #C62828;
  border-color: #FFCDD2;
}

.proof-dropzone {
  margin-bottom: 0;
  padding: 24px 16px;
}

.required-tag {
  color: #C62828;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.wd-pending-icon {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 12px;
}

.bank-continue-btn {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
}

.wd-done-icon {
  width: 56px;
  height: 56px;
  background: var(--green-dark);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 16px;
}

@media (max-width: 900px) {
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-link {
    padding: 8px 14px;
    font-size: 0.82rem;
  }
}

/* ── Profile Page ── */
.profile-pending-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff8e6;
  border: 1px solid #f0d78c;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 24px;
  color: #7a5d00;
}

.profile-pending-banner svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.profile-pending-banner p {
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0;
}

.profile-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.profile-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow);
}

.profile-card-intro {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 8px 0 24px;
  line-height: 1.5;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-logo-section {
  margin-bottom: 20px;
}

.profile-logo-section > .cloud-label {
  display: block;
  margin-bottom: 10px;
}

.profile-logo-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.profile-logo-preview {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: var(--radius-sm);
  border: 2px dashed var(--border);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.profile-logo-preview:hover:not(:disabled),
.profile-logo-preview.drag-over {
  border-color: var(--green-dark);
  box-shadow: 0 0 0 3px rgba(0, 92, 47, 0.12);
}

.profile-logo-preview:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.profile-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.profile-logo-placeholder {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  padding: 8px;
}

.profile-live-logo-empty {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

.profile-logo-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 92, 47, 0.72);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s;
}

.profile-logo-preview:hover:not(:disabled) .profile-logo-overlay,
.profile-logo-preview.drag-over .profile-logo-overlay {
  opacity: 1;
}

.profile-logo-upload {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.btn-attach-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--white);
  border: 1px solid var(--green-dark);
  color: var(--green-dark);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-attach-logo:hover:not(:disabled) {
  background: var(--green-dark);
  color: var(--white);
}

.btn-attach-logo:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.logo-file-name {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

.logo-pending-hint {
  font-size: 0.82rem;
  color: var(--green-dark);
  font-weight: 500;
  margin: 0;
}

.btn-logo-submit {
  padding: 10px 20px;
  font-size: 0.82rem;
}

.profile-live-logo-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
  align-items: center;
}

.profile-live-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 4px;
}

.profile-form-actions {
  margin-top: 20px;
}

.profile-live-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.profile-live-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--green-dark);
}

.profile-live-list {
  display: grid;
  gap: 12px;
}

.profile-live-list div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
  font-size: 0.88rem;
}

.profile-live-list dt {
  color: var(--text-muted);
  font-weight: 500;
}

.profile-live-list dd {
  font-weight: 600;
  margin: 0;
}

.verification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.verification-badge {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text-muted);
}

.verification-badge.verified {
  background: var(--green-pale);
  color: var(--green-dark);
}

.verification-badge.pending {
  background: #fff8e6;
  color: #7a5d00;
}

.verification-timeline {
  margin: 20px 0 28px;
}

.process-section {
  margin-bottom: 24px;
}

.process-section .verification-timeline {
  max-width: none;
  margin: 16px 0 12px;
}

.process-status-note {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--green-dark);
}

.verification-page .verification-navbar {
  margin-bottom: 8px;
}

.verification-page .verification-navbar .nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.verification-docs {
  margin-bottom: 28px;
}

.doc-upload-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.doc-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 16px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}

.doc-upload-zone:hover:not(:has(input:disabled)) {
  border-color: var(--green-dark);
  background: rgba(0, 92, 47, 0.03);
}

.doc-upload-zone.doc-uploaded {
  border-color: var(--green-dark);
  border-style: solid;
  background: var(--green-pale);
}

.doc-upload-zone span {
  font-size: 0.85rem;
  font-weight: 500;
}

.doc-upload-zone small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.verification-submit-btn {
  width: 100%;
}

.verification-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.verification-comments {
  max-height: 320px;
}

.verification-chat-form {
  align-items: center;
}

.chat-attach-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}

.chat-attach-btn:hover {
  background: var(--green-pale);
}

.chat-attach-hint {
  font-size: 0.78rem;
  color: var(--green-dark);
  margin-top: 8px;
}

.comment-attachment {
  font-size: 0.82rem;
  color: var(--green-dark);
  margin: 6px 0 0;
  font-weight: 500;
}

.verification-highlight {
  box-shadow: 0 0 0 3px rgba(178, 255, 89, 0.5), var(--shadow);
  transition: box-shadow 0.3s;
}

@media (max-width: 1024px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .profile-logo-row {
    flex-direction: column;
  }

  .profile-live-list div,
  .profile-live-logo-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* ── Auth / Login ── */
.login-layout {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--shadow);
  text-align: center;
}

.login-logo {
  display: inline-flex;
  margin-bottom: 20px;
}

.login-card h1 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: var(--green-dark);
}

.login-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.login-tabs {
  display: flex;
  gap: 8px;
  background: var(--bg);
  padding: 4px;
  border-radius: var(--radius-pill);
  margin-bottom: 24px;
}

.login-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: none;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.login-tab.active {
  background: var(--green-dark);
  color: var(--white);
}

.login-form {
  text-align: left;
}

.login-form .edit-field {
  margin-bottom: 14px;
}

.password-input-wrap {
  position: relative;
}

.password-input-wrap input {
  width: 100%;
  padding-right: 44px;
}

.edit-field .password-input-wrap input {
  width: 100%;
  padding-right: 44px;
}

.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.password-toggle-btn:hover {
  color: var(--green-dark);
  background: rgba(0, 92, 47, 0.08);
}

.password-toggle-btn:focus-visible {
  outline: 2px solid var(--green-dark);
  outline-offset: 2px;
}

.password-toggle-icon--hide {
  display: none;
}

.password-toggle-btn.is-visible .password-toggle-icon--show {
  display: none;
}

.password-toggle-btn.is-visible .password-toggle-icon--hide {
  display: block;
}

.login-submit-btn {
  width: 100%;
  margin-top: 8px;
}

.login-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 16px;
  text-align: center;
  line-height: 1.4;
}

.login-success {
  font-size: 0.85rem;
  color: var(--green-dark);
  background: var(--green-pale);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.logout-modal {
  max-width: 440px;
}

.logout-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

.btn-logout-confirm {
  padding: 12px 24px;
  background: #dc3545;
  color: var(--white);
  border: none;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-logout-confirm:hover {
  background: #c82333;
}

.new-store-banner {
  background: linear-gradient(135deg, var(--green-pale) 0%, #f0fff4 100%);
  border: 1px solid rgba(0, 92, 47, 0.15);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}

.new-store-banner-content h2 {
  font-size: 1.15rem;
  color: var(--green-dark);
  margin-bottom: 8px;
}

.new-store-banner-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.new-store-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.new-store-banner-actions .btn-attach-logo {
  text-decoration: none;
}

.new-store-banner-actions .btn-update-item {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.portal-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.portal-tab {
  flex: 1;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.signup-type-tabs {
  margin-bottom: 16px;
}

.portal-tab.active[data-signup-type='retailer'],
.portal-tab.active[data-portal='retailer'] {
  border-color: var(--green-dark);
  background: var(--green-pale);
  color: var(--green-dark);
}

.portal-tab.active[data-signup-type='driver'],
.portal-tab.active[data-portal='driver'] {
  border-color: #0b5ed7;
  background: #e8f1ff;
  color: #0b5ed7;
}

.portal-tab.active[data-portal='agent'] {
  border-color: #005C2F;
  background: #e8f5e9;
  color: var(--green-dark);
}

.portal-tab.active[data-portal='admin'] {
  border-color: #1a1a2e;
  background: #eef0f8;
  color: #1a1a2e;
}

.login-portal-switch {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.88rem;
}

.login-portal-switch a {
  color: var(--green-dark);
  font-weight: 600;
  text-decoration: none;
}

.login-portal-switch a:hover {
  text-decoration: underline;
}

.login-agent-intro {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
  text-align: left;
}

.agent-login-btn {
  background: var(--green-dark);
}

.admin-login-btn {
  background: #1a1a2e;
}

.driver-login-btn {
  background: #0b5ed7;
}

.driver-page .page {
  max-width: 960px;
}

.driver-badge {
  color: #0b5ed7;
}

.driver-metrics {
  margin-bottom: 24px;
}

.driver-vehicle-stat {
  font-size: 1.1rem;
}

.driver-deliveries-card {
  margin-bottom: 0;
}

.driver-delivery-card + .driver-delivery-card {
  margin-top: 16px;
}

.driver-panel-grid {
  display: grid;
  grid-template-columns: minmax(300px, 420px) 1fr;
  gap: 24px;
  align-items: start;
}

.driver-work-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.driver-work-tab {
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.driver-work-tab.active {
  background: #0b5ed7;
  color: var(--white);
}

.driver-onboarding-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: grid;
  gap: 12px;
}

.driver-onboarding-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}

.driver-onboarding-steps li span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--green-dark);
}

.driver-onboarding-steps li.done {
  border-color: var(--green-dark);
  background: var(--green-pale);
}

.driver-onboarding-modal .modal {
  max-width: 560px;
}

.driver-signup-summary,
.driver-status-panel {
  margin-bottom: 24px;
}

.driver-enquiry-card + .driver-enquiry-card,
.driver-enquiry-chat + .driver-enquiry-chat,
.driver-app-item + .driver-app-item {
  margin-top: 16px;
}

.driver-enquiry-chat {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--white);
}

.driver-enquiry-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.driver-enquiry-chat-header h3 {
  margin: 0 0 4px;
}

.driver-enquiry-messages {
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 4px;
}

.driver-enquiry-message-form,
.admin-enquiry-message-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.driver-enquiry-message-form input,
.admin-enquiry-message-form input {
  flex: 1;
  min-width: 0;
}

.driver-enquiry-admin-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.driver-account-alerts {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.driver-account-alert {
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--white);
}

.driver-account-alert h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.driver-account-alert p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.driver-alert-warning {
  border-color: #e6c200;
  background: #fffbea;
}

.driver-alert-danger {
  border-color: #d9534f;
  background: #fff5f5;
}

.driver-alert-info {
  border-color: var(--green);
  background: #f3faf6;
}

.driver-app-summary {
  cursor: pointer;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}

.driver-readonly-details {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

@media (max-width: 900px) {
  .driver-panel-grid {
    grid-template-columns: 1fr;
  }
}

.admin-page {
  --admin-ribbon-width: 240px;
}

.admin-ribbon {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--admin-ribbon-width);
  background: var(--green-dark);
  z-index: 2;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  overflow-y: auto;
}

.admin-ribbon-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 20px;
  padding: 0 12px;
}

.admin-ribbon-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-ribbon-nav .admin-work-tab {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.2s, color 0.2s;
}

.admin-ribbon-nav .admin-work-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.admin-ribbon-nav .admin-work-tab.active {
  background: var(--white);
  color: var(--green-dark);
}

.admin-ribbon-group {
  margin: 4px 0;
}

.admin-ribbon-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
  padding: 8px 16px 4px;
}

.admin-ribbon-subnav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-ribbon-nav .admin-ribbon-sub {
  padding: 10px 16px 10px 28px;
  font-size: 0.84rem;
}

.admin-ribbon-group.is-active .admin-ribbon-group-label {
  color: rgba(255, 255, 255, 0.85);
}

.admin-page .admin-main {
  margin-left: var(--admin-ribbon-width);
  max-width: none;
  min-height: 100vh;
  padding-bottom: 64px;
  overflow-x: auto;
  overflow-y: visible;
}

.admin-badge {
  color: #1a1a2e;
}

.admin-panel {
  width: 100%;
  min-width: 0;
}

.admin-panel-grid {
  display: grid;
  grid-template-columns: minmax(300px, 420px) 1fr;
  gap: 24px;
  align-items: start;
  width: 100%;
  min-width: 0;
}

.admin-panel-grid > * {
  min-width: 0;
}

.admin-onboard-card,
.admin-list-card,
.admin-summary-card {
  margin-bottom: 0;
  max-height: none;
  overflow: visible;
}

.admin-list-card .admin-table-wrap {
  margin: 0 -4px;
  padding: 0 4px 4px;
}

.admin-form-grid {
  display: grid;
  gap: 14px;
}

.admin-form-grid select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.88rem;
}

.admin-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.admin-table-wrap .admin-table {
  min-width: 720px;
}

.admin-table-wrap .admin-table th:last-child,
.admin-table-wrap .admin-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: var(--white);
  box-shadow: -8px 0 12px rgba(0, 0, 0, 0.05);
  white-space: nowrap;
}

.admin-table-wrap .admin-table thead th:last-child {
  z-index: 3;
}

.admin-table-wrap .admin-table tbody tr:hover td:last-child {
  background: #fafbfc;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.admin-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.admin-list-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-filter-select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.85rem;
  width: 100%;
}

.admin-employee-filter-btn {
  flex-shrink: 0;
}

.admin-employee-filters {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0, 74, 38, 0.03);
}

.admin-employee-filters-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-employee-filters-grid .edit-field {
  margin-bottom: 0;
}

.admin-employee-filters-grid label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.admin-employee-filters-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.admin-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.dept-dashboard-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-ribbon-link {
  text-decoration: none;
  text-align: left;
}

.department-dashboard-page .admin-ribbon-nav .admin-work-tab[disabled] {
  opacity: 1;
  cursor: default;
}

.dept-finance-list {
  display: grid;
  gap: 16px;
}

.dept-finance-card {
  margin: 0;
}

.dept-it-tabs {
  margin-bottom: 16px;
}

.payroll-steps-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: rgba(0, 90, 45, 0.08);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green-dark);
}

.finance-push-payslip-block {
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid #f0c040;
  border-radius: var(--radius-sm);
  background: #fff8e6;
}

.finance-push-payslip-warning {
  margin: 0 0 10px;
  color: #8a6500;
  font-size: 0.92rem;
  line-height: 1.5;
}

.finance-push-payslip-block .profile-card-intro {
  margin-bottom: 12px;
}

.finance-push-payslip-block .btn-update-item {
  margin-top: 4px;
}

.payroll-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.payroll-summary-card {
  background: var(--bg-muted, #f7f8fa);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.payroll-calc-results {
  margin-bottom: 8px;
}

.payroll-calc-list .payroll-net-row dd {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green-dark);
}

.payroll-form-actions {
  flex-wrap: wrap;
}

.department-dashboard-page .admin-modal {
  max-width: 820px;
}

.payslip-preview-overlay .payslip-preview-modal {
  max-width: 920px;
  width: calc(100% - 32px);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
}

.payslip-preview-body {
  overflow: auto;
  max-height: calc(100vh - 220px);
  padding-bottom: 8px;
}

.payslip-html-preview {
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.payslip-pdf-frame {
  width: 100%;
  min-height: 420px;
  border: 1px solid #d9d9d9;
  border-radius: var(--radius);
  background: #f5f5f5;
}

.payslip-pdf-preview-container {
  position: relative;
  min-height: 420px;
}

.payslip-pdf-embed {
  width: 100%;
  min-height: 420px;
  border: 1px solid #d9d9d9;
  border-radius: var(--radius);
  background: #f5f5f5;
}

.payslip-pdf-frame-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 420px;
}

.payslip-pdf-fallback-msg {
  margin: 12px 0 0;
  padding: 12px;
  background: #fff8e6;
  border: 1px solid #f0d48a;
  border-radius: var(--radius);
}

.payslip-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 24px 24px;
  border-top: 1px solid #eee;
}

.payslip-preview-section-label {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.payslip-inbox-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  border-left: 4px solid #5b9bd5;
  background: linear-gradient(90deg, rgba(91, 155, 213, 0.08), transparent);
}

.payslip-inbox-banner .section-title {
  margin-bottom: 6px;
}

.payslip-inbox-banner-content {
  flex: 1;
  min-width: 220px;
}

.payslip-doc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.payslip-doc-brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.payslip-doc-logo {
  max-width: 180px;
  max-height: 64px;
  object-fit: contain;
}

.payslip-doc-company p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.payslip-doc-title {
  margin: 0;
  font-size: 2rem;
  color: #5b9bd5;
  letter-spacing: 0.04em;
}

.payslip-doc-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 12px;
}

.payslip-doc-panel,
.payslip-doc-paygrid div {
  border: 1px solid #5b9bd5;
}

.payslip-doc-panel h3,
.payslip-doc-paygrid span {
  display: block;
  background: #5b9bd5;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 8px;
  text-transform: uppercase;
}

.payslip-doc-panel p,
.payslip-doc-paygrid strong {
  margin: 0;
  padding: 6px 8px;
  font-size: 0.85rem;
}

.payslip-doc-paygrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.payslip-doc-payment-method {
  margin: 0 0 14px;
  font-size: 0.88rem;
}

.payslip-doc-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 14px;
  font-size: 0.84rem;
}

.payslip-doc-table th {
  background: #d9d9d9;
  text-align: left;
  padding: 8px;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.payslip-doc-table td {
  padding: 8px;
  border-bottom: 1px solid #e5e5e5;
}

.payslip-doc-table-deduct th:nth-child(2),
.payslip-doc-table-deduct th:nth-child(3),
.payslip-doc-table-deduct td:nth-child(2),
.payslip-doc-table-deduct td:nth-child(3) {
  text-align: right;
}

.payslip-doc-table th:nth-child(n + 2),
.payslip-doc-table td:nth-child(n + 2) {
  text-align: right;
}

.payslip-doc-total td {
  background: #a6a6a6;
  color: #fff;
  font-weight: 700;
  border: none;
}

.payslip-doc-net {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #a6a6a6;
  color: #fff;
  padding: 12px 14px;
  font-weight: 700;
  margin-bottom: 14px;
}

.payslip-doc-net strong {
  font-size: 1.15rem;
}

.payslip-doc-net-ytd {
  margin-left: auto;
  font-size: 0.9rem;
}

.payslip-doc-footer {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}

.employee-payslip-notice {
  margin-bottom: 16px;
  padding: 14px 16px;
  background: rgba(91, 155, 213, 0.12);
  border-left: 4px solid #5b9bd5;
  border-radius: var(--radius);
}

.employee-payslip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.employee-payslip-actions .btn-attach-logo,
.employee-payslip-actions .btn-update-item {
  margin: 0;
}

.admin-table .employee-payslip-actions {
  min-width: 180px;
}

@media (max-width: 900px) {
  .payslip-doc-meta-grid {
    grid-template-columns: 1fr;
  }

  .payslip-doc-header {
    flex-direction: column;
  }
}

@media (max-width: 900px) {
  .payroll-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .admin-employee-filters-grid {
    grid-template-columns: 1fr;
  }
}

.admin-modal {
  max-width: 720px;
  width: 100%;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-modal .modal-body {
  overflow-y: auto;
  max-height: calc(100vh - 120px);
  padding: 20px 24px 24px;
}

.admin-edit-form .edit-field {
  margin-bottom: 0;
}

.admin-edit-section {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.admin-edit-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.admin-edit-section-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 14px;
}

.admin-edit-grid {
  display: grid;
  gap: 14px;
}

.admin-edit-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-edit-summary {
  margin: 0;
}

.admin-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.admin-drivers-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.admin-drivers-list {
  width: 100%;
  overflow: hidden;
}

.admin-store-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--green-dark);
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.admin-store-link:hover {
  color: var(--green-mid);
}

.admin-store-performance-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-store-performance-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.admin-store-back-btn {
  flex-shrink: 0;
}

.admin-period-filter {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px;
  background: #f4f6f8;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}

.admin-period-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.admin-period-btn:hover {
  color: var(--green-dark);
}

.admin-period-btn.active {
  background: var(--white);
  color: var(--green-dark);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.admin-store-period-label {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.admin-store-metrics {
  margin-top: 4px;
}

.admin-store-rating-hint {
  margin-top: -8px;
}

.admin-store-orders-section {
  margin-top: 8px;
}

@media (min-width: 768px) {
  .admin-store-performance-header {
    flex-direction: row;
    align-items: center;
    gap: 20px;
  }
}

.admin-edit-form .edit-field select,
.admin-form-grid select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--white);
}

.driver-app-review {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.driver-app-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.driver-app-review-section {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px;
}

.driver-app-comments-section {
  background: var(--white);
  border: 1px solid var(--border);
}

.driver-doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.driver-doc-preview {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

.driver-doc-preview .cloud-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.driver-doc-image {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: var(--bg);
}

.driver-doc-file-name {
  font-size: 0.85rem;
  margin-bottom: 8px;
  word-break: break-word;
}

.driver-app-request-form,
.driver-app-admin-comment-form,
#driverApplicationReplyForm {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.application-comments-thread {
  display: grid;
  gap: 12px;
}

.application-comment {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
}

.application-comment.from-admin {
  border-color: #1a1a2e;
  background: #f4f5fa;
}

.application-comment.from-driver {
  border-color: #0b5ed7;
  background: #eef5ff;
}

.application-comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.82rem;
}

.application-comment-meta strong {
  color: var(--green-dark);
}

.application-comment-meta span {
  color: var(--text-muted);
}

.driver-application-review {
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .driver-app-review-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .admin-edit-grid-2 {
    grid-template-columns: 1fr;
  }

  .admin-modal {
    max-width: 100%;
  }
}

.admin-metrics {
  margin-bottom: 24px;
}

.admin-overview-block {
  margin-bottom: 28px;
}

.admin-section-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-dark);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.admin-kpi-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.admin-insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.admin-insight-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.admin-insight-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.admin-insight-head h3 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
}

.admin-insight-score {
  font-size: 0.875rem;
  font-weight: 700;
}

.admin-insight-score.admin-insight-good { color: var(--green-dark); }
.admin-insight-score.admin-insight-warn { color: #B45309; }
.admin-insight-score.admin-insight-bad { color: #C62828; }

.admin-progress-fill.admin-insight-good { background: var(--green-dark); }
.admin-progress-fill.admin-insight-warn { background: #F59E0B; }
.admin-progress-fill.admin-insight-bad { background: #C62828; }

.admin-progress-bar {
  height: 6px;
  background: #E9ECEF;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}

.admin-progress-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.admin-insight-detail {
  margin: 0;
  font-size: 0.75rem;
  color: #6C757D;
}

.admin-two-col {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}

.admin-three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.admin-stat-list,
.admin-notify-list,
.admin-calendar-list,
.admin-task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-stat-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  padding: 8px 0;
  border-bottom: 1px solid #F1F3F5;
}

.admin-stat-list li:last-child { border-bottom: none; }

.admin-status-good { color: var(--green-dark); }

.admin-notify-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8125rem;
  padding: 10px 12px;
  background: #F8F9FA;
  border-radius: var(--radius-md);
}

.admin-notify-time {
  color: #6C757D;
  white-space: nowrap;
  font-size: 0.75rem;
}

.admin-calendar-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #F1F3F5;
  font-size: 0.8125rem;
}

.admin-calendar-list li:last-child { border-bottom: none; }

.admin-calendar-day {
  min-width: 72px;
  font-weight: 600;
  color: var(--green-dark);
  font-size: 0.75rem;
}

.admin-calendar-time {
  display: block;
  color: #6C757D;
  font-size: 0.75rem;
  margin-top: 2px;
}

.admin-calendar-desc {
  display: block;
  color: #495057;
  font-size: 0.8125rem;
  margin-top: 2px;
}

.admin-card-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-card-heading-row .section-title {
  margin-bottom: 0;
}

.admin-card-link-btn {
  flex-shrink: 0;
}

.admin-task-btn {
  width: 100%;
  text-align: left;
  background: #F8F9FA;
  border: 1px solid #E9ECEF;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s;
}

.admin-task-btn:hover { background: #EEF2F0; }

.admin-task-priority {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 6px;
  border-radius: 4px;
}

.admin-priority-high { background: #FFEBEE; color: #C62828; }
.admin-priority-medium { background: #FFF8E1; color: #F57F17; }
.admin-priority-low { background: #E8F5E9; color: var(--green-dark); }

.admin-quick-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-quick-actions button {
  width: 100%;
  justify-content: center;
}

.admin-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.admin-chart-card {
  min-height: 280px;
}

.admin-chart-card .chart-title {
  font-size: 0.9375rem;
  margin-bottom: 12px;
}

.admin-chart-wrap {
  position: relative;
  height: 220px;
}

.admin-chart-wide {
  grid-column: 1 / -1;
  max-width: 520px;
}

.finance-kpi-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.finance-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.finance-modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.finance-module-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.finance-module-card h3 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--green-dark);
}

.finance-module-card p {
  margin: 0;
  font-size: 0.8125rem;
  color: #6C757D;
  flex: 1;
}

.finance-module-card .btn-attach-logo {
  width: fit-content;
}

.finance-charts-grid {
  grid-template-columns: repeat(2, 1fr);
}

.finance-ribbon-tabs,
.hr-ribbon-tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-right: 4px;
}

.finance-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.finance-panel-header .section-title {
  margin-bottom: 6px;
}

.btn-generate-report {
  background: var(--green-dark);
  color: var(--white);
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px 22px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s;
}

.btn-generate-report:hover {
  background: #004a26;
}

.finance-inline-form {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #EEF2F0;
}

.finance-form-action {
  display: flex;
  align-items: flex-end;
}

.finance-bracket-list {
  margin: 0 0 16px;
  padding-left: 20px;
  font-size: 0.8125rem;
  color: #495057;
}

.finance-tax-summary {
  margin-top: 8px;
}

.finance-statement-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.finance-two-col-statements {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .finance-two-col-statements {
    grid-template-columns: 1fr;
  }
}

.finance-statement h3 {
  margin: 0 0 10px;
  font-size: 0.9375rem;
  color: var(--green-dark);
}

.finance-statement h3 + dl {
  margin-bottom: 20px;
}

@media (max-width: 1100px) {
  .admin-two-col,
  .admin-three-col {
    grid-template-columns: 1fr;
  }

  .admin-charts-grid {
    grid-template-columns: 1fr;
  }

  .admin-chart-wide {
    max-width: none;
  }
}

@media (max-width: 900px) {
  .admin-page {
    --admin-ribbon-width: 200px;
  }

  .admin-ribbon {
    padding: 16px 10px;
  }

  .admin-ribbon-nav .admin-work-tab {
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  .agent-page {
    --agent-ribbon-width: 200px;
  }

  .agent-ribbon {
    padding: 16px 10px;
  }

  .agent-ribbon-nav .agent-nav-link {
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  .admin-panel-grid {
    grid-template-columns: 1fr;
  }
}

.agent-page {
  --agent-ribbon-width: 240px;
}

.agent-ribbon {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--agent-ribbon-width);
  background: var(--green-dark);
  z-index: 2;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  overflow-y: auto;
}

.agent-ribbon-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 20px;
  padding: 0 12px;
}

.agent-ribbon-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.agent-ribbon-nav .agent-nav-link {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  box-shadow: none;
  transition: background 0.2s, color 0.2s;
}

.agent-ribbon-nav .agent-nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.agent-ribbon-nav .agent-nav-link.active {
  background: var(--white);
  color: var(--green-dark);
}

.agent-page .agent-main {
  margin-left: var(--agent-ribbon-width);
  max-width: none;
}

.agent-navbar {
  grid-template-columns: auto 1fr auto;
  margin-bottom: 28px;
}

.agent-nav-title h1 {
  font-size: 1.35rem;
  color: var(--green-dark);
  margin-bottom: 4px;
}

.agent-nav-title p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.agent-badge {
  background: #e8f0ff;
  color: #1a4b8c;
}

.agent-logout-btn {
  padding: 10px 18px;
  font-size: 0.82rem;
  margin-left: 8px;
}

.agent-metrics {
  margin-bottom: 28px;
}

.agent-section {
  margin-bottom: 32px;
}

.agent-queue {
  display: grid;
  gap: 16px;
}

.agent-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow);
}

.agent-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.agent-card-header h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.agent-card-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.agent-detail-list {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.agent-detail-list div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px;
  font-size: 0.88rem;
}

.agent-detail-list dt {
  color: var(--text-muted);
}

.agent-detail-list dd {
  font-weight: 600;
  margin: 0;
}

.agent-doc-list {
  margin: 0 0 16px 18px;
  font-size: 0.88rem;
  color: var(--text);
}

.agent-comment-box {
  margin-bottom: 14px;
}

.agent-comment-input {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.88rem;
}

.agent-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.agent-empty {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 20px 24px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@media (max-width: 900px) {
  .agent-navbar {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .agent-detail-list div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* Agent portal layout */
.agent-portal-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.agent-portal-intro h1 {
  font-size: 1.5rem;
  color: var(--green-dark);
  margin-bottom: 4px;
}

.agent-welcome-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.agent-portal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.agent-name-btn {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border: 1px solid var(--green-dark);
  border-radius: var(--radius-pill);
  background: var(--green-pale);
  color: var(--green-dark);
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.agent-name-btn:hover {
  background: var(--green-dark);
  color: var(--white);
}

.agent-account-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.agent-account-card {
  margin-bottom: 0;
}

.agent-account-form .edit-field input[readonly] {
  background: var(--bg);
  color: var(--text-muted);
  cursor: not-allowed;
}

.agent-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.agent-nav-link {
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--green-dark);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: background 0.2s, color 0.2s;
}

.agent-nav-link:hover,
.agent-nav-link.active {
  background: var(--green-dark);
  color: var(--white);
}

.agent-work-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.agent-work-tab {
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.agent-work-tab.active {
  background: var(--green-dark);
  color: var(--white);
}

.agent-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 32px;
}

.agent-home-grid {
  grid-template-columns: 2fr 1fr;
}

.agent-queue-card {
  padding: 24px 28px;
}

.agent-queue-links {
  display: grid;
  gap: 10px;
}

.agent-queue-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--bg);
  border-radius: var(--radius);
  color: var(--green-dark);
  font-weight: 600;
  text-decoration: none;
}

.agent-queue-link span {
  background: var(--green-dark);
  color: var(--white);
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
}

.agent-verify-steps {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.88rem;
}

.agent-verify-steps label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.agent-verify-steps input[type="checkbox"] {
  width: auto;
  margin: 0;
  cursor: pointer;
  pointer-events: auto;
}

.btn-close-query {
  background: #1a8f4c;
  color: var(--white);
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-close-query:hover {
  background: #157a41;
}

.assignment-comment-form {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.assignment-comment-form input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.88rem;
}

.comments-thread {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.agent-doc-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.agent-doc-info {
  display: grid;
  gap: 4px;
  font-size: 0.88rem;
}

.agent-doc-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.doc-decline-form {
  width: 100%;
  margin-top: 10px;
}

.doc-decline-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.88rem;
  margin-bottom: 8px;
}

.doc-decline-reason {
  font-size: 0.85rem;
  color: #b42318;
  margin-top: 6px;
}

.agent-proof-link {
  color: var(--green-dark);
  font-weight: 600;
}

.agent-subheading {
  font-size: 0.92rem;
  margin: 12px 0 8px;
  color: var(--green-dark);
}

.process-log {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
}

.process-log-item + .process-log-item {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.process-log-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.withdrawal-approval-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
}

.withdrawal-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
}

.withdrawal-partial-input,
.withdrawal-reason-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.88rem;
}

.agent-hint.success {
  color: #1a8f4c;
  font-size: 0.88rem;
  margin: 0;
}

.agent-empty-inline {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
}

@media (max-width: 900px) {
  .agent-portal-header {
    grid-template-columns: 1fr;
  }

  .agent-home-grid {
    grid-template-columns: 1fr;
  }

  .agent-doc-row {
    flex-direction: column;
  }

  .agent-chat-layout-inner,
  .agent-chat-layout {
    grid-template-columns: 1fr;
  }
}

/* Support chat widget */
.support-chat-backdrop:not(.is-open),
.support-chat-panel:not(.is-open) {
  display: none !important;
  pointer-events: none;
  visibility: hidden;
}

.support-chat-backdrop.is-open {
  display: block !important;
  pointer-events: auto;
  visibility: visible;
}

.support-chat-panel.is-open {
  display: flex !important;
  pointer-events: auto;
  visibility: visible;
}

body.support-chat-active {
  overflow: hidden;
}

.support-chat-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 200;
}

.support-chat-panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(420px, 100vw);
  background: var(--white);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
  z-index: 201;
  display: flex;
  flex-direction: column;
}

.support-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--green-dark);
  color: var(--white);
}

.support-chat-header h2 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.support-chat-header p {
  font-size: 0.82rem;
  opacity: 0.9;
}

.support-chat-close {
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.support-chat-body {
  flex: 1;
  overflow: auto;
  padding: 20px 22px;
}

.support-chat-form {
  display: grid;
  gap: 14px;
}

.support-chat-form label {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.support-chat-form textarea {
  resize: vertical;
  min-height: 96px;
}

.support-chat-form input,
.support-chat-form textarea,
.support-chat-form select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.88rem;
  background: var(--white);
  color: var(--text);
  pointer-events: auto;
}

.support-chat-intro,
.support-chat-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.support-chat-submit {
  width: 100%;
  justify-content: center;
}

.support-chat-waiting {
  text-align: center;
  padding: 24px 8px;
}

.support-chat-wait-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 4px solid rgba(0, 92, 47, 0.15);
  border-top-color: var(--green-dark);
  animation: chatSpin 1s linear infinite;
}

@keyframes chatSpin {
  to { transform: rotate(360deg); }
}

.support-chat-eta {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 16px;
}

.support-chat-summary {
  text-align: left;
  margin: 16px 0;
}

.support-chat-summary div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px;
  font-size: 0.88rem;
  margin-bottom: 8px;
}

.support-chat-agent-line {
  font-size: 0.85rem;
  color: var(--green-dark);
  margin-bottom: 12px;
}

.support-chat-messages {
  display: grid;
  gap: 12px;
  max-height: 340px;
  overflow: auto;
  margin-bottom: 14px;
  padding-right: 4px;
}

.support-chat-message-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.support-chat-message-form input[type="text"] {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.88rem;
}

.chat-msg {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.88rem;
}

.chat-msg-retailer {
  background: #eef6f1;
  margin-left: 24px;
}

.chat-msg-driver {
  background: #eef4fb;
  margin-left: 24px;
}

.chat-msg-agent {
  background: var(--bg);
  margin-right: 24px;
}

.chat-msg-system {
  background: #fff8e6;
  font-style: italic;
}

.chat-msg-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.chat-msg-attachment {
  display: inline-block;
  margin-top: 6px;
  color: var(--green-dark);
  font-weight: 600;
  font-size: 0.82rem;
}

.agent-chat-layout,
.agent-chat-layout-inner {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  align-items: start;
}

.agent-chat-type-row {
  margin-bottom: 8px;
}

.chat-type-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chat-type-badge-retailer {
  background: #eef6f1;
  color: var(--green-dark);
}

.chat-type-badge-driver {
  background: #eef4fb;
  color: #1a4b8c;
}

.agent-chat-list-type {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.agent-chat-list-item.chat-type-driver.active,
.agent-chat-list-item.active .agent-chat-list-type {
  color: inherit;
}

.agent-chat-list {
  display: grid;
  gap: 8px;
}

.agent-chat-list-item {
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  font-family: inherit;
}

.agent-chat-list-item.active {
  border-color: var(--green-dark);
  background: #eef6f1;
}

.agent-chat-list-item strong {
  display: block;
  margin-bottom: 4px;
}

.agent-chat-list-item span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.agent-chat-window {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  min-height: 480px;
  display: flex;
  flex-direction: column;
}

.agent-chat-window-empty {
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.agent-chat-window-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.agent-chat-window-header h3 {
  margin-bottom: 4px;
}

.agent-chat-window-header p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.agent-chat-query-preview {
  font-size: 0.88rem;
  background: var(--bg);
  padding: 12px 14px;
  border-radius: var(--radius);
  margin-bottom: 14px;
}

.agent-chat-messages {
  flex: 1;
  max-height: none;
}

.chat-history-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.chat-history-search {
  flex: 1;
  min-width: 220px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.88rem;
}

.agent-chat-history-layout #historyContent {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  align-items: start;
}

.agent-chat-readonly-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.support-chat-ref-box {
  background: #eef6f1;
  border: 1px solid rgba(0, 92, 47, 0.2);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: center;
  margin: 16px 0;
}

.support-chat-ref-box span {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.support-chat-ref-box strong {
  font-size: 1.15rem;
  color: var(--green-dark);
  letter-spacing: 0.04em;
}

.support-chat-closed {
  text-align: center;
}

.support-chat-closed h3 {
  color: var(--green-dark);
  margin-bottom: 8px;
}

.support-chat-messages-readonly {
  text-align: left;
  margin: 16px 0;
  max-height: 280px;
}

@media (max-width: 900px) {
  .agent-chat-history-layout #historyContent {
    grid-template-columns: 1fr;
  }

  .refunds-layout {
    grid-template-columns: 1fr;
  }

  .refund-history-row,
  .refund-history-item summary {
    grid-template-columns: 1fr 1fr;
  }

  .refund-history-head span:nth-child(n + 3),
  .refund-history-item summary span:nth-child(n + 3) {
    display: none;
  }
}

/* Refunds */
.refunds-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.refund-policy-box {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
}

.refund-policy-box h3 {
  font-size: 0.95rem;
  color: var(--green-dark);
  margin-bottom: 10px;
}

.refund-policy-list {
  margin: 0 0 0 18px;
  font-size: 0.88rem;
  color: var(--text);
}

.refund-order-lookup {
  display: flex;
  gap: 10px;
}

.refund-order-lookup input {
  flex: 1;
}

.refund-order-panel {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.refund-subheading {
  font-size: 0.95rem;
  color: var(--green-dark);
  margin: 16px 0 10px;
}

.refund-items-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.refund-item-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}

.refund-item-row input {
  margin-top: 4px;
}

.refund-item-info {
  display: grid;
  gap: 4px;
  font-size: 0.88rem;
}

.refund-total-line {
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.refund-policy-checks {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 0.88rem;
}

.refund-policy-checks label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.refund-customer-details-panel {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.refund-customer-email-field {
  margin-bottom: 16px;
}

.refund-decline-details-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.88rem;
  margin-bottom: 14px;
}

.refund-decline-details-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.refund-customer-email-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.refund-email-edit {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.refund-customer-email-input {
  flex: 1;
  min-width: 220px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.88rem;
}

.refund-history-section {
  margin-bottom: 32px;
}

.refund-history-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.refund-history-intro {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.refund-history-search-wrap {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 280px;
}

.refund-history-table-wrap {
  overflow-x: auto;
}

.refund-history-table {
  min-width: 720px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.refund-history-row {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.8fr 1fr 1fr 0.9fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.refund-history-row:last-child {
  border-bottom: none;
}

.refund-history-head {
  background: var(--bg);
  font-weight: 700;
  color: var(--green-dark);
}

.refund-history-item {
  background: var(--white);
}

.refund-history-item summary {
  cursor: pointer;
  list-style: none;
}

.refund-history-item summary::-webkit-details-marker {
  display: none;
}

.refund-history-item[open] summary {
  background: #f7fbf9;
}

.refund-query-num {
  font-weight: 700;
  color: var(--green-dark);
}

.refund-history-detail {
  padding: 14px 16px 4px;
  margin-top: 0;
  border-top: 1px solid var(--border);
}

.agent-refund-history-row {
  grid-template-columns: 1.1fr 1fr 0.85fr 0.75fr 1fr 0.85fr;
}

.refund-email-preview dd a {
  word-break: break-all;
  color: var(--green-dark);
}

.refund-email-body {
  background: var(--bg);
  padding: 14px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  white-space: pre-wrap;
  margin: 14px 0;
  max-height: 200px;
  overflow: auto;
}

.customer-refund-page {
  min-height: 100vh;
}

.customer-refund-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.customer-refund-header {
  text-align: center;
  margin-bottom: 28px;
}

.customer-refund-header .logo-img {
  height: 72px;
  margin-bottom: 16px;
}

.customer-refund-header h1 {
  color: var(--green-dark);
  margin-bottom: 8px;
}

.customer-refund-card {
  padding: 28px 32px;
}

.customer-refund-summary {
  margin-bottom: 24px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.customer-refund-message,
.customer-refund-success {
  text-align: center;
}

.customer-refund-success h2 {
  color: var(--green-dark);
  margin-bottom: 16px;
}

/* HR Dashboard */
.hr-panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.hr-panel-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hr-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.hr-dynamic-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.hr-dynamic-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: #f8f9fa;
  border-radius: var(--radius);
}

.hr-check-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.it-role-form-grid {
  align-items: start;
}

.it-permission-picker-field {
  grid-column: 1 / -1;
}

.it-permission-picker-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.it-permission-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px 16px;
  padding: 12px;
  border: 1px solid #e5e5e5;
  border-radius: var(--radius);
  background: #f8f9fa;
}

.it-permission-option {
  white-space: normal;
}

.hr-readonly-block {
  background: #f8f9fa;
  border: 1px solid #e5e5e5;
  border-radius: var(--radius);
  padding: 12px;
  margin: 0;
  white-space: pre-wrap;
}

.hr-email-preview {
  max-height: 240px;
  overflow: auto;
  font-family: inherit;
  font-size: 0.92rem;
}

.hr-interview-candidate-select {
  min-height: 120px;
  margin-top: 8px;
}

.hr-doc-list {
  margin: 0;
  padding-left: 18px;
}

.hr-employee-form .profile-form-actions,
.hr-vacancy-form .profile-form-actions,
.hr-application-review .profile-form-actions {
  margin-top: 16px;
}

@media (max-width: 720px) {
  .hr-dynamic-row {
    grid-template-columns: 1fr;
  }
}

/* Careers Portal */
.careers-page {
  min-height: 100vh;
  background: #f4f6f8;
}

.careers-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
}

.careers-logo .logo-img {
  height: 42px;
}

.careers-nav a {
  color: var(--green-dark);
  font-weight: 600;
  text-decoration: none;
}

.careers-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.careers-hero h1 {
  margin: 8px 0 12px;
}

.careers-vacancy-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.careers-vacancy-card {
  border: 1px solid #e5e5e5;
  border-radius: var(--radius);
  padding: 20px;
  background: #fff;
}

.careers-vacancy-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.careers-vacancy-card h3 {
  margin: 0 0 8px;
}

.careers-vacancy-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.careers-vacancy-meta span:not(:last-child)::after {
  content: '•';
  margin-left: 16px;
  color: #ccc;
}

.careers-vacancy-salary {
  margin: 8px 0 0;
  font-weight: 600;
  color: var(--green-dark);
}

.careers-vacancy-body h4,
.careers-apply-details .section-title {
  margin: 16px 0 8px;
  font-size: 1rem;
}

.careers-vacancy-block {
  line-height: 1.6;
  color: #444;
}

.careers-apply-main {
  max-width: 820px;
}

.careers-apply-card {
  margin-bottom: 24px;
}

.careers-apply-card h1 {
  margin: 8px 0;
}

.careers-apply-success {
  text-align: center;
  padding: 40px 24px;
}

.careers-success-msg {
  color: var(--green-dark);
  font-weight: 600;
}

.careers-about-card {
  margin-bottom: 24px;
}

.careers-about-text {
  line-height: 1.7;
  color: #333;
  margin: 0 0 24px;
}

.careers-statements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.careers-statement-card {
  background: rgba(0, 92, 47, 0.05);
  border: 1px solid rgba(0, 92, 47, 0.12);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
}

.careers-statement-card h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: var(--green-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.careers-statement-card p {
  margin: 0;
  line-height: 1.6;
  color: #444;
}

.careers-vacancies-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.careers-filters-panel {
  margin-bottom: 20px;
}

.careers-filters-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.careers-vacancy-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.careers-hr-content-preview {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.careers-hr-content-preview > article > p {
  margin: 0;
  line-height: 1.6;
  color: #444;
  white-space: pre-wrap;
}

.careers-hr-content-preview .careers-statement-card p {
  white-space: pre-wrap;
}

/* Employee Portal */
.employee-portal-page .employee-ribbon {
  background: var(--green-dark);
}

.employee-portal-page .admin-main > .agent-portal-header {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: -24px -32px 20px;
  padding: 24px 32px 16px;
  background: rgba(245, 246, 248, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.employee-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 24px;
}

.employee-hours-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.employee-hours-stat {
  background: var(--green-pale);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
}

.employee-hours-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.employee-dashboard-grid,
.employee-org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.employee-dashboard-card,
.employee-org-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.employee-dashboard-card h3,
.employee-org-card h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--green-dark);
}

.employee-dashboard-card p,
.employee-org-card p {
  margin: 0;
  flex: 1;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.employee-org-doc-content {
  line-height: 1.7;
  color: #333;
  margin: 16px 0;
}

.employee-success-msg {
  color: var(--green-dark);
  font-weight: 500;
}

.employee-empty-state {
  padding: 32px 16px;
  text-align: center;
}

.employee-enquiry-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0 20px;
}

.employee-enquiry-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.employee-enquiry-card p {
  margin: 6px 0 8px;
  font-size: 0.9rem;
  color: #444;
}

.employee-enquiry-reply {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.employee-enquiry-reply input {
  flex: 1;
  min-width: 180px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
}

.employee-enquiry-active {
  flex-direction: column;
}

.employee-enquiry-active-body {
  width: 100%;
}

.payroll-hours-note {
  margin: 0 0 16px;
  padding: 12px 16px;
  background: var(--green-pale);
  border-radius: var(--radius-sm);
}

.admin-form-full {
  grid-column: 1 / -1;
}

/* Employee Dashboard Overview */
.employee-ribbon-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  max-height: none;
  padding-bottom: 4px;
}

.employee-ribbon-tabs .admin-work-tab {
  white-space: nowrap;
  flex-shrink: 0;
}

.emp-welcome-card {
  margin-bottom: 20px;
}

.emp-welcome-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
}

.emp-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--green-dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
}

.emp-welcome-name {
  margin: 0 0 6px;
  font-size: 1.35rem;
  color: var(--green-dark);
}

.emp-welcome-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.emp-welcome-meta span:not(:last-child)::after {
  content: '·';
  margin-left: 16px;
  color: var(--border);
}

.emp-welcome-manager {
  margin: 0 0 10px;
  font-size: 0.92rem;
}

.emp-work-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.emp-work-status-select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
}

.emp-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.emp-status-online { background: #22c55e; }
.emp-status-away { background: #f59e0b; }
.emp-status-offline { background: #94a3b8; }

.emp-welcome-datetime {
  text-align: right;
}

.emp-datetime-label {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.emp-datetime-value {
  margin: 4px 0 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--green-dark);
}

.emp-quick-actions {
  margin-bottom: 20px;
}

.emp-quick-actions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.emp-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.emp-task-list,
.emp-notif-list {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}

.emp-task-list li,
.emp-notif-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.emp-task-list li span,
.emp-notif-list li span {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.emp-notif-unread {
  background: var(--green-pale);
  padding: 10px 12px !important;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
}

.emp-link-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.emp-attendance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.emp-progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0 4px;
}

.emp-progress-fill {
  height: 100%;
  background: var(--green-dark);
  border-radius: 4px;
}

.emp-news-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.emp-news-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.emp-news-card h3 {
  margin: 8px 0 6px;
  font-size: 1rem;
}

.emp-news-card p {
  margin: 0 0 8px;
  color: #444;
  font-size: 0.9rem;
}

.emp-notif-full-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.emp-notif-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.emp-notif-item p {
  margin: 4px 0;
  color: #444;
  font-size: 0.9rem;
}

.emp-feedback {
  margin: 12px 0;
  padding: 14px 18px;
  border-left: 4px solid var(--green-dark);
  background: var(--green-pale);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.emp-feedback cite {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: normal;
}

.emp-inline-badge {
  position: static;
  display: inline-flex;
  margin-left: 6px;
  vertical-align: middle;
}

.btn-open-chat {
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--green-dark);
  color: #fff;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.btn-open-chat:hover {
  opacity: 0.92;
}

@media (max-width: 768px) {
  .emp-welcome-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .emp-welcome-datetime {
    text-align: center;
  }

  .emp-welcome-meta span:not(:last-child)::after {
    display: none;
  }
}

.emp-admin-preview-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin: 0 0 20px;
  padding: 12px 16px;
  background: #fff8e6;
  border: 1px solid #f0c040;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: #5c4a00;
}

.emp-admin-preview-banner strong {
  color: #8a6500;
}

.emp-admin-preview-banner span {
  flex: 1;
  min-width: 200px;
}

