/* =========================
   Medieval Times – Portal UI
   File: /Mltms.css
   ========================= */

:root {
    --gold: #f4c542;
    --gold-600: #e3b21a;
    --ink: #1f2937;
    --ink-2: #374151;
    --bg: #fafafa;
    --card: #ffffff;
    --line: #e5e7eb;
    --muted: #6b7280;
}

* {
    box-sizing: border-box
}

html, body {
    height: 100%
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.45 "Segoe UI",system-ui,-apple-system,Arial,sans-serif;
}

a {
    color: inherit;
    text-decoration: none
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px
}

.sr-only {
    position: absolute;
    left: -9999px
}

/* ============ HEADER ============ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: linear-gradient(#fff,#fffdf7);
    border-bottom: 4px solid var(--gold);
    box-shadow: 0 4px 14px rgba(0,0,0,.06)
}

.head-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 0
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 190px
}

    .brand img {
        height: 56px;
        display: block
    }

    .brand .tag {
        font-weight: 700;
        color: var(--muted)
    }

.main-nav {
    margin-left: auto;
    margin-right: auto;
    display: flex;
    gap: 10px
}

.nav-link {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-weight: 600;
    color: var(--ink-2)
}

    .nav-link:hover {
        border-color: var(--gold);
        background: #fff8e1
    }

    .nav-link.active {
        background: var(--gold);
        color: #1a1a1a
    }

/* User menu (Order dropdown) */
.user {
    position: relative;
    display: flex;
    align-items: center
}

.pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    font-weight: 600
}

.chev {
    border: solid var(--ink-2);
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    transform: rotate(45deg);
    transition: .15s
}

.user.open .chev {
    transform: rotate(-135deg)
}

.menu {
    position: absolute;
    right: 0;
    top: 110%;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(0,0,0,.08);
    min-width: 200px;
    padding: 6px;
    display: none
}

.user.open .menu {
    display: block
}

.menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--ink-2)
}

    .menu a:hover {
        background: #fff8e1
    }

/* ============ LAYOUT ============ */
.wrap {
    padding: 28px 0
}

.grid {
    display: grid;
    gap: 14px
}

.cols-3 {
    grid-template-columns: repeat(3,minmax(0,1fr))
}

.cols-2 {
    grid-template-columns: repeat(2,minmax(0,1fr))
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 6px 14px rgba(0,0,0,.04)
}

h1 {
    margin: 0 0 14px;
    font: 700 28px/1.2 Georgia,serif;
    border-bottom: 2px solid var(--gold);
    padding-bottom: 8px
}

h2 {
    margin: 8px 0 10px;
    font: 700 20px/1.2 Georgia,serif
}

.sub {
    color: var(--muted);
    font-size: 14px
}

/* ============ KPI ============ */
.kpi {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3,minmax(0,1fr))
}

    .kpi .tile {
        background: #111827;
        color: #f9fafb;
        border: 1px solid #27272a;
        border-radius: 12px;
        padding: 16px
    }

    .kpi .t {
        font: 600 12px/1.1 "Segoe UI",sans-serif;
        letter-spacing: .5px;
        text-transform: uppercase;
        color: #d1d5db
    }

    .kpi .v {
        margin-top: 6px;
        font: 700 18px/1.1 Georgia,serif
    }

/* ============ TABLE ============ */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: #f9fafb
}

thead th {
    background: #eef2ff;
    color: #111827;
    padding: 10px 12px;
    font-weight: 700;
    text-align: left;
    border-bottom: 1px solid var(--line)
}

tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line)
}

tbody tr:nth-child(odd) td {
    background: #ffffff
}

tbody tr:nth-child(even) td {
    background: #fbfbfd
}

/* ============ FORM & BUTTONS ============ */
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px
}

.field {
    min-width: 230px
}

.label {
    font: 600 13px/1.2 "Segoe UI",sans-serif;
    color: var(--muted);
    margin-bottom: 6px
}

input[type="number"], input[type="text"], input[type="email"], input[type="password"] {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: none
}

