/* ==========================================================================
   REVIUM AG - Luxury Private Banking & Client Portal Styling
   Core Palette: Deep Forest (#12211a, #1f3428), Cream (#faf8f3), Gold (#c8a96e)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* REVIUM Brand Colors */
  --brand-950: #12211a;
  --brand-900: #1f3428;
  --brand-800: #2b4536;
  --brand-700: #345642;
  --gold-300: #d9c39a;
  --gold-400: #c8a96e;
  --gold-500: #b28e4c;
  --gold-600: #94713a;
  --cream: #faf8f3;
  --cream-deep: #f2ece0;

  /* UI Tokens */
  --primary-color: var(--brand-900);
  --primary-hover: var(--brand-950);
  --accent-color: var(--gold-400);
  --accent-hover: var(--gold-500);
  --dark-bg: var(--brand-950);
  --dark-sidebar: var(--brand-950);
  --sidebar-hover: rgba(200, 169, 110, 0.08);
  --sidebar-active: rgba(200, 169, 110, 0.16);
  --light-bg: var(--cream);
  --card-bg: #ffffff;
  --border-color: rgba(31, 52, 40, 0.1);
  --border-gold: rgba(200, 169, 110, 0.35);
  --text-dark: var(--brand-950);
  --text-muted: #55675c;
  --text-light: #7e9185;
  --text-white: #faf8f3;
  --success-color: #2e7d32;
  --success-bg: #edf7ed;
  --success-text: #1b5e20;
  --danger-color: #c62828;
  --danger-bg: #fde8e8;
  --danger-text: #b71c1c;

  /* Typography */
  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
}

body {
  background-color: var(--light-bg);
  color: var(--text-dark);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   1. AUTHENTICATION & LOGIN PAGE
   ========================================================================== */
.login-body {
  background: radial-gradient(circle at 50% 25%, #1f3428 0%, #12211a 65%, #09130f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 100vh;
  position: relative;
}

.login-body::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(200, 169, 110, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.auth-container {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--border-gold);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  position: relative;
  z-index: 10;
  animation: authFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold-600), var(--gold-300), var(--gold-500));
}

@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-header {
  padding: 40px 36px 16px;
  text-align: center;
}

.login-logo {
  max-height: 48px;
  width: auto;
  margin: 0 auto 20px;
  display: block;
  transition: transform 0.3s ease;
}

.login-logo:hover {
  transform: scale(1.02);
}

.auth-header h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--brand-950);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.auth-header p {
  font-size: 14px;
  color: var(--text-muted);
}

.auth-body {
  padding: 10px 36px 40px;
}

/* Form Controls */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-950);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.form-control {
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1px solid rgba(31, 52, 40, 0.18);
  background-color: var(--cream);
  font-size: 14.5px;
  color: var(--brand-950);
  transition: all 0.25s ease;
  outline: none;
}

.form-control:focus {
  border-color: var(--gold-400);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(200, 169, 110, 0.15);
}

.form-control::placeholder {
  color: #94a39b;
}

.btn-submit {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--brand-900), var(--brand-950));
  border: 1px solid var(--brand-900);
  border-radius: 10px;
  color: var(--cream);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(18, 33, 26, 0.2);
}

.btn-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  border-color: var(--gold-500);
  color: var(--brand-950);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(178, 142, 76, 0.3);
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.back-link {
  display: inline-block;
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
  text-align: center;
  width: 100%;
}

.back-link:hover {
  color: var(--gold-500);
}

/* Alert messages */
.error-msg, .success-msg {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  margin-bottom: 20px;
  display: none;
  font-weight: 500;
  line-height: 1.5;
  animation: alertSlide 0.3s ease;
}

@keyframes alertSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.error-msg {
  background-color: var(--danger-bg);
  border: 1px solid rgba(198, 40, 40, 0.25);
  color: var(--danger-text);
}

.success-msg {
  background-color: var(--success-bg);
  border: 1px solid rgba(46, 125, 50, 0.25);
  color: var(--success-text);
}

