
/* ==================================================
   SISTEMA OKLAHOMA
   ADMIN.CSS — IDENTIDADE VISUAL OFICIAL
   Compatível com o painel administrativo existente
   ================================================== */

:root {
  color-scheme: dark;

  /* Identidade visual do site principal */
  --ok-black: #101010;
  --ok-white: #ffffff;
  --ok-green: #90b832;
  --ok-green-hover: #a6cc49;
  --ok-caramel: #914d09;

  /* Cores funcionais */
  --ok-blue: #3b82f6;
  --ok-warning: #e8a23d;
  --ok-danger: #ef6b6b;
  --ok-success: #9fd65d;

  /* Tema escuro padrão */
  --bg: #101010;
  --surface: #1c1c1c;
  --surface-soft: #292929;
  --field: #161616;
  --text: #ffffff;
  --muted: #bdbdbd;
  --border: #393939;
  --placeholder: #999999;
  --shadow: 0 12px 36px #00000030;

  /* Compatibilidade com estilos anteriores */
  --copper: var(--ok-green);
  --copper-light: var(--ok-green-hover);
  --danger: var(--ok-danger);
  --success: var(--ok-success);

  --radius: 16px;
}

/* Tema claro, ativável futuramente pelo JavaScript */
:root[data-theme="light"] {
  color-scheme: light;

  --bg: #f7f7f7;
  --surface: #ffffff;
  --surface-soft: #f0f0f0;
  --field: #ffffff;
  --text: #181818;
  --muted: #646464;
  --border: #dedede;
  --placeholder: #777777;
  --shadow: 0 8px 28px #0000000d;
}

/* CONFIGURAÇÕES GERAIS */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
  transition:
    background-color .2s ease,
    color .2s ease;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  transition:
    background-color .2s ease,
    border-color .2s ease,
    color .2s ease,
    transform .15s ease;
}

button:active:not(:disabled) {
  transform: scale(.98);
}

button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--ok-green);
  outline-offset: 3px;
}

.hidden {
  display: none !important;
}

.app-shell {
  width: min(100% - 28px, 1100px);
  margin: 0 auto;
  padding: 24px 0 44px;
}

/* CABEÇALHO */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 26px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 25px;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
}

.brand-logo {
  width: 76px;
  height: 76px;
  object-fit: contain;
  border-radius: 12px;
  background: transparent;
}

.brand-area h1 {
  font-size: clamp(23px, 5vw, 34px);
  letter-spacing: .12em;
  line-height: 1.15;
  margin: 3px 0;
}

.eyebrow {
  color: var(--ok-caramel);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .19em;
}

.admin-label {
  border: 1px solid var(--ok-green);
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--ok-green);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  white-space: nowrap;
}

/* CARTÕES */

.panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 34px);
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}

.login-card {
  max-width: 490px;
  margin: 45px auto;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 5px 0 7px;
  font-size: clamp(23px, 4vw, 30px);
  letter-spacing: -.025em;
}

.section-heading h3,
h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.section-spaced {
  margin-top: 30px;
}

.muted,
.small {
  color: var(--muted);
  font-size: 13px;
  margin: 5px 0;
}

/* CAMPOS */

label {
  display: block;
  margin: 15px 0 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

input,
select,
textarea {
  display: block;
  width: 100%;
  min-height: 47px;
  padding: 12px 14px;
  background: var(--field);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--placeholder);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--ok-green);
  box-shadow: 0 0 0 3px #90b83225;
}

/* BOTÕES */

.btn-primary,
.btn-secondary,
.tabs button,
.actions button {
  min-height: 45px;
  padding: 12px 18px;
  border-radius: 11px;
  font-weight: 700;
}

.btn-primary {
  width: 100%;
  margin-top: 23px;
  background: var(--ok-green);
  border: 1px solid var(--ok-green);
  color: #101010;
}

.btn-primary:hover:not(:disabled) {
  background: var(--ok-green-hover);
  border-color: var(--ok-green-hover);
}

.btn-secondary {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--ok-green);
  background: var(--surface-soft);
}

.actions button {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text);
}

.actions button:hover:not(:disabled) {
  border-color: var(--ok-green);
}

/* NAVEGAÇÃO */

.tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 22px;
}

.tabs button {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
}

.tabs button:hover:not(.active) {
  border-color: var(--ok-green);
  color: var(--text);
}

.tabs button.active {
  background: var(--ok-green);
  border-color: var(--ok-green);
  color: #101010;
}

/* PRODUTOS */

.product {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 18px;
  margin: 14px 0;
}

.product > b,
.product > strong {
  display: block;
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--ok-green);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.grid label {
  margin-top: 4px;
}

.subtotal {
  margin-top: 15px;
  font-weight: 700;
  color: var(--ok-green);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

/* RESUMO */

.summary {
  margin: 24px 0;
  padding: 20px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 15px;
}

.summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 10px 0;
}

