/* =========================
   TEMA BASE – DARK / LIGHT
   ========================= */

/* ===== VARIÁVEIS (DARK) ===== */
:root{
  --bg-main:#0b0d10;
  --bg-panel:#0f1216;
  --bg-input:#222834;

  --text:#f2f4f6;
  --text-dim:#a9afb6;

  --accent:#1e90ff;
  --action-link:#7cc7ff;
  --action-link-hover:#ffffff;

  --border:#1e2228;
  --border-soft:#2a2f36;

  --menu:#0d1014;
  --menu-text:#e6e9ed;

  --menu-width:300px;
  --topbar-height:38px;
}

/* ===== VARIÁVEIS (LIGHT) ===== */
body.light-mode{
  --bg-main:#dfe7ef;
  --bg-panel:#f4f8fc;
  --bg-input:#ffffff;

  --text:#000000;
  --text-dim:#2f3d4d;

  --accent:#1061bd;
  --action-link:#0b63c9;
  --action-link-hover:#084a98;

  --border:#c7d2de;
  --border-soft:#d7e0ea;

  --menu:#d2dde8; 
  --menu-text:#16202a;
}

/* =========================
   BASE
   ========================= */
*{ box-sizing:border-box; }
html,body{ height:100%; }


body{
  margin:0;
  padding-left:var(--menu-width);
  padding-top: calc(var(--topbar-height) + 20px); /* <<< AQUI */
  background:var(--bg-main);
  color:var(--text);
  font-family:"Segoe UI","Inter",system-ui,Arial,sans-serif;
}

/* =========================
   TOP BAR (STATUS)
   ========================= */
.topbar{
  position:fixed;
  top:0;
  left:var(--menu-width);
  right:0;
  height:var(--topbar-height);
  background:var(--bg-panel);
  border-bottom:1px solid var(--border-soft);
  display:flex;
  align-items:center;
  justify-content:flex-end;
  padding:0 16px;
  z-index:100;
}

.topbar-right{
  display:flex;
  gap:16px;
  font-size:13px;
  color:var(--text-dim);
  white-space:nowrap;
}

.topbar-right span{
  display:flex;
  align-items:center;
  gap:6px;
}

.topbar .env{
  font-weight:600;
  letter-spacing:.4px;
}

.topbar .env.demo{
  color:#f5c542;
}

.topbar .env.prod{
  color:#4caf50;
}

/* =========================
   MENU LATERAL
   ========================= */
#menu{
  position:fixed;
  top:0;
  left:0;
  bottom:0;
  width:var(--menu-width);
  background:var(--menu);
  border-right:1px solid var(--border-soft);
  padding:14px 12px;
  color:var(--menu-text);
}

/* REMOVE info do topo do menu */
.menu-user{ display:none; }

.menu-section{ margin-bottom:18px; }

.menu-title{
  margin:0 0 6px 4px;
  font-size:14px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.3px;
  color:var(--text-dim);
}

.menu-links{
  margin:0;
  padding-left:18px;
}

.menu-links li{ list-style:none; }

.menu-links a{
  display:block;
  padding:3px 0;
  font-weight:500;
  color:var(--menu-text);
  text-decoration:none;
}

.menu-links a:hover{ text-decoration:underline; }

.menu-footer{
  position:absolute;
  bottom:14px;
  left:12px;
  right:12px;
}

.menu-logout{
  display:block;
  margin-bottom:10px;
  color:var(--menu-text);
  text-decoration:none;
  font-weight:500;
}

.menu-logout:hover{ text-decoration:underline; }

a.link-acao,
a.link-acao:visited{
  display:inline-block;
  color:var(--action-link) !important;
  text-decoration:none;
  font-weight:600;
  letter-spacing:.1px;
  transition:color .15s ease, opacity .15s ease;
}

a.link-acao:hover,
a.link-acao:focus{
  color:var(--action-link-hover) !important;
  text-decoration:none;
  opacity:1;
}

.tag{
  display:inline-block;
  padding:3px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  line-height:1.2;
  letter-spacing:.2px;
}

.tag.ABERTO{
  background:#f2d38a;
  color:#3a2a0a;
}

