/*
------------------------------------------------
Archivo: admin.css
Proyecto: Detalles Aurvin
Descripción:
Estilos exclusivos del módulo administrativo.
------------------------------------------------
*/


:root {
    --admin-bg: #f4f1f8;
    --admin-card: #ffffff;
    --admin-text: #2d2435;
    --admin-muted: #62596c;
    --admin-primary: #7b2cbf;
    --admin-primary-hover: #6822a4;
    --admin-danger: #c0392b;
    --admin-danger-hover: #a93226;
    --admin-light: #ece7f4;
    --admin-border: #e2d9ed;
    --admin-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.admin-body {
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--admin-bg);
    color: var(--admin-text);
}

.admin-container {
    width: min(92%, 1200px);
    margin: 42px auto;
}

/* TOPBAR */
.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.admin-topbar h1 {
    font-size: 2rem;
    color: #4b2e83;
    margin-bottom: 4px;
}

.admin-subtitle {
    color: var(--admin-muted);
}

.admin-topbar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* BOTÓN SECUNDARIO */
.admin-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.admin-btn-secondary:hover {
    background: #5a6268;
    color: #fff;
}

/* DASHBOARD */
.admin-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.admin-card {
    background: var(--admin-card);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--admin-shadow);
}

.admin-card-center {
    text-align: center;
}

.admin-card h3 {
    margin-bottom: 10px;
    color: #3d2c5a;
}

.admin-card p {
    margin-bottom: 16px;
    color: var(--admin-muted);
    line-height: 1.5;
}

/* BOTONES */
.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    border-radius: 10px;
    padding: 11px 16px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s ease;
}

.admin-btn-primary {
    background: linear-gradient(135deg, #8b4a2f, #b56a3c);
    color: #fff;
}

.admin-btn-primary:hover {
    background: linear-gradient(135deg, #7a3f28, #a45d33);
    color: #fff;
}

.admin-btn-light {
    background: var(--admin-light);
    color: #4b2e83;
}

.admin-btn-light:hover {
    background: #ddd3ec;
    color: #3f236f;
}

.admin-btn-danger {
    background: #b64031;
    color: #fff;
}

.admin-btn-danger:hover {
    background: #9d3327;
    color: #fff;
}

.admin-btn-disabled {
    background: #d8d8d8;
    color: #666;
    cursor: not-allowed;
}

/* ALERTAS */
.admin-alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 10px;
    font-weight: bold;
}

.admin-alert-error {
    background: #ffe9e9;
    color: #a93226;
    border: 1px solid #f1b8b8;
}

.admin-alert-success {
    background: #e9f8ef;
    color: #1e8449;
    border: 1px solid #bee5cb;
}

/* FORMULARIOS */
.admin-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #3c3150;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d2cadd;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 18px;
    background: #fff;
}

.admin-form textarea {
    resize: vertical;
    min-height: 110px;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(123, 44, 191, 0.12);
}

/* GRID */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 18px;
}

.admin-grid .full-width {
    grid-column: 1 / -1;
}

.admin-actions {
    margin-top: 6px;
}

/* TABLAS */
.admin-table-wrapper {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--admin-shadow);
}

.admin-table th,
.admin-table td {
    padding: 12px;
    border-bottom: 1px solid #ece7f2;
    text-align: center;
    vertical-align: middle;
}

.admin-table th {
    background: #f3edf9;
    color: #4b2e83;
}

/* BADGES */
.admin-badge-active {
    color: #1f8b4c;
    font-weight: bold;
}

.admin-badge-inactive {
    color: #c0392b;
    font-weight: bold;
}

/* IMÁGENES */
.admin-thumb {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: #fafafa;
}

.admin-no-image {
    width: 70px;
    height: 70px;
    border: 1px dashed #bbb;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #777;
    background: #fafafa;
}

.admin-thumb-large {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.admin-image-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.admin-image-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 8px;
}

.admin-help-text {
    display: block;
    margin-top: 6px;
    color: #6b6475;
    font-size: 12px;
}

/* LOGIN */
.admin-login-wrapper {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.admin-login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--admin-shadow);
}

.admin-login-card h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #4b2e83;
}

.admin-login-card input {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 14px;
    border: 1px solid #d2cadd;
    border-radius: 10px;
}

.admin-login-card button {
    width: 100%;
}

/* LINK SECUNDARIO DEL LOGIN */
.admin-link-secondary {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
    color: #6b5d85;
    text-decoration: none;
    transition: 0.2s ease;
}

.admin-link-secondary:hover {
    color: #4b2e83;
    text-decoration: underline;
}

/* ESTADOS DE PEDIDOS / RECLAMOS */
.admin-badge-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    min-width: 95px;
}

.admin-status-pendiente {
    background: #ececec;
    color: #555;
}

.admin-status-procesando,
.admin-status-en-proceso {
    background: #e8f1ff;
    color: #1f5fbf;
}

.admin-status-enviado {
    background: #fff3e6;
    color: #c96a00;
}

.admin-status-entregado {
    background: #e9f8ef;
    color: #1e8449;
}

.admin-status-cancelado {
    background: #ffe9e9;
    color: #c0392b;
}

/* =========================
   PANEL ADMIN - ESTILO MARCA
========================= */

.admin-body-brand {
    position: relative;
    background: linear-gradient(180deg, #f5f0ea 0%, #efe7df 100%);
    overflow-x: hidden;
}

.admin-body-brand::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url('/img/logo-aurvin.png') center center / 340px no-repeat;
    opacity: 0.10;
    pointer-events: none;
    z-index: 0;
}

.admin-shell {
    position: relative;
    z-index: 1;
    width: min(94%, 1280px);
    margin: 34px auto 50px;
}

.admin-brand-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.admin-brand-left h1 {
    font-size: 2.5rem;
    margin: 8px 0 10px;
    color: #4e2f1f;
}

.admin-brand-badge {
    display: inline-block;
    background: #7a4b2f;
    color: #fff;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 0.3px;
}

.admin-brand-text {
    max-width: 720px;
    color: #6b584d;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.admin-dashboard-brand {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 22px;
    align-items: stretch;
}

.admin-card-brand {
    min-height: 250px;
    border-radius: 20px;
    padding: 28px 24px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid #eadfce;
    box-shadow: 0 12px 28px rgba(93, 63, 36, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.admin-card-brand:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(93, 63, 36, 0.12);
}

.admin-card-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    border-radius: 16px;
    background: #f4e9dc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.admin-card-brand h3 {
    font-size: 1.45rem;
    color: #4e2f1f;
    margin-bottom: 10px;
}

.admin-card-brand p {
    color: #6e5b4e;
    line-height: 1.7;
    margin-bottom: 20px;
    min-height: 76px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .admin-topbar {
        align-items: flex-start;
    }

    .admin-brand-left h1 {
        font-size: 2rem;
    }

    .admin-card-brand {
        min-height: auto;
    }

    .admin-card-brand p {
        min-height: auto;
    }

    .admin-body-brand::before {
        background-size: 220px;
        opacity: 0.08;
    }
}
/* =========================
   FORMULARIO ACTUALIZAR ESTADO PEDIDO
========================= */

.admin-card .admin-form input[readonly] {
    background: #f7f4fb;
    color: #4b3f59;
    font-weight: 600;
}

.admin-card .admin-form select {
    min-height: 46px;
}

.admin-topbar h1 {
    margin-bottom: 6px;
}