/* ── Auth pages (account/sign_in, sign_up, forgot_password, …) ────────────── */
/* Two equal panes: brand/title on the left, form on the right.               */

body.auth-body {
    padding: 0;
    margin: 0;
    background: #fff;
    color: #555;
}

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

/* ── Left pane ────────────────────────────────────────────────────────────── */
.auth-brand {
    flex: 0 0 50%;
    max-width: 50%;
    height: 100vh;
    position: sticky;
    top: 0;
    /* Equal rows above and below keep the copy at the true centre of the pane,
       level with the form, whatever the logo and footer heights are. */
    display: grid;
    grid-template-rows: 1fr auto 1fr;
    padding: 36px 56px;
    color: #fff;
    background-color: #1b1c2e;
    background-image:
        radial-gradient(circle at 12% 88%, rgba(46, 48, 148, 0.65), transparent 55%),
        radial-gradient(circle at 92% 8%, rgba(46, 48, 148, 0.35), transparent 45%);
    overflow: hidden;
}

.auth-brand-logo {
    display: block;
    align-self: start;
    justify-self: start;
}

/* agendali.png has transparent padding around the artwork; the negative
   margins trim it so the logo's visible edge lines up with the copy below. */
.auth-brand-logo img {
    display: block;
    height: 54px;
    width: auto;
    margin: -7px 0 -7px -5px;
}

.auth-brand-copy {
    align-self: center;
    max-width: 460px;
}

.auth-brand-copy h1 {
    font-size: 38px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    margin: 0 0 14px 0;
}

.auth-brand-copy p {
    font-size: 15px;
    line-height: 1.65;
    color: #a9abc6;
    margin: 0;
}

.auth-brand-foot {
    align-self: end;
    font-size: 12px;
    color: #7b7d9b;
}

/* ── Right pane ───────────────────────────────────────────────────────────── */
.auth-panel {
    flex: 0 0 50%;
    max-width: 50%;
    display: flex;
    padding: 48px 32px;
    background: #fff;
}

.auth-panel-inner {
    width: 100%;
    max-width: 400px;
    margin: auto;
}

.auth-panel-inner.auth-panel-wide {
    max-width: 480px;
}

.auth-panel a {
    color: #2e3094;
    font-weight: 600;
}

.auth-panel a:hover,
.auth-panel a:focus {
    color: #252880;
    text-decoration: underline;
}

/* Fields */
.auth-field {
    margin-bottom: 18px;
}

.auth-row {
    display: flex;
    gap: 14px;
}

.auth-row > .auth-field {
    flex: 1 1 0;
    min-width: 0;
}

/* Last field + submit, with a link on the label's right (e.g. "Forgot
   password?"). The link comes last in the markup so Tab goes field -> submit
   -> link, and the grid lifts it back up beside the label. */
.auth-field-link {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
}

.auth-field-link > .auth-password {
    grid-row: 2;
    grid-column: 1 / -1;
}

.auth-field-link > .auth-actions {
    grid-row: 3;
    grid-column: 1 / -1;
}

.auth-field-link > a {
    grid-row: 1;
    grid-column: 2;
    font-size: 12.5px;
}

.auth-panel .auth-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1b1c2e;
    margin: 0 0 6px 0;
}

.auth-panel .auth-input {
    display: block;
    width: 100%;
    height: 42px;
    padding: 9px 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background: #fff;
    border: 1px solid #e2e4ed;
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}

.auth-panel .auth-input::placeholder {
    color: #b3b6c6;
}

.auth-panel .auth-input:focus {
    border-color: #2e3094 !important;
    border-bottom-width: 1px !important;
    box-shadow: 0 0 0 3px rgba(46, 48, 148, 0.12) !important;
}

