:root {
    --primary-green: #0C9569;
    --primary-blue: #3281DE;
    --bright-green: #10C878;
    --bright-blue: #4A9EFF;
    --dark-bg: #0a0e27;
    --darker-bg: #050710;
    --accent-cyan: #3281DE;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --card-bg: rgba(12, 149, 105, 0.08);
    --card-border: rgba(12, 149, 105, 0.3);
    --card-bg-blue: rgba(50, 129, 222, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--darker-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Geometric Square Effect */
.background-swirl {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.background-swirl::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 10%;
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, rgba(12, 149, 105, 0.6), rgba(50, 129, 222, 0.6));
    transform: rotate(45deg);
    border: 2px solid rgba(12, 149, 105, 0.6);
    box-shadow: 0 0 100px rgba(12, 149, 105, 0.3);
    animation: diamond-rotate 30s linear infinite;
    transform-origin: center center;
}

.background-swirl::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 15%;
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, rgba(50, 129, 222, 0.6), rgba(12, 149, 105, 0.6));
    transform: rotate(-45deg);
    border: 2px solid rgba(50, 129, 222, 0.6);
    box-shadow: 0 0 100px rgba(50, 129, 222, 0.3);
    animation: diamond-rotate-reverse 30s linear infinite;
    transform-origin: center center;
}

@keyframes diamond-rotate {
    0% {
        transform: rotate(45deg);
    }

    100% {
        transform: rotate(405deg);
    }
}

@keyframes diamond-rotate-reverse {
    0% {
        transform: rotate(-45deg);
    }

    100% {
        transform: rotate(-405deg);
    }
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.container {
    position: relative;
    z-index: 1;
    width: 80%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.brand-logo {
    max-width: 330px;
    height: auto;
    margin-bottom: 1rem;
    /* Transparent PNG - no border-radius needed */
    filter:
        drop-shadow(0 0 30px rgba(12, 149, 105, 0.4)) drop-shadow(0 0 60px rgba(50, 129, 222, 0.2));
    transition: filter 0.3s ease, transform 0.3s ease;
}

.brand-logo:hover {
    filter:
        drop-shadow(0 0 40px rgba(12, 149, 105, 0.6)) drop-shadow(0 0 80px rgba(50, 129, 222, 0.3));
    transform: scale(1.02);
}

.brand-logo-small {
    max-width: 140px;
    margin-bottom: 0.5rem;
}

.brand-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 30px rgba(12, 149, 105, 0.3);
}

.brand-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.logout-button {
    position: absolute;
    top: 0;
    right: 0;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(12, 149, 105, 0.4);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.logout-button:hover {
    border-color: var(--primary-green);
    background: rgba(12, 149, 105, 0.1);
    box-shadow: 0 4px 16px rgba(12, 149, 105, 0.3);
    transform: translateY(-2px);
    color: var(--primary-green);
}

.logout-button:active {
    transform: translateY(0);
}

/* Auth Guard - Aurora Theme */
#authGuard {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.auth-aurora-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.auth-aurora-bg::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 10%;
    width: 700px;
    height: 700px;
    background: linear-gradient(135deg, rgba(12, 149, 105, 0.6), rgba(50, 129, 222, 0.6));
    transform: rotate(45deg);
    border: 2px solid rgba(12, 149, 105, 0.6);
    box-shadow: 0 0 120px rgba(12, 149, 105, 0.3);
    animation: diamond-rotate 30s linear infinite;
    transform-origin: center center;
}

.auth-aurora-bg::after {
    content: '';
    position: absolute;
    top: 45%;
    right: 10%;
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, rgba(50, 129, 222, 0.6), rgba(12, 149, 105, 0.6));
    transform: rotate(-45deg);
    border: 2px solid rgba(50, 129, 222, 0.6);
    box-shadow: 0 0 120px rgba(50, 129, 222, 0.3);
    animation: diamond-rotate-reverse 30s linear infinite;
    transform-origin: center center;
    z-index: 0;
}

.auth-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
}

