/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f5f0;
    color: #333;
    overflow: hidden;
}

/* ==================
   LOGIN PAGE
   ================== */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-image: url('https://cdn.hubblecontent.osi.office.net/m365content/publish/0cab4379-8d6d-451d-8993-01263a604385/thumbnails/xxlarge.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
}

.login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(82, 95, 79, 0.82) 0%,
        rgba(164, 179, 160, 0.75) 50%,
        rgba(60, 75, 58, 0.85) 100%
    );
}

.login-box {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 16px;
    padding: 48px 44px;
    width: 440px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
    text-align: center;
    border-top: 5px solid #A4B3A0;
}

.login-logo {
    width: 160px;
    height: auto;
    margin-bottom: 16px;
    object-fit: contain;
}

.logo-area h1 {
    font-size: 24px;
    color: #3c4b3a;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.tagline {
    color: #7a8c78;
    font-size: 13px;
    margin-bottom: 0;
    letter-spacing: 0.3px;
}

.login-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #A4B3A0, transparent);
    margin: 24px 0;
}

.login-content p {
    color: #555;
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.7;
}

.login-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background-color: #3c4b3a;
    color: white;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
    width: 100%;
    justify-content: center;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(60, 75, 58, 0.3);
}

.login-button:hover {
    background-color: #A4B3A0;
    color: #2a3528;
    box-shadow: 0 6px 16px rgba(164, 179, 160, 0.4);
    transform: translateY(-1px);
}

.login-footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.login-footer p {
    color: #aaa;
    font-size: 12px;
}

/* ==================
   PORTAL PAGE
   ================== */

.portal-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background-image: url('https://cdn.hubblecontent.osi.office.net/m365content/publish/0cab4379-8d6d-451d-8993-01263a604385/thumbnails/xxlarge.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* ==================
   LOGO BANNER
   ================== */

.logo-banner {
    background: linear-gradient(135deg, #3c4b3a 0%, #5a6e58 60%, #A4B3A0 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border-bottom: 2px solid rgba(164, 179, 160, 0.3);
}

.banner-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.banner-logo {
    height: 64px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

.banner-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    border-left: 2px solid rgba(255, 255, 255, 0.3);
    padding-left: 18px;
}

.banner-title {
    display: none;
}

.banner-welcome {
    font-size: 22px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.banner-right {
    display: flex;
    align-items: center;
}

.user-name {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
}

/* ==================
   ROTATE HINT
   ================== */

.rotate-hint {
    background: rgba(60, 75, 58, 0.92);
    color: white;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(164, 179, 160, 0.3);
}

.rotate-hint button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
    padding: 0 4px;
    opacity: 0.8;
}

.rotate-hint button:hover {
    opacity: 1;
}

/* ==================
   MENU HEADER
   ================== */

.portal-header {
    background: rgba(60, 75, 58, 0.92);
    color: white;
    padding: 0 20px;
    height: 44px;
    display: flex;
    align-items: center;
    z-index: 1000;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(164, 179, 160, 0.3);
    backdrop-filter: blur(4px);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.logout-button {
    background-color: rgba(255, 255, 255, 0.12);
    color: white;
    padding: 6px 14px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.25);
    margin-left: auto;
}

.logout-button:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

/* ==================
   DROPDOWN MENUS
   ================== */

.dropdown {
    position: relative;
}

.dropdown-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.12);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.28);
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 180px;
    justify-content: space-between;
}

.dropdown-button:hover {
    background-color: rgba(255, 255, 255, 0.22);
}

.dropdown-arrow {
    font-size: 9px;
    opacity: 0.75;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
    min-width: 240px;
    z-index: 2000;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    max-height: 70vh;
    overflow-y: auto;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    color: #3c4b3a;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid #f4f5f0;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #f0f4ef;
    color: #3c4b3a;
}

.dropdown-item.active {
    background-color: #e8ede7;
    color: #3c4b3a;
    font-weight: 600;
    border-left: 3px solid #A4B3A0;
}

