/* Dokuz Eylül Üniversitesi - Kurumsal Giriş Teması (auth.css) */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

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

:root {
    --deu-primary: #004B87;
    --deu-primary-dark: #003a6a;
    --deu-primary-light: #e3f2fd;
    --deu-border: #d0d0d0;
    --deu-text: #212529;
    --deu-muted: #546e7a;
    --deu-card-bg: #ffffff;
    --danger: #c62828;
    --success: #2e7d32;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: var(--deu-text);
}

.login-container,
.auth-container {
    width: 100%;
    max-width: 470px;
    margin: 0 auto;
}

.login-card,
.auth-card {
    background: var(--deu-card-bg);
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    padding: 38px 34px 30px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    position: relative;
}

/* ===== Logo Section ===== */
.logo-section {
    text-align: center;
    margin-bottom: 16px;
}

.logo-section img {
    width: 135px;
    max-width: 100%;
    height: auto;
    display: inline-block;
}

/* ===== Titles ===== */
.login-title {
    color: var(--deu-primary);
    font-size: 1.18rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.35;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.client-name {
    text-align: center;
    color: var(--deu-muted);
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 16px 0;
}

/* ===== Info Alert Box ===== */
.info-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background-color: var(--deu-primary-light);
    border: 1px solid #90caf9;
    border-left: 3px solid var(--deu-primary);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 20px;
}

.info-alert .info-icon {
    color: var(--deu-primary);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-alert .info-icon svg {
    width: 18px;
    height: 18px;
}

.info-alert p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.45;
    color: #1565c0;
}

.info-alert strong {
    color: var(--deu-primary);
    font-weight: 700;
}

/* ===== Primary DEU SSO Button ===== */
.btn-sso-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 12px 20px;
    background-color: var(--deu-primary);
    color: #ffffff !important;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 75, 135, 0.28);
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.btn-sso-primary svg {
    width: 20px;
    height: 20px;
    max-width: 20px;
    max-height: 20px;
    flex-shrink: 0;
}

.btn-sso-primary:hover {
    background-color: var(--deu-primary-dark);
    box-shadow: 0 6px 18px rgba(0, 75, 135, 0.38);
    color: #ffffff !important;
}

.btn-sso-primary:active {
    transform: translateY(1px);
}

/* ===== Section Divider ===== */
.section-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0 18px;
    color: var(--deu-muted);
    font-size: 12.5px;
    font-weight: 500;
}

.section-divider::before,
.section-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}

.section-divider span {
    padding: 0 12px;
}

/* ===== Form Styles ===== */
.login-form {
    margin-top: 4px;
}

.form-group {
    margin-bottom: 18px;
}

/* Material Floating Label Input Wrapper */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #757575;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.input-icon svg {
    width: 20px;
    height: 20px;
    max-width: 20px;
    max-height: 20px;
}

.form-input {
    width: 100%;
    height: 52px;
    padding: 16px 46px 16px 46px;
    font-size: 15px;
    font-family: inherit;
    border: 1.5px solid var(--deu-border);
    border-radius: 12px;
    outline: none;
    transition: all 0.25s ease;
    background: #fafafa;
    color: var(--deu-text);
}

.form-input:focus {
    border-color: var(--deu-primary);
    box-shadow: 0 0 0 3px rgba(0, 75, 135, 0.12);
    background: #ffffff;
}

.form-input:hover:not(:focus) {
    border-color: #a0a0a0;
    background: #ffffff;
}

.form-label {
    position: absolute;
    left: 46px;
    top: 50%;
    transform: translateY(-50%);
    color: #757575;
    font-size: 15px;
    pointer-events: none;
    transition: all 0.2s ease;
    background: transparent;
}

/* Float label to top when focused or not empty */
.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
    top: 0;
    left: 14px;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--deu-primary);
    background: #ffffff;
    padding: 0 6px;
    z-index: 3;
}

/* Password Toggle Button */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: #757575;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 2;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

