/* ============================================================
   KANBAN LEAN EMERGÊNCIAS — Stylesheet
   Paleta: Azul profundo + acentos ciano + status semafórico
   ============================================================ */

:root {
  --navy:    #0a1628;
  --navy2:   #0d1f3c;
  --navy3:   #112952;
  --blue:    #1549a8;
  --blue2:   #1a5fc8;
  --blue3:   #2272e8;
  --cyan:    #00b8d9;
  --cyan2:   #00d4f5;
  --white:   #ffffff;
  --gray1:   #e8edf5;
  --gray2:   #c5d0e0;
  --gray3:   #7b8fb5;

  --green:   #16a34a;
  --green-bg:#dcfce7;
  --yellow:  #d97706;
  --yellow-bg:#fef3c7;
  --red:     #dc2626;
  --red-bg:  #fee2e2;

  --radius:  8px;
  --shadow:  0 4px 20px rgba(10,22,40,.25);
  --shadow2: 0 2px 8px rgba(10,22,40,.15);
  --font:    'Barlow', sans-serif;
  --font2:   'Barlow Condensed', sans-serif;
}

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

body {
  font-family: var(--font);
  background: #f0f4fb;
  color: var(--navy);
  min-height: 100vh;
}

/* ── NAVBAR ─────────────────────────────────────────────── */
.navbar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy3) 100%);
  padding: 0 24px;
  height: 64px;
  box-shadow: 0 3px 16px rgba(0,0,0,.35);
  position: sticky; top: 0; z-index: 1000;
  border-bottom: 2px solid var(--blue2);
}

