/*
 * tpl_dnd5e — Login, registrazione e recupero account
 */

body.dnd-auth-body .dnd-shell-main {
    padding-top: 0;
    padding-bottom: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

body.dnd-auth-body .dnd-main {
    flex: 1;
    display: flex;
    align-items: stretch;
    min-height: calc(100vh - 72px);
}

body.dnd-auth-body .dnd-content-col {
    display: flex;
    flex: 1;
    width: 100%;
}

body.dnd-auth-body .dnd-component {
    flex: 1;
    display: flex;
    width: 100%;
}

body.dnd-auth-body .dnd-footer {
    margin-top: auto;
}

body.dnd-auth-body .dnd-aside,
body.dnd-auth-body .dnd-hero-pos,
body.dnd-auth-body .dnd-content-top,
body.dnd-auth-body .dnd-content-bottom,
body.dnd-auth-body .dnd-bottom {
    display: none !important;
}

/* Layout a due pannelli */
.dnd-auth {
    --auth-panel: #1a1210;
    --auth-border: rgba(201, 162, 39, .35);
    flex: 1;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(280px, 42%) 1fr;
    min-height: calc(100vh - 72px);
}

.dnd-auth-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 3rem 2.5rem;
    background:
        radial-gradient(ellipse 90% 70% at 50% 0%, rgba(201, 162, 39, .18), transparent 65%),
        radial-gradient(ellipse 60% 50% at 100% 100%, rgba(123, 17, 19, .35), transparent),
        linear-gradient(165deg, #1f1611 0%, #120909 55%, #0a0808 100%);
    border-right: 1px solid var(--auth-border);
    overflow: hidden;
}

.dnd-auth-aside::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Ccircle cx='40' cy='40' r='1.2' fill='%23c9a227' opacity='.07'/%3E%3C/svg%3E");
    pointer-events: none;
}

.dnd-auth-aside > * {
    position: relative;
    z-index: 1;
}

.dnd-auth-logo {
    width: clamp(100px, 14vw, 140px);
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 8px 24px rgba(201, 162, 39, .4));
}

