
/* =========================================
   MARCELA PEREYRA ESTUDIO
   Identidad visual y estilos generales
========================================= */

:root {
    --rose: #C98B8B;
    --ivory: #F8F1EC;
    --gold: #B08D57;
    --brown: #3A2E2E;
    --beige: #E8D5CF;
    --green: #6E8B74;
    --white: #FFFFFF;
    --muted: #9B8985;
    --border: #EEE4DF;
    --soft: #FCF8F5;
    --danger: #A85F5F;
}

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

body {
    font-family: 'Jost', sans-serif;
    background: var(--ivory);
    color: var(--brown);
    min-height: 100vh;
}

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

button {
    cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

h1,
h2,
h3 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
}

p {
    line-height: 1.6;
}

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

#app {
    min-height: 100vh;
}

/* =========================================
   SELECTOR DE PERFILES
========================================= */

.login-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at top, #FFFFFF 0%, transparent 55%),
        var(--ivory);
}

.login-card {
    width: 100%;
    max-width: 460px;
    padding: 48px 42px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(58, 46, 46, 0.06);
}

.brand-mark {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--ivory);
    border: 1px solid var(--beige);
    color: var(--gold);
    font-family: 'Cormorant Garamond', serif;
    font-size: 27px;
}

.eyebrow {
    color: var(--gold);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 7px;
}

.login-card h1 {
    font-size: 42px;
    margin-bottom: 8px;
}

.login-card > p:not(.eyebrow) {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 26px;
}

.profile-options {
    display: grid;
    gap: 10px;
    margin-bottom: 22px;
}

.profile-choice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    background: var(--soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--brown);
    font-size: 13px;
    transition: 0.2s ease;
}

.profile-choice:hover {
    background: #F8EBE8;
    border-color: var(--rose);
}

.login-card > small {
    font-size: 10px;
}

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

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 255px;
    min-width: 255px;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    padding: 27px 18px;
    background: var(--white);
    border-right: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 8px 28px;
}

.brand .brand-mark {
    width: 43px;
    height: 43px;
    margin: 0;
    font-size: 21px;
}

.brand strong {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 21px;
    font-weight: 600;
}

.brand small {
    display: block;
    color: var(--gold);
    font-size: 9px;
    letter-spacing: 3px;
}

.profile-chip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 9px;
    padding: 11px;
    margin-bottom: 27px;
    background: var(--soft);
    border-radius: 10px;
    font-size: 12px;
}

.profile-chip button {
    padding: 5px 8px;
    border: 0;
    background: transparent;
    color: var(--rose);
    font-size: 10px;
}

.sidebar nav {
    display: grid;
    gap: 7px;
}

.sidebar nav button {
    width: 100%;
    padding: 13px 14px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    text-align: left;
    color: #806E6B;
    font-size: 13px;
    transition: 0.2s ease;
}

.sidebar nav button:hover {
    background: var(--ivory);
    color: var(--brown);
}

.sidebar-bottom {
    margin-top: auto;
    padding: 12px 8px;
    color: var(--green);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.sidebar-bottom small {
    display: block;
    margin-top: 8px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.5;
}

.main {
    width: calc(100% - 255px);
    max-width: 1600px;
    min-height: 100vh;
    margin-left: 255px;
    padding: 30px 4.5vw 20px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 23px;
    border-bottom: 1px solid var(--border);
}

.topbar h2 {
    font-size: 35px;
}

.topbar > span {
    color: var(--muted);
    font-size: 12px;
}

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

.primary,
.secondary {
    padding: 11px 18px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    transition: 0.2s ease;
}

.primary {
    border: 1px solid var(--rose);
    background: var(--rose);
    color: var(--white);
}

.primary:hover {
    background: #B97979;
    border-color: #B97979;
}

.secondary {
    border: 1px solid var(--border);
    background: var(--soft);
    color: #725C58;
}

.secondary:hover {
    background: var(--beige);
}

.danger-link {
    display: block;
    margin-top: 18px;
    padding: 10px 0;
    border: 0;
    background: transparent;
    color: var(--danger);
    font-size: 12px;
}

/* =========================================
   ENCABEZADOS Y RESUMEN
========================================= */

.welcome-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin: 28px 0 20px;
}

.welcome-row h3 {
    font-size: 28px;
}

.welcome-row p {
    color: var(--muted);
    font-size: 12px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 22px;
}