/* ==================
   REPORT AREA
   ================== */

.portal-main {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    min-height: 0;
}

.report-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    background: rgba(164, 179, 160, 0.15);
    backdrop-filter: blur(2px);
}

.report-container {
    width: 100%;
    height: 100%;
    display: none;
    border-radius: 12px;
    overflow: hidden;
}

.report-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Loading Spinner */
.loading-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: white;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(60, 75, 58, 0.75);
    border-radius: 12px;
    z-index: 10;
    backdrop-filter: blur(6px);
}

.loading-message p {
    font-size: 14px;
    letter-spacing: 0.3px;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin-bottom: 14px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Message */
.error-message {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: white;
    text-align: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(60, 75, 58, 0.75);
    border-radius: 12px;
    z-index: 10;
    backdrop-filter: blur(6px);
}

.error-message p {
    margin-bottom: 20px;
    font-size: 14px;
    max-width: 400px;
    line-height: 1.7;
    color: white;
}

.error-message button {
    background-color: #3c4b3a;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.error-message button:hover {
    background-color: #A4B3A0;
    color: #2a3528;
}

/* ==================
   MOBILE RESPONSIVE
   ================== */

@media (max-width: 768px) {

    body {
        overflow: auto;
    }

    .portal-container {
        height: 100dvh;
    }

    /* Smaller banner on mobile */
    .logo-banner {
        padding: 8px 12px;
    }

    .banner-logo {
        height: 36px;
    }

    .banner-welcome {
        font-size: 14px;
    }

    .banner-text {
        padding-left: 10px;
    }

    .user-name {
        font-size: 11px;
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Compact header on mobile */
    .portal-header {
        height: 40px;
        padding: 0 10px;
    }

    /* Smaller dropdowns on mobile */
    .dropdown-button {
        min-width: 120px;
        font-size: 12px;
        padding: 5px 10px;
    }

    .logout-button {
        font-size: 12px;
        padding: 5px 10px;
    }

    /* Larger touch targets in dropdown */
    .dropdown-item {
        padding: 14px 16px;
        font-size: 14px;
    }

    /* Remove padding around report on mobile */
    .portal-main {
        padding: 6px;
    }

    .report-wrapper {
        border-radius: 8px;
    }
}
/* ==================
   HOME PAGE
   ================== */

.home-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-image: url('https://cdn.hubblecontent.osi.office.net/m365content/publish/0cab4379-8d6d-451d-8993-01263a604385/thumbnails/xxlarge.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.home-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
}

.home-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 36px 40px;
    width: 100%;
    max-width: 780px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
    border-top: 5px solid #A4B3A0;
}

.home-title {
    font-size: 22px;
    font-weight: 700;
    color: #3c4b3a;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.home-subtitle {
    font-size: 13px;
    color: #7a8c78;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e8ede7;
}

.report-list {
    display: flex;
    flex-direction: row;
    gap: 16px;
    justify-content: center;
}

.report-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}    

.report-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #f4f7f3;
    border: 1px solid #e0e8de;
    border-radius: 8px;
    text-decoration: none;
    color: #3c4b3a;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.report-list-item:hover {
    background: #e8ede7;
    border-color: #A4B3A0;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(60, 75, 58, 0.12);
}

.report-list-name {
    flex: 1;
    font-size: 16px;
}

.report-list-arrow {
    color: #A4B3A0;
    font-size: 16px;
    font-weight: 700;
    transition: transform 0.2s ease;
}

.report-list-item:hover .report-list-arrow {
    transform: translateX(4px);
    color: #3c4b3a;
}

.logo-banner .logout-button {
    margin-left: 16px;
}

@media (max-width: 768px) {
    .home-content {
        padding: 24px 20px;
        border-radius: 12px;
    }

    .home-title {
        font-size: 18px;
    }

    .report-list-item {
        padding: 16px 14px;
        font-size: 15px;
    }
}
