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

:root {
  --primary: #8D6E63;
  --primary-dark: #5D4037;
  --primary-light: #D7CCC8;
  --surface: #FDFBF7;
  --surface-2: #FFFFFF;
  --surface-3: #F5F5F5;
  --border: rgba(93, 64, 55, 0.12);
  --text-primary: #3E2723;
  --text-secondary: #795548;
  --error: #E53935;
  --success: #43A047;
  --sidebar-w: 220px;
  --topbar-h: 64px;
  --radius: 10px;
  --brown-50: #FAF6F1;
  --brown-100: #EFE3D4;
  --brown-200: #D9BFA0;
  --brown-400: #A67C52;
  --brown-600: #7A5230;
  --brown-800: #4A2F17;
  --cream: #F5EFE6;
}

html {
  font-size: 14px;
}

html,
body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  background: var(--surface);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  display: flex;
}

/* ─── Sidebar ────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--surface-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.5rem 1.25rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(93, 64, 55, 0.2);
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s;
  position: relative;
}

.nav-item:hover {
  background: var(--surface-3);
  color: var(--text-primary);
  transform: translateX(2px);
}

.nav-item.active {
  background: rgba(141, 110, 99, 0.15);
  color: var(--primary-dark);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 99px;
  background: var(--primary-dark);
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 0.5rem 0.85rem;
}

.sidebar-section-title {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--brown-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.75rem 0.85rem 0.25rem;
}

.sidebar-footer {
  padding: 1rem 0.75rem;
  border-top: 1px solid var(--border);
}

.doc-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 10px;
  transition: all 0.2s;
  text-decoration: none;
  margin-bottom: 0.25rem;
}

.doc-btn:hover {
  background: var(--surface-3);
  color: var(--text-primary);
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--error);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 10px;
  transition: background 0.2s;
}

.logout-btn:hover {
  background: rgba(229, 57, 53, 0.08);
}

/* ─── Main Content ───────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Topbar — Modern Klasik Coklat ─────────── */
.topbar {
  height: var(--topbar-h);
  background: #FDFBF7;
  border-bottom: 1px solid rgba(93, 64, 55, 0.1);
  box-shadow: 0 2px 16px rgba(62, 39, 35, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Menu toggle */
.menu-toggle {
  display: none;
  width: 35px;
  height: 35px;
  background: none;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-secondary);
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.menu-toggle:hover {
  background: rgba(93, 64, 55, 0.08);
  border-color: rgba(93, 64, 55, 0.12);
  color: var(--brown-800);
}

/* Breadcrumb */
.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-brand {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--brown-400);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.topbar-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brown-800);
  letter-spacing: -0.01em;
}

/* Divider */
.tb-divider {
  width: 1px;
  height: 22px;
  background: rgba(93, 64, 55, 0.15);
  margin: 0 0.4rem;
}

/* Cart button */
.tb-cart-btn {
  position: relative;
  width: 38px;
  height: 38px;
  background: rgba(93, 64, 55, 0.07);
  border: 1px solid rgba(93, 64, 55, 0.12);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brown-800);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.tb-cart-btn:hover {
  background: rgba(93, 64, 55, 0.14);
  border-color: rgba(93, 64, 55, 0.22);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(62, 39, 35, 0.12);
}

.tb-cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  background: linear-gradient(135deg, #3E2723, #6D4C41);
  color: #EFE3D4;
  font-size: 9px;
  font-weight: 800;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--surface);
  box-shadow: 0 2px 6px rgba(62, 39, 35, 0.3);
  animation: tb-badge-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tb-badge-pop {
  from {
    transform: scale(0);
  }

  to {
    transform: scale(1);
  }
}

/* User section */
.tb-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: default;
}

.tb-user-text {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.tb-user-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brown-800);
  line-height: 1.2;
  white-space: nowrap;
}

.tb-user-role {
  font-size: 0.67rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: rgba(141, 110, 99, 0.12);
  border: 1px solid rgba(141, 110, 99, 0.18);
  padding: 1px 7px;
  border-radius: 99px;
  text-transform: capitalize;
  letter-spacing: 0.03em;
  width: fit-content;
  margin-left: auto;
}

.tb-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.tb-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid transparent;
  box-shadow: 0 0 0 2px var(--primary-light);
  transition: box-shadow 0.2s;
}

.tb-avatar-wrap:hover .tb-avatar {
  box-shadow: 0 0 0 2px var(--primary);
}

/* Legacy aliases — keep old IDs working */
.user-info {
  display: none;
}

.user-avatar {
  display: none;
}

.cart-btn {
  display: none;
}

/* ─── Pages ──────────────────────────────────── */
.page {
  display: none;
  flex: 1;
  padding: 1.5rem 1.25rem;
  animation: pageFadeIn 0.35s ease;
}

.page.active {
  display: block;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

.page-header {
  margin-bottom: 1.5rem;
}

.page-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.page-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

/* ─── Stats Grid ─────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(93, 64, 55, 0.1);
}

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

.stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

/* ─── Profile Quick Card ─────────────────────── */
.profile-quick-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s;
}

.profile-quick-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(93, 64, 55, 0.08);
}

.pq-info {
  flex: 1;
  min-width: 160px;
}

.pq-info h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.pq-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

