/* Estilo compartilhado — Área do Cliente (login + kanban) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-base:      #05070a;
  --bg-surface:   #080b10;
  --bg-surface2:  #0d1118;
  --bg-surface3:  #111620;
  --border:       rgba(255,255,255,0.055);
  --border-md:    rgba(255,255,255,0.09);
  --blue-500:     #1254c0;
  --blue-400:     #1a65f5;
  --blue-300:     #4285f4;
  --blue-200:     #6aa3f8;
  --gray-400:     #5d6478;
  --gray-300:     #8b92a5;
  --gray-200:     #c4c9d8;
  --text-primary:   #edf0ff;
  --text-secondary: #8b92a5;
  --text-muted:     #434857;
  --grad-blue:    linear-gradient(135deg, #1254c0 0%, #1a65f5 100%);
  --grad-text:    linear-gradient(135deg, #1a65f5 0%, #4285f4 55%, #6aa3f8 100%);
  --red:    #e53e3e;
  --green:  #22c55e;
  --font-sans:    'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  20px;
  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
}

html { font-size: 16px; }
body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.012em;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em; }
a { color: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; width: 100%; }

/* ---- SIMPLE NAVBAR (login page) ---- */
.app-navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(5,7,10,0.94);
  backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid var(--border);
}
.app-nav-container {
  max-width: 1200px; margin: 0 auto; padding: 0 32px;
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.app-nav-logo { display: flex; align-items: center; text-decoration: none; }
.app-nav-logo img { height: 38px; width: auto; }

/* ---- APP SHELL (kanban page): icon sidebar + topbar, unified frame ---- */
.app-shell { display: flex; min-height: 100vh; background: var(--bg-surface); }

.app-sidebar {
  flex-shrink: 0; width: 76px;
  display: flex; flex-direction: column; align-items: center;
  padding: 22px 0 18px;
  position: relative; z-index: 10;
}
.sidebar-logo { margin-bottom: 30px; display: flex; }
.sidebar-logo img { width: 32px; height: 32px; object-fit: contain; }
.sidebar-nav { display: flex; flex-direction: column; gap: 8px; flex: 1; align-items: center; }
.sidebar-bottom { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.sidebar-link {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md); color: var(--gray-400); background: none; border: 1px solid transparent;
  text-decoration: none; cursor: pointer; font-size: 16px; position: relative; transition: var(--transition);
}
.sidebar-link:hover { background: rgba(255,255,255,0.045); color: var(--text-primary); }
.sidebar-link.active { background: rgba(26,101,245,0.12); color: var(--blue-300); border-color: rgba(26,101,245,0.25); }
.sidebar-link.active::after {
  content: ''; position: absolute; right: -19px; top: 9px; bottom: 9px; width: 3px;
  background: var(--blue-400); border-radius: 2px; box-shadow: 0 0 9px rgba(26,101,245,0.65);
}
.sidebar-link.danger:hover { background: rgba(229,62,62,0.1); color: #f87171; }

.app-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.app-topbar {
  height: 68px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 34px; position: relative;
}
.app-topbar h1 { font-size: 19px; letter-spacing: -0.02em; }
.app-topbar-right { display: flex; align-items: center; gap: 16px; }

.app-user-badge { font-size: 13px; color: var(--gray-300); display: flex; align-items: center; gap: 8px; }
.app-user-badge .role-tag {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--blue-200); background: rgba(26,101,245,0.1); border: 1px solid rgba(26,101,245,0.22);
  padding: 3px 9px; border-radius: 3px;
}

.client-filter {
  background: var(--bg-surface2); border: 1px solid var(--border-md); color: var(--text-primary);
  font-family: var(--font-sans); font-size: 13px; padding: 9px 12px; border-radius: 6px; outline: none;
}
.kc-client {
  display: inline-flex; align-self: flex-start; font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--gray-200); background: rgba(255,255,255,0.05); border: 1px solid var(--border-md);
  padding: 2px 8px; border-radius: 3px;
}