.dnd-auth-aside h1 {
    margin: 0 0 .75rem;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: .03em;
    background: linear-gradient(180deg, #fff8dc, #c9a227);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.dnd-auth-aside p {
    margin: 0;
    max-width: 320px;
    color: #c4b896;
    font-size: 1.02rem;
    line-height: 1.65;
}

.dnd-auth-badge {
    display: inline-block;
    margin-bottom: 1.25rem;
    padding: .35rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(201, 162, 39, .45);
    background: rgba(201, 162, 39, .1);
    color: #c9a227;
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.dnd-auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem clamp(1.25rem, 4vw, 3.5rem);
    background: linear-gradient(180deg, rgba(16, 11, 10, .6), rgba(10, 8, 8, .85));
}

.dnd-auth-card {
    width: 100%;
    max-width: 440px;
    background: linear-gradient(180deg, #231812, #150f0c);
    border: 1px solid var(--auth-border);
    border-radius: 18px;
    padding: clamp(1.75rem, 3vw, 2.25rem);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

.dnd-auth-card h2 {
    margin: 0 0 .35rem;
    font-size: 1.65rem;
    font-weight: 800;
    color: #f6e8b1;
}

.dnd-auth-card .dnd-auth-lead {
    margin: 0 0 1.75rem;
    color: #b9ad8f;
    font-size: .95rem;
    line-height: 1.55;
}

/* Form Joomla / Bootstrap */
.dnd-auth-card .form-label,
.dnd-auth-card label,
.dnd-auth-card legend {
    color: #e8ddc4 !important;
    font-weight: 600;
    font-size: .88rem;
    margin-bottom: .35rem;
}

.dnd-auth-card legend {
    font-size: 1rem;
    color: #f6e8b1 !important;
    border-bottom: 1px solid rgba(201, 162, 39, .2);
    padding-bottom: .5rem;
    margin-bottom: 1rem;
    width: 100%;
}

.dnd-auth-card fieldset {
    border: 0;
    padding: 0;
    margin: 0 0 1.25rem;
}

.dnd-auth-card .control-group,
.dnd-auth-card .mb-3,
.dnd-auth-card .form-group {
    margin-bottom: 1.1rem;
}

.dnd-auth-card .form-control,
.dnd-auth-card input[type="text"],
.dnd-auth-card input[type="email"],
.dnd-auth-card input[type="password"],
.dnd-auth-card input[type="tel"],
.dnd-auth-card select,
.dnd-auth-card textarea {
    width: 100%;
    padding: .75rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(201, 162, 39, .28);
    background: rgba(0, 0, 0, .35);
    color: #f3ead4;
    font-size: 1rem;
    transition: border-color .15s, box-shadow .15s;
}

.dnd-auth-card .form-control:focus,
.dnd-auth-card input:focus,
.dnd-auth-card select:focus,
.dnd-auth-card textarea:focus {
    outline: none;
    border-color: #c9a227;
    box-shadow: 0 0 0 3px rgba(201, 162, 39, .18);
    background: rgba(0, 0, 0, .5);
    color: #fff;
}

.dnd-auth-card .form-control::placeholder {
    color: #7a7060;
}

.dnd-auth-card .form-check-input {
    background-color: rgba(0, 0, 0, .4);
    border-color: rgba(201, 162, 39, .4);
}

.dnd-auth-card .form-check-input:checked {
    background-color: #c9a227;
    border-color: #c9a227;
}

.dnd-auth-card .form-check-label {
    color: #c4b896 !important;
    font-weight: 500;
}

.dnd-auth-card .invalid-feedback,
.dnd-auth-card .form-text,
.dnd-auth-card small.text-muted {
    color: #a89878 !important;
    font-size: .82rem;
}

.dnd-auth-card .btn-primary,
.dnd-auth-card button[type="submit"].btn-primary,
.dnd-auth-card .com-users-registration__register {
    width: 100%;
    margin-top: .5rem;
    padding: .85rem 1.25rem;
    border-radius: 10px;
    border: 2px solid #a3201f;
    background: linear-gradient(180deg, #9b1a1c, #7b1113);
    color: #fff !important;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: .03em;
    box-shadow: 0 4px 18px rgba(123, 17, 19, .4);
    transition: transform .15s, box-shadow .15s;
}

.dnd-auth-card .btn-primary:hover,
.dnd-auth-card button[type="submit"].btn-primary:hover {
    background: linear-gradient(180deg, #b52224, #8f1416);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(123, 17, 19, .5);
    color: #fff !important;
}

.dnd-auth-card .btn-secondary {
    width: 100%;
    margin-top: .5rem;
    border-radius: 10px;
    border: 1px solid rgba(201, 162, 39, .35);
    background: transparent;
    color: #c9a227 !important;
}

.dnd-auth-links {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(201, 162, 39, .15);
}

.dnd-auth-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .7rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .06);
    background: rgba(0, 0, 0, .2);
    color: #e8ddc4;
    font-size: .92rem;
    font-weight: 600;
    transition: .15s;
}

.dnd-auth-links a:hover {
    border-color: rgba(201, 162, 39, .4);
    background: rgba(201, 162, 39, .08);
    color: #f6e8b1;
}

.dnd-auth-links a.dnd-auth-link-accent {
    border-color: rgba(201, 162, 39, .35);
    color: #c9a227;
}

.dnd-auth-links a::after {
    content: "→";
    opacity: .6;
}

.dnd-auth-back {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: 1.25rem;
    color: #b9ad8f;
    font-size: .88rem;
}

.dnd-auth-back:hover {
    color: #f6e8b1;
}

/* Nascondi elementi Joomla default brutti */
.dnd-auth-card .well,
.dnd-auth-card .list-group,
.dnd-auth-card .page-header {
    all: unset;
    display: block;
}

.dnd-auth-card .page-header h1 {
    display: none;
}

.dnd-auth-card .com-users-login__options {
    display: none;
}

/* Registrazione: fieldset più compatti */
.dnd-auth-register .dnd-auth-card {
    max-width: 520px;
}

.dnd-auth-register fieldset + fieldset {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(201, 162, 39, .12);
}

@media (max-width: 900px) {
    .dnd-auth {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .dnd-auth-aside {
        border-right: 0;
        border-bottom: 1px solid var(--auth-border);
        padding: 2rem 1.5rem;
    }

    .dnd-auth-aside h1 {
        font-size: 1.45rem;
    }

    .dnd-auth-logo {
        width: 88px;
        margin-bottom: 1rem;
    }

    .dnd-auth-panel {
        padding: 1.75rem 1.15rem 2.5rem;
    }
}

@media (min-width: 901px) {
    body.dnd-auth-body .dnd-header {
        position: relative;
    }
}
