/* =========  Igor Dsgn · Área do cliente  ========= */

:root {
  --bg:       #06070E;
  --bg2:      #090B16;
  --bg3:      #0C0E1D;
  --panel:    #0F1120;
  --panel-2:  #141729;
  --border:   rgba(255,255,255,0.08);
  --border-2: rgba(255,255,255,0.14);
  --border-lime: rgba(219,255,59,0.22);
  --text:     #FFFFFF;
  --text-dim: rgba(255,255,255,0.55);
  --text-mute: rgba(255,255,255,0.30);
  --lime:     #DBFF3B;
  --lime-2:   #c5f000;
  --blue:     #1B3EB3;
  --blue-2:   #2248CC;
  --success:  #66E3A6;
  --warning:  #F5B452;
  --danger:   #FF6B6B;
  --radius:   16px;
  --radius-sm: 10px;
  --shadow:   0 16px 48px rgba(0,0,0,0.45);
  --shadow-lime: 0 0 28px rgba(219,255,59,0.25);
  --font-head: 'Outfit', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

h1, h2, h3, h4 { font-family: var(--font-head); letter-spacing: -0.01em; }

a { color: var(--lime); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; cursor: pointer; border: none; color: var(--text); }
button:disabled { opacity: 0.45; cursor: not-allowed; }

input, textarea, select {
  font-family: inherit;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  width: 100%;
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  font-size: 14px;
}
input:focus, textarea:focus, select:focus {
  border-color: rgba(219, 255, 59, 0.45);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(219, 255, 59, 0.12);
}
input:disabled, textarea:disabled, select:disabled {
  opacity: 0.8;
  background: rgba(255, 255, 255, 0.02);
  cursor: not-allowed;
}
/* Fix: em dark mode o popup nativo de <select> pode abrir com fundo branco
   e texto branco (invisível). Força cores compatíveis. */
select option {
  background-color: #141729;
  color: #FFFFFF;
  padding: 8px;
}
select option:checked,
select option:hover {
  background-color: #1B3EB3;
  color: #FFFFFF;
}
textarea { resize: vertical; min-height: 80px; font-family: inherit; }

label {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 7px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-head);
}

/* =========  BUTTONS  ========= */
.btn {
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-head);
  transition: transform 0.1s, background 0.15s, border-color 0.15s, box-shadow 0.2s;
  border: 1px solid var(--border-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.btn:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(219, 255, 59, 0.4); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--lime);
  color: var(--bg);
  border: none;
  font-weight: 800;
  box-shadow: var(--shadow-lime);
}
.btn-primary:hover { background: var(--lime); opacity: 0.92; transform: translateY(-1px); box-shadow: 0 0 40px rgba(219, 255, 59, 0.45); }

.btn-ghost { background: transparent; border: 1px solid var(--border); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.04); }

.btn-danger { background: rgba(255, 107, 107, 0.12); border: 1px solid rgba(255, 107, 107, 0.35); color: var(--danger); }
.btn-danger:hover { background: rgba(255, 107, 107, 0.18); }

.btn-success { background: rgba(102, 227, 166, 0.12); border: 1px solid rgba(102, 227, 166, 0.35); color: var(--success); }
.btn-success:hover { background: rgba(102, 227, 166, 0.18); }

.btn-blue { background: var(--blue); color: var(--text); border: none; }
.btn-blue:hover { background: var(--blue-2); }

.btn-sm { padding: 7px 14px; font-size: 12px; }

/* =========  LOGIN  ========= */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.login-wrap::before, .login-wrap::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}
.login-wrap::before { width: 500px; height: 500px; background: rgba(27, 62, 179, 0.4); top: -120px; left: 50%; transform: translateX(-50%); }
.login-wrap::after { width: 350px; height: 350px; background: rgba(219, 255, 59, 0.07); bottom: -80px; right: -60px; }