.tag.FECHADO{
  background:#8fb7a7;
  color:#0f241c;
}

.tag.CANCELADO{
  background:#b76666;
  color:#fff3f3;
}

/* =========================
   CONTEÚDO
   ========================= */
#conteudo{
  padding:24px;
}

/* =========================
   TABLES
   ========================= */
table tr{ height:50px; }
table td{ vertical-align:middle; }

td.label{
  color:var(--text-dim);
  font-weight:500;
  white-space:nowrap;
}

body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4,
body.light-mode h5,
body.light-mode h6,
body.light-mode th,
body.light-mode td,
body.light-mode strong,
body.light-mode .muted,
body.light-mode .wrap,
body.light-mode #conteudo{
  color:var(--text);
}

body.light-mode #conteudo{
  background:transparent;
}

body:not(.light-mode) #conteudo{
  background:transparent;
}

body.light-mode .wrap{
  background:#f7fafc;
  border:1px solid var(--border-soft);
  border-radius:18px;
  padding:24px 28px;
  box-shadow:0 10px 24px rgba(53, 74, 96, .08);
}

body:not(.light-mode) .wrap{
  background:#12171d;
  border:1px solid #252d37;
  border-radius:18px;
  padding:24px 28px;
  box-shadow:0 16px 36px rgba(0, 0, 0, .35);
}

body.light-mode table.grid{
  background:#ffffff;
}

body:not(.light-mode) table.grid{
  background:#0f141a;
}

body.light-mode .grid th{
  background:#edf3f8;
}

body:not(.light-mode) .grid th{
  background:#171e26;
}

body.light-mode .grid th,
body.light-mode .grid td{
  border-color:var(--border) !important;
}

body:not(.light-mode) .grid th,
body:not(.light-mode) .grid td{
  border-color:#2a333d !important;
}

/* =========================
   INPUTS / SELECT
   ========================= */
input,
select{
  background-color:var(--bg-input);
  color:var(--text);
  border:1px solid var(--border-soft);
  border-radius:8px;
  height:30px;
  padding:4px 8px;
  font-size:14px;
  font-family:inherit;
  outline:none;
}

/* =========================
   TEXTAREA
   ========================= */
textarea{
  background-color:var(--bg-input);
  color:var(--text);
  border:1px solid var(--border-soft);
  border-radius:8px;
  padding:14px 12px;
  font-size:14px;
  font-family:inherit;
  outline:none;
}

input::placeholder,
textarea::placeholder{
  color:var(--text-dim);
  opacity:1;
}

input:focus,
select:focus,
textarea:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 2px rgba(30,144,255,.25);
}

/* =========================
   BOTÕES
   ========================= */
