/* ============================================================
   Virtual Ejército del Aire — panel stylesheet
   Shared by crew.virtualeda.com, admin.virtualeda.com
   ============================================================ */

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

:root {
    --navy:    #002b5c;
    --navy-2:  #004990;
    --accent:  #004990;
    --accent-2:#00366b;
    --ink:     #1a1a1a;
    --muted:   #666666;
    --line:    #e0e0e0;
    --line-2:  #f0f0f0;
    --bg:      #f8f9fa;
    --white:   #ffffff;
    --gray-1:  #1a1a1a;
    --gray-2:  #444444;
    --gray-3:  #777777;
    --gray-4:  #999999;
    --ok:      #1c6b3a;
    --err:     #a52222;
    --black:   #000000;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

h1, h2, h3, h4, .page-title, .panel-title, .auth-title, .footer-col h3, .footer-col h4 {
    font-family: "Archivo Black", "Arial Black", Gadget, sans-serif;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    font-weight: 900;
}

/* ============ SHARED NAVBAR (Single Row) ============ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    height: 80px;
    display: flex;
    align-items: center;
}

.navbar-inner {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo img {
    height: 100px;
    width: auto;
    display: block;
}

.nav-items {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.nav-link {
    padding: 0.8rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--gray-1);
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link.active, .nav-link.is-active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ============ MAIN CONTENT CONTAINER ============ */
.app-main {
    flex: 1 0 auto;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}
@media (max-width: 860px) {
    .app-main { padding: 2rem 1.25rem 3rem; }
}

/* ============ SITE FOOTER ============ */
.site-footer {
    background: var(--black);
    color: rgba(255,255,255,0.6);
    padding: 5rem 2rem 2rem;
}

.footer-wrap {
    max-width: 1100px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    align-items: start;
    gap: 3rem;
    padding-bottom: 3rem;
}
@media (max-width: 820px) {
    .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

.footer-col h3, .footer-col h4 {
    color: var(--white);
    font-family: "Archivo Black", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-col h3 { font-size: 1.2rem; margin-bottom: 1.5rem; }
.footer-col h4 { font-size: 0.9rem; margin-bottom: 1.2rem; }

.footer-col p {
    max-width: 460px;
    font-size: 0.95rem;
    line-height: 1.7;
    font-weight: 300;
    color: rgba(255,255,255,0.55);
    margin: 0 0 1.75rem 0;
}

.footer-logos {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.footer-logos img {
    height: 42px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    display: block;
    opacity: 0.85;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.footer-links a {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    transition: color .2s;
}
.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.4);
}

/* ============ PAGE HEAD ============ */
.page-head { margin-bottom: 1.75rem; }
.page-title {
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--navy);
    line-height: 1.2;
}
.page-lead { font-size: 0.92rem; color: var(--muted); margin-top: 0.35rem; }
.page-head-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* ============ STAT CARDS ============ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}
@media (max-width: 780px) { .stat-grid { grid-template-columns: 1fr; } }

.stat-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-top: 3px solid var(--navy-2);
    padding: 1.6rem 1.5rem 1.5rem;
}
.stat-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.6rem;
}
.stat-value {
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.025em;
    color: var(--navy);
}
.stat-unit { font-size: 0.82rem; font-weight: 700; color: var(--muted); margin-left: 0.4rem; letter-spacing: 0.06em; }

/* ============ PANELS ============ */
.panel {
    background: var(--white);
    border: 1px solid var(--line);
    margin-bottom: 1.75rem;
}
.panel-head {
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--line);
    background: #fafbfc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.panel-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--navy);
}
.panel-note { font-size: 0.78rem; color: var(--muted); }
.panel-body { padding: 1.75rem 1.5rem; }
.panel-body-tight { padding: 0; }

/* ============ FORMS ============ */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem 1.5rem;
}
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }

.fieldset { border: none; margin-bottom: 2rem; }
.fieldset:last-of-type { margin-bottom: 1.5rem; }
.fieldset-legend {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--navy-2);
    padding-bottom: 0.7rem;
    margin-bottom: 1.35rem;
    border-bottom: 1px solid var(--line);
    display: block;
    width: 100%;
}

.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
}
.field label .req { color: var(--err); margin-left: 0.2rem; }

.field input[type="text"],
.field input[type="password"],
.field input[type="email"],
.field input[type="number"],
.field input[type="date"],
.field select,
.field textarea {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--line);
    background: var(--white);
    border-radius: 0;
    transition: border-color .2s, box-shadow .2s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 2.2rem; }
