/* ============================================================
   Del Barrio al Ring — Panel Admin
   Estética "ringside" (mismos tokens que ring.css):
   fondo #111318 · panel #1a1d24 · tinta #f2f4f8 · muted #9aa0b4
   hielo #4fd8ff · fuego #ff4d00→#ff2d00 · línea #282d38
   ============================================================ */

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
    background:
        radial-gradient(1200px 500px at 85% -10%, rgba(255, 77, 0, .07), transparent 60%),
        radial-gradient(900px 420px at -10% 110%, rgba(79, 216, 255, .05), transparent 60%),
        #0e1013;
    color: #f2f4f8;
    font-size: 15px;
    line-height: 1.5;
}

a { color: #4fd8ff; text-decoration: none; }
a:hover { text-decoration: none; color: #8fe6ff; }

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

.admin-sidebar {
    width: 236px;
    flex-shrink: 0;
    background: #0a0c0f;
    border-right: 1px solid #22262e;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.admin-brand {
    display: block;
    font-family: 'Anton', 'Plus Jakarta Sans', sans-serif;
    font-size: 22px;
    font-weight: 400;
    color: #ffffff;
    letter-spacing: 1px;
    line-height: 1.1;
    margin-bottom: 30px;
    text-transform: uppercase;
}
.admin-brand em,
.admin-brand span {
    display: block;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #ff4d00;
    margin-top: 4px;
}
.admin-brand:hover { text-decoration: none; color: #ffffff; }

.admin-nav { display: flex; flex-direction: column; gap: 4px; }
.admin-nav a {
    color: #9aa0b4;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
}
.admin-nav a:hover {
    background: rgba(255, 255, 255, .05);
    color: #ffffff;
    text-decoration: none;
}
.admin-nav a.active {
    background: linear-gradient(90deg, rgba(255, 77, 0, .22), rgba(255, 77, 0, .06));
    border-left-color: #ff4d00;
    color: #ffffff;
}
.admin-nav a.nav-logout { margin-top: 24px; color: #ff8a5c; }
.admin-nav .nav-logout-form { margin-top: 24px; }
.admin-nav .nav-logout-form .nav-logout {
    margin-top: 0;
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    border: 0;
    border-left: 3px solid transparent;
    border-radius: 10px;
    background: none;
    color: #ff8a5c;
    font: inherit;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.admin-nav .nav-logout-form .nav-logout:hover { background: rgba(255, 77, 0, .1); color: #ffab8c; }

.admin-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    background: #0a0c0f;
    border-bottom: 1px solid #22262e;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 30px;
}
.admin-topbar h1 {
    margin: 0;
    font-family: 'Anton', 'Plus Jakarta Sans', sans-serif;
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.admin-user { color: #9aa0b4; font-size: 14px; }
.admin-user strong { color: #ffffff; font-weight: 700; }

.admin-content {
    padding: 28px 30px;
    flex: 1;
}

/* ---------------- Cards ---------------- */
.card {
    background: #181b22;
    border: 1px solid #262a33;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    padding: 22px 24px;
    margin-bottom: 24px;
}
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #262a33;
}
.card-head h2 {
    margin: 0;
    font-family: 'Anton', 'Plus Jakarta Sans', sans-serif;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.card-link { font-size: 13px; font-weight: 700; color: #4fd8ff; }
.card-link:hover { color: #8fe6ff; }

/* ---------------- Stats ---------------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.stat-card {
    background: #181b22;
    border: 1px solid #262a33;
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff4d00, #ff7a18, transparent 70%);
    opacity: .85;
}
.stat-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #9aa0b4;
}
.stat-value {
    font-family: 'Anton', 'Plus Jakarta Sans', sans-serif;
    font-size: 30px;
    font-weight: 400;
    color: #ffffff;
    letter-spacing: .5px;
}
.stat-value small { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; color: #9aa0b4; }
.stat-warn { color: #ff5d3a; }

.quick-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

/* ---------------- Botones ---------------- */
.btn {
    display: inline-block;
    border: 1px solid #2e3440;
    background: #1d212a;
    color: #d6dbe6;
    border-radius: 999px;
    padding: 10px 22px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: filter .15s, transform .1s, background .15s, border-color .15s;
    text-align: center;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
    background: linear-gradient(135deg, #ff7a18, #ff2d00);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(255, 45, 0, .28);
}
.btn-primary:hover { filter: brightness(1.1); color: #ffffff; }

.btn-ghost {
    background: #1d212a;
    color: #d6dbe6;
    border: 1px solid #2e3440;
}
.btn-ghost:hover { border-color: #4fd8ff; color: #4fd8ff; }

.btn-danger { background: rgba(255, 61, 61, .12); color: #ff6d6d; border: 1px solid rgba(255, 61, 61, .3); }
.btn-danger:hover { background: rgba(255, 61, 61, .2); color: #ff8f8f; }

.btn-small { padding: 5px 12px; font-size: 13px; }
.btn-block { width: 100%; padding: 13px; font-size: 15px; }

/* ---------------- Formularios ---------------- */
.admin-form .field { margin-bottom: 16px; }
.field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 6px;
    color: #b9c0cf;
}
.field label small { font-weight: 500; color: #9aa0b4; text-transform: none; letter-spacing: 0; }

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="datetime-local"],
input[type="search"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid #2e3440;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    color: #f2f4f8;
    background: #12151b;
    transition: border-color .15s, box-shadow .15s;
    color-scheme: dark;
}
input::placeholder, textarea::placeholder { color: #5d6577; }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #ff4d00;
    box-shadow: 0 0 0 3px rgba(255, 77, 0, .18);
}
input[type="file"] { padding: 8px 13px; }
textarea { resize: vertical; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0 18px;
}
.field-row { display: flex; gap: 24px; margin-bottom: 18px; }
.check-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: #d6dbe6;
}
.check-inline input { accent-color: #ff4d00; }

.current-img {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 8px;
}
.current-img img { border-radius: 8px; border: 1px solid #2e3440; }

.form-actions { display: flex; gap: 10px; margin-top: 8px; }

.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.filters select { width: auto; min-width: 180px; }
.filters input[type="search"] { width: 240px; }

/* ---------------- Tablas ---------------- */
.table-wrap { overflow-x: auto; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.admin-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9aa0b4;
    padding: 10px 12px;
    border-bottom: 2px solid #2b303c;
}
.admin-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #22262f;
    vertical-align: middle;
    color: #dde2ec;
}
.admin-table tbody tr:hover { background: #1d212b; }
.admin-table .empty { text-align: center; color: #9aa0b4; padding: 28px 12px; }
.admin-table .muted { color: #7c8497; }
.col-actions { white-space: nowrap; text-align: right; }
.col-actions form.inline-form { display: inline; margin-left: 6px; }
.thumb { border-radius: 6px; border: 1px solid #2e3440; display: block; }

/* ---------------- Badges ---------------- */
.badge {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid transparent;
}
.badge-danger  { background: rgba(255, 61, 61, .14);  color: #ff7b7b; border-color: rgba(255, 61, 61, .3); }
.badge-accent  { background: rgba(255, 77, 0, .14);   color: #ff8a5c; border-color: rgba(255, 77, 0, .35); }
.badge-ok      { background: rgba(46, 204, 113, .12); color: #4cd98a; border-color: rgba(46, 204, 113, .3); }
.badge-muted   { background: rgba(154, 160, 180, .1); color: #9aa0b4; border-color: rgba(154, 160, 180, .25); }
.badge-warn    { background: rgba(255, 179, 0, .12);  color: #ffc44d; border-color: rgba(255, 179, 0, .3); }

/* ---------------- Alertas ---------------- */
.alert {
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
}
.alert-ok    { background: rgba(46, 204, 113, .1);  color: #4cd98a; border-color: rgba(46, 204, 113, .3); }
.alert-error { background: rgba(255, 61, 61, .1);   color: #ff7b7b; border-color: rgba(255, 61, 61, .3); }

/* ---------------- Login ---------------- */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(900px 500px at 50% -10%, rgba(255, 77, 0, .12), transparent 60%),
        #0b0d10;
    padding: 20px;
}
.login-card {
    background: #161921;
    border: 1px solid #262a33;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
    width: 100%;
    max-width: 380px;
    padding: 38px 34px;
}
.login-brand { text-align: center; margin-bottom: 26px; }
.login-logo {
    font-family: 'Anton', 'Plus Jakarta Sans', sans-serif;
    font-size: 30px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ffffff;
}
.login-logo em { color: #ff4d00; font-style: normal; }
.login-brand p {
    margin: 6px 0 0;
    font-size: 12px;
    color: #4fd8ff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
}
.login-form .field { margin-bottom: 16px; }

/* ---------------- Detalle / grillas ---------------- */
.admin-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}
.detail-list {
    display: grid;
    grid-template-columns: 130px 1fr;
    row-gap: 10px;
    column-gap: 14px;
    margin: 0;
    font-size: 14px;
}
.detail-list dt { color: #9aa0b4; font-weight: 600; }
.detail-list dd { margin: 0; color: #e6eaf2; }
.admin-form-inline {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.admin-form-inline select,
.admin-form-inline input[type="search"] {
    padding: 8px 12px;
    border: 1px solid #2e3440;
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
    background: #12151b;
    color: #f2f4f8;
}
.pagination {
    display: flex;
    gap: 10px;
    padding: 14px 20px;
    font-size: 14px;
}
.pagination a { color: #4fd8ff; }

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
    .admin-shell { flex-direction: column; }
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: static;
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        padding: 12px 16px;
        gap: 8px;
        border-right: 0;
        border-bottom: 1px solid #22262e;
    }
    .admin-brand { margin-bottom: 0; margin-right: 12px; font-size: 18px; }
    .admin-nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
    .admin-nav a { padding: 7px 12px; font-size: 14px; }
    .admin-nav a.nav-logout { margin-top: 0; }
    .admin-nav .nav-logout-form { margin-top: 0; }
    .admin-topbar { padding: 12px 18px; }
    .admin-topbar h1 { font-size: 18px; }
    .admin-content { padding: 18px 14px; }
    .col-actions { text-align: left; }
    .admin-grid-2 { grid-template-columns: 1fr; }
    .detail-list { grid-template-columns: 1fr; row-gap: 2px; }
    .detail-list dd { margin-bottom: 8px; }
}

/* Inventario merch (admin/pedidos.php) */
.input-num { width: 90px; }
.comprobante-img { max-width: 420px; width: 100%; border-radius: 10px; border: 1px solid #2a2f3d; }
