/* =========================================================
   GENERAL STYLES
========================================================= */

@import url('tokens.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* BRAND - Harmonized to canonical LPENHS tokens */
    --primary-green: var(--brand-primary, #155b2a);
    --secondary-green: var(--brand-primary-dark, #0d3f1d);
    --light-green: var(--brand-primary-soft, #edf5ee);
    --misty-green: #d4e9d7;
    --white: #ffffff;
    --gray: var(--surface-bg, #f8fafc);
    --max-width: 1200px;

    /* TYPOGRAPHY */
    --font-sans: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

    /* TEXT */
    --text-dark: #333333;
    --text-primary: #222222;
    --text-secondary: #666666;
    --text-muted: #888888;
    --text-faint: #999999;

    /* BORDERS + SUBTLE BACKGROUNDS */
    --border-color: #e5e5e5;
    --border-color-light: #eeeeee;
    --bg-subtle: #fafafa;

    /* STATUS COLORS */
    --success: #2e7d32;
    --success-bg: #eef6ee;
    --success-bg-alt: #dcecdc;
    --warning: #ef6c00;
    --warning-bg: #fff8e1;
    --amber: #ffc107;
    --amber-alt: #ffb300;
    --danger: #c0392b;
    --danger-bg: #fdecea;
    --danger-bg-alt: #f5c2c0;
    --info: #1c74c4;
    --info-bg: #e3f0fb;
    --accent-purple: #7b4fd1;
    --accent-purple-bg: #ede4fb;
    --accent-orange: #d67a1f;
    --accent-orange-bg: #fdeee0;

    /* RADIUS SCALE */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-pill: 25px;

    /* ELEVATION SCALE */
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.16);
    --shadow-brand-sm: 0 2px 6px rgba(20, 107, 44, 0.12);
    --shadow-brand: 0 8px 20px rgba(45, 122, 58, 0.14);
    --shadow-warning: 0 4px 8px rgba(255, 179, 0, 0.3);

    /* SPACING SCALE */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    margin: 0;
    padding: 0;
    background-color: var(--white);
    color: var(--text-dark);
    overflow-x: hidden;
}

h1,
h2,
h3,
p {
    overflow-wrap: break-word;
    word-wrap: break-word;
}


/* =========================================================
   CONTAINER
========================================================= */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}


/* =========================================================
   HEADER / NAVBAR
========================================================= */

body > header,
header.main-header,
header.cc-header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 35px;
    width: 100%;
}

.logo-container img {
    height: 85px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 65px;
    margin: 0;
    padding: 0;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: bold;
    font-size: 1.4rem;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--primary-green);
}


/* =========================================================
   AUTH BUTTONS
========================================================= */

.auth-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 14px 34px;
    font-size: 1.1rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.btn-login {
    background-color: var(--primary-green);
    color: var(--white);
}