.auth-logo {
    max-width: 420px;
    height: auto;
    margin-bottom: 2rem;
    filter:
        drop-shadow(0 0 40px rgba(12, 149, 105, 0.5)) drop-shadow(0 0 80px rgba(50, 129, 222, 0.3));
    animation: auth-logo-glow 3s ease-in-out infinite alternate;
}

@keyframes auth-logo-glow {
    from {
        filter:
            drop-shadow(0 0 40px rgba(12, 149, 105, 0.5)) drop-shadow(0 0 80px rgba(50, 129, 222, 0.3));
    }

    to {
        filter:
            drop-shadow(0 0 60px rgba(12, 149, 105, 0.7)) drop-shadow(0 0 100px rgba(50, 129, 222, 0.5));
    }
}

.auth-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 30px rgba(12, 149, 105, 0.3);
}

.auth-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 3rem;
}

.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 8px 32px rgba(12, 149, 105, 0.2);
    max-width: 500px;
    margin: 0 auto;
}

.auth-card-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-card-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.6;
}

.auth-button {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    color: var(--darker-bg);
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(12, 149, 105, 0.3);
    width: 100%;
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(12, 149, 105, 0.4);
    filter: brightness(1.1);
}

.auth-button:active {
    transform: translateY(0);
}

/* Auth Provider Buttons */
.auth-providers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-provider-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.auth-provider-btn.google {
    background: rgba(255, 255, 255, 0.95);
    color: #1f1f1f;
}

.auth-provider-btn.google:hover {
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(12, 149, 105, 0.3);
    transform: translateY(-2px);
}

.auth-provider-btn.github {
    background: linear-gradient(135deg, #2d333b 0%, #1c2128 100%);
    color: #ffffff;
    border: 1px solid rgba(12, 149, 105, 0.3);
}

.auth-provider-btn.github:hover {
    border-color: var(--primary-green);
    box-shadow: 0 4px 16px rgba(12, 149, 105, 0.3);
    transform: translateY(-2px);
}

.auth-provider-btn.microsoft {
    background: linear-gradient(135deg, #0078d4 0%, #004578 100%);
    color: #ffffff;
}

.auth-provider-btn.microsoft:hover {
    box-shadow: 0 4px 16px rgba(50, 129, 222, 0.4);
    transform: translateY(-2px);
}

/* Auth Error State */
.auth-card.auth-error {
    border-color: rgba(255, 107, 107, 0.4);
    box-shadow: 0 8px 32px rgba(255, 107, 107, 0.2);
}

.auth-card.auth-error .auth-card-title {
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Main Content */
.main-content {
    flex: 1;
}

/* Section Styling */
.section-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* Check-in Form */
.checkin-section {
    background: linear-gradient(135deg, rgba(12, 149, 105, 0.08), rgba(50, 129, 222, 0.08));
    border: 1px solid rgba(12, 149, 105, 0.3);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(12, 149, 105, 0.2), 0 0 60px rgba(50, 129, 222, 0.1);
    backdrop-filter: blur(10px);
}

.checkin-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.input-textarea {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(12, 149, 105, 0.3);
    border-radius: 8px;
    padding: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    resize: vertical;
    transition: all 0.3s ease;
}

.input-textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 20px rgba(12, 149, 105, 0.3);
    background: rgba(0, 0, 0, 0.5);
}

/* Buttons */
.btn-primary {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--bright-green), var(--primary-green), var(--primary-blue), var(--bright-blue));
    background-size: 200% 200%;
    border: none;
    border-radius: 8px;
    padding: 1rem 2rem;
    animation: gradient-shift 3s ease infinite;
    color: var(--dark-bg);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(12, 149, 105, 0.5), 0 0 40px rgba(50, 129, 222, 0.3);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, rgba(12, 149, 105, 0.08), rgba(50, 129, 222, 0.08));
    border: 1px solid rgba(12, 149, 105, 0.3);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(12, 149, 105, 0.2), 0 0 60px rgba(50, 129, 222, 0.1);
    backdrop-filter: blur(10px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(12, 149, 105, 0.1), rgba(50, 129, 222, 0.1));
    border: 1px solid rgba(12, 149, 105, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    border-color: var(--bright-green);
    box-shadow: 0 4px 24px rgba(12, 149, 105, 0.4), 0 0 40px rgba(50, 129, 222, 0.2);
    transform: translateY(-4px);
    background: linear-gradient(135deg, rgba(12, 149, 105, 0.15), rgba(50, 129, 222, 0.15));
}

