/* =====================================================
   Planner Marcolino — Base Styles
   ===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,400&display=swap');

:root {
  --navy:    #0F1B2D;
  --navy2:   #162236;
  --navy3:   #1E2D42;
  --teal:    #0D9488;
  --teal2:   #14B8A6;
  --teal-bg: rgba(13,148,136,.1);
  --amber:   #F59E0B;
  --amber-bg: rgba(245,158,11,.1);
  --red:     #EF4444;
  --red-bg:  rgba(239,68,68,.1);
  --green:   #22C55E;
  --green-bg:rgba(34,197,94,.1);
  --white:   #FFFFFF;
  --light:   #F0F4F8;
  --muted:   #94A3B8;
  --border:  rgba(255,255,255,.08);
  --shadow:  0 4px 24px rgba(0,0,0,.3);
  --radius:  14px;
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  /* Status colors */
  --status-naoiniciado: #64748B;
  --status-emandamento: #F59E0B;
  --status-concluido:   #22C55E;
  --status-cancelado:   #EF4444;

  /* Alert colors */
  --alert-atrasado:  #EF4444;
  --alert-urgente:   #F59E0B;
  --alert-noprazo:   #22C55E;
  --alert-semprazo:  #64748B;
}

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

html { font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--navy);
  color: var(--white);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.2); }

/* ── Typography ── */
h1,h2,h3,h4 { font-family: var(--font-head); font-weight: 700; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border: none; border-radius: 10px;
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all .2s; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--teal), var(--teal2));
  color: var(--white);
}
.btn-primary:hover { opacity: .88; transform: translateY(-1px); }

.btn-ghost {
  background: rgba(255,255,255,.06);
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: rgba(255,255,255,.1); color: var(--white); }

.btn-danger {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(239,68,68,.2);
}
.btn-danger:hover { background: rgba(239,68,68,.2); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-icon { padding: 8px; border-radius: 8px; }

/* ── Cards ── */
.card {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

/* ── Badge / Tag ── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 99px;
  font-size: 11px; font-weight: 600; letter-spacing: .4px;
  text-transform: uppercase;
}
.badge-naoiniciado { background: rgba(100,116,139,.15); color: #94A3B8; }
.badge-emandamento { background: var(--amber-bg); color: var(--amber); }
.badge-concluido   { background: var(--green-bg);  color: var(--green); }
.badge-cancelado   { background: var(--red-bg);    color: var(--red);   }

.badge-atrasado { background: var(--red-bg);    color: var(--red);   }
.badge-urgente  { background: var(--amber-bg);  color: var(--amber); }
.badge-noprazo  { background: var(--green-bg);  color: var(--green); }
.badge-semprazo { background: rgba(100,116,139,.15); color: #94A3B8; }

/* ── Inputs ── */
.input {
  width: 100%;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--white);
  font-family: var(--font-body); font-size: 14px;
  outline: none;
  transition: border-color .2s, background .2s;
}
.input:focus { border-color: var(--teal); background: rgba(13,148,136,.06); }
.input::placeholder { color: rgba(255,255,255,.2); }

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

.form-label {
  display: block;
  font-size: 12px; font-weight: 500;
  color: var(--muted);
  text-transform: uppercase; letter-spacing: .6px;
  margin-bottom: 7px;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: all .25s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
  background: var(--navy2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  width: 100%; max-width: 540px;
  max-height: 90vh; overflow-y: auto;
  transform: scale(.95) translateY(10px);
  transition: transform .25s;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.modal-title { font-family: var(--font-head); font-size: 18px; font-weight: 700; }
.modal-close {
  background: none; border: none; color: var(--muted);
  font-size: 20px; cursor: pointer; padding: 4px;
  transition: color .2s;
}
.modal-close:hover { color: var(--white); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; }
.form-group:last-child { margin-bottom: 0; }

/* ── Toast ── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 999; display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: var(--navy2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 14px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow);
  animation: toastIn .3s ease both;
  min-width: 260px;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red);   }
.toast.info    { border-left: 3px solid var(--teal);  }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Utils ── */
.text-muted  { color: var(--muted); }
.text-teal   { color: var(--teal2); }
.text-amber  { color: var(--amber); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red);   }
.font-head   { font-family: var(--font-head); }
.fw-700      { font-weight: 700; }
.flex        { display: flex; }
.items-center{ align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8       { gap: 8px; }
.gap-12      { gap: 12px; }
.mt-4        { margin-top: 4px; }
.mt-8        { margin-top: 8px; }
.mt-16       { margin-top: 16px; }
.mb-16       { margin-bottom: 16px; }

/* ── Loading spinner ── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,.1);
  border-top-color: var(--teal2);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty state ── */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--muted);
}
.empty-state .icon { font-size: 48px; margin-bottom: 16px; opacity: .4; }
.empty-state h3 { font-size: 16px; margin-bottom: 8px; color: rgba(255,255,255,.4); }
.empty-state p { font-size: 13px; }

/* ── Skeleton loading ── */
.skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,.05) 25%,
    rgba(255,255,255,.1) 50%,
    rgba(255,255,255,.05) 75%);
  background-size: 200% 100%;
  animation: skeleton-wave 1.5s infinite;
  border-radius: 8px;
}
@keyframes skeleton-wave {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}



/* ── Fix dropdown select options ── */
select.input option {
    background: var(--navy2);
    color: var(--white);
}

.filter-select option {
    background: var(--navy2);
    color: var(--white);
}