/* ═══════════════════════════════════════════════════════════
   HeiVendas — Central de Comunicações
   Design: Natural Green — Refined Organic
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg: #ecefea;
  --bg-card: #f4f6f2;
  --bg-card-2: #ffffff;
  --border: #d6dbd2;
  --border-strong: #b8c1b3;

  --green-dark: #05592a;
  --green-mid: #0a7a3c;
  --green-accent: #70bf50;
  --green-light: #c8e8bb;
  --green-pale: #e2efe0;

  --text-primary: #05592a;
  --text-secondary: #2d6b48;
  --text-body: #3a5446;
  --text-muted: #7a9a84;
  --text-on-green: #ffffff;

  --status-pending: #f59e0b;
  --status-approved: #10b981;
  --status-rejected: #ef4444;
  --status-art: #8b5cf6;
  --status-mailing: #3b82f6;
  --status-done: #05592a;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 2px 12px rgba(5, 89, 42, 0.08);
  --shadow-md: 0 4px 24px rgba(5, 89, 42, 0.12);
  --shadow-lg: 0 8px 40px rgba(5, 89, 42, 0.16);

  --sidebar-w: 240px;
  --topbar-h: 60px;
  --transition: 0.18s ease;

  font-size: 14px;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Syne', sans-serif; color: var(--text-primary); }
h1 { font-size: 1.6rem; font-weight: 700; }
h2 { font-size: 1.3rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 600; }

.hidden { display: none !important; }

/* ─── AUTH ─── */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

.auth-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px;
  background: var(--green-dark);
  position: relative;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.06);
  top: -160px; right: -160px;
  pointer-events: none;
}

.auth-left::after {
  content: '';
  position: absolute;
  width: 360px; height: 360px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.04);
  bottom: -80px; left: -80px;
  pointer-events: none;
}

.auth-brand { position: relative; z-index: 1; text-align: center; }

.auth-logo-img {
  width: 220px;
  margin-bottom: 24px;
  mix-blend-mode: screen;
}

.auth-tagline {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.03em;
}

.auth-right {
  width: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: var(--bg);
}

.auth-form-box { width: 100%; }

.auth-form-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 1.5rem;
}

.auth-tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.25rem;
  margin-bottom: 1.5rem;
}

.auth-tab {
  flex: 1;
  padding: 0.55rem;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
  font-size: 0.8rem;
}

.auth-tab.active {
  background: var(--green-dark);
  color: #fff;
  box-shadow: 0 2px 8px rgba(5,89,42,0.3);
}

