/* === Claude Customer Manager — Full Redesign v2 === */

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

:root {
  --text-primary: #f0f0f5;
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-muted: rgba(255, 255, 255, 0.45);
  --accent-blue: #5aadff;
  --accent-cyan: #5ad8e6;
  --accent-purple: #b48eff;
  --accent-green: #63e6a0;
  --accent-gold: #f5c45a;
  --accent-red: #ff8a8a;
  --accent-orange: #fb923c;
  --glass-bg: rgba(13, 17, 28, 0.82);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.16);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* === Body === */

body {
  color: var(--text-primary);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
  min-height: 100vh;
  background: #06090f;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
body.has-bg {
  background-repeat: no-repeat;
}
body:not(.has-bg) {
  background-image:
    radial-gradient(
      ellipse 80% 60% at 20% 40%,
      rgba(40, 90, 180, 0.12) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 60% 50% at 80% 25%,
      rgba(100, 60, 200, 0.07) 0%,
      transparent 55%
    );
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* === Glass === */

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}
.glass-light {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}
/* Safari keeps backdrop-filter for nicer visuals */
@supports (-webkit-touch-callout: none) {
  .glass,
  .glass-light {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
  }
}

/* === Header === */

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding: 20px 26px;
}
.header h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.revenue-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 196, 90, 0.1);
  border: 1px solid rgba(245, 196, 90, 0.2);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  margin-right: 4px;
}
.revenue-label {
  font-size: 11px;
  font-weight: 500;
}
.revenue-amount {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* Revenue group - three metrics */
.revenue-group {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  margin-right: 4px;
  padding: 4px 0;
}
.revenue-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 14px;
  gap: 2px;
}
.revenue-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.rev-gold .revenue-label {
  color: rgba(245, 196, 90, 0.6);
}
.rev-gold .revenue-amount {
  color: var(--accent-gold);
}
.rev-green .revenue-label {
  color: rgba(99, 230, 160, 0.6);
}
.rev-green .revenue-amount {
  color: var(--accent-green);
}
.rev-red .revenue-label {
  color: rgba(255, 138, 138, 0.6);
}
.rev-red .revenue-amount {
  color: var(--accent-red);
}
.rev-orange .revenue-label {
  color: rgba(251, 146, 60, 0.6);
}
.rev-orange .revenue-amount {
  color: var(--accent-orange);
}

.btn-add {
  background: rgba(56, 132, 255, 0.85);
  color: #fff;
  border: 1px solid rgba(120, 180, 255, 0.3);
  padding: 9px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(56, 132, 255, 0.25);
  transition: all 0.2s var(--ease);
}
.btn-add:hover {
  box-shadow: 0 4px 20px rgba(56, 132, 255, 0.4);
  transform: translateY(-1px);
}

.btn-settings {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.btn-settings:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.bg-preview {
  display: none;
  margin-top: 8px;
  height: 80px;
  border-radius: var(--radius-sm);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--glass-border);
}

/* === Stats === */

.stats {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}

.stat-card {
  flex: 1;
  padding: 18px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  position: relative;
}
.stat-card:hover {
  background: rgba(255, 255, 255, 0.05);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 4px 16px rgba(0, 0, 0, 0.15);
}
.stat-card.stat-active {
  border-color: rgba(56, 132, 255, 0.4);
  box-shadow:
    0 0 0 1px rgba(56, 132, 255, 0.2),
    0 4px 16px rgba(56, 132, 255, 0.08);
}

/* Color indicator bar */
.stat-indicator {
  width: 28px;
  height: 3px;
  border-radius: 2px;
  margin: 0 auto 10px;
  background: rgba(255, 255, 255, 0.15);
}
.stat-card.blue .stat-indicator {
  background: var(--accent-blue);
}
.stat-card.cyan .stat-indicator {
  background: var(--accent-cyan);
}
.stat-card.purple .stat-indicator {
  background: var(--accent-purple);
}
.stat-card.green .stat-indicator {
  background: var(--accent-green);
}

