﻿/* =====================================================
   AH RIJSCHOOL - Modern Login Stylesheet
   Kleur: #D4512A (AH Rood)
   ===================================================== */

:root {
    /* Color palette */
    --color-primary: #2c3e50;
    --color-primary-light: #34495e;
    --color-primary-dark: #1a252f;
    --color-accent: #3498db;
    --color-accent-light: #5dade2;
    --color-success: #27ae60;
    --color-success-light: #2ecc71;
    --color-danger: #e74c3c;
    --color-danger-light: #ec7063;
    --color-warning: #f39c12;
    --color-light: #ecf0f1;
    --color-lighter: #f8f9fa;
    --color-dark: #2c3e50;
    --color-text: #2c3e50;
    --color-text-light: #7f8c8d;
    --color-border: #bdc3c7;
    --color-border-light: #ecf0f1;
    
    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    --font-size-base: 16px;
    --font-size-sm: 14px;
    --font-size-lg: 18px;
    --font-size-xl: 24px;
    --font-size-xxl: 32px;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* Sizing */
    --input-height: 44px;
    --button-height: 44px;
    
    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
    --transition-slow: 450ms ease-in-out;
}

/* =====================================================
   Global styles
   ===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    font-family: 'Century Gothic', CenturyGothic, AppleGothic, Arial, sans-serif;
    background: linear-gradient(135deg, #f5f5f5 0%, #e9e9e9 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-md);
}

/* =====================================================
   Login container
   ===================================================== */

.login-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Background decoration */
.login-background-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    opacity: 0.08;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: #8a2833;
    border-radius: 50%;
    top: -200px;
    right: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: #8a2833;
    border-radius: 50%;
    bottom: -100px;
    left: -50px;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: #8a2833;
    border-radius: 50%;
    top: 50%;
    left: 5%;
}

/* =====================================================
   Login wrapper & header
   ===================================================== */

.login-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 50px 60px;
    width: 100%;
    max-width: 550px;
    z-index: 10;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--color-border-light);
}

.login-logo {
    width: calc(100% - 2 * var(--spacing-md));
    height: 120px;
    background: linear-gradient(135deg, #8a2833 0%, #a8343c 100%);
    border-radius: var(--radius-lg);
    margin: 0 var(--spacing-md) var(--spacing-lg) var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: slideDown 0.5s ease-out;
}

.login-logo img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.login-title {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.login-subtitle {
    font-size: 14px;
    color: #666;
    font-weight: normal;
}

/* =====================================================
   Form styles
   ===================================================== */

.login-form {
    width: 100%;
}

.login-section {
    display: none;
}

.login-section.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Error Message */
#lblError {
    display: block;
    background-color: #ffebee;
    color: #c62828;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #c62828;
    font-size: 13px;
    line-height: 1.5;
}

/* =====================================================
   Form groups & inputs
   ===================================================== */

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-label i {
    margin-right: 8px;
    color: #8a2833;
    width: 16px;
}

/* Input Fields */
.form-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-family: 'Century Gothic', CenturyGothic, AppleGothic, Arial, sans-serif;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.form-input:focus {
    outline: none;
    border-color: #8a2833;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(138, 40, 51, 0.1);
}

.form-input::placeholder {
    color: #999;
}

/* Password wrapper for toggle button */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper .form-input {
    flex: 1;
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #8a2833;
    font-size: 16px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #6b1f27;
}

.password-toggle:focus {
    outline: none;
    color: var(--color-accent);
}

.form-focus-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #8a2833;
    transition: width 0.3s ease;
}

.form-input:focus ~ .form-focus-border {
    width: 100%;
}

/* Validation Messages */
.validation-messages {
    display: none;
    margin-bottom: 20px;
}

.validation-messages.has-errors {
    display: block;
}

.error-message {
    display: none;
    background-color: #ffebee;
    color: #c62828;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 4px;
    border-left: 4px solid #c62828;
    font-size: 12px;
    line-height: 1.4;
    animation: slideDown 0.3s ease-out;
}

.error-message:not(:empty) {
    display: block;
}