.app-content {
  padding: 32px 36px 60px; flex: 1;
  background: var(--bg-base);
  border-top-left-radius: 26px;
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
  position: relative;
}
.app-content::before {
  content: '';
  position: absolute; top: -1px; left: -1px; width: 60px; height: 60px;
  border-top-left-radius: 26px;
  box-shadow: -6px -6px 24px rgba(26,101,245,0.06);
  pointer-events: none;
}

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--grad-blue); color: #fff;
  font-family: var(--font-sans); font-size: 14px; font-weight: 600;
  padding: 12px 22px; border-radius: 6px; border: none; cursor: pointer;
  text-decoration: none; transition: var(--transition);
  box-shadow: 0 2px 16px rgba(26,101,245,0.28), inset 0 1px 0 rgba(255,255,255,0.12);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(26,101,245,0.4), inset 0 1px 0 rgba(255,255,255,0.14); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: var(--gray-300); font-size: 13.5px; font-weight: 500;
  padding: 10px 18px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.1); cursor: pointer;
  text-decoration: none; transition: var(--transition);
}
.btn-secondary:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.btn-danger {
  background: rgba(229,62,62,0.1); color: #f87171; border: 1px solid rgba(229,62,62,0.3);
  font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 5px; cursor: pointer;
}
.btn-danger:hover { background: rgba(229,62,62,0.18); }
.btn-sm { font-size: 12px; padding: 7px 12px; }

/* ---- FORMS ---- */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.01em; }
.form-group input, .form-group select, .form-group textarea {
  background: var(--bg-surface2); border: 1px solid var(--border-md); color: var(--text-primary);
  font-family: var(--font-sans); font-size: 14px; padding: 11px 14px; border-radius: var(--radius-sm);
  outline: none; transition: var(--transition); width: 100%;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(26,101,245,0.12);
}
.form-group textarea { resize: vertical; min-height: 70px; }
.form-error { color: #f87171; font-size: 13px; margin-top: 4px; min-height: 18px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group input[type="date"] { color-scheme: dark; }

/* ---- LOGIN ---- */
.login-wrap { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 40px 20px; position: relative; overflow: hidden; }
.login-glow {
  position: absolute; width: 640px; height: 460px; left: 50%; top: 45%;
  transform: translate(-50%, -50%); background: rgba(26,101,245,0.07); filter: blur(120px);
  border-radius: 50%; pointer-events: none;
}
.login-card {
  width: 100%; max-width: 380px; background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 40px 34px; position: relative; overflow: hidden; z-index: 1;
}
.login-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(to right, transparent, rgba(26,101,245,0.5), transparent);
}
.login-card h1 { font-size: 22px; margin-bottom: 8px; }
.login-card .sub { font-size: 13.5px; color: var(--text-secondary); margin-bottom: 28px; }

