/* ─── RESET & BASE ─── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url('../images/landingbg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #1a2b3c;
    color: #1d2733;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(8, 14, 24, 0.76), rgba(8, 14, 24, 0.42) 48%, rgba(8, 14, 24, 0.24)),
        rgba(12, 18, 28, 0.12);
    z-index: -1;
}

/* ─── MAIN CONTAINER ─── */
.container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    width: 100%;
    padding: 40px;
    gap: 40px;
    /* No background – completely transparent */
}

/* ─── LEFT SIDE: BRAND (Centered) ─── */
.brand {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;      /* ← CENTERS EVERYTHING HORIZONTALLY */
    justify-content: center;
    text-align: center;       /* ← CENTERS THE TEXT */
    color: #fff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.55);
}

.brand .logo {
    max-width: 140px;          /* slightly bigger */
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 15px rgba(0,0,0,0.6));
}

.brand h1 {
    font-size: clamp(2.25rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.1;
}

.brand h1 span {
    font-weight: 500;
    display: block;
    margin-top: 4px;
    font-size: 0.58em;
    opacity: 0.92;
}

.brand .decorative-line {
    width: 70px;
    height: 4px;
    background: #c9a96e;
    margin: 20px auto;        /* ← CENTERED */
    border-radius: 2px;
}

.brand .subtitle {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.7;
    max-width: 85%;
    margin: 0 auto;           /* ← CENTERED */
    font-weight: 400;
}

/* ─── RIGHT SIDE: FLOATING SIGN-IN CARD ─── */
.form-wrapper {
    width: 420px;
    max-width: 100%;
    padding: 42px 38px 34px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    flex-shrink: 0;
}

.form-wrapper h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a2b3c;
    margin-bottom: 4px;
}

.form-wrapper .form-subtitle {
    color: #888;
    font-size: 0.95rem;
    margin-bottom: 30px;
}

/* ─── FORM FIELDS ─── */
.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid #d9dee7;
    border-radius: 10px;
    font-size: 0.98rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    background: #fbfcfe;
    color: #1d2733;
}

.form-group input:focus {
    outline: none;
    border-color: #c9a96e;
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.2);
    background: #fff;
}

/* ─── SIGN IN BUTTON ─── */
.btn-signin {
    width: 100%;
    padding: 14px;
    background: #e98a15;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.02rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    margin-top: 8px;
}

.btn-signin:hover {
    background: #cf760a;
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(207, 118, 10, 0.28);
}

/* ─── FORGOT PASSWORD ─── */
.forgot-password {
    text-align: center;
    margin-top: 15px;
}

.forgot-password a {
    color: #888;
    font-size: 0.85rem;
    text-decoration: none;
    transition: 0.3s;
}

.forgot-password a:hover {
    color: #c9a96e;
    text-decoration: underline;
}

/* ─── FOOTER TEXT ─── */
.footer-text {
    font-size: 0.75rem;
    color: #aaa;
    text-align: center;
    margin-top: 28px;
    line-height: 1.5;
}

.footer-text strong {
    color: #1a2b3c;
}

/* ─── ERROR NOTIFICATION ─── */
.error-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    background: #d32f2f;
    color: #fff;
    padding: 14px 30px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    min-width: 350px;
    max-width: 90%;
    animation: slideDown 0.4s ease;
}

.error-notification .error-content {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
}

.error-notification .error-icon {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.error-notification .error-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.8;
    padding: 0 8px;
}

.error-notification .error-close:hover {
    opacity: 1;
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* ─── MODAL OVERLAY ─── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 10, 18, 0.58);
    z-index: 1500;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(6px);
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    background: #fff;
    width: 450px;
    max-width: 95%;
    max-height: 90vh;
    border-radius: 14px;
    padding: 30px 35px;
    overflow-y: auto;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    animation: fadeInScale 0.25s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1a2b3c;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #888;
    transition: 0.2s;
    padding: 0 8px;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 0 2px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.modal-footer button {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s;
    border: none;
}

.btn-cancel {
    background: transparent;
    color: #888;
}

.btn-cancel:hover {
    color: #333;
    background: #f5f5f5;
}

.btn-save {
    background: #c9a96e;
    color: #fff;
}

.btn-save:hover {
    background: #b8975a;
    transform: translateY(-1px);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
    .container {
        padding-inline: 0;
    }

    .brand {
        padding-inline: 20px;
    }
}

@media (max-width: 850px) {
    .container {
        flex-direction: column;
        padding: 20px 0;
        gap: 30px;
    }
    .brand {
        width: 100%;
        padding: 0 20px;
    }
    .brand .subtitle {
        max-width: 100%;
    }
    .form-wrapper {
        width: 100%;
        padding: 30px 25px;
        border-radius: 0;
    }
    .error-notification {
        min-width: auto;
        width: 90%;
        top: 15px;
        padding: 12px 18px;
    }
}

/* Keep stacked landing content anchored within short phone and tablet viewports. */
@media (max-width: 850px) and (max-height: 850px),
       (max-width: 600px) {
    body {
        align-items: flex-start;
        overflow-y: auto;
    }

    .container {
        padding-top: max(20px, env(safe-area-inset-top));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}