/* ─── Profile & Form ─────────────────────────── */
.profile-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.profile-avatar-section {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

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

.profile-avatar-section h3 {
  font-weight: 800;
  color: var(--primary-dark);
}

.profile-avatar-section p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.role-badge {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.2rem 0.7rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(141, 110, 99, 0.15);
  color: var(--primary-dark);
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-group {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input,
.form-group select {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(121, 85, 72, 0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.1em;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px rgba(141, 110, 99, 0.15);
}

.input-readonly {
  background: var(--surface-3) !important;
  color: var(--text-secondary) !important;
  cursor: not-allowed;
  opacity: 0.7;
}

.form-help-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  line-height: 1.4;
}

.form-help-text strong {
  color: var(--primary-dark);
}

/* ─── Settings Card ──────────────────────────── */
.settings-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.settings-card h4 {
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.settings-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.settings-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.settings-item-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

/* ─── Buttons ────────────────────────────────── */
.btn-primary {
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.15s, box-shadow 0.15s;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(93, 64, 55, 0.25);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(93, 64, 55, 0.35);
}

.btn-primary.loading .btn-text {
  opacity: 0;
}

.btn-primary.loading .btn-spinner {
  display: block;
}

.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  position: absolute;
}

.btn-sm {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  background: rgba(141, 110, 99, 0.1);
  border: 1px solid rgba(141, 110, 99, 0.2);
  color: var(--primary-dark);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-sm:hover {
  background: rgba(141, 110, 99, 0.2);
}

.btn-sm.btn-primary {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white !important;
  border: none;
  box-shadow: 0 4px 10px rgba(93, 64, 55, 0.2);
}

.btn-sm.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(93, 64, 55, 0.3);
  color: white !important;
}

.btn-danger {
  background: rgba(229, 57, 53, 0.1);
  border-color: rgba(229, 57, 53, 0.2);
  color: var(--error);
}

.btn-danger:hover {
  background: rgba(229, 57, 53, 0.15);
}

.btn-secondary {
  padding: 0.65rem 1.4rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}

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

.btn-danger-solid {
  padding: 0.65rem 1.4rem;
  background: var(--error);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.btn-danger-solid:hover {
  background: #C62828;
}

/* ─── Searchable Select ──────────────────────── */
.searchable-select {
  position: relative;
  width: 100%;
}

.searchable-select input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.searchable-select input:focus {
  border-color: var(--primary);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px rgba(141, 110, 99, 0.15);
}

.searchable-select .select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 250px;
  overflow-y: auto;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 5px;
  z-index: 1000;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  display: none;
}

.searchable-select .select-dropdown.show {
  display: block;
}

.searchable-select .option {
  padding: 10px 15px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: background 0.2s;
}

.searchable-select .option:hover {
  background: var(--brown-50);
}

.searchable-select .option.selected {
  background: var(--brown-100);
  font-weight: 600;
}

.searchable-select .no-results {
  padding: 15px;
  text-align: center;
  color: var(--brown-400);
  font-size: 0.85rem;
}

/* ─── Modal & Alert ──────────────────────────── */
.alert {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  display: none;
  margin-bottom: 1.5rem;
}

.alert.show {
  display: block;
  animation: fadeIn 0.3s;
}

.alert.success {
  background: rgba(67, 160, 71, 0.1);
  color: var(--success);
  border: 1px solid rgba(67, 160, 71, 0.2);
}

.alert.error {
  background: rgba(229, 57, 53, 0.1);
  color: var(--error);
  border: 1px solid rgba(229, 57, 53, 0.2);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 380px;
  width: 100%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.25s;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  z-index: 2001;
  position: relative;
}

.modal-overlay.show .modal {
  transform: scale(1);
}

.modal-icon {
  width: 64px;
  height: 64px;
  background: rgba(229, 57, 53, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--error);
  margin: 0 auto 1.25rem;
}

.modal h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.modal p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.agent-card {
  background: var(--brown-50);
  border: 0.5px solid var(--brown-200);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
  height: 100%;
  position: relative;
}

.agent-card:hover {
  border-color: var(--brown-400);
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(74, 47, 23, 0.15);
}

/* ── FREE Badge ──────────────────────── */
.free-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #2E7D32, #43A047);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.3);
  animation: free-badge-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes free-badge-pop {
  from {
    transform: scale(0) rotate(-20deg);
  }

  to {
    transform: scale(1) rotate(0deg);
  }
}

/* FREE badge variant for modal */
.free-badge-modal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #2E7D32, #43A047);
  border-radius: 50%;
  color: white;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(46, 125, 50, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

/* Disabled buy button for free agents */
.btn-buy:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--brown-400);
}

.btn-buy:disabled:hover {
  background: var(--brown-400);
}

#marketGrid {
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 1200px) {

  #marketGrid,
  #myAgentsGrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {

  #marketGrid,
  #myAgentsGrid {
    grid-template-columns: 1fr;
  }
}

.card-top {
  background: var(--brown-800);
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.card-top::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
  z-index: 0;
}

.card-top::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 15%;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.02);
  pointer-events: none;
  z-index: 0;
}

.card-avatar {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid var(--brown-400);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.card-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 1;
}

.card-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--brown-100);
  margin: 0;
}

.card-badge {
  display: inline-block;
  font-size: 11px;
  background: var(--brown-400);
  color: var(--brown-50);
  padding: 2px 8px;
  border-radius: 4px;
  width: fit-content;
}

.card-body {
  padding: 24px 20px;
  flex: 1;
}

.card-desc {
  font-size: 0.95rem;
  color: var(--brown-600);
  line-height: 1.7;
  margin: 0;
}

.card-footer {
  padding: 14px 20px;
  border-top: 0.5px solid var(--brown-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--cream);
}

.card-price {
  font-size: 15px;
  font-weight: 500;
  color: var(--brown-800);
}

.card-price span {
  font-size: 11px;
  font-weight: 400;
  color: var(--brown-400);
  display: block;
  margin-bottom: 1px;
}

.btn-buy {
  background: var(--brown-800);
  color: var(--brown-100);
  border: none;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
  padding: 10px 20px;
  font-weight: 600;
}

.btn-buy:hover {
  background: var(--brown-600);
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  margin-top: 3rem;
  margin-bottom: 2rem;
}

