:root {
    font-family: Arial, sans-serif;
    color: #18314f;
    background: #f4f7fb;
}

body {
    margin: 0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: #005a8d;
    color: white;
}

    .topbar a {
        color: white;
        text-decoration: none;
        margin-left: 14px;
    }

.brand {
    font-weight: 700;
    font-size: 20px;
    margin-left: 0 !important;
}

.container {
    max-width: 1100px;
    margin: 24px auto;
    padding: 0 16px;
}

.grid.two {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.card,
.credential {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    padding: 24px;
}

.narrow {
    max-width: 480px;
    margin: auto;
}

label {
    display: block;
    font-weight: 600;
    margin-top: 12px;
}

input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #ccd6e0;
    border-radius: 8px;
    margin-top: 4px;
}

button,
.button {
    display: inline-block;
    background: #005a8d;
    color: white;
    padding: 10px 16px;
    border: 0;
    border-radius: 8px;
    margin-top: 16px;
    text-decoration: none;
    cursor: pointer;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    border-bottom: 1px solid #e3e8ef;
    padding: 10px;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

    .alert.error {
        background: #ffe5e5;
        color: #842029;
    }

    .alert.info {
        background: #e7f3ff;
        color: #084298;
    }

.details {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 10px;
}

dt {
    font-weight: 700;
}

/* TARJETA */

.credential-card {
    width: 930px;
    max-width: 100%;
    aspect-ratio: 1.586;
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,.20);
    background: white;
    text-align:left;
}

.credential-background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.credential-sidebar {
    position: absolute;
    left: 0;
    top: 0;
    width: 72px;
    height: 100%;
    background: #2f2b6d;
    z-index: 2;
    overflow: visible;
}

    .credential-sidebar span {
        position: absolute;
        left: 55px;
        top: 50%;
        transform: translateY(-50%) rotate(180deg);
        writing-mode: vertical-rl;
        color: #cfc9e8;
        opacity: .95;
        font-size: 72px;
        font-weight: 900;
        letter-spacing: 2px;
        line-height: 1;
    }

/* CONTENIDO */

.credential-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    padding: 0 60px 0 120px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #132b56;
    text-transform: uppercase;
}

.credential-row {
    display: grid;
    grid-template-columns: 1.2fr 1.2fr 1.1fr;
    align-items: center;
    font-size: 34px;
    font-weight: 700;
}

/*.credential-name {
    font-size: 38px;
    font-weight: 800;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 10px;
}*/

.credential-name {
    font-size: 38px;
    font-weight: 800;
    color: #111;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* VALIDACIONES */

.required {
    color: #c62828;
    font-weight: 900;
}

.field-error {
    display: block;
    color: #c62828;
    font-size: 13px;
    margin-top: -14px;
    margin-bottom: 12px;
}