.stat-value {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--bright-green), var(--primary-green), var(--primary-blue), var(--bright-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 8px rgba(12, 149, 105, 0.5));
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.already-checked-in {
    text-align: center;
    color: var(--primary-green);
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Navigation Links */
.nav-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-link {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(12, 149, 105, 0.3);
    border-radius: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
}

.nav-link:hover {
    border-color: var(--primary-green);
    background: rgba(12, 149, 105, 0.1);
    box-shadow: 0 4px 16px rgba(12, 149, 105, 0.2);
}

/* Error Message */
.error-message {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.5);
    border-radius: 8px;
    padding: 1rem;
    color: #ff6b6b;
    margin-top: 1rem;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.1);
}

/* Auth Required Section */
.auth-required {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(12, 149, 105, 0.1);
    text-align: center;
}

/* Site Footer */
.site-footer {
    margin-top: auto;
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    border-top: 1px solid var(--card-border);
}

.site-footer p {
    margin: 0;
}

.site-footer #tenantDisplay {
    color: var(--primary-green);
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 1rem;
    }

    .brand-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .checkin-section,
    .stats-section {
        padding: 1.5rem;
    }

    .stats-section {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .stat-card {
        padding: 1rem 0.75rem;
        min-width: 0;
        /* Allow cards to shrink below content size */
    }

    .stat-value {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .container {
        width: 100%;
        padding: 0.75rem;
    }

    .stats-section {
        padding: 0.75rem;
    }

    .stats-grid {
        gap: 0.5rem;
    }

    .stat-card {
        padding: 0.75rem 0.5rem;
    }

    .stat-value {
        font-size: 1.75rem;
    }

    .stat-label {
        font-size: 0.65rem;
    }
}


/* Tooltip Styles */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::before,
[data-tooltip]::after {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 1000;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    bottom: 120%;
    width: max-content;
    max-width: 220px;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(5, 7, 16, 0.95);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
    border: 1px solid var(--primary-green);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    white-space: normal;
}

[data-tooltip]::after {
    content: '';
    bottom: 110%;
    border-width: 6px;
    border-style: solid;
    border-color: var(--primary-green) transparent transparent transparent;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* Likert Scale Styles */
.likert-container {
    padding: 1rem 0;
    width: 100%;
}

.likert-header-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 0 1rem;
}

.likert-endpoint-label {
    font-weight: 500;
}

.likert-options-grid {
    display: grid;
    grid-template-columns: repeat(var(--scale, 5), 1fr);
    gap: 0.5rem;
    background: rgba(12, 149, 105, 0.05);
    padding: 1rem;
    border-radius: 8px;
    width: 100%;
}

.likert-option-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    text-align: center;
    position: relative;
    padding: 0.5rem;
    /* Add padding to increase hit area */
    border-radius: 8px;
    /* Round corners for hover state if added */
}

.likert-item-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.2;
    min-height: 2.4em;
    /* Ensure consistent height for 2 lines */
    display: flex;
    align-items: flex-end;
    /* Bottom align labels so circles line up */
    justify-content: center;
}

.likert-option-wrapper input[type="radio"] {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
    margin: 0;
}

.likert-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.2);
}

.likert-option-wrapper:hover {
    background: rgba(12, 149, 105, 0.05);
    /* Subtle background on hover */
}

.likert-option-wrapper:hover .likert-circle {
    border-color: var(--primary-green);
    color: var(--text-primary);
    background: rgba(12, 149, 105, 0.1);
    transform: translateY(-2px);
}

.likert-option-wrapper input[type="radio"]:checked+.likert-circle {
    background: var(--primary-green);
    border-color: var(--primary-green);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(12, 149, 105, 0.4);
}

@media (max-width: 600px) {
    .likert-options-grid {
        gap: 0.25rem;
        padding: 0.5rem;
    }

    .likert-circle {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .likert-item-label {
        font-size: 0.65rem;
    }
}