.login-card {
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  position: relative;
  z-index: 1;
}
.login-card .brand-mark {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 4px;
}
.login-card .brand-mark .dot { color: var(--lime); }
.login-card h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
}
.login-card p.sub { margin: 0 0 28px; color: var(--text-dim); font-size: 13px; }
.login-card .field { margin-bottom: 14px; }
.login-card .btn-primary { width: 100%; justify-content: center; margin-top: 6px; padding: 14px; }
.login-card .error {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.25);
  color: var(--danger);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
}
.login-card .hint { margin-top: 20px; font-size: 11px; color: var(--text-mute); text-align: center; letter-spacing: 0.04em; }
.login-card .success {
  background: rgba(219, 255, 59, 0.08);
  border: 1px solid rgba(219, 255, 59, 0.3);
  color: var(--lime);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
}
.login-tabs { display: flex; gap: 6px; background: rgba(255,255,255,0.04); padding: 4px; border-radius: 10px; margin-bottom: 18px; }
.login-tab { flex: 1; background: transparent; border: none; color: var(--text-mute); font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; padding: 9px; border-radius: 8px; cursor: pointer; transition: .2s; }
.login-tab.active { background: var(--lime); color: var(--bg); }
.login-tab:not(.active):hover { color: var(--white); background: rgba(255,255,255,.03); }
.auth-form.hidden { display: none; }
.auth-form textarea { width: 100%; background: var(--bg); border: 1px solid var(--dim); color: var(--white); padding: 11px 12px; border-radius: 10px; font-family: inherit; font-size: 13px; resize: vertical; min-height: 70px; }

/* =========  APP LAYOUT  ========= */
.app { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; position: relative; z-index: 1; }

.sidebar {
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar .brand {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 19px;
  letter-spacing: -1px;
  padding: 0 8px;
}
.sidebar .brand .dot { color: var(--lime); }
.sidebar .brand small { display: block; font-size: 10px; color: var(--text-mute); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; margin-top: 2px; }

.side-section { display: flex; flex-direction: column; gap: 12px; }
.side-section .title {
  font-family: var(--font-head);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-mute);
  margin: 0 8px;
  font-weight: 700;
}
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  background: transparent;
  border: none;
  color: var(--text-dim);
  text-align: left;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 11px;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  border: 1px solid transparent;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.nav-item.active {
  background: rgba(219, 255, 59, 0.08);
  color: var(--text);
  border-color: var(--border-lime);
}

.company-select { margin: 0 8px; }

.sidebar-footer { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--border); }
.user-chip { display: flex; align-items: center; gap: 11px; padding: 6px 8px; color: var(--text-dim); font-size: 13px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--lime);
  color: var(--bg);
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: 13px;
}
.user-chip .meta { display: flex; flex-direction: column; line-height: 1.25; }
.user-chip .meta small { color: var(--text-mute); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; }

/* =========  MAIN  ========= */
.main { padding: 36px 40px 80px; overflow-x: hidden; position: relative; }
.main::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: rgba(27, 62, 179, 0.12);
  border-radius: 50%;
  filter: blur(120px);
  top: -200px; right: -200px;
  pointer-events: none;
  z-index: 0;
}
.main > * { position: relative; z-index: 1; }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
}
.page-header .sub { color: var(--text-dim); font-size: 13px; margin-top: 6px; }
.header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* =========  CALENDAR  ========= */
.cal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 16px;
  flex-wrap: wrap;
}
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav h3 {
  margin: 0; font-size: 20px; font-weight: 800;
  text-transform: capitalize;
  min-width: 200px;
  font-family: var(--font-head);
}

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--text-dim); font-family: var(--font-head); letter-spacing: 0.04em; text-transform: uppercase; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: middle; }

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.cal-weekday {
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  padding: 10px 0;
  font-weight: 700;
  font-family: var(--font-head);
}
.cal-cell {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 115px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
  position: relative;
}
.cal-cell:hover { border-color: rgba(219, 255, 59, 0.3); background: rgba(255, 255, 255, 0.04); }
.cal-cell.empty { background: transparent; border: 1px solid transparent; cursor: default; }
.cal-cell.today {
  border-color: var(--lime);
  box-shadow: 0 0 0 1px rgba(219, 255, 59, 0.25);
}
.cal-cell.today .daynum { color: var(--lime); font-weight: 800; }
.cal-cell .daynum { font-size: 12px; color: var(--text-dim); font-weight: 700; font-family: var(--font-head); }