.stat-num {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.2;
}
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}
.stat-card.blue .stat-num {
  color: var(--accent-blue);
}
.stat-card.cyan .stat-num {
  color: var(--accent-cyan);
}
.stat-card.purple .stat-num {
  color: var(--accent-purple);
}
.stat-card.green .stat-num {
  color: var(--accent-green);
}
.stat-card.gold .stat-indicator {
  background: var(--accent-gold);
}
.stat-card.gold .stat-num {
  color: var(--accent-gold);
}
.stat-sub {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 2px;
  vertical-align: middle;
}
.dot-green {
  background: var(--accent-green);
}
.dot-red {
  background: var(--accent-red);
}
.dot-gray {
  background: rgba(255, 255, 255, 0.25);
}

/* Google Accounts Panel */
.ga-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 8px;
  transition: background 0.2s;
}
.ga-row:hover {
  background: rgba(255, 255, 255, 0.06);
}
.ga-free {
  opacity: 0.5;
}
.ga-email {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.ga-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
}
.ga-name {
  color: var(--text-secondary);
  font-weight: 500;
}
.ga-plan {
  display: inline-flex;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid;
  background: rgba(255, 255, 255, 0.04);
}

/* === Search === */

.search {
  margin-bottom: 22px;
}
.search input {
  width: 100%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: #e2e8f0;
  padding: 11px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
}
.search input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}
.search input:focus {
  border-color: rgba(56, 132, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(56, 132, 255, 0.08);
}

/* === Customer Cards === */

.customer-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.customer-card {
  padding: 18px 20px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
  animation: cardIn 0.4s var(--ease) backwards;
  animation-delay: calc(var(--index, 0) * 50ms);
}

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

/* Left border + glow */
.customer-card.plan-standard {
  border-left: 4px solid var(--accent-blue);
}
.customer-card.plan-self_paid {
  border-left: 4px solid var(--accent-cyan);
}
.customer-card.plan-custom {
  border-left: 4px solid var(--accent-purple);
}
.customer-card.plan-personal {
  border-left: 4px solid var(--accent-green);
}

.customer-card.plan-standard::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(
    90deg,
    rgba(90, 173, 255, 0.06) 0%,
    transparent 100%
  );
  pointer-events: none;
}
.customer-card.plan-self_paid::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(
    90deg,
    rgba(90, 216, 230, 0.06) 0%,
    transparent 100%
  );
  pointer-events: none;
}
.customer-card.plan-custom::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(
    90deg,
    rgba(180, 142, 255, 0.06) 0%,
    transparent 100%
  );
  pointer-events: none;
}
.customer-card.plan-personal::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(
    90deg,
    rgba(99, 230, 160, 0.06) 0%,
    transparent 100%
  );
  pointer-events: none;
}

/* Hover: glow border instead of translateY */
.customer-card:hover {
  border-color: var(--glass-border-hover);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 8px 32px rgba(0, 0, 0, 0.18);
}
.customer-card.plan-standard:hover {
  border-left-color: var(--accent-blue);
  box-shadow:
    0 0 0 1px rgba(90, 173, 255, 0.1),
    inset 0 0 20px rgba(90, 173, 255, 0.03),
    0 8px 32px rgba(0, 0, 0, 0.18);
}
.customer-card.plan-self_paid:hover {
  border-left-color: var(--accent-cyan);
  box-shadow:
    0 0 0 1px rgba(90, 216, 230, 0.1),
    inset 0 0 20px rgba(90, 216, 230, 0.03),
    0 8px 32px rgba(0, 0, 0, 0.18);
}
.customer-card.plan-custom:hover {
  border-left-color: var(--accent-purple);
  box-shadow:
    0 0 0 1px rgba(180, 142, 255, 0.1),
    inset 0 0 20px rgba(180, 142, 255, 0.03),
    0 8px 32px rgba(0, 0, 0, 0.18);
}
.customer-card.plan-personal:hover {
  border-left-color: var(--accent-green);
  box-shadow:
    0 0 0 1px rgba(99, 230, 160, 0.1),
    inset 0 0 20px rgba(99, 230, 160, 0.03),
    0 8px 32px rgba(0, 0, 0, 0.18);
}