.btn-login:hover {
    background-color: var(--secondary-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-signup {
    background-color: transparent;
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
}

.btn-signup:hover {
    background-color: var(--primary-green);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}


/* =========================================================
   AUTH PAGE
========================================================= */

.auth-page-wrapper {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url('../assets/misty_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 20px;
    overflow-y: auto;
}


/* =========================================================
   AUTH CARD
========================================================= */

.auth-card {
    display: flex;
    width: 750px;
    max-width: 100%;
    min-height: 450px;
    background: var(--white);
    border-radius: var(--radius-xs);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.auth-card-signup {
    width: 860px;
    max-width: 100%;
}

.auth-left {
    flex: 1.2;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.auth-right {
    flex: 0.8;
    background-color: var(--primary-green);
    color: var(--white);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}


/* =========================================================
   WAVY BACKGROUND DESIGN
========================================================= */

.auth-right::before {
    content: '';
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background:
        radial-gradient(
            circle at 10% 20%,
            rgba(255, 255, 255, 0.15) 0%,
            transparent 25%
        ),
        radial-gradient(
            circle at 90% 80%,
            rgba(255, 255, 255, 0.15) 0%,
            transparent 35%
        );
    z-index: 1;
}

.wavy-shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
}

.shape-1 {
    width: 250px;
    height: 250px;
    top: -60px;
    left: -60px;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -40px;
    right: -40px;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}

.shape-3 {
    width: 60px;
    height: 60px;
    top: 30%;
    right: 15%;
    transform: rotate(45deg);
    border-radius: var(--radius-xs);
    background: rgba(255, 255, 255, 0.15);
}

.auth-right > * {
    position: relative;
    z-index: 2;
}

.auth-right .wavy-shape {
    position: absolute;
    z-index: 1;
}


/* =========================================================
   AUTH LOGO / HEADINGS
========================================================= */

.auth-logo {
    width: 82px;
    height: 82px;
    object-fit: contain;
    margin-bottom: 15px;
}

.auth-logo-small {
    width: 70px;
    height: 70px;
    margin-bottom: 12px;
}

.auth-heading {
    color: var(--primary-green);
    margin-bottom: 35px;
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.auth-heading-tight {
    margin-bottom: 25px;
}

.auth-brand-logo {
    display: block;
    height: 80px;
    max-height: 85px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    margin: 0 auto 16px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

.auth-heading-white {
    font-size: 2rem;
    font-weight: 800;
}

.auth-subtitle {
    margin: 20px 0;
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 500;
}


/* =========================================================
   AUTH ERROR
========================================================= */

.auth-error {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--danger-bg);
    color: #b3261e;
    border: 1px solid var(--danger-bg-alt);
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    max-width: 370px;
    width: 100%;
}

.auth-error i {
    font-size: 1rem;
}


/* =========================================================
   FORGOT PASSWORD
========================================================= */

.forgot-password {
    margin-bottom: 30px;
    text-align: center;
}

.forgot-password a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1rem;
    font-weight: bold;
    transition: color 0.2s;
}

.forgot-password a:hover {
    color: var(--primary-green);
}


/* =========================================================
   FORM STYLES
========================================================= */

.auth-form {
    width: 100%;
    max-width: 370px;
}

.input-group {
    margin-bottom: 15px;
    position: relative;
}

.input-group i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-group input {
    width: 100%;
    padding: 12px 15px 12px 50px;
    border-radius: var(--radius-pill);
    border: none;
    background-color: var(--gray);
    font-size: 1rem;
}

.input-group input.has-toggle {
    padding-right: 46px;
}

.toggle-password {
    left: auto !important;
    right: 20px;
    cursor: pointer;
}

.toggle-password:hover {
    color: var(--primary-green);
}

.input-name::placeholder {
    font-size: 0.95rem;
}


/* =========================================================
   STRAND SELECT
========================================================= */

.strand-select {
    width: 100%;
    padding: 12px 15px 12px 50px;
    border-radius: var(--radius-pill);
    border: none;
    background-color: var(--gray);
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-muted);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 16px;
    cursor: pointer;
}

.strand-select:valid {
    color: var(--text-dark);
}


/* =========================================================
   AUTH SUBMIT BUTTON
========================================================= */

.auth-btn {
    background-color: var(--primary-green);
    color: var(--white);
    border: none;
    padding: 12px 50px;
    border-radius: var(--radius-pill);
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    font-size: 1.1rem;
    transition:
        background 0.3s,
        transform 0.2s,
        box-shadow 0.2s;
}

.auth-btn:hover {
    background-color: var(--secondary-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}


/* =========================================================
   OUTLINE BUTTON
========================================================= */

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
    padding: 10px 40px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-weight: bold;
    margin-top: 20px;
    display: inline-block;
    transition: all 0.3s;
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-green);
}


/* =========================================================
   AUTH DIVIDER
========================================================= */

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 370px;
    margin: 16px 0;
    color: var(--text-faint);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: #e0e0e0;
}


/* =========================================================
   GOOGLE LOGIN BUTTON
   ICON + TEXT
========================================================= */

.btn-google {
    width: 100%;
    max-width: 370px;
    min-height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    padding: 10px 20px;

    background-color: var(--white);
    border: 1.5px solid #dcdcdc;
    border-radius: var(--radius-pill);

    color: #3c4043;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.btn-google:hover {
    background-color: var(--bg-subtle);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.btn-google:active {
    transform: translateY(0);
}

.btn-google:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-google svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}


/* =========================================================
   GOOGLE SIGN-UP MODAL
========================================================= */

.gmodal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gmodal-overlay.show {
    display: flex;
}

.gmodal-box {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 35px 30px;
    width: 100%;
    max-width: 380px;
    box-shadow: var(--shadow-lg);
}

.gmodal-title {
    color: var(--primary-green);
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0 0 6px;
    text-align: center;
}

.gmodal-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
    margin: 0 0 22px;
    line-height: 1.4;
}

.gmodal-box .input-group input:disabled {
    color: var(--text-faint);
    cursor: not-allowed;
}