.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-error { color: #ef4444; font-size: 0.8rem; margin-top: 0.25rem; }
.auth-success { color: var(--green-accent); font-size: 0.8rem; margin-top: 0.25rem; }

@media (max-width: 768px) {
  .auth-screen { flex-direction: column; }
  .auth-left { padding: 40px 24px; flex: none; min-height: 200px; }
  .auth-logo-img { width: 130px; margin-bottom: 12px; }
  .auth-right { width: 100%; padding: 32px 24px; }
}

/* ─── APP LAYOUT ─── */
.app {
  display: flex;
  min-height: 100vh;
}

/* ─── SIDEBAR ─── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--green-dark);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform var(--transition);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo-mark-sm {
  width: 36px; height: 36px;
  background: var(--green-accent);
  color: var(--green-dark);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 0.85rem;
  flex-shrink: 0;
}

.sidebar-brand {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
}

.sidebar-nav { padding: 1rem 0.75rem; }

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
  padding: 0.25rem 0.5rem;
  margin-bottom: 0.35rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 0.1rem;
}

.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }

.nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.nav-item.active {
  background: var(--green-accent);
  color: var(--green-dark);
  font-weight: 600;
}

.sidebar-footer {
  margin-top: auto;
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-badge {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
}

.user-avatar {
  width: 32px; height: 32px;
  background: var(--green-accent);
  color: var(--green-dark);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem;
  flex-shrink: 0;
}

.user-info { display: flex; flex-direction: column; overflow: hidden; }
.user-info span:first-child { font-size: 0.8rem; color: #fff; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 0.65rem; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.05em; }

.btn-logout {
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.5);
  padding: 0.5rem;
  border-radius: 6px;
  transition: var(--transition);
  display: flex;
}
.btn-logout:hover { background: rgba(255,255,255,0.1); color: #fff; }

.nav-badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 20px;
  margin-left: auto;
  min-width: 18px;
  text-align: center;
}

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

.topbar {
  height: var(--topbar-h);
  background: var(--bg-card-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  padding: 0.25rem;
}

.topbar-title {
  flex: 1;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.topbar-credits {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.topbar-credits.warning { color: var(--status-pending); font-weight: 600; }
.topbar-credits.danger { color: var(--status-rejected); font-weight: 600; }

.page-content {
  padding: 2rem;
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

.page { display: none; }
.page.active { display: block; }

.page-header {
  margin-bottom: 1.75rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-header > div:first-child,
.page-header > h1 { flex: 1; }
.page-header p { color: var(--text-muted); margin-top: 0.25rem; font-size: 0.875rem; }
.page-header-actions { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }

/* ─── FORM ─── */
.form-card {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.form-section {
  padding: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.form-section:last-of-type { border-bottom: none; }

.form-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--green-dark);
  margin-bottom: 1.25rem;
}

.section-num {
  width: 28px; height: 28px;
  background: var(--green-dark);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }

.field-group { display: flex; flex-direction: column; gap: 0.4rem; }
.field-group label { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
.req { color: var(--status-rejected); }
.field-opt { font-weight: 400; color: var(--text-muted); }
.field-hint { font-size: 0.75rem; color: var(--text-muted); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-body);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  transition: var(--transition);
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--green-accent);
  background: var(--bg-card-2);
  box-shadow: 0 0 0 3px rgba(112,191,80,0.15);
}

textarea { resize: vertical; min-height: 80px; }
select { cursor: pointer; }

.radio-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.radio-card {
  flex: 1;
  min-width: 120px;
  cursor: pointer;
}

.radio-card input { position: absolute; opacity: 0; width: 0; height: 0; }

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-body);
  transition: var(--transition);
  white-space: nowrap;
}

.radio-card input:checked + .radio-label {
  border-color: var(--green-accent);
  background: var(--green-pale);
  color: var(--green-dark);
}

/* ─── UPLOAD ZONE ─── */
.upload-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  background: var(--bg);
}

.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--green-accent);
  background: var(--green-pale);
}

.upload-zone svg { color: var(--text-muted); }
.upload-zone p { font-size: 0.875rem; color: var(--text-body); }
.upload-link { color: var(--green-accent); text-decoration: underline; font-weight: 600; }
.upload-hint { font-size: 0.75rem; color: var(--text-muted); }

.upload-preview {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--green-pale);
  border-radius: var(--radius-sm);
  border: 1px solid var(--green-light);
}

.upload-preview-name { font-size: 0.85rem; font-weight: 500; color: var(--green-dark); flex: 1; }
.upload-preview-size { font-size: 0.75rem; color: var(--text-muted); }
.upload-remove { background: none; border: none; cursor: pointer; color: var(--status-rejected); font-size: 1rem; padding: 0.1rem; }

/* ─── MULTI SELECT ─── */
.multi-select-box {
  position: relative;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  min-height: 42px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}

.multi-select-box:focus-within { border-color: var(--green-accent); box-shadow: 0 0 0 3px rgba(112,191,80,0.15); }

.ms-placeholder { font-size: 0.875rem; color: var(--text-muted); line-height: 1.5; }
.ms-options {
  position: absolute;
  top: 100%; left: -1px; right: -1px;
  background: var(--bg-card-2);
  border: 1.5px solid var(--green-accent);
  border-radius: var(--radius-sm);
  z-index: 100;
  max-height: 180px;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  margin-top: 2px;
}