.summary-line strong {
  color: var(--ok-green);
  font-size: 19px;
}

.summary input {
  margin-bottom: 18px;
}

.shiprow {
  padding: 15px;
  margin: 12px 0;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
}

/* LINKS E REGISTROS */

a {
  color: var(--ok-green);
  overflow-wrap: anywhere;
}

a:hover {
  text-decoration-thickness: 2px;
}

.records {
  margin-top: 18px;
}

.records > p,
.records > div {
  padding: 13px 15px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 11px;
  margin: 10px 0;
  overflow-wrap: anywhere;
}

.records input {
  margin: 8px 0;
}

.footer-actions {
  display: flex;
  justify-content: flex-end;
  margin: 25px 0;
}

/* MENSAGENS */

#msg:not(:empty) {
  padding: 13px 17px;
  margin: 20px 0;
  border: 1px solid var(--border);
  border-radius: 11px;
}

#msg.error {
  color: #ffb1aa;
  border-color: #89463f;
  background: #391d1c;
}

#msg.success {
  color: #b5e5c1;
  border-color: #3b6349;
  background: #1c3023;
}

:root[data-theme="light"] #msg.error {
  color: #9e2424;
  background: #fff0ee;
  border-color: #e8aaa4;
}

:root[data-theme="light"] #msg.success {
  color: #17643b;
  background: #edf9f0;
  border-color: #a5d6b4;
}

/* RODAPÉ */

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 20px 0;
}

/* ELEMENTOS PREPARADOS PARA NOVOS MÓDULOS */

.module-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.module-card:hover {
  border-color: var(--ok-green);
}

.metric-value {
  color: var(--text);
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 750;
  letter-spacing: -.03em;
}

.status-success {
  color: var(--ok-success);
}

.status-warning {
  color: var(--ok-warning);
}

.status-danger {
  color: var(--ok-danger);
}

.status-info {
  color: var(--ok-blue);
}

.progress-track {
  height: 10px;
  background: var(--surface-soft);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: var(--ok-green);
  border-radius: inherit;
  transition: width .3s ease;
}

/* CELULARES */

@media (max-width: 650px) {
  .app-shell {
    width: calc(100% - 22px);
    padding-top: 12px;
  }

  .topbar {
    align-items: flex-start;
  }

  .brand-logo {
    width: 56px;
    height: 56px;
  }

  .admin-label {
    font-size: 8px;
    padding: 7px 9px;
  }

  .tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .panel-card {
    padding: 19px 15px;
  }

  .summary {
    padding: 16px;
  }

  .actions button {
    flex: 1;
  }
}

/* ACESSIBILIDADE */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* Plano de desenvolvimento — área interna */
.roadmap-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:14px;margin-top:20px}
.roadmap-stage{border:1px solid var(--border);border-radius:14px;background:var(--surface-soft);padding:18px}
.roadmap-stage-top{display:flex;justify-content:space-between;align-items:center;gap:12px}
.roadmap-number{font-size:1.4rem;font-weight:800;color:var(--ok-green)}
.roadmap-status{font-size:.75rem;color:var(--muted);text-align:right}
.roadmap-stage h3{font-size:1rem;margin:12px 0 8px;line-height:1.35}
.roadmap-stage p{font-size:.88rem;color:var(--muted);margin:0;line-height:1.55}
.roadmap-note{margin-top:18px;font-size:.82rem}

.roadmap-stage summary{cursor:pointer;list-style:none}
.roadmap-stage summary::-webkit-details-marker{display:none}
.roadmap-stage summary>strong{display:block;margin:10px 0 4px;font-size:1rem}
.roadmap-chevron{display:block;color:var(--muted);font-size:.78rem}
.roadmap-stage[open] .roadmap-chevron{color:var(--ok-green)}
.roadmap-editor{display:grid;gap:12px;margin-top:16px;padding-top:14px;border-top:1px solid var(--border)}
.roadmap-editor label{display:grid;gap:6px;font-size:.86rem;font-weight:600}
.roadmap-editor textarea,.roadmap-editor select{width:100%;padding:10px;border-radius:8px;border:1px solid var(--border);background:var(--field);color:var(--text);font:inherit}
.roadmap-editor textarea{resize:vertical}
.roadmap-editor button{justify-self:start}