.page-btn {
  padding: 10px 18px;
  border-radius: 10px;
  background: white;
  border: 1px solid var(--border);
  color: var(--brown-800);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover:not(:disabled) {
  background: var(--brown-50);
  border-color: var(--brown-400);
  color: var(--brown-600);
}

.page-btn.active {
  background: var(--brown-800);
  color: white;
  border-color: var(--brown-800);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ─── Agent Detail Modal (am-) — Premium Modern Klasik ──── */

.am-panel {
  width: min(70vw, 800px);
  max-height: 90vh;
  background: #FDFBF7;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(62, 39, 35, 0.15);
  position: relative;
  overflow: hidden;
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.33, 1, 0.68, 1);
  margin: auto;
}

#agentModal.show .am-panel,
#rateModal.show .am-panel,
#suggestAgentModal.show .am-panel,
#agreementModal.show .am-panel,
#editSubmissionModal.show .am-panel,
#deleteSubmissionModal.show .am-panel,
#paymentModal.show .am-panel {
  transform: scale(1);
  opacity: 1;
}

/* Decorative top gradient stripe */
.am-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3E2723, #8D6E63, #D7CCC8);
}

/* ── Header ───────────────────────── */
.am-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.8rem 2.5rem 1.4rem;
  flex-shrink: 0;
  background: #FDFBF7;
}

.am-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--brown-800);
  letter-spacing: -0.02em;
  margin: 0;
}

.am-close {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(93, 64, 55, 0.15);
  border-radius: 12px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
  flex-shrink: 0;
}

.am-close:hover {
  background: rgba(93, 64, 55, 0.08);
  border-color: rgba(93, 64, 55, 0.25);
  color: var(--brown-800);
  transform: rotate(90deg);
}

.am-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(93, 64, 55, 0.12), rgba(93, 64, 55, 0.04));
  flex-shrink: 0;
}

/* ── Body ─────────────────────────── */
.am-body {
  flex: 1;
  overflow-y: auto;
  padding: 2rem 2.5rem;
  scroll-behavior: smooth;
}

.am-body::-webkit-scrollbar {
  width: 6px;
}

.am-body::-webkit-scrollbar-track {
  background: transparent;
}

.am-body::-webkit-scrollbar-thumb {
  background: rgba(93, 64, 55, 0.2);
  border-radius: 99px;
}

/* ── Footer ───────────────────────── */
.am-footer {
  padding: 1.4rem 2.5rem;
  border-top: 1px solid rgba(93, 64, 55, 0.1);
  background: white;
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
}

.am-cart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 1rem 1.8rem;
  background: linear-gradient(135deg, #3E2723 0%, #6D4C41 100%);
  color: #EFE3D4;
  border: none;
  border-radius: 16px;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: all 0.25s;
  box-shadow: 0 8px 24px rgba(62, 39, 35, 0.25);
}

.am-cart-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #4E342E 0%, #795548 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(62, 39, 35, 0.35);
}

.am-cart-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.6);
  box-shadow: none;
}

/* Feature List Styles */
.am-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.am-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  font-size: 0.95rem;
  color: var(--brown-600);
  line-height: 1.5;
}

.am-feature-icon {
  color: var(--primary-dark);
  margin-top: 2px;
  flex-shrink: 0;
}

/* ── Responsive ───────────────────── */
@media (max-width: 768px) {
  .am-panel {
    width: 90vw;
    max-height: 85vh;
    border-radius: 20px;
  }

  .am-header {
    padding: 1.5rem 1.5rem 1rem;
  }

  .am-body {
    padding: 1.5rem;
  }

  .am-footer {
    padding: 1.2rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .am-panel {
    width: 95vw;
  }

  .am-cart-btn {
    width: 100%;
  }
}

/* ─── Cart Button & Badge (legacy — replaced by .tb-cart-btn) ── */
.cart-btn {
  display: none;
}

.cart-count-badge {
  display: none;
}

/* ─── Toast Notification ──────────────────────── */
.toast {
  position: fixed;
  bottom: 90px;
  right: 30px;
  background: var(--brown-800);
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── Cart Modal (cm-) — Premium Modern Klasik ──── */

/* Override overlay for cart: left-edge background, right-side panel */
#cartModal {
  align-items: stretch;
  justify-content: flex-end;
}

.cm-panel {
  width: min(72vw, 860px);
  height: 100vh;
  background: #FDFBF7;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(93, 64, 55, 0.1);
  box-shadow: -20px 0 60px rgba(62, 39, 35, 0.12);
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.32, 0, 0.67, 0);
  position: relative;
  overflow: hidden;
}

#cartModal.show .cm-panel {
  transform: translateX(0);
  transition-timing-function: cubic-bezier(0.33, 1, 0.68, 1);
}

/* Decorative top gradient stripe */
.cm-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3E2723, #8D6E63, #D7CCC8);
}

/* ── Header ───────────────────────── */
.cm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.8rem 2rem 1.4rem;
  flex-shrink: 0;
  background: #FDFBF7;
}

.cm-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cm-header-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #3E2723, #6D4C41);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #EFE3D4;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(62, 39, 35, 0.25);
}

.cm-title {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--brown-800);
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
}

.cm-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: 3px 0 0;
}

.cm-close {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(93, 64, 55, 0.15);
  border-radius: 12px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
  flex-shrink: 0;
}

.cm-close:hover {
  background: rgba(93, 64, 55, 0.08);
  border-color: rgba(93, 64, 55, 0.25);
  color: var(--brown-800);
  transform: rotate(90deg);
}

.cm-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(93, 64, 55, 0.12), rgba(93, 64, 55, 0.04));
  flex-shrink: 0;
}

/* ── Body / Items ─────────────────── */
.cm-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 2rem;
  scroll-behavior: smooth;
}

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

.cm-body::-webkit-scrollbar-track {
  background: transparent;
}