.field textarea { resize: vertical; min-height: 110px; }

.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--navy-2);
    box-shadow: 0 0 0 3px rgba(0, 73, 144, 0.12);
}

.field input[readonly] { background: #f6f7f9; color: var(--muted); }
.field-hint { font-size: 0.76rem; color: var(--muted); }
.field-error { font-size: 0.78rem; color: var(--err); font-weight: 600; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--err); }

.form-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 0.5rem;
}

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.6rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1.5px solid transparent;
    transition: all .25s ease;
    border-radius: 2px;
}
.btn-primary { 
    background: var(--navy-2); 
    color: var(--white); 
    border-color: var(--navy-2); 
}
.btn-primary:hover { 
    background: var(--navy); 
    border-color: var(--navy);
    transform: translateY(-2px);
}
.btn-outline { 
    background: transparent; 
    color: var(--navy-2); 
    border-color: var(--navy-2); 
}
.btn-outline:hover { 
    background: var(--navy-2); 
    color: var(--white);
    transform: translateY(-2px);
}
.btn-ghost {
    background: transparent;
    color: var(--navy-2);
    border-color: var(--navy-2);
}
.btn-ghost:hover {
    background: var(--navy-2);
    color: var(--white);
    transform: translateY(-2px);
}
.btn-block { width: 100%; justify-content: center; }

/* ============ MESSAGES ============ */
.flash {
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    border: 1px solid;
    border-left-width: 4px;
    border-radius: 2px;
}
.flash-ok  { background: #f0f7f2; border-color: #c2dcc9; color: var(--ok); }
.flash-err { background: #fdf3f3; border-color: #ecc5c5; color: var(--err); }

/* ============ TABLES ============ */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }

.data-table thead th {
    background: var(--navy);
    color: var(--white);
    text-align: left;
    padding: 1rem 1.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;
}
.data-table tbody tr { border-bottom: 1px solid var(--line-2); }
.data-table tbody tr:nth-child(even) { background: #fafbfc; }
.data-table tbody tr:hover { background: #f2f5f9; }
.data-table tbody td { padding: 1rem 1.5rem; vertical-align: middle; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .mono { font-family: "Courier New", Consolas, monospace; font-size: 0.9rem; }

.row-me { background: #eef4fb !important; }
.row-me td:first-child { box-shadow: inset 3px 0 0 var(--navy-2); }

.rank-cell { width: 3.5rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.name-cell { font-weight: 700; color: var(--ink); }
.sub-cell { display: block; font-size: 0.8rem; font-weight: 400; color: var(--muted); }

.badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    background: #eef1f5;
    border: 1px solid var(--line);
    color: var(--muted);
    border-radius: 2px;
}

.mono { font-family: "Courier New", Consolas, monospace; }

.table-scroll { overflow-x: auto; }
.empty { padding: 3.5rem 2rem; text-align: center; color: var(--muted); font-size: 1rem; }

/* Detail row inside tables */
.detail-row td { background: #f7f9fb; padding: 1.5rem 1.5rem 2rem; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 2.5rem; }
@media (max-width: 720px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-k {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.5rem;
}
.detail-v { font-size: 1rem; color: var(--ink); white-space: pre-wrap; line-height: 1.6; }

/* ============ PROFILE ============ */
.profile-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 2.5rem;
    align-items: start;
}
@media (max-width: 860px) { .profile-grid { grid-template-columns: 1fr; } }

.info-list { border-top: 1px solid var(--line); }
.info-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}
.info-k {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}
.info-v { font-size: 1.05rem; font-weight: 700; color: var(--navy); text-align: right; }

/* ============ SIGN-IN SCREEN ============ */
.auth-shell {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem;
    width: 100%;
    background: var(--navy);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--white);
    border-top: 4px solid var(--navy-2);
    padding: 3rem 2.5rem 2.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.auth-card .btn-primary {
    width: 100%;
    justify-content: center;
    padding: 1.1rem;
    font-size: 1rem;
    margin-top: 1rem;
}

.auth-head { margin-bottom: 2rem; text-align: center; }
.auth-head .brand-logo { justify-content: center; margin-bottom: 1.5rem; }
.auth-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; color: var(--navy); }
.auth-sub {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 0.5rem;
}

.auth-card .field { margin-bottom: 1.25rem; }
.auth-foot {
    margin-top: 2rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

.site-link {
    display: block;
    text-align: center;
    margin-top: 2rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1.5rem;
}
.site-link:hover { color: var(--white); }