.form-section {
  display: none;
}

.form-section.active {
  display: block;
}

/* ==========================================================================
   2. DASHBOARD PORTAL LAYOUT
   ========================================================================== */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
  background-color: var(--light-bg);
}

/* Sidebar */
.sidebar {
  width: 280px;
  background-color: var(--brand-950);
  border-right: 1px solid rgba(200, 169, 110, 0.15);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
}

.sidebar-brand {
  padding: 28px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid rgba(250, 248, 243, 0.08);
}

.brand-logo-container {
  width: 42px;
  height: 42px;
  background: rgba(200, 169, 110, 0.12);
  border: 1px solid var(--border-gold);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: 0.04em;
}

.brand-subtitle {
  font-size: 11.5px;
  color: var(--gold-400);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.sidebar-menu {
  padding: 24px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: rgba(250, 248, 243, 0.65);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
  width: 100%;
}

.menu-item svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  transition: transform 0.2s;
}

.menu-item:hover {
  background: var(--sidebar-hover);
  color: var(--cream);
}

.menu-item:hover svg {
  transform: translateX(2px);
}

.menu-item.active {
  background: var(--sidebar-active);
  color: var(--gold-400);
  font-weight: 600;
  border-left: 3px solid var(--gold-400);
  border-radius: 0 10px 10px 0;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid rgba(250, 248, 243, 0.08);
  background: rgba(10, 19, 15, 0.5);
}

.user-profile-info {
  margin-bottom: 14px;
}

.user-profile-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-profile-email {
  display: block;
  font-size: 12px;
  color: var(--gold-300);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout-sidebar {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fca5a5;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-logout-sidebar svg {
  width: 16px;
  height: 16px;
}

.btn-logout-sidebar:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fee2e2;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 40px 50px;
  max-width: 1280px;
}

.content-header {
  margin-bottom: 36px;
}

.content-title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--brand-950);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.content-subtitle {
  font-size: 15px;
  color: var(--text-muted);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: panelFade 0.4s ease;
}

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

/* Investment Portfolio Cards */
#portfolioContainer {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.empty-portfolio {
  width: 100%;
  text-align: center;
  padding: 64px 32px;
  background: #ffffff;
  border-radius: 18px;
  border: 1px dashed var(--border-gold);
  box-shadow: 0 10px 30px rgba(18, 33, 26, 0.03);
}

.empty-portfolio .empty-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  color: var(--gold-400);
}

.empty-portfolio .empty-icon svg {
  width: 100%;
  height: 100%;
}

.empty-portfolio .empty-text {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--brand-950);
  margin-bottom: 8px;
}

/* Luxury Full-Width Executive Investment Card */
.investment-card {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(18, 33, 26, 0.04);
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  width: 100%;
}

.investment-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3.5px;
  background: linear-gradient(90deg, var(--gold-400), var(--brand-800));
}

.investment-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(18, 33, 26, 0.08);
  border-color: var(--border-gold);
}

.investment-card.is-inactive {
  opacity: 0.72;
  filter: grayscale(0.2);
}

.investment-card.is-inactive::before {
  background: #94a39b;
}

/* Card Header */
.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}

.card-bank-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.bank-logo-box-large {
  width: 76px;
  height: 52px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(200, 169, 110, 0.3);
  box-shadow: 0 4px 14px rgba(18, 33, 26, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  flex-shrink: 0;
}

.bank-logo-box-large img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.bank-logo-box-large svg {
  width: 26px;
  height: 26px;
  color: var(--brand-900);
}

.card-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.card-bank-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--brand-950);
  line-height: 1.2;
  margin: 0;
}

.card-product-pill {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  background: rgba(200, 169, 110, 0.15);
  color: var(--gold-600);
  border: 1px solid rgba(200, 169, 110, 0.3);
  border-radius: 20px;
}