.cm-body::-webkit-scrollbar-thumb {
  background: rgba(93, 64, 55, 0.2);
  border-radius: 99px;
}

.cm-loading {
  text-align: center;
  color: var(--text-secondary);
  padding: 4rem 0;
  font-size: 0.9rem;
}

/* ── Item cards ───────────────────── */
.cart-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  border-radius: 16px;
  background: white;
  margin-bottom: 0.85rem;
  border: 1px solid rgba(93, 64, 55, 0.07);
  box-shadow: 0 2px 10px rgba(62, 39, 35, 0.04);
  transition: all 0.2s;
  position: relative;
}

.cart-item:hover {
  border-color: rgba(93, 64, 55, 0.18);
  box-shadow: 0 6px 20px rgba(62, 39, 35, 0.08);
  transform: translateY(-2px);
}

/* Checkbox select */
.cart-item-check {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid rgba(93, 64, 55, 0.25);
  cursor: pointer;
  appearance: none;
  flex-shrink: 0;
  transition: all 0.15s;
  background: white;
  position: relative;
}

.cart-item-check:checked {
  background: linear-gradient(135deg, #3E2723, #6D4C41);
  border-color: #3E2723;
}

.cart-item-check:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 7px;
  height: 11px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.cart-item-img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid rgba(93, 64, 55, 0.08);
  flex-shrink: 0;
}

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

.cart-item-name {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--brown-800);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.cart-item-price {
  font-weight: 800;
  color: var(--primary-dark);
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.btn-remove-cart {
  width: 34px;
  height: 34px;
  background: none;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #B71C1C;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  opacity: 0.5;
}

.cart-item:hover .btn-remove-cart {
  opacity: 1;
}

.btn-remove-cart:hover {
  background: #FFF1F1;
  border-color: rgba(183, 28, 28, 0.15);
  transform: scale(1.1);
}

/* ── Footer ───────────────────────── */
.cm-footer {
  padding: 1.4rem 2rem 1.8rem;
  border-top: 1px solid rgba(93, 64, 55, 0.1);
  background: white;
  flex-shrink: 0;
}

.cm-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
  padding: 1rem 1.2rem;
  background: rgba(93, 64, 55, 0.04);
  border-radius: 14px;
  border: 1px solid rgba(93, 64, 55, 0.08);
}

.cm-total-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.cm-total-amount {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--brown-800);
  letter-spacing: -0.02em;
}

.cm-checkout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #3E2723 0%, #6D4C41 100%);
  color: #EFE3D4;
  border: none;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: all 0.25s;
  box-shadow: 0 8px 24px rgba(62, 39, 35, 0.25);
}

.cm-checkout-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #4E342E 0%, #795548 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(62, 39, 35, 0.35);
}

.cm-checkout-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
  filter: grayscale(0.6);
}

/* ── Responsive ───────────────────── */
@media (max-width: 900px) {
  .cm-panel {
    width: 80vw;
  }
}

@media (max-width: 600px) {
  .cm-panel {
    width: 100vw;
    border-left: none;
  }

  .cm-header {
    padding: 1.2rem 1.2rem 1rem;
  }

  .cm-body {
    padding: 1rem 1.2rem;
  }

  .cm-footer {
    padding: 1rem 1.2rem 1.4rem;
  }

  .cm-total-amount {
    font-size: 1.2rem;
  }
}


.status-badge-top {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-active {
  background: #e8f5e9;
  color: #2e7d32;
}

.status-expired {
  background: #ffebee;
  color: #c62828;
}

/* ─── Responsive ─────────────────────────────── */
@media (max-width: 768px) {
  .main-content {
    margin-left: 0;
  }

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

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.1);
  }

  .menu-toggle {
    display: flex;
  }

  .user-info {
    display: none;
  }

  .page {
    padding: 1.25rem 1rem;
  }

  .profile-quick-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ═══════════════════════════════════════════════
   OVERVIEW PAGE — Modern Klasik Coklat
   ═══════════════════════════════════════════════ */