/* Planejamento: cartões compactos e editor expandido em largura total. */
#roadmapSection .roadmap-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;gap:14px}
#roadmapSection .roadmap-stage{min-width:0;padding:18px;overflow:hidden}
#roadmapSection .roadmap-stage[open]{grid-column:1/-1;padding:24px;background:var(--surface);border-color:var(--ok-green)}
#roadmapSection .roadmap-stage summary{min-height:80px;outline-offset:5px}
#roadmapSection .roadmap-stage summary>strong{font-size:1rem;line-height:1.35}
#roadmapSection .roadmap-stage[open] summary{min-height:auto;padding-bottom:14px;border-bottom:1px solid var(--border)}
#roadmapSection .roadmap-task-list{margin:18px 0 10px}
#roadmapSection .roadmap-task-list h4{margin:0 0 12px;font-size:1rem}
#roadmapSection .roadmap-task{display:flex!important;flex-direction:row!important;align-items:center!important;gap:12px!important;padding:11px 13px;margin:0 0 7px;border:1px solid var(--border);border-radius:9px;cursor:pointer;font-weight:400!important;font-size:.92rem!important;line-height:1.45}
#roadmapSection .roadmap-task:hover{border-color:var(--ok-green)}
#roadmapSection .roadmap-task input[type="checkbox"]{appearance:auto!important;display:block!important;position:static!important;flex:0 0 18px!important;width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;max-width:18px!important;max-height:18px!important;margin:0!important;padding:0!important;accent-color:var(--ok-green);box-shadow:none!important}
#roadmapSection .roadmap-task span{flex:1;min-width:0}
#roadmapSection .roadmap-task:has(input:checked){background:color-mix(in srgb,var(--ok-green) 9%,transparent)}
#roadmapSection .roadmap-task:has(input:checked) span{text-decoration:line-through;opacity:.75}
#roadmapSection .roadmap-editor{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
#roadmapSection .roadmap-editor label{min-width:0}
#roadmapSection .roadmap-editor label:first-child,#roadmapSection .roadmap-editor label:last-of-type{grid-column:1/-1}
#roadmapSection .roadmap-editor textarea{min-height:86px}
#roadmapSection .roadmap-editor [data-stage-save]{border:0;border-radius:9px;background:var(--ok-green);color:#101510;font-weight:700;padding:12px 20px;min-height:44px}
#roadmapSection .roadmap-editor [data-stage-feedback]{align-self:center}
#roadmapSection .roadmap-close{margin-top:10px;border:1px solid var(--border);border-radius:8px;background:transparent;color:var(--text);padding:8px 12px}
#roadmapSection .roadmap-task-count{font-size:.8rem;color:var(--ok-green);margin:10px 0 0}
@media(max-width:1100px){#roadmapSection .roadmap-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){#roadmapSection .roadmap-grid{grid-template-columns:minmax(0,1fr)}#roadmapSection .roadmap-stage[open]{padding:16px}#roadmapSection .roadmap-editor{grid-template-columns:minmax(0,1fr)}#roadmapSection .roadmap-editor label:first-child,#roadmapSection .roadmap-editor label:last-of-type{grid-column:auto}}

/* Controle acessível de visibilidade da senha no login */
.okd-password-wrap{position:relative;width:100%}
.okd-password-wrap input{width:100%;padding-right:54px}
.okd-password-toggle{position:absolute;right:9px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:38px;height:38px;padding:0;border:0;border-radius:8px;background:transparent;color:var(--muted,#bdbdbd);cursor:pointer}
.okd-password-toggle:hover,.okd-password-toggle:focus-visible{color:var(--text,#fff);background:rgba(144,184,50,.12)}
.okd-password-toggle:focus-visible{outline:2px solid var(--ok-green,#90b832);outline-offset:1px}
.okd-eye-slash{display:none}
.okd-password-toggle[aria-pressed="true"] .okd-eye-slash{display:block}

/* Ação contextual de aprovação — integrada ao campo de parcelas sem juros */
.okd-approval-action{display:flex;align-items:flex-start;flex-direction:column;gap:5px;margin-top:10px}
.okd-approval-link{display:inline-flex;align-items:center;gap:8px;max-width:100%;padding:9px 12px;border:1px solid var(--ok-green,#90b832);border-radius:9px;background:rgba(144,184,50,.08);color:var(--ok-green,#90b832);font-size:13px;font-weight:700;line-height:1.35;text-decoration:none;transition:background .15s ease}
.okd-approval-link:hover,.okd-approval-link:focus-visible{background:rgba(144,184,50,.2);text-decoration:none}
.okd-approval-link:focus-visible{outline:2px solid var(--ok-green,#90b832);outline-offset:2px}
.okd-approval-action small{font-size:12px;color:var(--muted,#bdbdbd);line-height:1.4}

/* Indicador de solicitações pendentes no menu compacto */
.okd-approval-count{display:inline-flex;align-items:center;justify-content:center;min-width:19px;height:19px;padding:0 4px;border-radius:12px;background:var(--ok-green,#90b832);color:#101010;font-size:11px;font-weight:800;line-height:1;flex-shrink:0}
.okd-approval-count[hidden]{display:none!important}
.okd-sidebar:not(.expanded) .okd-approval-count{position:absolute;right:1px;top:1px;min-width:15px;height:15px;font-size:9px;padding:0 2px}
#okdInstallmentApprovalsNav{position:relative}
