/* Shared look for login, register, forgot/reset password and 2FA.
   Loaded after the page's own CSS so it wins. */
:root {
    --auth-green: #2c7744;
    --auth-brown: #5a3f37;
    --auth-radius: 18px;
}

html, body {
    font-family: "Poppins", Arial, sans-serif;
}

body {
    min-height: 100vh;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    background: #1d221e;
}

/* Darken the photo so the card stays readable. */
.background-image {
    filter: brightness(.65);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(ellipse at top, rgba(44, 119, 68, .25), transparent 60%),
                linear-gradient(180deg, rgba(0, 0, 0, .15), rgba(0, 0, 0, .45));
    pointer-events: none;
}

.container {
    height: auto;
    min-height: 100vh;
    padding: 24px 16px 32px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.container > .text-center {
    width: 100%;
    max-width: 460px;
}

.container > .text-center:has(.registeri) {
    max-width: 760px;
}

.logoName {
    display: block;
    max-width: 170px;
    margin: 12px auto 18px !important;
    padding: 0 !important;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .45));
}

/* Glass card */
.card {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .16) !important;
    border-radius: var(--auth-radius);
    background: rgba(18, 22, 19, .55);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
    animation: auth-in .55s cubic-bezier(.22, .61, .36, 1) both;
}

.card-body {
    padding: 32px 30px 26px;
}

.card-title,
.titullilogin,
.titulliregisteri,
.titulliForgotPass,
.titulliResetPass {
    font-family: "Poppins", Arial, sans-serif;
    font-weight: 600;
    font-size: 1.75rem;
    letter-spacing: .2px;
    margin-bottom: 6px;
    padding: 0;
}

.card-title::after {
    content: "";
    display: block;
    width: 44px;
    height: 3px;
    margin: 10px auto 0;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--auth-green), #6fbf73);
}

.card-body p {
    color: rgba(255, 255, 255, .8) !important;
    font-size: .9rem;
}

/* Fields */
.form-group label + br,
.input2 > br {
    display: none;
}

.title h2 {
    font-size: 1.75rem;
}

.form-group,
.registeri {
    font-family: "Poppins", Arial, sans-serif;
}

.form-group {
    padding-bottom: 14px;
}

.inputet {
    height: auto;
    font-size: inherit;
    margin-bottom: 0;
}

.form-group label,
.emailLabel {
    display: block;
    margin-bottom: 6px;
    padding: 0;
    font-size: .8rem;
    font-weight: 500;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .85) !important;
}

.form-control,
#phone_number,
.address-inputs input {
    height: 46px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, .25) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, .95);
    color: #222;
    font-size: .95rem;
    margin-bottom: 0;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.inputet input::placeholder,
.inputetadress input::placeholder,
.form-control::placeholder {
    font-size: .9rem;
    color: #8a8f8b;
}

.form-control:focus,
#phone_number:focus {
    outline: 0;
    border-color: var(--auth-green) !important;
    box-shadow: 0 0 0 .22rem rgba(44, 119, 68, .35);
}

.form-control.is-invalid {
    border-color: #dc3545 !important;
}

.address-inputs {
    gap: 8px;
}

.address-inputs .me-1 {
    margin-right: 0 !important;
}

.address-inputs + .address-inputs {
    margin-top: 8px;
}

.iti {
    width: 100%;
}

#phone_number {
    width: 100%;
}

/* Primary button */
.card .btn-success,
.card .btn-primary {
    display: block;
    width: 100%;
    height: 48px;
    margin-top: 10px !important;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--auth-green), #3f9a5c);
    box-shadow: 0 8px 20px rgba(44, 119, 68, .4);
    font-weight: 600;
    letter-spacing: .4px;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.card .btn-success:hover,
.card .btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.07);
    box-shadow: 0 12px 26px rgba(44, 119, 68, .5);
}

.card .btn-success:disabled {
    transform: none;
    filter: grayscale(.4);
}

.card .btn-link {
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
    font-size: .88rem;
}

/* Small links under the form */
.register,
.logini,
.form-group.text-center {
    font-size: .88rem;
    color: rgba(255, 255, 255, .8);
    padding-top: 6px;
    padding-bottom: 4px;
}

.register a,
.logini a,
.form-group a,
.card-body a {
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, .4);
    transition: border-color .2s ease;
}

.register a:hover,
.logini a:hover,
.form-group a:hover,
.card-body a:hover {
    color: #fff;
    border-bottom-color: #fff;
}

.timerDisplay {
    max-width: none;
    color: rgba(255, 255, 255, .85);
}

.text-warning {
    color: #ffd27a !important;
    font-size: .8rem;
    margin-top: 4px;
}

.alert {
    border-radius: 10px;
}

/* Legal links + credit below the card */
.law {
    margin-top: 18px;
    font-size: .85rem;
}

.law > a {
    margin: 0 8px;
    color: rgba(255, 255, 255, .85) !important;
    text-decoration: none;
}

.law > a:hover {
    color: #fff !important;
    text-decoration: underline;
}

@keyframes auth-in {
    from { opacity: 0; transform: translateY(18px) scale(.98); }
    to { opacity: 1; transform: none; }
}

/* Register: two columns on desktop. */
@media (min-width: 700px) {
    .dyinputet {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 22px;
    }

    .input1 {
        padding-right: 0;
    }

}

@media (max-width: 699.98px) {
    .registeri {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .container {
        padding-top: 12px;
    }

    .card-body {
        padding: 24px 18px 20px;
    }

    .logoName {
        max-width: 140px;
    }

    .card-title {
        font-size: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .card {
        animation: none;
    }
}
