:root {
    --text: #23364d;
    --text-strong: #172b43;
    --muted: #64778d;

    --panel: rgba(255, 255, 255, 0.95);
    --panel-soft: rgba(248, 252, 255, 0.97);

    --border: rgba(60, 118, 155, 0.20);
    --border-strong: rgba(60, 118, 155, 0.30);

    --accent: #38aee8;
    --accent-2: #657cf0;

    --success: #208a65;
    --danger: #b94350;

    --shadow: 0 14px 38px rgba(35, 79, 115, 0.18);

    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family:
        Inter,
        "Segoe UI",
        Tahoma,
        Geneva,
        Verdana,
        sans-serif;

    color: var(--text);

    background:
        linear-gradient(
            rgba(225, 247, 255, 0.34),
            rgba(239, 250, 255, 0.42)
        ),
        url('/assets/img/farever-bg.jpg')
        center center / cover
        no-repeat
        fixed;
}


/* =========================================
   ESTRUCTURA
========================================= */

.wrapper {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 60px;
}


/* =========================================
   CABECERA
========================================= */

.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;

    padding: 22px 26px;
    margin-bottom: 22px;

    border-radius: 24px;

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,0.98),
            rgba(234,248,255,0.96)
        );

    border: 1px solid rgba(84, 155, 199, 0.23);

    box-shadow: var(--shadow);
}

.hero-main {
    min-width: 0;
}

.hero-eyebrow {
    display: block;

    margin-bottom: 3px;

    color: #3287b5;

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;

    color: var(--text-strong);

    font-size: 34px;
    line-height: 1.05;

    letter-spacing: 0.3px;
}

.hero p {
    margin: 7px 0 0;

    color: var(--muted);

    font-size: 15px;
}

.admin-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    flex-shrink: 0;

    padding: 10px 15px;

    border-radius: 999px;

    background: #ffffff;

    border: 1px solid #cfe3ef;

    color: #31536a;

    font-size: 14px;
    font-weight: 700;

    box-shadow: 0 5px 16px rgba(44, 102, 138, 0.10);
}

.admin-chip::before {
    content: "";

    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: #32bf86;

    box-shadow: 0 0 0 4px rgba(50,191,134,0.13);
}


/* =========================================
   PANELES
========================================= */

.grid {
    display: grid;
    grid-template-columns: 420px minmax(0, 1fr);
    gap: 24px;
}

.panel {
    padding: 22px;

    border-radius: var(--radius);

    background: var(--panel);

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

    box-shadow: var(--shadow);
}

.panel h2 {
    margin: 0 0 18px;

    color: var(--text-strong);

    font-size: 22px;
    line-height: 1.2;
}

.panel h3 {
    margin: 0 0 12px;

    color: var(--text-strong);
}


/* =========================================
   MENSAJES
========================================= */

.flash {
    margin-bottom: 18px;
    padding: 13px 15px;

    border-radius: 14px;

    font-size: 14px;
    font-weight: 700;

    line-height: 1.45;
}

.flash-ok {
    color: #17694e;

    background: #e5f8f0;

    border: 1px solid #a9e5cf;
}

.flash-error {
    color: #943946;

    background: #fff0f1;

    border: 1px solid #efc2c7;
}


/* =========================================
   FORMULARIO
========================================= */

.form-grid {
    display: grid;
    gap: 17px;
}

.form-row {
    display: grid;
    gap: 7px;
}

.form-row label,
.form-label {
    color: #3b536d;

    font-size: 13px;
    font-weight: 800;

    line-height: 1.3;
}

.input,
.select,
.number {
    width: 100%;

    padding: 12px 13px;

    border: 1px solid #c9dce8;
    border-radius: 13px;

    background: #ffffff;

    color: #24374d;

    font-family: inherit;
    font-size: 14px;

    outline: none;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.input::placeholder {
    color: #8595a6;
}

.input:focus,
.select:focus,
.number:focus {
    border-color: #54afe0;

    box-shadow:
        0 0 0 4px rgba(84,175,224,0.14);
}

.select option {
    color: #24374d;
    background: #ffffff;
}

.two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}