input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(244,197,66,.2)
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 600
}

    .btn:hover {
        background: #fff8e1;
        border-color: var(--gold);
    }

    .btn.primary {
        background: var(--gold);
        border-color: var(--gold);
        color: #1a1a1a;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .btn.second {
        background: #fff8e1;
        border-color: var(--gold);
        color: #1a1a1a;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

        .btn.second:hover {
            background: var(--gold);
            border-color: var(--gold);
        }

.hint {
    font-size: 12px;
    color: #b91c1c;
    margin-top: 6px;
    display: none
}

/* ============ FOOTER ============ */
.footer {
    background: #f8f8f8;
    border-top: 2px solid #e5e7eb;
    padding: 20px 0;
    text-align: center;
    margin-top: 40px;
    color: #444;
    font-size: .9rem
}

    .footer .tagline {
        display: block;
        margin-top: 4px;
        color: #777;
        font-size: .8rem
    }

/* ============ UTILITIES ============ */
.mt-hide {
    display: none !important
}

.mt-center {
    text-align: center
}

.mt-right {
    text-align: right
}

.mt-gap-8 {
    gap: 8px
}

.mt-gap-12 {
    gap: 12px
}

.mt-gap-16 {
    gap: 16px
}

.mt-mt-12 {
    margin-top: 12px
}

.mt-mt-18 {
    margin-top: 18px
}

.mt-mb-12 {
    margin-bottom: 12px
}

/* ============ RESPONSIVE ============ */
@media (max-width:900px) {
    .head-bar {
        flex-wrap: wrap
    }

    .main-nav {
        order: 3;
        width: 100%;
        justify-content: center
    }

    .user {
        order: 2;
        margin-left: 0
    }

    .kpi {
        grid-template-columns: 1fr
    }

    .cols-3 {
        grid-template-columns: 1fr
    }

    .cols-2 {
        grid-template-columns: 1fr
    }
}

/* ===== Custom Sign-in Button Style ===== */
input[type="submit"][value="Sign in"],
button[type="submit"] {
    background: var(--gold, #f4c542);
    border: 1px solid var(--gold-600, #e3b21a);
    color: #1a1a1a !important;
    font-weight: 600;
    font-size: 15px;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 3px 6px rgba(0,0,0,0.08);
}

    input[type="submit"][value="Sign in"]:hover,
    button[type="submit"]:hover {
        background: var(--gold-600, #e3b21a);
        border-color: var(--gold-600, #e3b21a);
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0,0,0,0.12);
        cursor: pointer;
    }

/* Para alinear el botón y el link "Forgot your password?" */
.page-login .form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.page-login input[type="submit"][value="Sign in"] {
    order: 1;
}

.page-login .btn-secondary,
.page-login a[href*="PasswordRecovery"] {
    background: transparent;
    border: none;
    color: var(--ink-2, #374151);
    font-weight: 500;
    text-decoration: underline;
    cursor: pointer;
}

/* ====== Login: forzar estilos del botón ====== */
/* Máxima especificidad y !important para ganar a Bootstrap */
.page-login form[action*="SignIn"] input[type="submit"],
.page-login .btn.btn-primary,
.account form input[type="submit"].btn-primary,
form[action*="SignIn"] input[type="submit"].btn,
input[type="submit"][value="Sign in"] {
    background: var(--gold, #f4c542) !important;
    border: 1px solid var(--gold-600, #e3b21a) !important;
    color: #1a1a1a !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    transition: all .2s ease-in-out !important;
    box-shadow: 0 3px 6px rgba(0,0,0,.08) !important;
    line-height: 1.2 !important;
}

    .page-login form[action*="SignIn"] input[type="submit"]:hover,
    .page-login .btn.btn-primary:hover,
    .account form input[type="submit"].btn-primary:hover,
    form[action*="SignIn"] input[type="submit"].btn:hover {
        background: var(--gold-600, #e3b21a) !important;
        border-color: var(--gold-600, #e3b21a) !important;
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0,0,0,.12) !important;
        cursor: pointer;
    }

/* Quitar el estilo oscuro por defecto de Bootstrap en el submit */
.page-login .btn.btn-primary,
.account .btn.btn-primary {
    background-image: none !important;
    text-shadow: none !important;
}

/* ===== Token pages ===== */
:root {
    --brand: var(--gold, #f4c542);
    --brand-600: #b5890f;
    --ink-2: #374151;
    --line: #e5e7eb;
}

/* contenedor principal */
.mt-shell {
    max-width: 980px;
    margin: 28px auto;
    padding: 0 18px
}

/* tarjeta */
.mt-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px 22px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.03)
}

.mt-narrow {
    max-width: 760px;
    margin: 0 auto
}

.mt-sub {
    color: var(--ink-2);
    margin: 8px 0 0
}

/* bullets */
.mt-bullets {
    margin: 16px 0 0 0;
    padding: 0 0 0 18px;
    color: #6b7280
}

    .mt-bullets li {
        margin: 6px 0
    }

/* acciones */
.mt-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px
}

.mt-btn {
    appearance: none;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #111
}

    .mt-btn:hover {
        background: #fafafa
    }

.mt-btn-primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff
}

    .mt-btn-primary:hover {
        background: var(--brand-600);
        border-color: var(--brand-600)
    }

.mt-btn-outline {
    background: transparent;
    border-color: var(--ink-2);
    color: var(--ink-2)
}

    .mt-btn-outline:hover {
        background: #f3f4f6
    }

/* badge/pill */
.mt-pill {
    display: inline-block;
    background: #0f172a;
    color: #fff;
    border-radius: 12px;
    padding: 6px 10px;
    font-size: 12px;
    margin: 8px 0 0;
    border: 1px solid #000;
    opacity: .95
}

/* Título y badge del ORDER ID */
.mt-page-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 8px
}

    .mt-page-title .mt-title {
        font: 700 28px/1.2 Georgia,serif
    }

.mt-order-badge {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .4px;
    padding: 10px 25px;
    border-radius: 999px;
    border: 1px solid var(--line,#e5e7eb);
    background: #fff8e1;
    color: #1f2937;
}

/* Tarjeta de evento (fila Castle / Show date) */
.mt-event .label {
    font: 600 13px/1.2 "Segoe UI",sans-serif;
    color: var(--muted,#6b7280);
    margin-bottom: 4px
}

.mt-event .value {
    font-weight: 600;
    color: #1f2937
}

.mt-section-divider {
    border: none;
    border-top: 2px solid var(--gold,#f4c542);
    margin: 16px 0 10px
}

/* === Typography fix: forzar misma fuente en todos los títulos === */
/* H1 de cabecera y títulos dentro de tarjetas */
h1, .page-title h1, .mt-page-title .mt-title,
.card h2, h2 {
    font-family: Georgia, "Times New Roman", Times, serif !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    color: #111827 !important; /* mismo color que usas en h1/h2 */
}

    /* Si algún h1/h2 viene con clases display-* de Bootstrap */
    h1.display-1, h1.display-2, h1.display-3, h1.display-4,
    h2.display-1, h2.display-2, h2.display-3, h2.display-4 {
        font-family: Georgia, "Times New Roman", Times, serif !important;
        font-weight: 700 !important;
    }

/* Alineación del badge junto al título (opcional, pulido visual) */
.mt-page-title {
    align-items: center;
}

.mt-order-badge {
    line-height: 1;
}

/* ===== Page tools junto al título ===== */
.mt-page-title {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: space-between;
}

.mt-page-tools .btn {
    padding: 8px 12px;
}

/* Responsive: apila título + herramientas */
@media (max-width: 640px) {
    .mt-page-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ===== Terms: evitar botones “full width” y alinear ===== */
#btnPdf, #btnAccept {
    width: auto !important;
    display: inline-flex !important;
}

/* Fila de términos: checkbox a la izquierda, botón a la derecha */
.row.mt-align-center {
    align-items: center;
    justify-content: space-between;
}

.mt-terms-ck {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Por si el tema añade .btn-block en algún flujo */
#btnPdf.btn-block, #btnAccept.btn-block {
    display: inline-flex !important;
    width: auto !important;
}

/* Spinner pequeño para acciones inline */
.mt-spin {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,.15);
    border-top-color: rgba(0,0,0,.55);
    display: inline-block;
    vertical-align: middle;
    animation: mtspin .7s linear infinite;
    margin-left: 8px;
}

@keyframes mtspin {
    to {
        transform: rotate(360deg);
    }
}

/* Estado de carga del botón */
.mt-loading {
    opacity: .75;
    pointer-events: none;
}

/* opcional, deja el input gris cuando es de solo lectura en modo total */
.is-readonly {
    background: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

.status-tag {
    text-align: center;
    font-weight: bold;
    font-size: 1rem;
    color: #fff;
}

.status-paid {
    background-color: #ECFDF5;
    border-radius: 6px;
    border-color: #A7F3D0;
    padding: 10px 25px;
    width: 300px;
    color: #065F46;
}

.status-partial {
    background-color: #FFFBEB;
    border-radius: 6px;
    border-color: #FDE68A;
    padding: 10px 25px;
    width: 300px;
    color: #92400E;
}

.status-unpaid {
    background-color: #FEF2F2;
    border-radius: 6px;
    border-color: #FCA5A5;
    padding: 10px 25px;
    width: 300px;
    color: #7F1D1D;
}


.mt-order-badge {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .4px;
    padding: 10px 25px;
    border-radius: 999px;
    border: 1px solid var(--line,#e5e7eb);
    background: #fff8e1;
    color: #1f2937;
}

.status-pending {
    color: #92400e;
    background: #fef3c7;
    padding: 6px 10px;
    border-radius: 4px;
}

.payment-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    width: 100%;
    flex-wrap: nowrap;
}

.amount-container {
    display: flex;
    align-items: center;
    min-width: 200px;
    flex: 1 0 200px;
    position: relative;
}

    .amount-container .currency {
        position: absolute;
        left: 20px;
        top: 50%;
        transform: translateY(-50%);
        font-weight: 600;
        pointer-events: none;
    }

    .amount-container input {
        padding-left: 30px;
        text-align: right;
        width: 100%;
    }

.payment-row .btn.primary {
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 200px;
    width: 50%;
}

@media (max-width: 480px) {
    .payment-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .amount-container {
        min-width: auto;
    }
}

.toggle-btn {
    width: 26px;
    height: 26px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    color: #495057;
    line-height: 1;
}

    .toggle-btn:hover,
    .toggle-btn:focus {
        color: #495057 !important;
        background-color: #e9ecef;
        border-color: #ced4da;
    }

.desc-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.short-desc {
    line-height: 1.3;
}