.ms-option {
  padding: 0.6rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.ms-option:hover { background: var(--green-pale); }
.ms-option.selected { background: var(--green-pale); color: var(--green-dark); font-weight: 600; }

.ms-option::before {
  content: '';
  width: 14px; height: 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: 3px;
  flex-shrink: 0;
}

.ms-option.selected::before {
  background: var(--green-accent);
  border-color: var(--green-accent);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 6l3 3 5-5' stroke='%2305592a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 10px;
  background-repeat: no-repeat;
  background-position: center;
}

.ms-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.35rem;
}

.ms-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.5rem;
  background: var(--green-dark);
  color: #fff;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.ms-tag-remove {
  cursor: pointer;
  opacity: 0.7;
  font-size: 0.75rem;
  line-height: 1;
}
.ms-tag-remove:hover { opacity: 1; }

/* ─── ALERTS ─── */
.alert-warning {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: #92400e;
  margin-top: 0.75rem;
}

.alert-info {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: #1e40af;
  margin-top: 0.75rem;
}

.alert-success {
  padding: 0.75rem 1rem;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: #065f46;
}

.alert-error {
  padding: 0.75rem 1rem;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: #7f1d1d;
}

/* ─── FORM ACTIONS ─── */
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.25rem 1.75rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

/* ─── BUTTONS ─── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: var(--green-dark);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover { background: var(--green-mid); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(5,89,42,0.25); }
.btn-primary:active { transform: none; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: var(--green-accent);
  color: var(--green-dark);
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-accent:hover { filter: brightness(1.05); transform: translateY(-1px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-ghost:hover { border-color: var(--border-strong); color: var(--text-body); }

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  background: var(--green-dark);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  transition: var(--transition);
}

.btn-sm:hover { background: var(--green-mid); }

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(239,68,68,0.1);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-danger:hover { background: rgba(239,68,68,0.15); }

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

/* ─── CARDS DE SOLICITAÇÃO ─── */
.requests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.request-card {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.request-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--green-accent);
  border-radius: 3px 0 0 3px;
}

.request-card:hover { border-color: var(--green-accent); box-shadow: var(--shadow); transform: translateY(-2px); }

.request-card-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--green-dark);
  margin-bottom: 0.5rem;
}