.navbar-brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; margin-right: 12px;
}
.brand-icon {
  background: var(--blue3);
  color: #fff;
  font-family: var(--font2);
  font-weight: 900;
  font-size: 18px;
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: -1px;
  box-shadow: 0 0 0 2px var(--cyan);
}
.brand-icon span { color: var(--cyan2); }
.brand-text { line-height: 1.2; }
.brand-text strong { color: #fff; font-size: 13px; display: block; font-weight: 700; }
.brand-text span { color: var(--gray2); font-size: 11px; }

.navbar-menu {
  display: flex; align-items: center; gap: 2px; list-style: none; flex: 1;
}
.nav-link {
  display: flex; align-items: center; gap: 6px;
  color: var(--gray2); text-decoration: none;
  padding: 6px 12px; border-radius: 6px;
  font-size: 13px; font-weight: 600;
  transition: all .2s;
  white-space: nowrap;
}
.nav-link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-link:hover, .nav-link.active {
  background: rgba(255,255,255,.1);
  color: var(--cyan2);
}
.badge-notif {
  background: var(--red); color: #fff;
  border-radius: 999px; font-size: 10px;
  padding: 1px 6px; font-weight: 700; margin-left: 2px;
}

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown .chevron { width: 12px; height: 12px; }
.dropdown-menu {
  display: none; position: absolute; top: calc(100% + 6px); left: 0;
  background: var(--navy2);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 180px; list-style: none;
  overflow: hidden; z-index: 999;
}
.dropdown-menu li a {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; color: var(--gray2);
  text-decoration: none; font-size: 13px; font-weight: 500;
  transition: background .15s;
}
.dropdown-menu li a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-dropdown:hover .dropdown-menu { display: block; }

.navbar-user {
  display: flex; align-items: center; gap: 10px; margin-left: auto;
}
.user-info { text-align: right; line-height: 1.3; }
.user-name { color: #fff; font-size: 13px; font-weight: 700; display: block; }
.user-role { color: var(--cyan); font-size: 11px; }
.btn-logout {
  display: flex; align-items: center; justify-content: center;
  background: rgba(220,38,38,.15); color: #f87171;
  width: 36px; height: 36px; border-radius: 8px;
  text-decoration: none; transition: all .2s;
}
.btn-logout svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-logout:hover { background: rgba(220,38,38,.35); color: #fff; }

/* ── MAIN ───────────────────────────────────────────────── */
.main-content { padding: 28px 28px 60px; max-width: 1900px; margin: 0 auto; }

/* ── CARDS / SECTIONS ───────────────────────────────────── */
.page-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
}
.page-header h1 {
  font-family: var(--font2); font-size: 28px; font-weight: 700;
  color: var(--navy3);
}
.page-header .sub { color: var(--gray3); font-size: 14px; margin-top: 2px; }

.card {
  background: #fff; border-radius: 12px;
  box-shadow: var(--shadow2); border: 1px solid var(--gray1);
  margin-bottom: 24px;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px;
  background: linear-gradient(90deg, var(--navy3) 0%, var(--blue) 100%);
  border-radius: 12px 12px 0 0;
  color: #fff;
}
.card-header h2 {
  font-family: var(--font2); font-size: 18px; font-weight: 700;
  letter-spacing: .5px; display: flex; align-items: center; gap: 8px;
}
.card-body { padding: 22px; }

/* ── FORMS ──────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 12px; font-weight: 700; color: var(--gray3); text-transform: uppercase; letter-spacing: .5px; }
.form-control {
  padding: 10px 14px; border: 1.5px solid #a0aec0;
  border-radius: var(--radius); font-family: var(--font);
  font-size: 14px; color: var(--navy);
  background: #fafcff;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.form-control:focus { border-color: var(--blue2); box-shadow: 0 0 0 3px rgba(26,95,200,.12); background: #fff; }
.form-control::placeholder { color: var(--gray2); }
select.form-control { cursor: pointer; }

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 20px; border-radius: var(--radius);
  font-family: var(--font); font-size: 14px; font-weight: 700;
  border: none; cursor: pointer; text-decoration: none;
  transition: all .2s;
}
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--blue2); color: #fff; }
.btn-primary:hover { background: var(--blue3); box-shadow: 0 4px 12px rgba(26,95,200,.4); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-danger  { background: var(--red); color: #fff; }
.btn-danger:hover  { background: #b91c1c; }
.btn-warning { background: var(--yellow); color: #fff; }
.btn-warning:hover { background: #b45309; }
.btn-outline {
  background: transparent; color: var(--blue2);
  border: 1.5px solid var(--blue2);
}
.btn-outline:hover { background: var(--blue2); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-cyan { background: var(--cyan); color: var(--navy); }
.btn-cyan:hover { background: var(--cyan2); }

/* ── ALERT ──────────────────────────────────────────────── */
.alert { padding: 13px 18px; border-radius: var(--radius); margin-bottom: 20px; font-size: 14px; font-weight: 600; }
.alert-success { background: var(--green-bg); color: #166534; border-left: 4px solid var(--green); }
.alert-error   { background: var(--red-bg);   color: #991b1b; border-left: 4px solid var(--red); }
.alert-warning { background: var(--yellow-bg);color: #92400e; border-left: 4px solid var(--yellow); }
.alert-info    { background: #dbeafe;          color: #1e40af; border-left: 4px solid var(--blue2); }

/* ── TABLES ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  background: var(--navy3); color: #fff;
  padding: 11px 14px; text-align: left;
  font-family: var(--font2); font-size: 12px; font-weight: 700;
  letter-spacing: .6px; white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, 0.3);
}
thead th:first-child { border-radius: 8px 0 0 0; border-left: 1px solid rgba(255, 255, 255, 0.2); }
thead th:last-child  { border-radius: 0 8px 0 0; border-right: none; }
tbody tr { transition: background .15s; }
tbody tr:nth-child(even) { background: #f7f9fd; }
tbody tr:hover { background: #edf2ff; }
tbody td {
  padding: 10px 14px; border-bottom: 1px solid var(--gray1);
  vertical-align: middle; white-space: nowrap;
}

/* ── STATUS DOTS ────────────────────────────────────────── */
.status-cell { display: flex; align-items: center; gap: 5px; flex-direction: column; }
.badge-time  { font-size: 11px; font-weight: 700; color: var(--navy3); }
.dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  font-weight: 900; font-size: 11px; color: #fff;
}
.dot-green  { background: var(--green); }
.dot-yellow { background: var(--yellow); animation: pulse-yellow 2s infinite; }
.dot-red    { background: var(--red);    animation: pulse-red 1.2s infinite; }
.badge-none { color: var(--gray2); font-size: 12px; }

@keyframes pulse-yellow { 0%,100%{box-shadow:0 0 0 0 rgba(217,119,6,.4)} 50%{box-shadow:0 0 0 5px rgba(217,119,6,0)} }
@keyframes pulse-red    { 0%,100%{box-shadow:0 0 0 0 rgba(220,38,38,.5)} 50%{box-shadow:0 0 0 6px rgba(220,38,38,0)} }

/* Disposição badges */
.disp-alta       { background: var(--green);  color:#fff; padding:3px 10px; border-radius:999px; font-size:11px; font-weight:700; }
.disp-observacao { background: var(--yellow); color:#fff; padding:3px 10px; border-radius:999px; font-size:11px; font-weight:700; }
.disp-internacao { background: var(--red);    color:#fff; padding:3px 10px; border-radius:999px; font-size:11px; font-weight:700; }

/* ── LOGIN PAGE ─────────────────────────────────────────── */
body.auth-page {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy3) 50%, var(--blue) 100%);
  display: flex; align-items: center; justify-content: center; min-height: 100vh;
}
.auth-box {
  background: rgba(255,255,255,.97);
  border-radius: 18px; padding: 44px 40px;
  width: 100%; max-width: 440px;
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
}
.auth-logo {
  text-align: center; margin-bottom: 30px;
}
.auth-logo-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 70px; height: 70px; background: var(--navy3); border-radius: 18px;
  font-family: var(--font2); font-size: 26px; font-weight: 900;
  color: #fff; margin-bottom: 12px;
  box-shadow: 0 0 0 4px var(--cyan);
}
.auth-logo-icon span { color: var(--cyan2); }
.auth-logo h1 { font-family: var(--font2); font-size: 22px; color: var(--navy3); font-weight: 700; }
.auth-logo p  { color: var(--gray3); font-size: 13px; margin-top: 2px; }
.auth-footer  { text-align: center; margin-top: 20px; font-size: 13px; color: var(--gray3); }
.auth-footer a { color: var(--blue2); font-weight: 700; text-decoration: none; transition: color 0.15s ease; }
.auth-footer a:hover { color: var(--blue3); text-decoration: underline; }
.auth-box .form-control { border: 2px solid #a0aec0 !important; }

/* ── KANBAN PAINEL ──────────────────────────────────────── */
.kanban-stats {
  display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 24px;
}
.stat-card {
  flex: 1; min-width: 160px;
  background: #fff; border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 4px 18px rgba(10,22,40,.10), 0 1px 4px rgba(10,22,40,.06);
  border: 1.5px solid #e2e8f4;
  display: flex; align-items: center; gap: 14px;
  transition: transform .18s ease, box-shadow .18s ease;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: 14px 0 0 14px;
  background: var(--blue2);
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(10,22,40,.14), 0 2px 8px rgba(10,22,40,.08);
}
.stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-size: 22px;
}
.stat-icon.blue   { background: #dbeafe; box-shadow: 0 2px 8px rgba(59,130,246,.18); }
.stat-icon.green  { background: var(--green-bg); box-shadow: 0 2px 8px rgba(22,163,74,.18); }
.stat-icon.yellow { background: var(--yellow-bg); box-shadow: 0 2px 8px rgba(217,119,6,.18); }
.stat-icon.red    { background: var(--red-bg); box-shadow: 0 2px 8px rgba(220,38,38,.18); }
.stat-num  { font-family: var(--font2); font-size: 30px; font-weight: 900; color: var(--navy3); line-height: 1; }
.stat-label{ font-size: 12px; font-weight: 600; color: var(--gray3); margin-top: 2px; text-transform: uppercase; letter-spacing: .4px; }

/* Colored left accent per card */
.stat-card-blue::before   { background: var(--blue2) !important; }
.stat-card-green::before  { background: var(--green) !important; }
.stat-card-yellow::before { background: var(--yellow) !important; }
.stat-card-red::before    { background: var(--red) !important; }

/* Setor header inside kanban */
.setor-header {
  background: linear-gradient(90deg, var(--blue) 0%, var(--cyan) 100%);
  color: #fff; font-family: var(--font2); font-weight: 700;
  font-size: 14px; letter-spacing: 1px; text-align: center;
  padding: 8px 12px; text-transform: uppercase;
}

/* Responsive small table adjustments */
@media(max-width:768px){
  .main-content{padding:14px;}
  .navbar{padding:0 12px;}
  .brand-text{display:none;}
  .navbar-menu .nav-link span{display:none;}
  .form-grid{grid-template-columns:1fr;}
}

/* ── MODAL ──────────────────────────────────────────────── */
.modal-overlay {
  display:none; position:fixed; inset:0;
  background:rgba(10,22,40,.6); z-index:2000;
  align-items:center; justify-content:center;
}
.modal-overlay.active { display:flex; }
.modal-box {
  background:#fff; border-radius:14px;
  padding:28px 30px; width:100%; max-width:500px;
  box-shadow:0 20px 60px rgba(0,0,0,.4);
  animation: slideUp .25s ease;
}
@keyframes slideUp { from{transform:translateY(30px);opacity:0} to{transform:translateY(0);opacity:1} }
.modal-title { font-family:var(--font2); font-size:20px; font-weight:700; color:var(--navy3); margin-bottom:18px; padding-bottom:12px; border-bottom:2px solid var(--gray1); }

/* ── TELÃO ──────────────────────────────────────────────── */
body.telao-page {
  background: var(--navy);
  padding: 0;
  font-family: var(--font2);
}
.telao-header {
  background: linear-gradient(90deg, var(--navy2) 0%, var(--navy3) 100%);
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 3px solid var(--blue2);
}
.telao-table { width: 100%; border-collapse: collapse; font-family: var(--font2); }
.telao-table th {
  background: var(--navy3); color: #fff;
  padding: 8px 10px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  text-align: center; border: 1px solid rgba(255,255,255,.06);
}
.telao-table td {
  padding: 7px 10px; text-align: center;
  border: 1px solid rgba(255,255,255,.05);
  font-size: 13px; font-weight: 600; color: #e0e8f8;
  background: rgba(255,255,255,.03);
}
.telao-table tr:nth-child(even) td { background: rgba(255,255,255,.06); }
.telao-setor {
  background: linear-gradient(90deg, var(--blue) 0%, var(--cyan) 100%) !important;
  color: #fff !important; font-weight:900; font-size:13px;
  letter-spacing:1px; text-align:center; text-transform:uppercase;
}

/* Countdown timer style */
.timer-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 700; padding: 3px 8px;
  border-radius: 5px;
}
.timer-ok     { background: var(--green-bg);  color: #166534; border: 1px solid rgba(22,163,74,.3); }
.timer-warn   { background: var(--yellow-bg); color: #92400e; border: 1px solid rgba(217,119,6,.3); }
.timer-over   { background: var(--red-bg);    color: #991b1b; border: 1px solid rgba(220,38,38,.3); }

/* ── LEGEND ─────────────────────────────────────────────── */
.legend { display:flex; gap:14px; align-items:center; flex-wrap:wrap; }
.legend-item { display:flex; align-items:center; gap:6px; font-size:12px; font-weight:600; color:#fff; }
@ k e y f r a m e s   p u l s e - g r e e n   {   0 %   {   b o x - s h a d o w :   0   0   0   0   r g b a ( 3 4 ,   1 9 7 ,   9 4 ,   0 . 7 ) ;   }   7 0 %   {   b o x - s h a d o w :   0   0   0   8 p x   r g b a ( 3 4 ,   1 9 7 ,   9 4 ,   0 ) ;   }   1 0 0 %   {   b o x - s h a d o w :   0   0   0   0   r g b a ( 3 4 ,   1 9 7 ,   9 4 ,   0 ) ;   }   }  

/* ── EMPTY STATE ────────────────────────────────────────── */
.empty-state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  max-width: 440px;
  margin: 0 auto;
  text-align: center;
}

.empty-state-icon {
  font-size: 54px;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.08));
  animation: empty-float 3s ease-in-out infinite;
}

@keyframes empty-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.empty-state-title {
  font-family: var(--font2);
  font-size: 20px;
  font-weight: 700;
  color: var(--navy3);
  margin-bottom: 8px;
}

.empty-state-text {
  font-size: 14px;
  color: var(--gray3);
  margin-bottom: 24px;
  line-height: 1.4;
}

.empty-state-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--blue2) 0%, var(--blue3) 100%);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(26, 95, 200, 0.3);
  transition: all 0.2s ease;
}

.empty-state-btn span {
  font-size: 18px;
  font-weight: 900;
}

.empty-state-btn:hover {
  background: linear-gradient(135deg, var(--blue3) 0%, #3b82f6 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 95, 200, 0.45);
  color: #fff;
}

.empty-state-btn:active {
  transform: translateY(0);
}

/* ── PRETTY TEXT LINKS ──────────────────────────────────── */
.text-link {
  color: var(--blue2);
  text-decoration: none;
  font-weight: 700;
  position: relative;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.text-link::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--cyan);
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}

.text-link:hover {
  color: var(--blue3);
}

.text-link:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* ── ROW ACTIONS DROPDOWN (três pontinhos) ──────────────── */
.btn-dots {
  background: none; border: none; cursor: pointer;
  width: 32px; height: 32px; border-radius: 8px;
  display: inline-flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  transition: background .15s;
  padding: 0;
}
.btn-dots:hover { background: rgba(26,95,200,.12); }
.btn-dots span {
  display: block; width: 4px; height: 4px;
  border-radius: 50%; background: var(--navy3);
  transition: background .15s;
}
.btn-dots:hover span { background: var(--blue2); }

.row-menu {
  display: none;
  position: absolute;
  right: 0; top: calc(100% + 4px);
  background: #fff;
  border: 1px solid var(--gray1);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(10,22,40,.18);
  min-width: 168px;
  z-index: 500;
  overflow: hidden;
}
.row-menu.open { display: block; animation: fadeIn .15s ease; }
@keyframes fadeIn { from{opacity:0;transform:translateY(-4px)} to{opacity:1;transform:translateY(0)} }

.row-menu-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  font-size: 13px; font-weight: 600; color: var(--navy3);
  text-decoration: none; cursor: pointer;
  background: none; border: none; width: 100%; text-align: left;
  transition: background .12s, color .12s;
  white-space: nowrap;
}
.row-menu-item:hover { background: #f0f4fb; color: var(--blue2); }
.row-menu-item + .row-menu-item { border-top: 1px solid var(--gray1); }
.row-menu-danger { color: var(--red) !important; }
.row-menu-danger:hover { background: var(--red-bg) !important; color: var(--red) !important; }