/* ── Hero Header ─────────────────────────────── */
.ov-hero {
  position: relative;
  background: linear-gradient(135deg, #3E2723 0%, #5D4037 40%, #795548 70%, #8D6E63 100%);
  border-radius: 20px;
  padding: 1.8rem 2rem;
  margin-bottom: 1.8rem;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(62, 39, 35, 0.3);
}

.ov-hero-ornament {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 90% 50%, rgba(215, 204, 200, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 10% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.ov-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.ov-hero::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: 30%;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.ov-hero-content {
  position: relative;
  z-index: 1;
}

.ov-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 99px;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.9rem;
  backdrop-filter: blur(8px);
}

.ov-hero h2 {
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.ov-hero-subtitle {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 0.4rem;
  font-weight: 400;
}

.ov-hero-deco {
  position: absolute;
  right: 2.4rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 1;
}

.ov-hero-deco span {
  display: block;
  height: 2px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
}

.ov-hero-deco span:nth-child(1) {
  width: 48px;
}

.ov-hero-deco span:nth-child(2) {
  width: 32px;
}

.ov-hero-deco span:nth-child(3) {
  width: 20px;
}

/* ── Stats Row ───────────────────────────────── */
.ov-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.ov-stat-card {
  background: #fff;
  border: 1px solid rgba(93, 64, 55, 0.1);
  border-radius: 18px;
  padding: 1.2rem 1.4rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s;
  box-shadow: 0 4px 16px rgba(62, 39, 35, 0.06);
  cursor: default;
}

.ov-stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(62, 39, 35, 0.14);
}

.ov-stat-bg-icon {
  position: absolute;
  bottom: -10px;
  right: -10px;
  color: rgba(93, 64, 55, 0.05);
  pointer-events: none;
}

.ov-stat-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ov-icon-brown {
  background: linear-gradient(135deg, #5D4037, #8D6E63);
}

.ov-icon-amber {
  background: linear-gradient(135deg, #E65100, #FFB300);
}

.ov-icon-emerald {
  background: linear-gradient(135deg, #1B5E20, #43A047);
}

.ov-stat-body {
  flex: 1;
}

.ov-stat-num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--brown-800);
  letter-spacing: -0.03em;
  line-height: 1;
  transition: color 0.3s;
}

.ov-stat-lbl {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 0.25rem;
}

.ov-stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
  width: fit-content;
}

.ov-trend-up {
  background: rgba(93, 64, 55, 0.1);
  color: #5D4037;
}

.ov-trend-warn {
  background: rgba(230, 81, 0, 0.1);
  color: #E65100;
}

.ov-trend-green {
  background: rgba(27, 94, 32, 0.1);
  color: #2E7D32;
}

/* ── Main Grid ───────────────────────────────── */
.ov-main-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.ov-col-left,
.ov-col-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── Panel ───────────────────────────────────── */
.ov-panel {
  background: #fff;
  border: 1px solid rgba(93, 64, 55, 0.1);
  border-radius: 18px;
  overflow: visible;
  box-shadow: 0 4px 16px rgba(62, 39, 35, 0.06);
  transition: box-shadow 0.25s;
}

.ov-panel:hover {
  box-shadow: 0 8px 28px rgba(62, 39, 35, 0.10);
}

.ov-panel-warn {
  border-left: 3px solid #FFB300;
}

.ov-panel-premium {
  background: linear-gradient(160deg, #FDFAF7 0%, #FAF5EE 100%);
  border: 1px solid rgba(166, 124, 82, 0.18);
}

.ov-panel-header {
  padding: 1.4rem 1.6rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ov-panel-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #5D4037, #8D6E63);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(93, 64, 55, 0.2);
}

.ov-panel-icon-warn {
  background: linear-gradient(135deg, #E65100, #FFB300);
  box-shadow: 0 4px 12px rgba(230, 81, 0, 0.2);
}

.ov-panel-icon-gold {
  background: linear-gradient(135deg, #4A2F17, #A67C52);
  box-shadow: 0 4px 12px rgba(74, 47, 23, 0.25);
}

.ov-panel-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--brown-800);
  margin: 0;
  letter-spacing: -0.01em;
}

.ov-panel-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 2px 0 0;
  font-weight: 400;
}

/* WhatsApp Button */
.ov-wa-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: white !important;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}

.ov-wa-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
  background: linear-gradient(135deg, #2ae771 0%, #15a191 100%);
}

.ov-wa-btn:active {
  transform: translateY(0) scale(1);
}

.ov-wa-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

/* WhatsApp Tooltip Hint */
.ov-wa-btn::after {
  content: attr(data-hint);
  position: absolute;
  bottom: 135%;
  right: 0;
  background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  box-shadow: 0 4px 12px rgba(18, 140, 126, 0.25);
  z-index: 99;
}

.ov-wa-btn::before {
  content: '';
  position: absolute;
  bottom: 120%;
  right: 24px;
  border: 6px solid transparent;
  border-top-color: #075E54;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  z-index: 99;
}

.ov-wa-btn:hover::after,
.ov-wa-btn:hover::before {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 480px) {
  .ov-wa-btn {
    padding: 0;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    justify-content: center;
  }

  .ov-wa-btn span {
    display: none;
  }

  .ov-wa-btn svg {
    width: 18px;
    height: 18px;
    margin: 0;
  }

  .ov-wa-btn::before {
    right: 12px;
  }
}

/* ── Divider ─────────────────────────────────── */
.ov-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(93, 64, 55, 0.12), transparent);
  margin: 0;
}

.ov-divider-warn {
  background: linear-gradient(to right, transparent, rgba(255, 179, 0, 0.3), transparent);
}

/* ── Agent List ──────────────────────────────── */
.ov-agent-list {
  padding: 1.2rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ov-empty-text {
  font-size: 0.88rem;
  color: var(--brown-400);
  text-align: center;
  padding: 1rem 0;
}

/* Skeleton loading */
.ov-skeleton-item {
  height: 60px;
  border-radius: 12px;
  background: linear-gradient(90deg, #F5EFE6 25%, #EDE0D0 50%, #F5EFE6 75%);
  background-size: 200% 100%;
  animation: ov-shimmer 1.4s infinite;
}

@keyframes ov-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Agent row item (injected by JS) */
.ov-agent-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--brown-50);
  border: 1px solid rgba(93, 64, 55, 0.08);
  transition: all 0.2s;
  cursor: default;
}

.ov-agent-row:hover {
  background: #EDE0D0;
  border-color: rgba(93, 64, 55, 0.18);
  transform: translateX(3px);
}

.ov-agent-row img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid rgba(93, 64, 55, 0.15);
  flex-shrink: 0;
}

.ov-agent-row-info {
  flex: 1;
  min-width: 0;
}

.ov-agent-row-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--brown-800);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ov-agent-row-meta {
  font-size: 0.72rem;
  color: var(--brown-400);
  margin: 2px 0 0;
}

.ov-badge-active {
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: #e8f5e9;
  color: #2e7d32;
  flex-shrink: 0;
}

/* Expiring row */
.ov-expiring-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #FFF8E1;
  border: 1px solid rgba(255, 179, 0, 0.2);
  transition: all 0.2s;
}

.ov-expiring-row:hover {
  background: #FFF3CD;
  transform: translateX(3px);
}

.ov-expiring-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #FFB300;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(255, 179, 0, 0.2);
  animation: ov-pulse 2s infinite;
}

@keyframes ov-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(255, 179, 0, 0.2);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(255, 179, 0, 0.08);
  }
}

.ov-expiring-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: #7B4F00;
  margin: 0;
}