.stat-card {
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 11px;
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.stat-card strong {
    display: block;
    margin: 7px 0 3px;
    color: var(--brown);
    font-family: 'Cormorant Garamond', serif;
    font-size: 35px;
    font-weight: 600;
}

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

.panel {
    padding: 24px;
    margin: 19px 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.panel h3 {
    margin-bottom: 7px;
    font-size: 26px;
}

.panel > p {
    color: var(--muted);
    font-size: 12px;
}

/* =========================================
   TABLAS DE PEDIDOS
========================================= */

.table-wrap {
    width: 100%;
    margin-top: 18px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 12px;
}

th {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
}

td {
    padding: 15px 10px;
    border-bottom: 1px solid #F2EAE6;
    color: #665653;
}

tbody tr {
    cursor: pointer;
    transition: 0.15s ease;
}

tbody tr:hover {
    background: var(--soft);
}

td strong,
td small {
    display: block;
}

td strong {
    color: var(--brown);
    font-weight: 600;
}

td small {
    margin-top: 3px;
    font-size: 10px;
}

/* =========================================
   FORMULARIOS
========================================= */

.form-panel {
    max-width: 900px;
    margin: 30px auto;
}

.form-panel h3 {
    font-size: 31px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 25px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: #806D68;
    font-size: 11px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #E8DCD6;
    border-radius: 7px;
    background: var(--white);
    color: var(--brown);
    font-size: 12px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--rose);
    outline: none;
}

.field textarea {
    resize: vertical;
}

.field.wide {
    grid-column: 1 / -1;
}

.form-footer {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 5px;
}

/* =========================================
   DETALLE Y SEGUIMIENTO
========================================= */

.back-link {
    margin: 17px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--rose);
    font-size: 12px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.detail-grid .panel {
    margin-top: 0;
}

.timeline {
    margin: 23px 0;
}

.timeline-item {
    position: relative;
    display: flex;
    gap: 12px;
    padding-bottom: 21px;
}

.timeline-item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 16px;
    left: 7px;
    width: 1px;
    height: calc(100% - 16px);
    background: var(--beige);
}

.timeline-dot {
    position: relative;
    z-index: 1;
    width: 15px;
    height: 15px;
    min-width: 15px;
    border: 2px solid var(--beige);
    border-radius: 50%;
    background: var(--white);
}

.timeline-item.done .timeline-dot {
    border-color: var(--green);
    background: var(--green);
}

.timeline-item strong {
    display: block;
    font-size: 12px;
    font-weight: 500;
}

.timeline-item small {
    display: block;
    margin-top: 3px;
    font-size: 10px;
}

.detail-grid .panel > p {
    margin: 8px 0;
}

/* =========================================
   AGENDA Y EVENTOS
========================================= */

.event-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 14px 0;
    border-bottom: 1px solid #F1E8E4;
    font-size: 12px;
}

.event-row strong {
    color: var(--brown);
}

.event-row span,
.event-row small {
    color: var(--muted);
    font-size: 11px;
}

.event-row small {
    display: block;
}

/* =========================================
   PIE DE PÁGINA
========================================= */

.footer {
    padding: 28px 0 10px;
    color: #A99590;
    text-align: center;
    font-size: 10px;
}

/* =========================================
   DISEÑO RESPONSIVE
========================================= */

@media (max-width: 1000px) {
    .main {
        padding: 25px;
    }

    .sidebar {
        width: 220px;
        min-width: 220px;
    }

    .main {
        width: calc(100% - 220px);
        margin-left: 220px;
    }

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

@media (max-width: 700px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        position: relative;
        width: 100%;
        min-width: 0;
        padding: 13px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .brand {
        padding: 0 5px 12px;
    }

    .profile-chip {
        margin-bottom: 10px;
    }

    .sidebar nav {
        display: flex;
        gap: 5px;
        overflow-x: auto;
    }

    .sidebar nav button {
        width: auto;
        white-space: nowrap;
        padding: 10px;
        font-size: 11px;
    }

    .sidebar-bottom {
        display: none;
    }

    .main {
        width: 100%;
        margin: 0;
        padding: 19px 14px;
    }

    .topbar h2 {
        font-size: 28px;
    }

    .welcome-row {
        align-items: flex-start;
    }

    .welcome-row h3 {
        font-size: 24px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 9px;
    }

    .stat-card {
        padding: 13px;
    }

    .stat-card strong {
        font-size: 29px;
    }

    .panel {
        padding: 16px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .field.wide,
    .form-footer {
        grid-column: 1;
    }

    .form-footer {
        flex-wrap: wrap;
    }

    .login-card {
        padding: 35px 22px;
    }

    .login-card h1 {
        font-size: 35px;
    }

    .table-wrap table {
        min-width: 650px;
    }

    .event-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 380px) {
    .welcome-row {
        flex-direction: column;
    }

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


/* Panel de declaración de seña */
.deposit-panel {
    margin-top: 24px;
    padding: 24px;
    background: #F8F1EC;
    border: 1px solid #E8D5CF;
    border-radius: 14px;
}

.deposit-panel h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #3A2E2E;
    font-family: "Cormorant Garamond", serif;
    font-size: 26px;
}

.deposit-panel > p {
    color: #6B5B57;
    line-height: 1.6;
}

.deposit-amount {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 20px 0;
    padding: 18px;
    background: #FFFFFF;
    border: 1px solid #E8D5CF;
    border-left: 4px solid #B08D57;
    border-radius: 10px;
}

.deposit-amount span {
    color: #6B5B57;
    font-size: 13px;
}

.deposit-amount strong {
    color: #3A2E2E;
    font-size: 28px;
    font-weight: 600;
}

.deposit-panel .field {
    margin-bottom: 16px;
}

.deposit-panel .deposit-note {
    margin-bottom: 0;
    font-size: 13px;
    color: #6E8B74;
}