/* === Card Layout === */

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.card-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.card-badge {
  padding: 3px 11px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
}
.badge-standard {
  background: rgba(56, 132, 255, 0.12);
  color: var(--accent-blue);
  border: 1px solid rgba(56, 132, 255, 0.2);
}
.badge-self-paid {
  background: rgba(80, 200, 220, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(80, 200, 220, 0.2);
}
.badge-custom {
  background: rgba(160, 100, 255, 0.12);
  color: var(--accent-purple);
  border: 1px solid rgba(160, 100, 255, 0.2);
}
.badge-self {
  background: rgba(80, 220, 150, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(80, 220, 150, 0.15);
}

.card-info {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}
.info-label {
  color: rgba(255, 255, 255, 0.3);
  font-weight: 500;
}

.card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.card-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-gold);
}
.card-dates {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.card-date {
  font-size: 11px;
  color: var(--text-muted);
}
.card-date strong {
  color: rgba(255, 255, 255, 0.65);
}

/* === Action Buttons === */

.card-actions {
  display: flex;
  gap: 6px;
}
.btn-sm {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}
.btn-sm:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}
.btn-sm.renew {
  color: var(--accent-blue);
  border-color: rgba(56, 132, 255, 0.2);
}
.btn-sm.renew:hover {
  background: rgba(56, 132, 255, 0.15);
}
.btn-sm.delete:hover {
  background: rgba(255, 60, 60, 0.15);
  color: var(--accent-red);
  border-color: rgba(255, 60, 60, 0.2);
}

/* === Tags === */

.reminder-tag {
  display: inline-flex;
  background: rgba(56, 132, 255, 0.1);
  border: 1px solid rgba(56, 132, 255, 0.2);
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 10px;
  color: var(--accent-blue);
  font-weight: 500;
}

/* Days left: 3 levels */
.days-left {
  font-size: 11px;
  color: var(--accent-blue);
  font-weight: 600;
}
.days-left.level-warn {
  color: var(--accent-orange);
}
.days-left.level-critical {
  color: var(--accent-red);
}
.urgent-tag {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 4px;
}
.urgent-tag.urgent-warn {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.urgent-tag.urgent-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.days-left.level-expired {
  color: var(--accent-red);
}

/* Expiring badges: 3 levels */
.expiring-soon {
  border-color: rgba(245, 158, 11, 0.3) !important;
}
.expiring-badge {
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
}
.expiring-badge.level-warn {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.expiring-badge.level-critical {
  background: rgba(251, 146, 60, 0.15);
  color: var(--accent-orange);
  border: 1px solid rgba(251, 146, 60, 0.25);
}
.expiring-badge.level-expired {
  background: rgba(255, 138, 138, 0.12);
  color: var(--accent-red);
  border: 1px solid rgba(255, 138, 138, 0.2);
}

/* === Modal === */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 1;
  transition: opacity 0.2s var(--ease);
  will-change: transform;
  transform: translateZ(0);
}
.modal-overlay.closing {
  opacity: 0;
}

.modal {
  background: rgba(13, 17, 28, 0.9);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  will-change: transform;
  transform: translateZ(0);
  padding: 28px;
  width: 440px;
  max-width: 90vw;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  animation: modalIn 0.3s var(--ease);
  transform: translateY(0) scale(1);
  opacity: 1;
  transition:
    transform 0.2s var(--ease),
    opacity 0.2s var(--ease);
}
.modal-overlay.closing .modal {
  transform: translateY(12px) scale(0.97);
  opacity: 0;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 22px;
}
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}
.form-group input,
.form-group select {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  color: #e2e8f0;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
}
.form-group input:focus,
.form-group select:focus {
  border-color: rgba(56, 132, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(56, 132, 255, 0.08);
}
.form-group select {
  appearance: none;
}
.form-row {
  display: flex;
  gap: 12px;
}
.form-row .form-group {
  flex: 1;
}

.reminder-options {
  display: flex;
  gap: 6px;
}
.reminder-opt {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}
.reminder-opt.selected {
  background: rgba(56, 132, 255, 0.15);
  border-color: rgba(56, 132, 255, 0.3);
  color: var(--accent-blue);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.btn-cancel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  padding: 9px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}
.btn-save {
  background: rgba(56, 132, 255, 0.85);
  border: 1px solid rgba(120, 180, 255, 0.3);
  color: #fff;
  padding: 9px 22px;
  border-radius: var(--radius-md);
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(56, 132, 255, 0.25);
  transition: all 0.2s;
}
.btn-save:hover {
  box-shadow: 0 4px 20px rgba(56, 132, 255, 0.4);
  transform: translateY(-1px);
}

.computed-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
}
.computed-date strong {
  color: var(--accent-blue);
}

