:root {
    --unj-primary: #006569;
    /* UNJ brand teal */
    --unj-secondary: #004d50;
    /* darker academic teal */
    --unj-light: #e6f2f3;
    /* light teal accent */
    --academic-navy: #1a2332;
    /* deep professional navy */
    --academic-gray: #f8fafb;
    /* subtle background */
    --text-primary: #1e293b;
    /* readable dark text */
    --text-secondary: #64748b;
    /* muted text */
    --border: #e2e8f0;
    /* soft borders */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, var(--academic-gray) 0%, #ffffff 100%);
    min-height: 100vh;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* Academic pattern overlay */
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(
            circle at 25px 25px,
            rgba(0, 101, 105, 0.03) 2px,
            transparent 0
        ),
        radial-gradient(
            circle at 75px 75px,
            rgba(0, 101, 105, 0.03) 2px,
            transparent 0
        );
    background-size: 100px 100px;
    pointer-events: none;
}

.login-container {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow), 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    max-width: 480px;
    width: 90%;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.login-header {
    position: relative;
    background: linear-gradient(135deg, var(--unj-primary) 0%, var(--unj-secondary) 60%);
    color: #fff;
    padding: 1.5rem 1.5rem 1.75rem;
    text-align: center;
    overflow: hidden;
}

.login-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.06) 0 2px,
        transparent 2px 12px
    );
    opacity: 0.25;
    pointer-events: none;
}

.university-logo {
    width: 56px;
    height: 56px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.university-logo img {
    width: 34px;
    height: 34px;
}

.system-title {
    font-size: 1.5rem; /* 24px - smaller for 150% zoom */
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 0.375rem;
    letter-spacing: -0.02em;
}

.system-subtitle {
    font-size: 0.875rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.university-name {
    font-size: 0.95rem;
    opacity: 0.95;
    font-weight: 500;
    letter-spacing: 0.025em;
}

.login-body {
    padding: 1.75rem 1.5rem;
}

.welcome-text {
    text-align: center;
    margin-bottom: 1.5rem;
}

.welcome-title {
    font-size: 1.25rem; /* 20px - better for 150% zoom */
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.welcome-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

.sso-button {
    width: 100%;
    background: var(--unj-primary) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    min-height: 48px;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    text-decoration: none !important;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.sso-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.sso-button:hover,
.sso-button:hover:focus,
.sso-button:focus,
.sso-button:visited,
.sso-button:active {
    background: var(--unj-secondary) !important;
    color: white !important;
    text-decoration: none !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow), 0 10px 15px -3px rgba(0, 101, 105, 0.3);
    border-color: var(--unj-secondary) !important;
}

.sso-button:hover::before {
    left: 100%;
}

.sso-button:active {
    transform: translateY(0);
    background: var(--unj-secondary) !important;
}

/* Override Bootstrap button states */
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary.focus,
.btn-primary:not(:disabled):not(.disabled):active {
    background-color: var(--unj-secondary) !important;
    border-color: var(--unj-secondary) !important;
    color: white !important;
}

.sso-icon {
    font-size: 1.25rem;
}

.security-notice {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--unj-light);
    border-radius: 8px;
    border-left: 4px solid var(--unj-primary);
}

.security-notice-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--unj-secondary);
    line-height: 1.5;
}

.security-icon {
    font-size: 1.125rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.alert {
    border-radius: 8px;
    border: none;
    margin-bottom: 1.5rem;
    padding: 1rem;
}

.alert-success {
    background: #ecfdf5;
    border-left: 4px solid #10b981;
    color: #065f46;
}

.alert-danger {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.footer-text {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.footer-link {
    color: var(--unj-primary);
    text-decoration: none;
    font-weight: 500;
}

.footer-link:hover {
    color: var(--unj-secondary);
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .login-container {
        width: 95%;
        margin: 1rem;
    }

    .login-header,
    .login-body {
        padding: 1.5rem;
    }

    .system-title {
        font-size: 1.5rem;
    }
    .system-subtitle {
        font-size: 0.8125rem;
        letter-spacing: 0.04em;
    }
}

/* Loading state */
.sso-button.loading {
    pointer-events: none;
    opacity: 0.8;
}

.sso-button.loading .sso-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}