.password-toggle:hover {
    background-color: rgba(0, 75, 135, 0.08);
    color: var(--deu-primary);
}

/* ===== Form Options (Remember Me) ===== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.toggle-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 10px;
}

.toggle-wrapper input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: #cfd8dc;
    border-radius: 24px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.toggle-wrapper input[type="checkbox"]:checked + .toggle-slider {
    background: var(--deu-primary);
}

.toggle-wrapper input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.toggle-label {
    font-size: 13.5px;
    color: #424242;
    user-select: none;
}

/* ===== Local Login Button ===== */
.btn-login-secondary {
    width: 100%;
    min-height: 46px;
    font-size: 14.5px;
    font-weight: 600;
    font-family: inherit;
    color: var(--deu-primary);
    background-color: #f0f7ff;
    border: 1.5px solid #b3d7ff;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-login-secondary:hover {
    background-color: var(--deu-primary);
    color: #ffffff;
    border-color: var(--deu-primary);
}

.btn-login-secondary:active {
    transform: translateY(1px);
}

/* ===== Card Footer ===== */
.auth-footer {
    margin-top: 18px;
    text-align: center;
    font-size: 13.5px;
    color: var(--deu-muted);
}

.auth-footer a {
    color: var(--deu-primary);
    font-weight: 700;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ===== Help Section ===== */
.help-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #edf2f7;
}

.help-links {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.help-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--deu-muted);
    font-size: 12.5px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.help-link svg {
    width: 15px;
    height: 15px;
    color: #78909c;
    flex-shrink: 0;
}

.help-link:hover {
    color: var(--deu-primary);
    text-decoration: underline;
}

.help-link:hover svg {
    color: var(--deu-primary);
}

/* ===== Alert & Flash Messages ===== */
.message {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.5;
}

.message-error {
    border: 1px solid #ef9a9a;
    background-color: #ffebee;
    color: var(--danger);
}

.message-success {
    border: 1px solid #a5d6a7;
    background-color: #e8f5e9;
    color: var(--success);
}

.validation-errors {
    margin: 0 0 18px;
    padding: 12px 28px;
    border: 1px solid #ffcc80;
    border-radius: 10px;
    background: #fff8e8;
    color: #e65100;
    font-size: 13.5px;
    line-height: 1.6;
}

/* ===== Registration Page Compatibility ===== */
.auth-header {
    text-align: center;
    margin-bottom: 20px;
}

.auth-header h1 {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
}

.auth-header p {
    color: #94a3b8;
    font-size: 14px;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    border-radius: 16px;
    background: var(--deu-primary);
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    box-shadow: 0 8px 24px rgba(0, 75, 135, 0.4);
}

label:not(.form-label):not(.toggle-wrapper) {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 13.5px;
    font-weight: 600;
}

input:not(.form-input):not([type="checkbox"]) {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1.5px solid var(--deu-border);
    border-radius: 11px;
    background: #fafafa;
    color: var(--deu-text);
    font: inherit;
    font-size: 14.5px;
    outline: none;
    transition: all 0.2s ease;
}

input:not(.form-input):not([type="checkbox"]):focus {
    border-color: var(--deu-primary);
    box-shadow: 0 0 0 3px rgba(0, 75, 135, 0.12);
    background: #ffffff;
}

.auth-button {
    width: 100%;
    min-height: 48px;
    margin-top: 6px;
    border: none;
    border-radius: 12px;
    background: var(--deu-primary);
    color: #ffffff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.auth-button:hover {
    background: var(--deu-primary-dark);
}

.auth-button:active {
    transform: translateY(1px);
}

.password-help {
    margin-top: 6px;
    color: var(--deu-muted);
    font-size: 12px;
    line-height: 1.5;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .login-card,
    .auth-card {
        padding: 28px 20px 22px;
        border-radius: 16px;
    }

    .login-title {
        font-size: 1.05rem;
    }

    .logo-section img {
        width: 110px;
    }
}