@charset "utf-8";

/* ═══════════════════════════════════════════════════════════
   PERSEO — ESTILO GLOBAL BASE
   Variables, reset, tipografía, formularios base e utilidades.
═══════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════
   VARIABLES GLOBAIS
═══════════════════════════════════════ */

:root {
    --bg:           #0d0d0f;
    --surface:      #16161a;
    --surface2:     #1e1e24;
    --surface3:     #25252d;
    --border:       #2a2a35;

    --accent:       #c8f04a;
    --accent2:      #7c6af5;

    --text:         #e8e8f0;
    --muted:        #7a7a90;

    --danger:       #f04a6a;
    --success:      #4af09a;
    --warning:      #f0c84a;

    --sidebar-w:    240px;
    --sidebar-mini: 64px;

    --radius-sm:    8px;
    --radius:       14px;
    --radius-lg:    20px;

    --shadow-sm:    0 2px 8px rgba(0,0,0,.3);
    --shadow:       0 4px 24px rgba(0,0,0,.45);
    --shadow-lg:    0 8px 48px rgba(0,0,0,.6);

    --transition:   .25s cubic-bezier(.4,0,.2,1);

    --font-display: 'Syne', sans-serif;
    --font-body:    'DM Sans', sans-serif;
}


/* ═══════════════════════════════════════
   TEMA CLARO
═══════════════════════════════════════ */

body.light-theme {
    --bg:           #f5f5f7;
    --surface:      #ffffff;
    --surface2:     #ececf1;
    --surface3:     #e1e1e8;
    --border:       #d8d8e0;

    --accent:       #8bb300;
    --accent2:      #6a55f5;

    --text:         #1a1a1f;
    --muted:        #666680;

    --danger:       #d93a58;
    --success:      #1ca56b;
    --warning:      #d6a100;

    --shadow-sm:    0 2px 8px rgba(0,0,0,.08);
    --shadow:       0 4px 24px rgba(0,0,0,.12);
    --shadow-lg:    0 8px 48px rgba(0,0,0,.16);
}


/* ═══════════════════════════════════════
   RESET E BASE
═══════════════════════════════════════ */

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

html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    background: var(--bg);
    color: var(--text);

    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img,
picture,
video,
canvas,
svg {
    max-width: 100%;
    display: block;
}

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


/* ═══════════════════════════════════════
   TIPOGRAFÍA
═══════════════════════════════════════ */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

h1 {
    font-size: 2rem;
    font-weight: 800;
}

h2 {
    font-size: 1.4rem;
}

h3 {
    font-size: 1.1rem;
}

h4 {
    font-size: .95rem;
}

p {
    color: var(--text);
    margin-bottom: .75em;
}

p:last-child {
    margin-bottom: 0;
}

small,
.small {
    font-size: 12px;
    color: var(--muted);
}

strong {
    font-weight: 600;
}


/* ═══════════════════════════════════════
   CLASES HERDADAS
═══════════════════════════════════════ */

.style2 {
    font-size: 15px;
    color: var(--accent);
    font-weight: 500;
}

.style4 {
    font-size: 15px;
    color: var(--text);
}

.style7 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
}

.style8 {
    color: var(--text);
}

.style9 {
    font-size: 15px;
}

.style10 {
    font-size: 12px;
    color: var(--muted);
}


/* ═══════════════════════════════════════
   LIGAZÓNS
═══════════════════════════════════════ */

a,
a:link,
a:visited,
a:active {
    color: var(--accent2);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent);
}


/* ═══════════════════════════════════════
   FORMULARIOS BASE
═══════════════════════════════════════ */

input,
select,
textarea {
    width: 100%;

    padding: 8px 14px;
    margin: 2px;

    color: var(--text);
    background: var(--surface2);

    border: 1px solid var(--border);
    border-radius: var(--radius-sm);

    outline: none;

    font-size: 14px;

    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        background var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent2);
    box-shadow: 0 0 0 3px rgba(124,106,245,.15);
}

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

input[type="file"] {
    width: auto;
    padding: 8px;

    background: transparent;
    border: none;

    cursor: pointer;
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    margin-right: 6px;

    accent-color: var(--accent2);
    cursor: pointer;
}

select {
    appearance: none;
    -webkit-appearance: none;

    padding-right: 36px;

    cursor: pointer;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a7a90' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.input-medio {
    width: 100%;
    max-width: 500px;
}

.form-field,
.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;

    margin-bottom: 16px;
}

.form-field label,
.input-group label {
    padding: 0 4px;

    font-size: 11px;
    font-weight: 600;
    letter-spacing: .6px;
    text-transform: uppercase;

    color: var(--muted);
}


/* ═══════════════════════════════════════
   FIELDSET
═══════════════════════════════════════ */