.cal-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 5px 7px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.cal-pill:hover { border-color: rgba(219, 255, 59, 0.4); background: rgba(219, 255, 59, 0.06); }
.cal-pill .time { color: var(--text-mute); font-variant-numeric: tabular-nums; font-size: 10px; font-family: var(--font-head); }
.cal-pill .label { overflow: hidden; text-overflow: ellipsis; }

/* Status colors */
.status-pending { background: var(--warning); }
.status-approved { background: var(--lime); }
.status-changes_requested { background: var(--danger); }
.status-idea { background: var(--blue); }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--border-2);
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-head);
  letter-spacing: 0.02em;
}
.status-badge.pending { color: var(--warning); border-color: rgba(245, 180, 82, 0.3); background: rgba(245, 180, 82, 0.08); }
.status-badge.approved { color: var(--bg); background: var(--lime); border-color: var(--lime); }
.status-badge.changes_requested { color: var(--danger); border-color: rgba(255, 107, 107, 0.3); background: rgba(255, 107, 107, 0.08); }
.status-badge.idea { color: var(--text); border-color: rgba(27, 62, 179, 0.6); background: rgba(27, 62, 179, 0.18); }

/* Type chip */
.type-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(219, 255, 59, 0.08);
  color: var(--lime);
  border: 1px solid rgba(219, 255, 59, 0.2);
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* =========  LISTS (storytelling / reels / companies)  ========= */
.list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.card:hover {
  border-color: rgba(219, 255, 59, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(219, 255, 59, 0.06);
}
.card h3 { margin: 0; font-size: 16px; font-weight: 700; }
.card .muted { color: var(--text-dim); font-size: 12.5px; }
.card .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card .body { color: var(--text-dim); font-size: 13px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.card .footer { display: flex; gap: 6px; margin-top: auto; flex-wrap: wrap; }

/* =========  MODAL  ========= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 4, 10, 0.78);
  backdrop-filter: blur(6px);
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
}
.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 680px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.modal header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal header h3 { margin: 0; font-size: 18px; font-weight: 800; }
.modal .body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.modal footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.close-btn {
  background: transparent;
  color: var(--text-dim);
  font-size: 18px;
  padding: 4px 10px;
  border-radius: 6px;
  border: none;
}
.close-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

/* Media preview: 1080×1440 aspect for feed (3:4) */
.media-preview-frame {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 3 / 4;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border-2);
  border-radius: var(--radius-sm);
  margin: 0 auto;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--text-mute);
  font-size: 12px;
  text-align: center;
  padding: 12px;
}
.media-preview-frame img, .media-preview-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.media-dim-hint {
  display: block;
  text-align: center;
  font-size: 11px;
  color: var(--text-mute);
  margin-top: 6px;
  font-family: var(--font-head);
  letter-spacing: 0.06em;
}

.feedback-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
}
.feedback-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 13px;
}
.feedback-item .meta {
  color: var(--text-mute);
  font-size: 10.5px;
  margin-bottom: 5px;
  font-family: var(--font-head);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.feedback-item.by-admin { border-color: rgba(219, 255, 59, 0.22); background: rgba(219, 255, 59, 0.04); }
.feedback-item.by-company { border-color: rgba(27, 62, 179, 0.35); background: rgba(27, 62, 179, 0.08); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.hashtag-row { display: flex; flex-wrap: wrap; gap: 4px; }
.hashtag { background: rgba(219, 255, 59, 0.06); border: 1px solid rgba(219, 255, 59, 0.2); padding: 2px 10px; border-radius: 999px; font-size: 11px; color: var(--lime); }

/* =========  EMPTY STATE  ========= */
.empty {
  text-align: center;
  padding: 72px 20px;
  color: var(--text-dim);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}
.empty .icon { font-size: 36px; margin-bottom: 12px; }
.empty h3 { margin: 0 0 6px; color: var(--text); font-weight: 700; font-size: 17px; }

/* =========  TOAST  ========= */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--bg2);
  border: 1px solid var(--border-2);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  box-shadow: var(--shadow);
  z-index: 100;
  max-width: 340px;
  font-family: var(--font-head);
  font-weight: 600;
}
.toast.error { border-color: rgba(255, 107, 107, 0.45); color: var(--danger); }
.toast.ok { border-color: var(--border-lime); color: var(--lime); }

