/* MACK Media — Client Portal */
:root {
  --bg:         #0D1118;
  --surface:    #161B26;
  --surface-2:  #1E2535;
  --surface-3:  #252D3D;
  --border:     #2A3347;
  --border-2:   #364058;
  --text:       #E2E8F5;
  --text-2:     #9DAABF;
  --text-3:     #637085;
  --accent:     #FF4757;
  --blue:       #3B82F6;
  --blue-dim:   rgba(59,130,246,.15);
  --green:      #10B981;
  --green-dim:  rgba(16,185,129,.15);
  --yellow:     #F59E0B;
  --yellow-dim: rgba(245,158,11,.15);
  --pink:       #EC4899;
  --pink-dim:   rgba(236,72,153,.15);
  --red-dim:    rgba(255,71,87,.12);
  --radius-sm: 6px; --radius: 10px; --radius-lg: 16px;
  --font: "Inter", system-ui, sans-serif;
  --font-d: "Inter Tight", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
h1,h2,h3,h4 { font-family: var(--font-d); font-weight: 700; letter-spacing: -0.02em; margin: 0; }

/* Topbar */
.topbar { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; height: 52px; background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 24px; gap: 0; }
.topbar__brand { display: flex; align-items: center; gap: 10px; margin-right: 32px; flex-shrink: 0; }
.topbar__name { font-family: var(--font-d); font-weight: 800; font-size: 15px; color: #fff; }
.topbar__name .red { color: var(--accent); }
.topbar__label { font-size: 11px; font-weight: 500; color: var(--text-3); background: var(--surface-3); border: 1px solid var(--border); padding: 1px 8px; border-radius: 20px; }
.topbar__nav { display: flex; align-items: stretch; height: 100%; }
.nav-tab { display: flex; align-items: center; gap: 6px; padding: 0 16px; font-size: 13px; font-weight: 500; color: var(--text-3); border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.nav-tab:hover { color: var(--text); }
.nav-tab.is-active { color: #fff; border-bottom-color: var(--accent); }
.topbar__user { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.user-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }

/* Layout */
.main-content { padding: 32px 28px 60px; max-width: 1100px; margin: 0 auto; }
.loading-state { color: var(--text-3); padding: 60px 0; text-align: center; }
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 22px; color: #fff; }
.page-header p  { font-size: 13px; color: var(--text-3); margin: 4px 0 0; }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.stat-card.accent { border-color: var(--accent); background: linear-gradient(135deg, var(--surface) 60%, var(--red-dim)); }
.stat-card__value { font-family: var(--font-d); font-size: 30px; font-weight: 700; color: #fff; line-height: 1; }
.stat-card__label { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; margin-top: 6px; }

/* Info card */
.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; }
.info-card h2 { font-size: 16px; color: #fff; margin-bottom: 16px; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 12px; }
.info-field label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.info-field p { color: var(--text); font-size: 14px; margin: 3px 0 0; }

/* Table */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th { padding: 10px 16px; text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--border); background: var(--surface-2); }
tbody tr { border-bottom: 1px solid var(--border); }
tbody tr:last-child { border-bottom: 0; }
tbody td { padding: 12px 16px; color: var(--text); vertical-align: middle; }
.td-num { font-weight: 600; color: #fff; }
.td-muted { color: var(--text-3); }

/* Badges */
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-paid    { background: var(--green-dim); color: var(--green); }
.badge-unpaid  { background: var(--yellow-dim); color: var(--yellow); }
.badge-overdue { background: var(--red-dim); color: var(--accent); }
.plan-badge { display: inline-flex; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.plan-STARTER { background: var(--green-dim); color: var(--green); }
.plan-GROWTH  { background: var(--blue-dim);  color: var(--blue); }
.plan-PREMIUM { background: rgba(139,92,246,.15); color: #8B5CF6; }
.platform-chip { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.platform-facebook  { background: var(--blue-dim); color: var(--blue); }
.platform-instagram { background: var(--pink-dim); color: var(--pink); }

/* Calendar */
.calendar-controls { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.calendar-controls select { background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 10px; font-size: 13px; color: var(--text); }
.lang-toggle { display: flex; }
.lang-btn { padding: 5px 12px; font-size: 12px; font-weight: 700; border: 1px solid var(--border); background: var(--surface-3); color: var(--text-3); cursor: pointer; transition: all .15s; }
.lang-btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.lang-btn:last-child  { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; border-left: 0; }
.lang-btn.is-active   { background: var(--accent); color: #fff; border-color: var(--accent); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.cal-header { background: var(--surface-3); padding: 6px 8px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); text-align: center; }
.cal-cell { background: var(--surface); min-height: 80px; padding: 6px; }
.cal-cell.empty { background: var(--bg); opacity: .3; }
.cal-date { font-size: 11px; color: var(--text-3); margin-bottom: 4px; }
.cal-posts { display: flex; flex-direction: column; gap: 2px; }
.cal-post { font-size: 10px; padding: 2px 5px; border-radius: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.cal-post.facebook  { background: var(--blue-dim); color: var(--blue); }
.cal-post.instagram { background: var(--pink-dim); color: var(--pink); }

/* No content empty state */
.empty-cal { text-align: center; padding: 48px 20px; color: var(--text-3); }
.empty-cal h3 { color: var(--text-2); margin-bottom: 6px; }

/* Contact box */
.contact-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; margin-top: 24px; display: flex; align-items: center; gap: 16px; }
.contact-box__icon { font-size: 28px; }
.contact-box h3 { font-size: 14px; color: #fff; margin-bottom: 3px; }
.contact-box p  { font-size: 13px; color: var(--text-2); margin: 0; }

/* Toast */
.toast { position: fixed; bottom: 24px; right: 24px; z-index: 400; background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text); padding: 10px 16px; border-radius: var(--radius); font-size: 13px; box-shadow: 0 8px 30px rgba(0,0,0,.4); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }

@media (max-width: 600px) {
  .main-content { padding: 16px; }
  .topbar { padding: 0 14px; }
  .topbar__label { display: none; }
  .nav-tab { padding: 0 10px; font-size: 12px; }
}