/* === Toast with enter/exit === */

.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: translateX(120px);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.35s var(--ease),
    opacity 0.35s var(--ease);
}
.toast-success {
  background: rgba(15, 50, 40, 0.85);
  border: 1px solid rgba(80, 220, 150, 0.2);
  color: var(--accent-green);
}
.toast-error {
  background: rgba(60, 20, 20, 0.85);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}
.toast-show {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.toast-hide {
  transform: translateX(120px);
  opacity: 0;
}

/* === Scrollbar === */

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}
::selection {
  background: rgba(56, 132, 255, 0.3);
}

/* === Extra Income === */

.extra-income-month {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.extra-income-month span {
  font-size: 15px;
  font-weight: 600;
}
.extra-inc-total {
  margin-left: auto;
  font-size: 14px;
  color: var(--text-muted);
}
.extra-inc-total strong {
  color: var(--accent-gold);
  font-size: 16px;
}

.extra-income-add {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  align-items: center;
}
.extra-income-add input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  color: #e2e8f0;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
}
.extra-income-add input:focus {
  border-color: rgba(56, 132, 255, 0.4);
}

.extra-income-list {
  max-height: 320px;
  overflow-y: auto;
}

.extra-inc-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.extra-inc-item:last-child {
  border-bottom: none;
}
.extra-inc-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.extra-inc-amount {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-gold);
  min-width: 60px;
}
.extra-inc-note {
  font-size: 13px;
  color: var(--text-muted);
}

/* === Account Styles === */

.account-active {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
}

.cost-badge {
  display: inline-flex;
  background: rgba(180, 142, 255, 0.12);
  color: var(--accent-purple);
  border: 1px solid rgba(180, 142, 255, 0.2);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
}

.btn-change {
  color: var(--accent-purple);
  border-color: rgba(180, 142, 255, 0.2);
}
.btn-change:hover {
  background: rgba(180, 142, 255, 0.15);
}

.account-history-toggle {
  margin-top: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}
.account-history-toggle:hover {
  color: rgba(255, 255, 255, 0.45);
}

.account-history-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease);
}
.account-history-list.expanded {
  max-height: 400px;
  overflow-y: auto;
}

.account-retired {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 0;
  font-size: 11px;
  opacity: 0.65;
}

.refund-badge {
  display: inline-flex;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
}
.refund-badge.refund-done {
  background: rgba(99, 230, 160, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(99, 230, 160, 0.15);
}
.refund-badge.refund-pending {
  background: rgba(255, 138, 138, 0.1);
  color: var(--accent-red);
  border: 1px solid rgba(255, 138, 138, 0.15);
}
.refund-badge.refund-banned {
  background: rgba(251, 146, 60, 0.1);
  color: var(--accent-orange);
  border: 1px solid rgba(251, 146, 60, 0.15);
}
.btn-ban {
  color: var(--accent-orange);
  border-color: rgba(251, 146, 60, 0.2);
}
.btn-ban:hover {
  background: rgba(251, 146, 60, 0.15);
}
.ban-badge {
  display: inline-flex;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(251, 146, 60, 0.15);
  color: var(--accent-orange);
  border: 1px solid rgba(251, 146, 60, 0.2);
  margin-right: 6px;
}
.account-banned {
  border-left: 2px solid var(--accent-orange);
  padding-left: 8px;
}

.card-payment {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-cyan);
}