.error-message::before {
    content: "✕ ";
    font-weight: bold;
    margin-right: 6px;
    color: #c62828;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================================
   Buttons
   ===================================================== */

.btn {
    font-family: 'Century Gothic', CenturyGothic, AppleGothic, Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
}

.btn-primary {
    background-color: #8a2833;
    color: white;
}

.btn-primary:hover {
    background-color: #6b1f27;
    box-shadow: 0 5px 15px rgba(138, 40, 51, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-submit {
    margin-top: 10px;
}

/* =====================================================
   Password change section
   ===================================================== */

.password-change-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #fff3cd;
}

.password-change-header i {
    font-size: 48px;
    color: #8a2833;
    margin-bottom: 15px;
    display: block;
}

.password-change-header h2 {
    color: #333;
    font-size: 24px;
    margin-bottom: 10px;
}

.password-change-header p {
    color: #666;
    font-size: 13px;
    line-height: 1.6;
}

/* Password requirements */
.password-requirements {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
    padding-left: 15px;
}

/* Success Message */
.success-message {
    display: block;
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #2e7d32;
    font-size: 13px;
    line-height: 1.5;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================================
   Footer
   ===================================================== */

.login-footer {
    position: fixed;
    bottom: 20px;
    text-align: center;
    width: 100%;
    z-index: 5;
}

.footer-text {
    color: #999;
    font-size: 12px;
}

/* =====================================================
   Responsive design
   ===================================================== */

@media (max-width: 768px) {
    .login-wrapper {
        padding: 40px 30px;
        max-width: 90%;
        margin: 20px;
    }

    .login-header {
        margin-bottom: 30px;
        padding-bottom: 15px;
    }

    .login-logo {
        font-size: 48px;
    }

    .login-title {
        font-size: 26px;
    }

    .form-input {
        padding: 10px 12px;
        font-size: 13px;
    }

    .form-label {
        font-size: 12px;
    }

    .password-toggle {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .login-wrapper {
        padding: 30px 20px;
    }

    .login-logo {
        font-size: 40px;
    }

    .login-title {
        font-size: 22px;
    }

    .login-subtitle {
        font-size: 12px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Appended styles for polished validation messages */

.result-wrapper {
    display: none; /* controlled by server or JS */
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(20, 30, 40, 0.08);
    border-left: 4px solid transparent;
    background: linear-gradient(180deg, #fff, #fff);
    color: #1f2937;
    margin: 12px 0 6px;
    position: relative;
    transition: transform 160ms cubic-bezier(.2,.9,.3,1), opacity 160ms ease;
    opacity: 1;
    min-height: 46px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
}

.result-wrapper:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

/* icon */
.result-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    flex: 0 0 auto;
    color: #fff;
}

/* text */
.validation-messages {
    font-size: 14px;
    line-height: 1.35;
    color: inherit;
    margin: 0;
    padding: 0;
    display: block;
    word-break: break-word;
    flex: 1 1 auto;
    align-self: center;
}

/* close button */
.result-close {
    position: absolute;
    right: 8px;
    top: 6px;
    border: none;
    background: transparent;
    color: rgba(0,0,0,0.45);
    font-size: 20px;
    line-height: 1;
    padding: 4px;
    cursor: pointer;
    border-radius: 6px;
}
.result-close:hover {
    background: rgba(0,0,0,0.04);
}

/* states */
.result-wrapper.error {
    border-left-color: #ef4444; /* red */
    background: linear-gradient(180deg, #fff, #fff);
    color: #991b1b;
}
.result-wrapper.error .result-icon {
    background: linear-gradient(180deg, #ef4444, #dc2626);
    color: #fff;
}

.result-wrapper.warning {
    border-left-color: #f59e0b; /* amber */
    color: #92400e;
}
.result-wrapper.warning .result-icon {
    background: linear-gradient(180deg, #f59e0b, #d97706);
    color: #fff;
}

.result-wrapper.info {
    border-left-color: #2563eb; /* blue */
    color: #0b3d91;
}
.result-wrapper.info .result-icon {
    background: linear-gradient(180deg, #2563eb, #1e40af);
    color: #fff;
}

/* responsive tweaks */
@media (max-width: 480px) {
    .result-wrapper { padding: 12px; }
    .result-close { top: 4px; right: 6px; }
}