.request-card-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.meta-item svg { width: 12px; height: 12px; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.status-solicitacao_enviada { background: rgba(245,158,11,0.12); color: #92400e; }
.status-aprovada { background: rgba(16,185,129,0.12); color: #065f46; }
.status-reprovada { background: rgba(239,68,68,0.12); color: #7f1d1d; }
.status-arte { background: rgba(139,92,246,0.12); color: #4c1d95; }
.status-mailing { background: rgba(59,130,246,0.12); color: #1e3a5f; }
.status-programacao_concluida { background: rgba(5,89,42,0.12); color: var(--green-dark); }
.status-envio_feito { background: rgba(5,89,42,0.2); color: var(--green-dark); }
.status-historico { background: var(--bg); color: var(--text-muted); }

/* ─── TABLE ─── */
.table-container { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.85rem;
}

thead { background: var(--green-dark); }
thead th {
  padding: 0.9rem 1rem;
  text-align: left;
  font-family: 'Syne', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

tbody tr {
  border-top: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

tbody tr:hover { background: var(--green-pale); }
tbody td { padding: 0.85rem 1rem; color: var(--text-body); }

/* ─── CALENDAR ─── */
.calendar-container { background: var(--bg-card-2); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: var(--green-dark);
  color: #fff;
}

.cal-header h2 { color: #fff; font-size: 1.1rem; }

.cal-nav {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}

.cal-nav:hover { background: rgba(255,255,255,0.3); }

.cal-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--green-pale);
}

.cal-day-name {
  padding: 0.6rem;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.cal-cell {
  min-height: 80px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem;
  position: relative;
}

.cal-cell:nth-child(7n) { border-right: none; }

.cal-cell-num {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.cal-cell.today .cal-cell-num {
  background: var(--green-dark);
  color: #fff;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.cal-cell.other-month { background: var(--bg); }
.cal-cell.other-month .cal-cell-num { opacity: 0.4; }
.cal-cell.full { background: rgba(239,68,68,0.04); }

.cal-event {
  font-size: 0.65rem;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.cal-event.aprovada { background: rgba(16,185,129,0.15); color: #065f46; }
.cal-event.programacao_concluida { background: rgba(5,89,42,0.15); color: var(--green-dark); }
.cal-event.envio_feito { background: rgba(5,89,42,0.25); color: var(--green-dark); }

/* ─── CREDITS PAGE ─── */
.credits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.credit-card {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.credit-card-value {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--green-dark);
  line-height: 1;
  margin: 0.5rem 0;
}

.credit-card-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }

.credit-bar-wrap { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; margin: 1rem 0 0.5rem; }
.credit-bar { height: 100%; background: var(--green-accent); border-radius: 4px; transition: width 0.5s ease; }
.credit-bar.warning { background: var(--status-pending); }
.credit-bar.danger { background: var(--status-rejected); }

/* ─── OVERVIEW / DASHBOARD ─── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.metric-card {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.metric-value {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--green-dark);
  line-height: 1;
}

.metric-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.35rem; }

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

.chart-card {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.chart-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--green-dark);
  margin-bottom: 1rem;
}

.bar-chart { display: flex; flex-direction: column; gap: 0.5rem; }

.bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
}

.bar-label { width: 100px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }
.bar-track { flex: 1; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--green-accent); border-radius: 3px; }
.bar-count { width: 30px; text-align: right; color: var(--text-body); font-weight: 600; flex-shrink: 0; }

/* ─── STATIC INFO ─── */
.static-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.info-card {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.info-card h3 { margin-bottom: 1rem; }

.info-card ul, .info-card ol {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.info-card li { font-size: 0.875rem; color: var(--text-body); line-height: 1.5; }

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal {
  background: var(--bg-card-2);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 28px; height: 28px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  transition: var(--transition);
}

.modal-close:hover { background: var(--border); color: var(--text-body); }

.modal-header {
  padding: 1.5rem 1.5rem 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.modal-body { padding: 0 1.5rem 1.5rem; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.detail-item label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; display: block; margin-bottom: 0.2rem; }
.detail-item span { font-size: 0.9rem; color: var(--text-body); }

.status-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
}

.timeline-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.timeline-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
  flex-shrink: 0;
}

.timeline-dot.done { background: var(--green-accent); }
.timeline-dot.current { background: var(--green-dark); box-shadow: 0 0 0 3px rgba(5,89,42,0.2); }

/* ─── TOAST ─── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: slideInRight 0.2s ease;
  max-width: 320px;
}

.toast-success { background: var(--green-dark); color: #fff; }
.toast-error { background: #ef4444; color: #fff; }
.toast-warning { background: #f59e0b; color: #fff; }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ─── LOADING ─── */
.loading-spinner {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ─── FILTERS ─── */
.filter-select, .filter-input {
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card-2);
  color: var(--text-body);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

.filter-select:focus, .filter-input:focus {
  border-color: var(--green-accent);
}

/* ─── EMPTY STATE ─── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state svg { opacity: 0.3; margin-bottom: 1rem; }
.empty-state h3 { margin-bottom: 0.5rem; color: var(--text-muted); }

/* ─── ADM DETAIL ACTIONS ─── */
.modal-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.adm-status-select {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  color: var(--text-body);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .sidebar-toggle { display: flex; }

  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .static-content { grid-template-columns: 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .page-content { padding: 1rem; }
  .auth-card { width: 100%; max-width: 420px; }
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