/* =========  MISC  ========= */
.hidden { display: none !important; }
.row-flex { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.small { font-size: 12px; color: var(--text-dim); }

/* Responsive */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .main { padding: 24px; }
  .cal-cell { min-height: 80px; }
  .page-header h2 { font-size: 22px; }
}

/* =========  MOBILE — calendário compacto  ========= */
@media (max-width: 560px) {
  .main { padding: 16px 12px 60px; }
  .page-header { margin-bottom: 18px; gap: 10px; }
  .page-header h2 { font-size: 20px; }
  .page-header .sub { font-size: 12px; }
  .header-actions { width: 100%; }
  .header-actions .btn { padding: 8px 12px; font-size: 12px; }

  .cal-toolbar { gap: 8px; }
  .cal-nav h3 { font-size: 16px; min-width: 0; }

  .legend { gap: 8px; font-size: 9px; }
  .legend > span { display: inline-flex; align-items: center; }

  .calendar { gap: 3px; padding: 6px; border-radius: 12px; }
  /* esconde "Dom Seg Ter..." e mostra só a letra via data-letter */
  .cal-weekday {
    font-size: 0;
    letter-spacing: 0;
    padding: 6px 0;
    position: relative;
    height: 22px;
  }
  .cal-weekday::before {
    content: attr(data-letter);
    font-size: 11px;
    color: var(--text-mute);
    font-weight: 700;
    letter-spacing: 0;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .cal-cell {
    min-height: 56px;
    padding: 4px;
    border-radius: 7px;
    gap: 2px;
  }
  .cal-cell .daynum { font-size: 11px; }

  /* pills viram bolinhas coloridas (só o ponto, sem texto) */
  .cal-pill {
    padding: 0;
    height: 6px;
    width: 100%;
    border-radius: 999px;
    border: none;
    background: var(--card-color, var(--blue));
    overflow: hidden;
  }
  .cal-pill .time, .cal-pill .label, .cal-pill .ico { display: none !important; }
  .cal-pill + .cal-pill { margin-top: 2px; }

  /* admin calendar — chips de tarefas também viram dots */
  .cal-taskchip {
    padding: 0;
    height: 6px;
    width: 100%;
    border-radius: 999px;
    border: none;
    background: var(--card-color, var(--lime));
  }
  .cal-taskchip .ct-emoji,
  .cal-taskchip .ct-title,
  .cal-taskchip .ct-company { display: none !important; }
  .cal-more { font-size: 9px; padding: 0; color: var(--text-mute); }
}

/* phones bem pequenos (≤380px) — apertão extra */
@media (max-width: 380px) {
  .main { padding: 14px 8px 60px; }
  .calendar { gap: 2px; padding: 4px; }
  .cal-cell { min-height: 48px; padding: 3px; }
  .cal-cell .daynum { font-size: 10px; }
}

/* =========  PENDING STATE (cliente aguardando aprovacao) ========= */
.pending-card {
  max-width: 560px;
  margin: 60px auto;
  padding: 40px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
}
.pending-card .pending-icon {
  font-size: 56px;
  margin-bottom: 16px;
}
.pending-card h2 {
  font-family: var(--font-head);
  font-size: 26px;
  margin: 0 0 10px;
}
.pending-card p.sub {
  color: var(--text-dim);
  line-height: 1.55;
  margin: 0 0 24px;
}
.pending-details {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  text-align: left;
  margin-bottom: 24px;
  font-size: 13px;
  line-height: 1.7;
}
.pending-details strong {
  color: var(--text-dim);
  font-weight: 600;
  font-family: var(--font-head);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-right: 4px;
}
.pending-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* =========  SOLICITACOES (admin) ========= */
.nav-badge {
  display: inline-block;
  background: var(--lime);
  color: var(--bg);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 6px;
  font-family: var(--font-head);
  line-height: 1;
  vertical-align: middle;
}
.pending-user-card .pending-user-actions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.pending-mode-toggle {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.pending-block {
  margin-top: 8px;
}
.pending-block label {
  display: block;
  font-size: 11px;
  font-family: var(--font-head);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.pending-block select,
.pending-block input[type="text"] {
  width: 100%;
  padding: 9px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
}

/* ============ PROGRAMAÇÃO (Kanban + painel de empresas) ============ */
.prog-section {
  margin-bottom: 32px;
}
.prog-section .section-title {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin: 0 0 14px 4px;
}

/* Painel de empresas */
.company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.company-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.company-card:hover,
.company-card:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
  outline: none;
}
.company-card .cc-head { display: flex; flex-direction: column; gap: 2px; }
.company-card .cc-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}
.company-card .cc-handle {
  font-size: 12px;
  color: var(--text-soft);
}
.company-card .cc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.company-card .cc-stat {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  text-align: center;
}
.company-card .cc-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text);
}
.company-card .cc-stat span {
  font-size: 11px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.company-card .cc-cta {
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
  text-align: right;
}

/* Kanban */
.kanban {
  display: grid;
  grid-template-columns: repeat(6, minmax(220px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}
@media (max-width: 1400px) {
  .kanban { grid-template-columns: repeat(3, minmax(220px, 1fr)); }
}
@media (max-width: 800px) {
  .kanban { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
}
.kanban-col {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}
.kanban-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 2px solid var(--col-color, var(--accent));
  margin-bottom: 12px;
  color: var(--text);
}
.kanban-emoji { font-size: 16px; }
.kanban-label {
  flex: 1;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
}
.kanban-count {
  background: var(--col-color, var(--accent));
  color: #0a0a14;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-display);
}
.kanban-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 60px;
  padding: 4px;
  border-radius: 10px;
  transition: background .15s ease;
}
.kanban-list.drop-over {
  background: rgba(27, 62, 179, 0.12);
  outline: 2px dashed var(--accent);
  outline-offset: -4px;
}
.kanban-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--card-color, var(--accent));
  border-radius: 10px;
  padding: 10px 12px;
  cursor: grab;
  transition: transform .12s ease, border-color .12s ease;
}
.kanban-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.kanban-card.dragging {
  opacity: 0.5;
  cursor: grabbing;
}
.kanban-card .kc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.kanban-card .kc-company {
  font-size: 11px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kanban-card .kc-date {
  font-size: 11px;
  color: var(--accent);
  background: rgba(27, 62, 179, 0.15);
  border-radius: 6px;
  padding: 2px 6px;
  font-weight: 600;
  flex-shrink: 0;
}
.kanban-card .kc-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  color: var(--text);
}
.kanban-card .kc-desc {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.4;
}
.kanban-add {
  margin-top: 8px;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--text-soft);
  padding: 10px;
  cursor: pointer;
  font-size: 12px;
  font-family: var(--font-body);
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.kanban-add:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(27, 62, 179, 0.06);
}