button,
input[type="submit"],
input[type="button"]{
  background:var(--accent);
  color:#fff;
  border:none;
  border-radius:8px;
  padding:10px 22px;
  font-size:15px;
  font-weight:600;
  cursor:pointer;
  box-shadow:0 2px 6px rgba(0,0,0,.25);
  transition:background .15s ease, box-shadow .15s ease, transform .05s ease;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover{
  background:#187bdb;
  box-shadow:0 3px 8px rgba(0,0,0,.35);
}

button:active,
input[type="submit"]:active,
input[type="button"]:active{
  transform:translateY(1px);
  box-shadow:0 1px 4px rgba(0,0,0,.3);
}

/* botão secundário */
.btn-secondary{
  background:#6c757d;
}

.btn-secondary:hover{
  background:#5a6268;
}

/* =========================
   TOOLTIP TOPBAR
   ========================= */
   .topbar-right span{
    position:relative;
    cursor:default;
  }
  .topbar-right span::after{
    content: attr(data-tip);
    position:absolute;
    bottom:-36px;
    left:50%;
    transform:translateX(-50%);
    background:var(--bg-panel);
    color:var(--text);
    border:1px solid var(--border-soft);
    padding:6px 10px;
    font-size:12px;
    border-radius:6px;
    white-space:nowrap;
    opacity:0;
    pointer-events:none;
    box-shadow:0 4px 12px rgba(0,0,0,.35);
    transition:opacity .15s ease;
    z-index:999;
  }

  .topbar-right span:hover::after{
    opacity:1;
  }
  .topbar-right span{
    padding:4px 6px;
  }

  /* =========================
   TOPBAR – AÇÕES (DARK)
   ========================= */
.topbar .theme-toggle,
.topbar .topbar-logout{
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  margin-left: 12px;
}
.topbar .theme-toggle:hover{
  color: var(--accent);
  text-decoration: underline;
  /* text-decoration: none; */
}
.topbar .topbar-logout{
  color: #ff6b6b;   /* sair precisa chamar atenção */
}
.topbar .topbar-logout:hover{
  color: #ff4c4c;
  text-decoration: underline;
}

/* =========================
   TOPBAR – ALINHAMENTO
   ========================= */
   .topbar-right{
    display: flex;
    align-items: center;
    gap: 18px;
  }  
  .topbar-right span,
  .topbar-right a{
    line-height: 1;
    display: inline-flex;
    align-items: center;
  }
  
  /* table {
    font-size: 10px;
  } */
  table th, table td {
    font-weight: 500;
    line-height: 1.2;
  }




  .err {
    color: #ff6b6b;
    background-color: #2a0000;
    border: 1px solid #ff6b6b;
    padding: 8px 12px;
    margin: 10px 0;
    border-radius: 4px;
    text-align: center;
}
.ok {
    color: #7CFC98;
    background-color: #002a12;
    border: 1px solid #3cb371;
    padding: 8px 12px;
    margin: 10px 0;
    border-radius: 4px;
    text-align: center;
}

.ticket-page-wrap{
  max-width:1200px;
  margin:0 auto;
}

.ticket-lookup{
  max-width:720px;
  margin:14px 0 18px;
  padding:12px 14px;
  border:1px solid var(--border-soft);
  border-radius:12px;
  background:rgba(0,0,0,.08);
}

.ticket-lookup__label{
  display:block;
  margin-bottom:8px;
  color:var(--text);
  font-size:15px;
  font-weight:600;
}

.ticket-lookup__row{
  display:flex;
  align-items:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

.ticket-lookup__input{
  width:240px;
  max-width:100%;
}

.ticket-lookup__cancel{
  display:none;
}

.ticket-lookup__list{
  margin-top:8px;
  border:1px solid var(--border-soft);
  border-radius:10px;
  background:var(--bg-panel);
  overflow:hidden;
}

.ticket-lookup__item{
  width:100%;
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:8px 12px;
  background:transparent;
  border:0;
  border-bottom:1px solid var(--border-soft);
  color:var(--text);
  text-align:left;
  box-shadow:none;
}

.ticket-lookup__item:last-child{
  border-bottom:0;
}

.ticket-lookup__item:hover{
  background:rgba(255,255,255,.05);
}

.ticket-lookup__item strong,
.ticket-lookup__item small{
  display:block;
}

.ticket-lookup__item small{
  color:var(--text-dim);
}

.ticket-lookup__panel{
  margin-top:8px;
  padding:8px 10px;
  border:1px solid var(--border-soft);
  border-radius:10px;
  background:var(--bg-panel);
}

.ticket-lookup__panel--ok{
  border-color:#1d5f34;
  background:#101b14;
}

.ticket-lookup__panel--err{
  border-color:#6d2d2d;
  background:#1b1111;
}

.ticket-lookup__drivers{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:6px;
}

.ticket-lookup__driver{
  min-width:140px;
  padding:6px 8px;
  border:1px solid #334155;
  border-radius:10px;
  background:#1d2631;
  color:#fff;
  text-align:left;
  box-shadow:none;
}

.ticket-lookup__driver:hover{
  background:#213448;
}

.ticket-lookup__driver small{
  display:block;
  margin-top:2px;
  color:#c1cada;
  font-size:11px;
}

.ticket-lookup__hint{
  margin:0;
  font-size:12px;
  color:var(--text-dim);
}

.ticket-obs{
  width:45%;
}

.ticket-lookup.is-editing .ticket-lookup__cancel{
  display:inline-flex;
}