.gmodal-error {
    display: none;
    background-color: var(--danger-bg);
    color: #b3261e;
    border: 1px solid var(--danger-bg-alt);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.gmodal-error.show {
    display: block;
}


/* =========================================================
   HERO SECTION
========================================================= */

.hero {
    background:
        linear-gradient(
            rgba(45, 122, 58, 0.4),
            rgba(45, 122, 58, 0.4)
        ),
        url('../assets/school_bg.png');

    background-size: cover;
    background-position: center;

    height: 600px;

    display: flex;
    align-items: flex-end;

    text-align: left;
    color: var(--white);

    padding-bottom: 30px;
}

.hero .container {
    margin: 0;
    padding-left: 40px;
    max-width: 100%;
}

.hero h1 {
    font-size: 3rem;
    max-width: 800px;
    margin-bottom: 10px;
    font-weight: 800;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
}


/* =========================================================
   SECTION / CARD STYLES
========================================================= */

.section {
    padding: 80px 0;
}

.section-title {
    color: var(--primary-green);
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
}

.card-container {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.card {
    flex: 1;
    background-color: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition:
        transform 0.3s,
        box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-content {
    padding: 30px;
}


/* =========================================================
   CONTACT SECTION
========================================================= */

.contact-section {
    background-color: var(--secondary-green);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.contact-section h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
}


/* =========================================================
   FOOTER
========================================================= */

footer {
    background-color: #1a4521;
    color: rgba(255, 255, 255, 0.7);
    padding: 30px;
    text-align: center;
    font-size: 0.9rem;
}

/* Formal Document Report Footers (Transparent & Crisp Typography) */
footer.report-doc-footer,
.report-doc-footer,
.doc-footer {
    background: transparent !important;
    background-color: transparent !important;
    color: #475569 !important;
    padding: 0 !important;
    text-align: left !important;
}


/* =========================================================
   RESPONSIVE - TABLETS
========================================================= */

@media (max-width: 992px) {

    .hero h1 {
        font-size: 2.5rem;
    }

    .card-container {
        flex-direction: column;
        align-items: center;
    }

    .card {
        width: 100%;
        max-width: 500px;
    }
}


/* =========================================================
   RESPONSIVE - MOBILE
========================================================= */

@media (max-width: 768px) {

    .header-content {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    .logo-container img {
        height: 65px;
    }

    .btn {
        padding: 10px 25px;
        font-size: 1rem;
    }

    nav ul {
        gap: 28px;
    }

    .hero {
        padding: 0 20px 40px;
        height: 400px;
        text-align: center;
        align-items: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .auth-page-wrapper {
        align-items: flex-start;
        padding: 15px;
    }

    .auth-card,
    .auth-card-signup {
        flex-direction: column;
        width: 100%;
        max-width: 400px;
        min-height: auto;
        margin: 0 auto;
    }

    .auth-left,
    .auth-right {
        flex: none;
        width: 100%;
        padding: 20px;
    }

    .auth-right {
        order: 2;
    }

    .auth-left {
        order: 1;
    }
}


/* =========================================================
   NARROW PHONES
========================================================= */

@media (max-width: 400px) {

    .hero {
        height: 320px;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    nav ul {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .auth-buttons {
        gap: 10px;
    }

    .btn {
        padding: 8px 18px;
        font-size: 0.9rem;
    }
}


/* =========================================================
   VERY SHORT SCREENS
========================================================= */

@media (max-height: 600px) {

    .auth-subtitle {
        display: block;
        font-size: 0.78rem;
        margin: 4px 0 12px;
        line-height: 1.35;
        opacity: 0.95;
    }

    .auth-heading-white {
        margin: 0 0 6px;
        font-size: 1.25rem;
    }

    .input-group {
        margin-bottom: 4px;
    }

    .input-group input,
    .strand-select {
        padding: 6px 12px 6px 36px;
    }

    .auth-left,
    .auth-right {
        padding: 8px !important;
    }

    .auth-page-wrapper {
        padding: 5px;
    }
}


/* =========================================================
   SMALL MOBILE / SHORT SCREENS
========================================================= */

@media (max-width: 480px),
       (max-height: 700px) {

    .auth-heading {
        font-size: 1.4rem;
        margin-bottom: 12px;
    }

    .auth-heading-tight {
        margin-bottom: 10px;
    }

    .auth-heading-white {
        font-size: 1.3rem;
    }

    .auth-subtitle {
        margin: 6px 0;
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .forgot-password {
        margin-bottom: 10px;
    }

    .forgot-password a {
        font-size: 0.85rem;
    }

    .btn-outline {
        margin-top: 8px;
        padding: 7px 25px;
    }

    .input-group {
        margin-bottom: 6px;
    }

    .input-group input,
    .strand-select {
        padding: 8px 12px 8px 38px;
        font-size: 0.85rem;
    }

    .input-group input.has-toggle {
        padding-right: 36px;
    }

    .input-group i {
        left: 14px;
        font-size: 0.8rem;
    }

    .toggle-password {
        left: auto !important;
        right: 14px;
    }

    .input-name::placeholder {
        font-size: 0.78rem;
    }

    .auth-btn {
        padding: 8px 35px;
        font-size: 0.95rem;
        margin-top: 4px;
    }

    .auth-left,
    .auth-right {
        padding: 12px !important;
    }

    .auth-page-wrapper {
        padding: 8px;
    }

    .btn-google {
        max-width: 100%;
        min-height: 42px;
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .btn-google svg {
        width: 20px;
        height: 20px;
    }
}


/* =========================================================
   CLOSE BUTTON
========================================================= */

.auth-close-btn {
    position: fixed;
    top: 18px;
    right: 22px;

    width: 34px;
    height: 34px;

    border-radius: 50%;

    background-color: rgba(255, 255, 255, 0.85);
    color: var(--primary-green);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 1rem;
    text-decoration: none;

    box-shadow: var(--shadow-sm);

    transition:
        transform 0.15s,
        background-color 0.15s;

    z-index: 10;
}

.auth-close-btn:hover {
    background-color: var(--white);
    transform: scale(1.1);
}