fieldset {
    width: 100%;
    max-width: 560px;

    padding: 20px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

legend {
    padding: 0 8px;

    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .4px;

    color: var(--accent2);
}


/* ═══════════════════════════════════════
   LAYOUTS BÁSICOS HERDADOS
═══════════════════════════════════════ */

.barra {
    display: flex;
    align-items: center;
    gap: 12px;
}

.esquerda {
    flex: 1;
    text-align: left;
}

.centro {
    flex: 1;
    text-align: center;
}

.dereita {
    flex: 1;
    text-align: right;
}

.contenedor-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.separador {
    height: 1px;

    margin: 20px 0;

    border: none;
    background: var(--border);
}


/* ═══════════════════════════════════════
   TÁBOAS BASE
═══════════════════════════════════════ */

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table {
    font-size: 14px;
    color: var(--text);
}


/* ═══════════════════════════════════════
   LOGIN
═══════════════════════════════════════ */

.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 100vh;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 400px;

    padding: 48px 40px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.login-card h1 {
    margin-bottom: 8px;

    text-align: center;
    font-size: 1.8rem;
}

.login-card h1 span {
    color: var(--accent);
}

.login-card .subtitle {
    margin-bottom: 32px;

    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.login-card button[type="submit"],
.login-card input[type="submit"] {
    width: 100%;
    justify-content: center;

    padding: 13px;
    margin-top: 8px;

    font-size: 15px;
    border-radius: var(--radius-sm);
}


/* ═══════════════════════════════════════
   UTILIDADES FLEX
═══════════════════════════════════════ */

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.gap-sm {
    gap: 8px;
}

.gap-md {
    gap: 16px;
}

.gap-lg {
    gap: 24px;
}


/* ═══════════════════════════════════════
   UTILIDADES TEXTO
═══════════════════════════════════════ */

.text-muted {
    color: var(--muted);
}

.text-accent {
    color: var(--accent);
}

.text-accent2 {
    color: var(--accent2);
}

.text-danger {
    color: var(--danger);
}

.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-sm {
    font-size: 13px;
}

.text-xs {
    font-size: 11px;
}


/* ═══════════════════════════════════════
   UTILIDADES ESPAZADO
═══════════════════════════════════════ */

.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }

.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.mb-lg { margin-bottom: 24px; }


/* ═══════════════════════════════════════
   BADGES
═══════════════════════════════════════ */

.badge {
    display: inline-flex;
    align-items: center;

    padding: 3px 10px;

    border-radius: 999px;

    font-size: 11px;
    font-weight: 600;
    letter-spacing: .3px;
}

.badge-accent {
    background: rgba(200,240,74,.15);
    color: var(--accent);
    border: 1px solid rgba(200,240,74,.3);
}

.badge-accent2 {
    background: rgba(124,106,245,.15);
    color: var(--accent2);
    border: 1px solid rgba(124,106,245,.3);
}

.badge-danger {
    background: rgba(240,74,106,.15);
    color: var(--danger);
    border: 1px solid rgba(240,74,106,.3);
}

.badge-muted {
    background: var(--surface2);
    color: var(--muted);
    border: 1px solid var(--border);
}


/* ═══════════════════════════════════════
   DIVISORES
═══════════════════════════════════════ */

.divider {
    margin: 20px 0;

    border: none;
    border-top: 1px solid var(--border);
}


/* ═══════════════════════════════════════
   SCROLLBAR
═══════════════════════════════════════ */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--muted);
}


/* ═══════════════════════════════════════
   COMPATIBILIDADE MENÚ ANTIGO
═══════════════════════════════════════ */

.menu {
    display: none;
}


/* ═══════════════════════════════════════
   RESPONSIVE GLOBAL
═══════════════════════════════════════ */

@media (max-width: 768px) {
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    .login-card {
        padding: 32px 24px;
    }

    table {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
}

/* ═══════════════════════════════════════
   UTILIDADES VISIBILIDADE
═══════════════════════════════════════ */

.oculto {
    display: none !important;
}

.invisible {
    visibility: hidden !important;
}

.hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Stilo para a barra fixa no pé da páxina*/
.pe-paxina-fixo {
    position: fixed;

    left: var(--sidebar-w, 250px);
    bottom: 0;

    width: calc(100% - var(--sidebar-w, 250px));
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--surface);

    border-top: 1px solid var(--border);

    color: var(--muted);
    font-size: 12px;

    z-index: 8000;

    transition:
        left .25s ease,
        width .25s ease;
}


/* SIDEBAR COLAPSADO */

#appShell.sidebar-collapsed .pe-paxina-fixo {
    left: var(--sidebar-mini, 70px);

    width: calc(100% - var(--sidebar-mini, 70px));
}