.ov-expiring-days {
  font-size: 0.72rem;
  color: #A0660A;
  margin: 2px 0 0;
}

/* ── Recommendations ─────────────────────────── */
.ov-reco-list {
  padding: 1.2rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ov-reco-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(166, 124, 82, 0.15);
  transition: all 0.2s;
  cursor: pointer;
}

.ov-reco-item:hover {
  background: #fff;
  border-color: rgba(93, 64, 55, 0.25);
  box-shadow: 0 4px 16px rgba(62, 39, 35, 0.1);
  transform: translateX(3px);
}

.ov-reco-item img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid rgba(93, 64, 55, 0.12);
  flex-shrink: 0;
}

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

.ov-reco-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--brown-800);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ov-reco-price {
  font-size: 0.73rem;
  color: var(--brown-400);
  margin: 2px 0 0;
}

.ov-reco-btn {
  background: var(--brown-800);
  color: #EFE3D4;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: inherit;
}

.ov-reco-btn:hover {
  background: var(--brown-600);
  transform: scale(1.05);
}

/* ── Explore Button ──────────────────────────── */
.ov-explore-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 3.2rem);
  margin: 0 1.6rem 1.6rem;
  padding: 0.9rem;
  background: linear-gradient(135deg, #3E2723, #6D4C41);
  color: #EFE3D4;
  border: none;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(62, 39, 35, 0.25);
  letter-spacing: 0.01em;
}

.ov-explore-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(62, 39, 35, 0.35);
  background: linear-gradient(135deg, #4E342E, #795548);
}

/* ── Quick Tips Card ─────────────────────────── */
.ov-quick-tips {
  padding: 1.3rem 1.6rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: linear-gradient(135deg, #FFF8E1 0%, #FFF3CD 100%) !important;
  border: 1px solid rgba(255, 179, 0, 0.2) !important;
}

.ov-tips-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #E65100, #FFB300);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(230, 81, 0, 0.2);
}

.ov-tips-content h4 {
  font-size: 0.88rem;
  font-weight: 800;
  color: #7B4F00;
  margin: 0 0 4px;
}

.ov-tips-content p {
  font-size: 0.78rem;
  color: #A0660A;
  margin: 0;
  line-height: 1.5;
}

/* ── Responsive Overview ─────────────────────── */
@media (max-width: 1024px) {
  .ov-main-grid {
    grid-template-columns: 1fr;
  }

  .ov-stats-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .ov-stats-row {
    grid-template-columns: 1fr;
  }

  .ov-hero {
    padding: 1.5rem 1.4rem;
  }

  .ov-hero h2 {
    font-size: 1.4rem;
  }

  .ov-hero-deco {
    display: none;
  }
}

/* ── Responsive Topbar ───────────────────────── */
@media (max-width: 768px) {
  .main-content {
    margin-left: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

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

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.1);
  }

  .menu-toggle {
    display: flex !important;
  }

  .topbar {
    padding: 0 1rem;
    height: 64px;
    width: 100%;
  }

  .topbar-brand {
    display: none;
  }

  .topbar-breadcrumb svg {
    display: none;
  }

  .tb-user-text {
    display: none;
  }

  .tb-avatar {
    width: 38px;
    height: 38px;
  }

  .tb-cart-btn {
    width: 40px;
    height: 40px;
  }

  .page {
    padding: 1rem 0.75rem;
    width: 100%;
  }

  .profile-quick-card,
  .profile-card {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1.25rem;
  }

  .ov-stats-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .ov-stat-num {
    font-size: 1.6rem;
  }

  .ov-hero {
    padding: 1.5rem 1.25rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .ov-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .ov-main-grid {
    grid-template-columns: 1fr;
  }
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.table-card {
  padding: 0 !important;
  overflow: hidden;
  margin-top: 1rem;
}

.table-responsive {
  width: 100%;
  display: block;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
}

.table-responsive table {
  width: 100%;
  border-collapse: collapse;
  min-width: 650px;
}

#exportHistoryBtn {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .history-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  #exportHistoryBtn {
    width: 100%;
    justify-content: center;
  }
}

/* ─── Form Hints ───────────────────────────── */
.ov-hint {
  color: var(--brown-400);
  cursor: help;
  display: flex;
  align-items: center;
  position: relative;
  transition: color 0.2s;
}

.ov-hint:hover {
  color: var(--brown-800);
}

.ov-hint::after {
  content: attr(data-hint);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--brown-800);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  width: 200px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  box-shadow: 0 4px 12px rgba(62, 39, 35, 0.2);
  z-index: 100;
  line-height: 1.4;
}

.ov-hint:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.ov-hint::before {
  content: '';
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--brown-800);
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 100;
}

.ov-hint:hover::before {
  opacity: 1;
}

/* ─── Market Controls ───────────────────────── */
.market-controls {
  display: flex;
  gap: 2rem;
  margin-bottom: 2.5rem;
  padding: 1.25rem;
  background: white;
  border-radius: 24px;
  border: 1px solid rgba(93, 64, 55, 0.08);
  box-shadow:
    0 4px 20px rgba(93, 64, 55, 0.04),
    0 1px 2px rgba(93, 64, 55, 0.02);
  align-items: center;
  position: relative;
  z-index: 10;
  margin-top: 0;
}