/* ============ ADMIN SECTION ============ */
.admin-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.admin-toggle:hover {
  border-color: var(--accent);
  background: rgba(27, 62, 179, 0.10);
}
.admin-toggle.open {
  background: rgba(27, 62, 179, 0.15);
  border-color: var(--accent);
}
.admin-toggle .chev {
  font-size: 16px;
  color: var(--accent);
  margin-left: 8px;
}
.admin-nav {
  margin-top: 8px;
  padding-left: 8px;
  border-left: 2px solid rgba(27, 62, 179, 0.25);
}

/* Calendário do admin: chips dentro das células */
.cal-cell.has { background: rgba(27, 62, 179, 0.04); }
.cal-taskchip {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--card-color, var(--accent));
  border-radius: 6px;
  padding: 3px 6px;
  margin-top: 4px;
  font-size: 11px;
  cursor: pointer;
  overflow: hidden;
  transition: transform .12s ease;
}
.cal-taskchip:hover { transform: translateY(-1px); border-color: var(--accent); }
.cal-taskchip .ct-emoji { flex-shrink: 0; font-size: 11px; }
.cal-taskchip .ct-title {
  flex: 1;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-taskchip .ct-company {
  color: var(--text-soft);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60px;
}
.cal-more {
  font-size: 10px;
  color: var(--accent);
  margin-top: 2px;
  text-align: center;
  font-weight: 600;
}

/* ============================================================
   ICONS (SVG inline lime)
   ============================================================ */
.icon-svg {
  flex-shrink: 0;
  color: var(--lime);
  stroke: currentColor;
  vertical-align: -3px;
}
.nav-item .icon-svg,
.admin-toggle .icon-svg,
.btn .icon-svg,
.kanban-add .icon-svg,
.dp-trigger .icon-svg { color: var(--lime); }

.nav-item { display: flex; align-items: center; gap: 11px; }
.nav-item .ico { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; }
.admin-toggle .ico { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; margin-right: 8px; }
.admin-toggle .lbl { flex: 1; text-align: left; }

/* hover sutil: ícone fica branco no item ativo */
.nav-item.active .icon-svg { color: var(--lime); }

/* empty-state icons (caixas grandes em telas vazias) */
.empty .icon { display: inline-flex; width: 56px; height: 56px; align-items: center; justify-content: center; border-radius: 14px; background: rgba(219, 255, 59, 0.08); border: 1px solid var(--border-lime); color: var(--lime); margin: 0 auto 14px; }
.empty .icon .icon-svg { width: 28px; height: 28px; }

.pending-icon { display: inline-flex; width: 64px; height: 64px; align-items: center; justify-content: center; border-radius: 16px; background: rgba(219, 255, 59, 0.1); border: 1px solid var(--border-lime); color: var(--lime); margin-bottom: 18px; }
.pending-icon .icon-svg { width: 32px; height: 32px; }

/* ============================================================
   DATE PICKER (custom, dark + lime)
   ============================================================ */
.datepicker { position: relative; display: block; }
.dp-trigger {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 13px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
  text-align: left;
}
.dp-trigger:hover { border-color: rgba(219, 255, 59, 0.35); background: rgba(255, 255, 255, 0.04); }
.dp-trigger .dp-label { color: var(--text); flex: 1; }
.dp-trigger:has(.dp-label:empty) .dp-label::before { content: 'Selecionar data'; color: var(--text-mute); }

.dp-popover {
  position: absolute;
  top: calc(100% + 6px); left: 0;
  z-index: 50;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(219, 255, 59, 0.06);
  padding: 14px;
  width: 300px;
  font-family: var(--font-body);
}
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dp-title { font-family: var(--font-head); font-weight: 700; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text); }
.dp-nav {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--lime);
  width: 28px; height: 28px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.dp-nav:hover { border-color: var(--border-lime); background: rgba(219, 255, 59, 0.06); }

.dp-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px; }
.dp-w { text-align: center; font-size: 10px; color: var(--text-mute); padding: 6px 0; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; font-family: var(--font-head); }

.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-empty { background: transparent; }
.dp-day {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  padding: 0;
  height: 36px;
  border-radius: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.dp-day:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.dp-day.today { color: var(--lime); border-color: rgba(219, 255, 59, 0.3); }
.dp-day.selected {
  background: var(--lime);
  color: var(--bg);
  border-color: var(--lime);
}
.dp-day.selected:hover { background: var(--lime); color: var(--bg); }

.dp-foot { display: flex; justify-content: flex-end; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.dp-link {
  background: transparent;
  border: none;
  color: var(--lime);
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: point