.card-holder-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.card-holder-line svg {
  width: 14px;
  height: 14px;
  color: var(--text-light);
  flex-shrink: 0;
}

.card-header-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-badge.status-active {
  background: rgba(46, 125, 50, 0.12);
  color: #1b5e20;
  border: 1px solid rgba(46, 125, 50, 0.25);
}

.status-badge.status-inactive {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
  border: 1px solid rgba(100, 116, 139, 0.2);
}

.contract-pill {
  font-size: 11.5px;
  color: var(--text-light);
  font-family: monospace;
}

.contract-pill strong {
  color: var(--brand-950);
}

/* 4-Column Executive Metrics Banner */
.card-metrics-banner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: var(--cream);
  border: 1px solid rgba(31, 52, 40, 0.06);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 22px;
}

.metric-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.metric-caption {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  margin-bottom: 4px;
}

.metric-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand-950);
  line-height: 1.25;
  margin-bottom: 3px;
}

.metric-num.big-serif {
  font-family: var(--font-serif);
  font-size: 26px;
}

.metric-num.gold-accent {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--gold-600);
}

.metric-num.green-accent {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--success-text);
}

.metric-note {
  font-size: 11.5px;
  color: var(--text-muted);
}

.metric-term-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-950);
  margin-bottom: 3px;
}

.metric-term-row .term-arrow {
  color: var(--gold-500);
  font-weight: 700;
}

.metric-column.highlight-yield {
  background: rgba(46, 125, 50, 0.08);
  border: 1px solid rgba(46, 125, 50, 0.18);
  border-radius: 10px;
  padding: 10px 14px;
}

/* Card Footer */
.card-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-top: 4px;
}

.card-ref-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ref-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
}

.ref-content {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--cream);
  border: 1px solid rgba(31, 52, 40, 0.08);
  border-radius: 8px;
  padding: 6px 12px;
}

.ref-mini-logo {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.ref-mini-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.ref-mini-logo svg {
  width: 12px;
  height: 12px;
  color: var(--text-muted);
}

.ref-text {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.ref-bank-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand-950);
}

.ref-iban-val {
  font-size: 12px;
  font-family: monospace;
  color: var(--text-muted);
}

.card-ref-badge.is-empty {
  font-size: 12px;
  color: var(--text-light);
}

/* Action Button */
.btn-card-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 10px;
  background: var(--brand-900);
  border: 1px solid var(--brand-900);
  color: var(--cream);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-card-action svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease;
}

.investment-card:hover .btn-card-action {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--brand-950);
}

.investment-card:hover .btn-card-action svg {
  transform: translateX(4px);
}

@media (max-width: 991px) {
  .card-metrics-banner {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 640px) {
  .investment-card {
    padding: 20px;
  }
  .card-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .card-header-badges {
    align-items: flex-start;
  }
  .card-metrics-banner {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }
  .card-footer-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .btn-card-action {
    width: 100%;
    justify-content: center;
  }
}

/* Profile / Settings Cards */
.profile-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(18, 33, 26, 0.04);
  padding: 32px;
  margin-bottom: 28px;
}

.profile-card-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--brand-950);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(31, 52, 40, 0.08);
  padding-bottom: 16px;
}

.profile-card-title svg {
  width: 22px;
  height: 22px;
  color: var(--gold-500);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.profile-field {
  display: flex;
  flex-direction: column;
  background: var(--cream);
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid rgba(31, 52, 40, 0.06);
}

.profile-field-label {
  font-size: 11.5px;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.profile-field-value {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--brand-950);
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(31, 52, 40, 0.06);
  font-size: 14.5px;
}

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

.info-label {
  color: var(--text-muted);
  font-weight: 500;
}

.info-val {
  color: var(--brand-950);
  font-weight: 600;
}

/* ==========================================================================
   3. ADMIN PANEL STYLES
   ========================================================================== */
#authOverlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, #1f3428 0%, #12211a 70%, #09130f 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  color: var(--cream);
  text-align: center;
  padding: 24px;
}