/* =========================================
   CLASES
========================================= */

.class-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11px 14px;

    padding: 14px;

    border-radius: 14px;

    background: #f3f9fd;

    border: 1px solid #d6e7f1;
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 9px;

    color: #344e68;

    font-size: 14px;
    font-weight: 650;

    cursor: pointer;
}

.checkbox-line input {
    width: 17px;
    height: 17px;

    margin: 0;

    accent-color: #42aee5;

    cursor: pointer;
}

.checkbox-line.disabled {
    opacity: 0.45;
    cursor: default;
}

.small {
    color: var(--muted);

    font-size: 12px;
    line-height: 1.4;
}


/* =========================================
   BOTONES
========================================= */

.actions {
    display: flex;
    align-items: center;
    gap: 11px;
    flex-wrap: wrap;

    margin-top: 2px;
}

.button {
    padding: 12px 17px;

    border: 0;
    border-radius: 13px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 800;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        opacity 0.15s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #2eb9ed,
            #667cf0
        );

    box-shadow:
        0 7px 18px rgba(70, 137, 220, 0.24);
}

.button-secondary {
    color: #405970;

    background: #edf5fa;

    border: 1px solid #d3e3ec;
}

.info-note {
    margin-top: 2px;

    color: var(--muted);

    font-size: 12px;
    line-height: 1.5;
}


/* =========================================
   TABLA
========================================= */

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;

    border-collapse: collapse;
}

.table th,
.table td {
    padding: 14px 12px;

    text-align: left;
    vertical-align: middle;

    border-bottom: 1px solid #dfeaf1;
}

.table th {
    color: #526b83;

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 0.5px;

    text-transform: uppercase;
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.table tbody tr {
    transition: background 0.15s ease;
}

.table tbody tr:hover {
    background: #f5faff;
}

.item-name {
    margin-bottom: 3px;

    color: #243b54;

    font-weight: 800;
}

.item-meta {
    color: #698096;

    font-size: 12px;
}


/* =========================================
   CALIDADES
========================================= */

.badge-quality {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    padding: 6px 10px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 800;

    border: 1px solid transparent;
}

.badge-quality::before {
    content: "";

    display: inline-block;

    width: 8px;
    height: 8px;

    border-radius: 50%;
}


/* Legendario */

.quality-legendario {
    color: #8b6300;

    background: #fff5cf;

    border-color: #efd67c;
}

.quality-legendario::before {
    background: #dda900;
}


/* Épico */

.quality-epico {
    color: #7034a2;

    background: #f1e5fb;

    border-color: #d2acef;
}

.quality-epico::before {
    background: #a252de;
}


/* Raro */

.quality-raro {
    color: #2566a8;

    background: #e1f0ff;

    border-color: #a9cef3;
}

.quality-raro::before {
    background: #4e9be6;
}


/* Mágico */

.quality-magico {
    color: #23784b;

    background: #e1f7e9;

    border-color: #a4dfbb;
}

.quality-magico::before {
    background: #39b973;
}


/* Normal */

.quality-normal {
    color: #52616f;

    background: #eef2f5;

    border-color: #d0d8df;
}

.quality-normal::before {
    background: #8794a0;
}


/* =========================================
   VACÍOS
========================================= */

.empty-box {
    padding: 22px;

    border-radius: 15px;

    border: 1px dashed #b6cedd;

    background: #f5fbff;

    color: #647b8e;

    text-align: center;

    font-size: 14px;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 980px) {

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

}


@media (max-width: 700px) {

    .wrapper {
        width: min(100% - 20px, 1200px);
        padding-top: 14px;
    }

    .hero {
        flex-direction: column;
        align-items: flex-start;

        padding: 20px;
    }

    .hero h1 {
        font-size: 28px;
    }

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

}


@media (max-width: 450px) {

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

}