/* Portal de licenças Vantara Remote. Tokens --vt-* copiados de
   LightSystem/Java/Web/Vantara/.../assets/css/vantara.css (tema escuro). */
:root {
    --vt-bg: #030E17;
    --vt-bg-deep: #02070C;
    --vt-grid: rgba(0, 229, 255, 0.025);
    --vt-surface: #071926;
    --vt-surface-2: #0a2131;
    --vt-surface-3: #0e2a3c;
    --vt-border: #123142;
    --vt-border-strong: #1a4357;
    --vt-text: #e6edf3;
    --vt-muted: #8aa1b1;
    --vt-faint: #57707f;
    --vt-accent: #4cc2ff;
    --vt-accent-strong: #2ea8ea;
    --vt-accent-soft: rgba(76, 194, 255, 0.12);
    --vt-ok: #3fb950;
    --vt-warn: #d29922;
    --vt-danger: #f85149;
    --vt-claude: #d97757;
    --vt-radius: 10px;
    --vt-mono: "Cascadia Mono", Consolas, "Courier New", monospace;
    --vt-sans: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { background-color: var(--vt-bg-deep); }

body {
    margin: 0;
    font-family: var(--vt-sans);
    font-size: 0.925rem;
    color: var(--vt-text);
    min-height: 100vh;
    background-color: var(--vt-bg-deep);
    background-image:
        linear-gradient(var(--vt-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--vt-grid) 1px, transparent 1px),
        radial-gradient(ellipse at 50% 40%, rgba(0, 45, 58, 0.28) 0%, rgba(3, 14, 23, 0.35) 45%, rgba(2, 7, 12, 0.9) 100%);
    background-size: 32px 32px, 32px 32px, 100% 100%;
    background-attachment: fixed;
}

a { color: var(--vt-accent); text-decoration: none; }
a:hover { color: #8ad6ff; }

h1, h2, h3 { font-weight: 600; margin: 0 0 0.6rem; }
h1 { font-size: 1.3rem; }
h2 { font-size: 1.05rem; }

.mono { font-family: var(--vt-mono); }
.muted { color: var(--vt-muted); }
.faint { color: var(--vt-faint); }

/* ---------------------------------------------------------------- shell -- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: #030C14;
    border-right: 1px solid var(--vt-border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1.1rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--vt-text);
}
.brand img { width: 30px; height: 30px; }

.nav { padding: 0.25rem 0.6rem 1rem; flex: 1; }
.nav-group {
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--vt-faint); padding: 1rem 0.6rem 0.4rem; font-weight: 600;
}
.nav a {
    display: block; padding: 0.5rem 0.65rem; border-radius: 8px;
    color: var(--vt-muted); font-weight: 500; margin-bottom: 2px;
}
.nav a:hover { background: var(--vt-surface-3); color: var(--vt-text); }
.nav a.ativo { background: var(--vt-accent-soft); color: var(--vt-accent); }

.nav-foot { padding: 0.8rem 1.1rem; border-top: 1px solid var(--vt-border); font-size: 0.8rem; }

/* min-width: 0 lets a wide table scroll inside its card instead of
   stretching the page past the screen. */
.content { flex: 1; min-width: 0; padding: 1.5rem; max-width: 1100px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; gap: 1rem; flex-wrap: wrap; }

/* ---------------------------------------------------------------- cards -- */
.card {
    background: var(--vt-surface);
    border: 1px solid var(--vt-border);
    border-radius: var(--vt-radius);
    margin-bottom: 1.2rem;
}
.card-header {
    padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--vt-border); font-weight: 600;
    display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap;
}
.card-body { padding: 1.1rem; overflow-x: auto; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.stat {
    background: var(--vt-surface); border: 1px solid var(--vt-border);
    border-radius: var(--vt-radius); padding: 1rem;
}
.stat .n { font-size: 1.8rem; font-weight: 700; }
.stat .l { color: var(--vt-muted); font-size: 0.8rem; }

/* --------------------------------------------------------------- forms --- */
label { display: block; font-weight: 500; color: #c9d4df; margin: 0.8rem 0 0.3rem; }
input, select, textarea {
    width: 100%; padding: 0.5rem 0.7rem;
    background-color: var(--vt-surface-2); border: 1px solid var(--vt-border);
    border-radius: 8px; color: var(--vt-text); font-family: inherit; font-size: 0.925rem;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--vt-accent);
    box-shadow: 0 0 0 0.2rem var(--vt-accent-soft);
}
input::placeholder { color: var(--vt-faint); }
.row { display: flex; gap: 1rem; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 160px; }

/* ------------------------------------------------------------- buttons --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    padding: 0.5rem 1rem; border-radius: 8px; border: 1px solid transparent;
    font-weight: 500; font-size: 0.925rem; cursor: pointer; font-family: inherit;
    background: var(--vt-accent-strong); color: #04131c;
}
.btn:hover { background: var(--vt-accent); color: #04131c; }
.btn:disabled { background: #24485c; cursor: default; }
.btn-ghost { background: transparent; color: var(--vt-text); border-color: var(--vt-border-strong); }
.btn-ghost:hover { background: var(--vt-surface-3); color: #fff; }
.btn-danger { background: var(--vt-danger); color: #1a0606; }
.btn-danger:hover { background: #ff6a60; color: #1a0606; }
.btn-sm { padding: 0.3rem 0.65rem; font-size: 0.82rem; }

/* --------------------------------------------------------------- table --- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--vt-border); }
th { color: var(--vt-faint); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
tr:hover td { background: var(--vt-surface-2); }
td.acoes { white-space: nowrap; }

/* --------------------------------------------------------------- badges -- */
.badge { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.72rem; font-weight: 600; }
.badge-ok { background: rgba(63,185,80,0.18); color: var(--vt-ok); }
.badge-warn { background: rgba(210,153,34,0.18); color: var(--vt-warn); }
.badge-danger { background: rgba(248,81,73,0.18); color: var(--vt-danger); }
.badge-muted { background: var(--vt-surface-3); color: var(--vt-muted); }

.alert { padding: 0.7rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid; }
.alert-err { background: rgba(248,81,73,0.1); border-color: var(--vt-danger); color: #ffb3ae; }
.alert-ok { background: rgba(63,185,80,0.1); border-color: var(--vt-ok); color: #a6e6ae; }

.keybox {
    font-family: var(--vt-mono); font-size: 1.1rem; letter-spacing: 0.04em;
    background: var(--vt-surface-2); border: 1px solid var(--vt-accent); border-radius: 8px;
    padding: 0.8rem 1rem; margin: 0.6rem 0; word-break: break-all;
}

/* --------------------------------------------------------------- login --- */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-card {
    width: 100%; max-width: 410px; background: var(--vt-surface);
    border: 1px solid var(--vt-border); border-radius: 14px; padding: 2rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}
.auth-brand { display: flex; align-items: center; gap: 0.7rem; font-size: 1.35rem; font-weight: 700; margin-bottom: 0.25rem; }
.auth-brand img { width: 34px; height: 34px; }
.auth-sub { color: var(--vt-muted); font-size: 0.88rem; margin-bottom: 1.2rem; }

.filters { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem; }
.filters > div { min-width: 150px; }
.filters label { margin-top: 0; }
.inline { display: inline; }

/* The CSP (default-src 'self') blocks style="" attributes: spacing lives here. */
.form-actions { margin-top: 1.2rem; }
.btn-block { width: 100%; }
.small { font-size: 0.8rem; }
input[type="checkbox"] { width: auto; }
label.check { display: flex; align-items: center; gap: 0.5rem; margin-top: 1rem; }
.nav-foot .btn { margin-top: 0.5rem; }
.grid { margin-bottom: 1.2rem; }

/* ---------------------------------------------------------- small screens -- */
/* Must stay before the media query: the later rule of equal weight wins. */
.menu-btn { display: none; }

@media (max-width: 760px) {
    .sidebar {
        position: fixed; z-index: 20; top: 0; left: 0; bottom: 0;
        width: min(260px, 85vw); height: auto;
        transform: translateX(-100%); visibility: hidden;
        transition: transform .2s, visibility .2s;
    }
    .sidebar.open { transform: none; visibility: visible; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.55); }
    .content { padding: 1rem; }
    .menu-btn { display: inline-flex; margin-bottom: 1rem; }
    .grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
    .stat .n { font-size: 1.5rem; }
    /* 16px stops iOS from zooming into a focused field. */
    input, select, textarea { font-size: 16px; }
}