.search-box {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-box svg {
  position: absolute;
  left: 18px;
  color: var(--brown-400);
  transition: color 0.3s;
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 14px 18px 14px 50px;
  border-radius: 16px;
  border: 1px solid rgba(93, 64, 55, 0.1);
  background: rgba(93, 64, 55, 0.02);
  font-size: 1rem;
  color: var(--brown-800);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
}

.search-box input::placeholder {
  color: var(--brown-300);
}

.search-box input:focus {
  background: white;
  border-color: var(--brown-400);
  box-shadow: 0 8px 24px rgba(93, 64, 55, 0.08);
  outline: none;
}

.search-box input:focus+svg {
  color: var(--brown-600);
}

.filter-box {
  min-width: 220px;
}

.select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.select-wrapper select {
  width: 100%;
  padding: 14px 44px 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(93, 64, 55, 0.1);
  background: rgba(93, 64, 55, 0.02);
  font-size: 1rem;
  color: var(--brown-800);
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  transition: all 0.3s;
}

.select-wrapper select:hover {
  background: rgba(93, 64, 55, 0.04);
}

.select-wrapper select:focus {
  background: white;
  border-color: var(--brown-400);
  box-shadow: 0 8px 24px rgba(93, 64, 55, 0.08);
  outline: none;
}

.select-arrow {
  position: absolute;
  right: 18px;
  color: var(--brown-400);
  pointer-events: none;
  transition: transform 0.3s;
}

.select-wrapper select:focus+.select-arrow {
  transform: rotate(180deg);
  color: var(--brown-600);
}

@media (max-width: 850px) {
  .market-controls {
    flex-direction: column;
    margin-top: 0;
    padding: 1rem;
    gap: 1rem;
    border-radius: 20px;
  }

  .search-box,
  .filter-box {
    width: 100%;
    min-width: 0;
  }
}

/* ─── Card Tags ────────────────────────────── */
.card-tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.8rem;
  flex-wrap: wrap;
}

.tag-cat {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--brown-600);
  background: rgba(93, 64, 55, 0.06);
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.tag-origin {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.02em;
}

.tag-origin.official {
  background: rgba(46, 125, 50, 0.08);
  color: #2e7d32;
}

.tag-origin.community {
  background: rgba(21, 101, 192, 0.08);
  color: #1565c0;
}

.tag-origin svg {
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════
   Submit Agent Form — Premium Redesign (sa-*)
   ══════════════════════════════════════════════════════ */

/* Wrapper */
.sa-form-wrapper {
  width: 100%;
  margin: 0 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ── Main Panel ─────────────────────────────────── */
.sa-panel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(62, 39, 35, 0.05);
  position: relative;
}

.sa-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary), var(--primary-light));
}

.sa-form {
  display: flex;
  flex-direction: column;
}

/* ── Section ────────────────────────────────────── */
.sa-section {
  padding: 1.75rem 2rem;
}

.sa-section-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.sa-section-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(141, 110, 99, 0.1);
  border: 1px solid rgba(141, 110, 99, 0.18);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.sa-section-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--brown-800);
  letter-spacing: -0.01em;
  margin-bottom: 0.15rem;
}

.sa-section-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.sa-section-num {
  margin-left: auto;
  font-size: 1.8rem;
  font-weight: 900;
  color: rgba(141, 110, 99, 0.08);
  letter-spacing: -0.04em;
  line-height: 1;
  flex-shrink: 0;
  align-self: center;
}

.sa-section-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── Divider between sections ───────────────────── */
.sa-divider {
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent 80%);
  margin: 0 2rem;
}

/* ── Grid Layouts ───────────────────────────────── */
.sa-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.sa-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

/* ── Field ──────────────────────────────────────── */
.sa-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.sa-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  flex-wrap: wrap;
}

.sa-label em {
  font-style: normal;
  font-weight: 500;
  color: var(--text-secondary);
}

.sa-required {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: rgba(141, 110, 99, 0.1);
  padding: 1px 6px;
  border-radius: 99px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-left: auto;
}

.sa-optional {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface-3);
  padding: 1px 6px;
  border-radius: 99px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-left: auto;
}

.sa-field-hint {
  font-size: 0.73rem;
  color: var(--text-secondary);
  padding-left: 0.25rem;
}

/* ── Input Wrap ─────────────────────────────────── */
.sa-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.sa-input-icon {
  position: absolute;
  left: 0.9rem;
  color: var(--text-secondary);
  opacity: 0.6;
  display: flex;
  align-items: center;
  pointer-events: none;
  z-index: 1;
}

.sa-input-prefix {
  position: absolute;
  left: 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-dark);
  pointer-events: none;
  z-index: 1;
}

.sa-input-suffix {
  position: absolute;
  right: 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-dark);
  pointer-events: none;
}

.sa-input-wrap input,
.sa-input-wrap select {
  width: 100%;
  padding: 0.72rem 1rem 0.72rem 2.6rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.88rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.sa-input-wrap input:focus,
.sa-input-wrap select:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px rgba(141, 110, 99, 0.12);
}

.sa-input-wrap input:hover:not(:focus),
.sa-input-wrap select:hover:not(:focus) {
  border-color: rgba(141, 110, 99, 0.35);
}

.sa-select-wrap select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(121,85,72,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 1em;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* ── Code Textarea (cURL) ───────────────────────── */
.sa-code-wrap {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sa-code-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(141, 110, 99, 0.12);
}

.sa-code-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(62, 39, 35, 0.05);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.9rem;
}

.sa-code-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(141, 110, 99, 0.2);
}

.sa-code-dot:nth-child(1) {
  background: rgba(229, 57, 53, 0.4);
}

.sa-code-dot:nth-child(2) {
  background: rgba(251, 192, 45, 0.5);
}

.sa-code-dot:nth-child(3) {
  background: rgba(67, 160, 71, 0.4);
}

.sa-code-label {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sa-code-wrap textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: #FDFBF7;
  border: none;
  outline: none;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.82rem;
  color: var(--brown-800);
  line-height: 1.65;
  resize: vertical;
  min-height: 110px;
}

/* ── Plain Textarea ─────────────────────────────── */
.sa-textarea-plain {
  width: 100%;
  padding: 0.72rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  min-height: 80px;
}

.sa-textarea-plain:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px rgba(141, 110, 99, 0.12);
}