/* ---- KANBAN ---- */
.kanban-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.kanban-col { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-height: 200px; }
.kanban-col-title { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gray-300); border-bottom: 1px solid var(--border); }
.kanban-col-count { background: rgba(255,255,255,0.06); color: var(--gray-300); font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.kanban-card { background: var(--bg-surface2); border: 1px solid var(--border-md); border-radius: var(--radius-md); padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 8px; transition: var(--transition); }
.kanban-card:hover { border-color: rgba(26,101,245,0.25); box-shadow: 0 8px 28px rgba(0,0,0,0.4); }
.kanban-card h4 { font-size: 14px; font-weight: 600; line-height: 1.4; }
.kc-area { display: inline-flex; align-self: flex-start; font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 9px; border-radius: 3px; }
.kc-area.bi { color: var(--blue-200); background: rgba(26,101,245,0.1); border: 1px solid rgba(26,101,245,0.24); }
.kc-area.engenharia_dados { color: #7dd3fc; background: rgba(56,189,248,0.08); border: 1px solid rgba(56,189,248,0.22); }
.kc-area.ciencia_dados { color: #c4b5fd; background: rgba(167,139,250,0.1); border: 1px solid rgba(167,139,250,0.24); }
.kc-meta { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }
.kc-meta strong { color: var(--gray-200); font-weight: 600; }
.kc-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--border); }
.kc-author { font-size: 11px; color: var(--text-muted); }
.kc-move { display: flex; gap: 6px; flex-wrap: wrap; }
.kc-move select { font-size: 12px; padding: 5px 8px; background: var(--bg-surface3); border: 1px solid var(--border-md); color: var(--text-primary); border-radius: 4px; }
.kanban-empty { font-size: 13px; color: var(--text-muted); padding: 12px 6px; text-align: center; }

/* ---- CALENDÁRIO ---- */
.calendar-nav { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.calendar-month-label { font-family: var(--font-display); font-size: 17px; font-weight: 700; min-width: 160px; }
.calendar-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 8px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted);
  padding: 0 2px;
}
.calendar-weekdays span { text-align: center; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.calendar-cell {
  min-height: 108px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 8px; display: flex; flex-direction: column; gap: 6px; overflow: hidden;
}
.calendar-cell.outside { opacity: 0.35; }
.calendar-cell.today { border-color: rgba(26,101,245,0.5); box-shadow: 0 0 0 1px rgba(26,101,245,0.25); }
.calendar-day-num { font-size: 12px; font-weight: 600; color: var(--gray-300); }
.calendar-cell.today .calendar-day-num { color: var(--blue-300); }
.calendar-item {
  background: var(--bg-surface2); border: 1px solid var(--border-md); border-left: 3px solid var(--blue-400);
  border-radius: 4px; padding: 5px 7px; cursor: pointer; transition: var(--transition);
}
.calendar-item:hover { background: var(--bg-surface3); }
.calendar-item-title { font-size: 11.5px; font-weight: 600; color: var(--text-primary); line-height: 1.3; }
.calendar-item-impact { font-size: 10.5px; color: var(--text-muted); line-height: 1.3; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

@media (max-width: 900px) {
  .calendar-weekdays span:nth-child(n) { font-size: 9px; }
  .calendar-cell { min-height: 80px; }
}

/* ---- PROGRESSO DE ETAPAS ---- */
.kc-progress-wrap { display: flex; flex-direction: column; gap: 5px; }
.kc-progress-bar { height: 5px; background: rgba(255,255,255,0.07); border-radius: 4px; overflow: hidden; }
.kc-progress-fill { height: 100%; background: var(--grad-blue); border-radius: 4px; transition: width 0.25s ease; }
.kc-steps-btn {
  align-self: flex-start; background: none; border: none; cursor: pointer; padding: 0;
  font-size: 11px; color: var(--blue-300); text-decoration: underline; text-underline-offset: 2px;
}
.kc-steps-btn:hover { color: var(--blue-200); }

.steps-list { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 4px; max-height: 320px; overflow-y: auto; }
.step-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  background: var(--bg-surface2); border: 1px solid var(--border-md); border-radius: 6px;
}
.step-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--blue-400); cursor: pointer; flex-shrink: 0; }
.step-title { flex: 1; font-size: 13.5px; }
.step-item.done .step-title { text-decoration: line-through; color: var(--text-muted); }
.step-del { background: none; border: none; color: var(--gray-400); cursor: pointer; font-size: 13px; padding: 2px 4px; }
.step-del:hover { color: #f87171; }
.step-add-row { display: flex; gap: 8px; margin-top: 10px; }
.step-add-row input { flex: 1; }

/* ---- MODAL ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.65); backdrop-filter: blur(2px); display: none; align-items: center; justify-content: center; z-index: 500; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal-box { width: 100%; max-width: 440px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 32px; max-height: 88vh; overflow-y: auto; position: relative; }
.modal-box::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(to right, transparent, rgba(26,101,245,0.5), transparent);
}
.modal-box h2 { font-size: 18px; margin-bottom: 20px; }
.modal-close-row { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* ---- USERS PANEL ---- */
.users-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 13px; }
.users-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); padding: 8px 6px; border-bottom: 1px solid var(--border); }
.users-table td { padding: 9px 6px; border-bottom: 1px solid var(--border); color: var(--gray-200); }
.users-actions { display: flex; gap: 8px; white-space: nowrap; }

/* ---- INFORMAÇÕES DA CONTA ---- */
.account-info-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 8px; }
.account-info-row { padding: 12px 14px; background: var(--bg-surface2); border: 1px solid var(--border-md); border-radius: var(--radius-md); }
.account-info-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); margin-bottom: 5px; }
.account-info-value { font-size: 14px; color: var(--text-primary); line-height: 1.55; white-space: pre-wrap; }

@media (max-width: 900px) {
  .kanban-board { grid-template-columns: 1fr; }
  .app-nav-container { padding: 0 18px; }
  .app-content { padding: 24px 18px 48px; }
}
@media (max-width: 640px) {
  .app-shell { flex-direction: column; }
  .app-sidebar {
    width: 100%; flex-direction: row; padding: 10px 16px; justify-content: flex-start; gap: 6px;
  }
  .sidebar-logo { margin: 0 10px 0 0; }
  .sidebar-nav { flex-direction: row; flex: 1; }
  .sidebar-bottom { flex-direction: row; }
  .sidebar-link.active::after { right: auto; top: auto; bottom: -13px; height: 3px; width: auto; left: 9px; right: 9px; }
  .app-topbar { padding: 0 18px; flex-wrap: wrap; height: auto; min-height: 60px; gap: 10px; }
  .app-content { border-top-left-radius: 18px; }
}