/* Financial badges */
.finance-badge {
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.finance-badge.finance-refund {
  background: rgba(255, 138, 138, 0.12);
  color: var(--accent-red);
  border: 1px solid rgba(255, 138, 138, 0.2);
}
.finance-badge.finance-recovery {
  background: rgba(251, 146, 60, 0.12);
  color: var(--accent-orange);
  border: 1px solid rgba(251, 146, 60, 0.2);
}

/* Cost tier selector in modal (purple selected state) */
.reminder-opt.selected-purple {
  background: rgba(180, 142, 255, 0.15);
  border-color: rgba(180, 142, 255, 0.3);
  color: var(--accent-purple);
}

/* === Progress Bars === */

.progress-section {
  margin-top: 14px;
}
.progress-row {
  margin-bottom: 10px;
}
.progress-row:last-child {
  margin-bottom: 0;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  font-size: 11px;
}
.progress-title {
  color: rgba(255, 255, 255, 0.4);
  font-variant-numeric: tabular-nums;
}
.progress-days {
  font-weight: 600;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.progress-track {
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2);
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s var(--ease);
}
.fill-safe {
  background: linear-gradient(90deg, #5aadff, #3b82f6);
  box-shadow: 0 0 4px rgba(90, 173, 255, 0.25);
}
.fill-account-safe {
  background: linear-gradient(90deg, #8b5cf6, #b48eff);
  box-shadow: 0 0 4px rgba(180, 142, 255, 0.25);
}
.fill-warn {
  background: linear-gradient(90deg, #f59e0b, #fb923c);
  box-shadow: 0 0 4px rgba(251, 146, 60, 0.25);
}
.fill-danger {
  background: linear-gradient(90deg, #ef4444, #ff8a8a);
  box-shadow: 0 0 4px rgba(239, 68, 68, 0.25);
}
.days-color-safe {
  color: var(--accent-blue);
}
.days-color-account-safe {
  color: #b48eff;
}
.days-color-warn {
  color: #f59e0b;
}
.days-color-danger {
  color: #ef4444;
}

/* === Responsive === */

@media (max-width: 768px) {
  .header {
    flex-wrap: wrap;
    gap: 12px;
  }
  .header-right {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
  }
  .revenue-group {
    width: 100%;
    order: -1;
  }
  .revenue-item {
    padding: 0 10px;
  }
  .revenue-amount {
    font-size: 14px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 16px 12px;
  }
  .header {
    padding: 16px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .header h1 {
    font-size: 18px;
    width: 100%;
  }
  .header-right {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }
  .revenue-group {
    width: 100%;
    margin-right: 0;
  }
  .revenue-item {
    flex: 1;
    padding: 0 8px;
  }
  .revenue-amount {
    font-size: 13px;
  }
  .revenue-label {
    font-size: 9px;
  }
  .revenue-divider {
    height: 24px;
  }

  /* Button group horizontal scroll */
  .header-buttons {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    width: 100%;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .header-buttons::-webkit-scrollbar {
    display: none;
  }
  .header-buttons .btn-settings,
  .header-buttons .btn-add {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 12px;
    padding: 7px 12px;
  }

  .stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .stat-card {
    padding: 14px 10px;
  }
  .stat-num {
    font-size: 22px;
  }
  .stat-label {
    font-size: 10px;
  }

  .card-info {
    flex-direction: column;
    gap: 4px;
  }
  .card-bottom {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
  .card-actions {
    align-self: flex-end;
  }
  .btn-sm {
    padding: 6px 12px;
  }
  .form-row {
    flex-direction: column;
    gap: 0;
  }
}

/* === Calendar === */

.calendar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.btn-calendar-nav {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-calendar-nav:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  position: relative;
  cursor: default;
  transition: all 0.2s var(--ease);
}

.calendar-day.empty {
  opacity: 0;
  pointer-events: none;
}
.calendar-day.today {
  background: rgba(56, 132, 255, 0.1);
  border: 1px solid rgba(56, 132, 255, 0.25);
  color: var(--accent-blue);
  font-weight: 700;
}
.calendar-day.has-expiry {
  cursor: pointer;
}
.calendar-day.has-expiry:hover {
  background: rgba(255, 255, 255, 0.06);
}

.calendar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 3px;
  background: var(--accent-orange);
}
.calendar-day.today .calendar-dot {
  background: var(--accent-blue);
}

/* Calendar tooltip */
.calendar-day .calendar-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(13, 17, 28, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  white-space: nowrap;
  z-index: 10;
  font-size: 11px;
  color: var(--text-primary);
  line-height: 1.6;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.calendar-day:hover .calendar-tooltip {
  display: block;
}

/* === Renew Logs === */

.renew-logs-list {
  max-height: 420px;
  overflow-y: auto;
  margin-bottom: 8px;
}

.renew-log-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.2s;
}
.renew-log-item:hover {
  background: rgba(255, 255, 255, 0.03);
}
.renew-log-item + .renew-log-item {
  margin-top: 6px;
}

.renew-log-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(56, 132, 255, 0.12);
  border: 1px solid rgba(56, 132, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--accent-blue);
}

.renew-log-body {
  flex: 1;
  min-width: 0;
}
.renew-log-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.renew-log-dates {
  font-size: 11px;
  color: var(--text-muted);
}
.renew-log-dates strong {
  color: var(--text-secondary);
}
.renew-log-arrow {
  color: var(--accent-blue);
  margin: 0 4px;
}
.renew-log-time {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.renew-logs-empty {
  text-align: center;
  padding: 30px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 13px;
}

/* === Settle Button === */

.btn-sm.settle {
  color: var(--accent-gold);
  border-color: rgba(255, 183, 77, 0.2);
}
.btn-sm.settle:hover {
  background: rgba(255, 183, 77, 0.15);
}

/* === Record Cards === */

.record-card {
  flex: 1;
  padding: 28px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}
.record-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.record-card-icon {
  font-size: 28px;
  margin-bottom: 8px;
  color: var(--accent-blue);
}
.record-card:last-child .record-card-icon {
  color: var(--accent-gold);
}
.record-card-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

/* === Plan Type Cards === */

.plan-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.plan-type-card {
  padding: 14px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}
.plan-type-card:hover {
  background: rgba(255, 255, 255, 0.06);
}
.plan-type-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}
.plan-type-desc {
  font-size: 11px;
  opacity: 0.5;
}

/* Colors matching badges */
.plan-card-standard {
  border-color: rgba(56, 132, 255, 0.15);
}
.plan-card-standard .plan-type-label {
  color: var(--accent-blue);
}
.plan-card-standard.selected {
  background: rgba(56, 132, 255, 0.12);
  border-color: var(--accent-blue);
  box-shadow: 0 0 12px rgba(56, 132, 255, 0.15);
}

.plan-card-self-paid {
  border-color: rgba(80, 200, 220, 0.15);
}
.plan-card-self-paid .plan-type-label {
  color: var(--accent-cyan);
}
.plan-card-self-paid.selected {
  background: rgba(80, 200, 220, 0.12);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(80, 200, 220, 0.15);
}

.plan-card-custom {
  border-color: rgba(160, 100, 255, 0.15);
}
.plan-card-custom .plan-type-label {
  color: var(--accent-purple);
}
.plan-card-custom.selected {
  background: rgba(160, 100, 255, 0.12);
  border-color: var(--accent-purple);
  box-shadow: 0 0 12px rgba(160, 100, 255, 0.15);
}

.plan-card-personal {
  border-color: rgba(80, 220, 150, 0.15);
}
.plan-card-personal .plan-type-label {
  color: var(--accent-green);
}
.plan-card-personal.selected {
  background: rgba(80, 220, 150, 0.12);
  border-color: var(--accent-green);
  box-shadow: 0 0 12px rgba(80, 220, 150, 0.15);
}