.sa-textarea-plain:hover:not(:focus) {
  border-color: rgba(141, 110, 99, 0.35);
}

/* ── Revenue Split Preview ──────────────────────── */
.sa-split-preview {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-top: 0.25rem;
}

.sa-split-bar {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  height: 32px;
  margin-bottom: 0.6rem;
  border: 1px solid var(--border);
}

.sa-split-dev {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 5%;
}

.sa-split-dev span {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 8px;
}

.sa-split-plat {
  flex: 1;
  background: rgba(141, 110, 99, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sa-split-plat span {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  padding: 0 8px;
}

.sa-split-note {
  font-size: 0.73rem;
  color: var(--text-secondary);
  text-align: center;
}

/* ── Hint Tooltip ───────────────────────────────── */
.sa-hint {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary-dark);
  background: rgba(141, 110, 99, 0.1);
  padding: 1px 7px 1px 5px;
  border-radius: 99px;
  cursor: help;
  position: relative;
  transition: background 0.2s;
}

.sa-hint:hover {
  background: rgba(141, 110, 99, 0.18);
}

.sa-hint::after {
  content: attr(data-hint);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--brown-800);
  color: var(--brown-50);
  font-size: 0.73rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  white-space: normal;
  max-width: 240px;
  min-width: 180px;
  line-height: 1.5;
  text-align: center;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  box-shadow: 0 8px 20px rgba(62, 39, 35, 0.2);
}

.sa-hint::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--brown-800);
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 100;
}

.sa-hint:hover::after,
.sa-hint:hover::before {
  opacity: 1;
}

/* ── Form Footer ────────────────────────────────── */
.sa-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 2rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--brown-50);
  flex-wrap: wrap;
}

.sa-footer-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  flex: 1;
}

.sa-footer-info svg {
  flex-shrink: 0;
  color: var(--primary);
}

.sa-submit-btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.75rem;
  font-size: 0.88rem;
  position: relative;
}

.sa-submit-btn svg {
  flex-shrink: 0;
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
  .sa-section {
    padding: 1.25rem 1.25rem;
  }

  .sa-divider {
    margin: 0 1.25rem;
  }

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

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

  .sa-section-num {
    display: none;
  }

  .sa-step span {
    display: none;
  }

  .sa-form-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .sa-submit-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .sa-form-wrapper {
    margin: 0 0 1.5rem;
  }
}

/* ══════════════════════════════════════════════════════
   My Submission Card (msc-*)
   ══════════════════════════════════════════════════════ */

.msc-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 16px rgba(62, 39, 35, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.msc-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(62, 39, 35, 0.1);
}

/* ── Header ──────────────────────────────── */
.msc-header {
  padding: 1.1rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  position: relative;
  overflow: hidden;
}

.msc-header::after {
  content: '';
  position: absolute;
  top: -24px;
  right: -24px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.msc-header-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  backdrop-filter: blur(4px);
}

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

.msc-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: white;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.msc-nickname {
  font-size: 0.73rem;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
}

.msc-status-badge {
  font-size: 0.68rem;
  font-weight: 800;
  color: white;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 3px 10px;
  border-radius: 99px;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

/* ── Body ────────────────────────────────── */
.msc-body {
  padding: 1.1rem 1.4rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

/* ── Meta Rows ───────────────────────────── */
.msc-meta-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
}

.msc-meta-row--slim {
  grid-template-columns: repeat(2, 1fr);
  padding: 0.6rem 1rem;
}

.msc-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.msc-meta-label {
  font-size: 0.67rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.msc-meta-value {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brown-800);
}

/* ── Note Box ────────────────────────────── */
.msc-note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.78rem;
  line-height: 1.5;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  border: 1px solid;
}

.msc-note svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.msc-note strong {
  font-weight: 700;
}

/* ── Action Buttons ──────────────────────── */
.msc-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}

/* Primary CTA (agree) */
.msc-btn-agree {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.65rem 1rem;
  background: linear-gradient(135deg, #1565C0, #1976D2);
  color: white;
  border: none;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(21, 101, 192, 0.25);
  white-space: nowrap;
}

.msc-btn-agree:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(21, 101, 192, 0.35);
}

/* Edit CTA */
.msc-btn-edit {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.65rem 1rem;
  background: linear-gradient(135deg, #E65100, #FF8F00);
  color: white;
  border: none;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(230, 81, 0, 0.25);
  white-space: nowrap;
}

.msc-btn-edit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(230, 81, 0, 0.35);
}

/* Delete (ghost danger) */
.msc-btn-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.65rem 0.9rem;
  background: rgba(229, 57, 53, 0.06);
  color: #C62828;
  border: 1px solid rgba(229, 57, 53, 0.18);
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
}

.msc-btn-delete:hover {
  background: rgba(229, 57, 53, 0.12);
  border-color: rgba(229, 57, 53, 0.3);
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 600px) {
  .msc-meta-row {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .msc-btn-agree,
  .msc-btn-edit,
  .msc-btn-delete {
    flex: unset;
    width: 100%;
  }
}

/* ─── Custom Tooltip Premium ─── */
.tooltip-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: help;
}

.tooltip-text {
  visibility: hidden;
  width: 240px;
  background-color: #3E2723;
  color: #EFE3D4;
  text-align: left;
  border-radius: 12px;
  padding: 12px;
  position: absolute;
  z-index: 100;
  bottom: 135%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  font-size: 0.75rem;
  line-height: 1.5;
  box-shadow: 0 10px 25px rgba(62, 39, 35, 0.25);
  pointer-events: none;
  border: 1px solid rgba(215, 204, 200, 0.2);
}

.tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  border-width: 6px;
  border-style: solid;
  border-color: #3E2723 transparent transparent transparent;
}

.tooltip-container:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}