.auth-panel select.auth-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 34px;
    background-image: linear-gradient(45deg, transparent 50%, #888 50%), linear-gradient(135deg, #888 50%, transparent 50%);
    background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

/* Password show/hide */
.auth-password {
    position: relative;
}

.auth-password .auth-input {
    padding-right: 42px;
}

.auth-password .toggle-password {
    position: absolute;
    top: 21px;
    right: 14px;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 15px;
    color: #bbb;
    transition: color 0.2s;
}

.auth-password .toggle-password:hover {
    color: #2e3094;
}

/* Inline validation */
.auth-panel .help-block {
    margin: 6px 0 0 0;
    font-size: 12.5px;
    color: #c62828;
    background: none;
}

.auth-panel .help-block:empty {
    display: none;
}

.auth-panel .help-block p {
    margin: 0;
}

.auth-panel .help-block .list-group {
    margin: 0;
    background: none;
}

.auth-panel .help-block .list-group-item {
    padding: 2px 0;
    border: none;
    background: none;
    color: #c62828;
}

/* Buttons */
.auth-panel .btn.auth-btn,
.auth-panel .btn.auth-btn:hover,
.auth-panel .btn.auth-btn:focus {
    display: block;
    width: 100%;
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: #fff !important;
    background: #2e3094 !important;
    border: 1px solid #2e3094 !important;
    border-radius: 6px;
    box-shadow: none !important;
    text-decoration: none;
    transition: background 0.2s;
}

.auth-panel .btn.auth-btn:hover,
.auth-panel .btn.auth-btn:focus {
    background: #252880 !important;
    border-color: #252880 !important;
}

.auth-actions {
    margin-top: 26px;
}

.auth-alt {
    margin: 18px 0 0 0;
    font-size: 13px;
    color: #888;
    text-align: center;
}

/* Alerts */
.auth-panel .alert {
    padding: 11px 14px;
    margin-bottom: 18px;
    font-size: 13px;
    line-height: 1.5;
    border-radius: 8px;
    box-shadow: none;
}

.auth-panel .alert-danger {
    color: #c62828;
    background: #fdecea;
    border: 1px solid #f7cfcb;
}

.auth-panel .alert-success {
    color: #2e7d32;
    background: #e8f5e9;
    border: 1px solid #cde8cf;
}

/* Terms checkbox */
.auth-check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    color: #555;
    cursor: pointer;
}

.auth-check input[type=checkbox] {
    flex-shrink: 0;
    margin: 3px 0 0 0;
}

/* Message-only pages (success, already registered, …) */
.auth-message-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #eef0fb;
    color: #2e3094;
    font-size: 21px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.auth-message p {
    font-size: 14px;
    line-height: 1.65;
    color: #555;
    margin: 0 0 12px 0;
}

.auth-message .auth-actions {
    margin-top: 24px;
}

/* ── Stacked on small screens ─────────────────────────────────────────────── */
/* No split here, so the brand pane drops its dark background and becomes a    */
/* plain heading above the form. Heading + form are centred on the page as one */
/* block; the logo is pinned to the corner, with equal shell padding top and   */
/* bottom reserving its space so the centre is the true page centre.           */
@media (max-width: 900px) {
    .auth-shell {
        position: relative;
        flex-direction: column;
        justify-content: center;
        padding: 88px 0;
    }

    .auth-brand,
    .auth-panel {
        flex: 0 0 auto;
        max-width: 100%;
    }

    .auth-brand {
        display: block;
        height: auto;
        position: static;
        padding: 0 24px;
        color: #1b1c2e;
        background: #fff;
    }

    .auth-brand-logo {
        position: absolute;
        top: 24px;
        left: 24px;
    }

    .auth-brand-logo img {
        height: 36px;
        margin: 0;
    }

    /* Same column as .auth-panel-inner, so the title sits flush above the form */
    .auth-brand-copy {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .auth-shell-wide .auth-brand-copy {
        max-width: 480px;
    }

    .auth-brand-copy h1 {
        font-size: 26px;
        color: #1b1c2e;
        margin-bottom: 6px;
    }

    .auth-brand-copy p {
        font-size: 13.5px;
        color: #888;
    }

    .auth-brand-foot {
        display: none;
    }

    .auth-panel {
        padding: 28px 24px 0;
    }

    .auth-panel-inner {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .auth-row {
        display: block;
    }
}