#authOverlay h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  color: var(--cream);
  margin-bottom: 12px;
}

#authOverlay p {
  font-size: 14.5px;
  color: var(--gold-300);
}

.admin-wrapper {
  display: flex;
  min-height: 100vh;
  background-color: var(--light-bg);
}

.admin-sidebar {
  width: 320px;
  background-color: var(--brand-950);
  border-right: 1px solid rgba(200, 169, 110, 0.15);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
}

.admin-sidebar-header {
  padding: 28px 24px 20px;
  border-bottom: 1px solid rgba(250, 248, 243, 0.08);
}

.admin-sidebar-header h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--cream);
  font-weight: 700;
  margin-bottom: 4px;
}

.admin-sidebar-header p {
  font-size: 12.5px;
  color: var(--gold-300);
}

.admin-user-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-user-item {
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.25s;
}

.admin-user-item:hover {
  background: rgba(200, 169, 110, 0.1);
  border-color: rgba(200, 169, 110, 0.25);
  transform: translateX(2px);
}

.admin-user-item.active {
  background: rgba(200, 169, 110, 0.18);
  border-color: var(--gold-400);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.admin-user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 2px;
}

.admin-user-email {
  font-size: 12px;
  color: var(--gold-300);
}

.admin-main {
  margin-left: 320px;
  flex: 1;
  padding: 40px 50px;
  max-width: 1280px;
}

.admin-empty-state {
  margin-left: 320px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 16px;
  font-family: var(--font-serif);
  padding: 40px;
  text-align: center;
}

.admin-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(18, 33, 26, 0.04);
  padding: 30px;
  margin-bottom: 28px;
}

.admin-card-title {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--brand-950);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(31, 52, 40, 0.08);
}

.row-group {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 640px) {
  .row-group {
    flex-direction: column;
    gap: 0;
  }
}

.admin-portfolio-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--cream);
  border: 1px solid rgba(31, 52, 40, 0.08);
  border-radius: 12px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.admin-portfolio-item:hover {
  border-color: var(--border-gold);
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(18, 33, 26, 0.05);
}

.admin-portfolio-item:last-child {
  margin-bottom: 0;
}

.btn-admin {
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-admin.primary {
  background: var(--brand-900);
  color: var(--cream);
}

.btn-admin.primary:hover {
  background: var(--gold-500);
  color: var(--brand-950);
}

.btn-admin.warning {
  background: rgba(200, 169, 110, 0.15);
  border-color: var(--gold-400);
  color: var(--gold-600);
}

.btn-admin.warning:hover {
  background: var(--gold-400);
  color: var(--brand-950);
}

.btn-admin.danger {
  background: var(--danger-bg);
  border-color: rgba(198, 40, 40, 0.3);
  color: var(--danger-text);
}

.btn-admin.danger:hover {
  background: var(--danger-color);
  color: #ffffff;
}

/* ==========================================================================
   4. INVESTMENT CERTIFICATE & DETAIL PAGE
   ========================================================================== */
.cert-container {
  max-width: 920px;
  margin: 40px auto;
  background: #ffffff;
  border-radius: 16px;
  border: 2px solid var(--gold-400);
  box-shadow: 0 20px 60px rgba(18, 33, 26, 0.08);
  padding: 50px 60px;
  position: relative;
}

.cert-container::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(200, 169, 110, 0.35);
  border-radius: 10px;
  pointer-events: none;
}

.cert-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(200, 169, 110, 0.25);
}

.cert-bank-logo {
  height: 48px;
  display: flex;
  align-items: center;
}

.cert-bank-logo img {
  max-height: 44px;
  max-width: 180px;
  object-fit: contain;
}

.cert-title-wrap {
  text-align: center;
  flex: 1;
  padding: 0 20px;
}

.cert-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  color: var(--brand-950);
  letter-spacing: -0.01em;
}

.cert-user-info-box {
  text-align: right;
  font-size: 13px;
}

.cert-user-row {
  margin-bottom: 4px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.cert-user-label {
  color: var(--text-light);
}

.cert-user-value {
  font-weight: 600;
  color: var(--brand-950);
}

.cert-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  margin-bottom: 32px;
}

.cert-left-card, .cert-right-card {
  background: var(--cream);
  border: 1px solid rgba(200, 169, 110, 0.2);
  border-radius: 12px;
  padding: 24px;
}

.cert-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(31, 52, 40, 0.06);
  font-size: 14px;
}

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

.cert-item-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.cert-item-icon {
  width: 18px;
  height: 18px;
  color: var(--gold-500);
}

.cert-item-value {
  font-weight: 700;
  color: var(--brand-950);
}

/* Date Boxes */
.cert-date-box {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: #ffffff;
  border: 1px solid rgba(200, 169, 110, 0.25);
  border-radius: 10px;
  margin-bottom: 14px;
}

.cert-date-box:last-child {
  margin-bottom: 0;
}

.cert-date-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--cream);
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-600);
  flex-shrink: 0;
}

.cert-date-icon svg {
  width: 20px;
  height: 20px;
}

.cert-date-text-wrap {
  display: flex;
  flex-direction: column;
}

.cert-date-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  margin-bottom: 2px;
}

.cert-date-value {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--brand-950);
}

.cert-date-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* Calculation Table */
.cert-table-wrap {
  background: var(--cream);
  border: 1px solid rgba(200, 169, 110, 0.25);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 30px;
}

.cert-table-header {
  display: flex;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--brand-900);
  color: var(--cream);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cert-table-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 20px;
  border-bottom: 1px solid rgba(31, 52, 40, 0.06);
  font-size: 14px;
  color: var(--brand-950);
}

.cert-table-row:last-child {
  border-bottom: none;
}

.cert-table-row.total-row {
  background: rgba(200, 169, 110, 0.12);
  border-top: 2px solid var(--gold-400);
  font-family: var(--font-serif);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--brand-950);
}

.cert-table-row.total-row span:last-child {
  font-size: 19px;
  color: var(--brand-950);
}

.cert-info-bar {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(200, 169, 110, 0.1);
  border-left: 4px solid var(--gold-400);
  padding: 16px 20px;
  border-radius: 0 10px 10px 0;
  margin-bottom: 36px;
  font-size: 13.5px;
  color: var(--brand-950);
  line-height: 1.5;
}

.cert-info-icon {
  width: 20px;
  height: 20px;
  color: var(--gold-600);
  flex-shrink: 0;
}

.cert-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-cert {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  border: 1px solid transparent;
}

.btn-cert.back {
  background: transparent;
  border-color: rgba(31, 52, 40, 0.2);
  color: var(--brand-950);
}

.btn-cert.back:hover {
  background: var(--cream-deep);
}

.btn-cert.print {
  background: var(--brand-900);
  color: var(--cream);
  box-shadow: 0 6px 16px rgba(18, 33, 26, 0.15);
}

.btn-cert.print:hover {
  background: var(--gold-500);
  color: var(--brand-950);
}

/* Print Styles */
@media print {
  body {
    background: #ffffff;
    padding: 0;
  }
  .cert-container {
    border: 1.5px solid #000;
    box-shadow: none;
    margin: 0 auto;
    padding: 30px;
  }
  .cert-container::before {
    display: none;
  }
  .cert-actions {
    display: none !important;
  }
}

/* ==========================================================================
   5. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 991px) {
  .sidebar, .admin-sidebar {
    position: relative;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(200, 169, 110, 0.15);
  }
  .main-content, .admin-main, .admin-empty-state {
    margin-left: 0;
    padding: 24px;
  }
  .dashboard-wrapper, .admin-wrapper {
    flex-direction: column;
  }
  .cert-grid {
    grid-template-columns: 1fr;
  }
  .cert-container {
    padding: 30px 24px;
  }
}
