
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f4f6fb;
    margin: 0;
    padding: 0;
}

/* Card containers for forms */
.form-card, .register-card, .login-card, .add-student-card {
    background: #fff;
    padding: 2.5rem 2.5rem 2rem 2.5rem;
    border-radius: 14px;
    box-shadow: 0 6px 32px rgba(0,0,0,0.10);
    min-width: 340px;
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 1.7rem;
    position: relative;
}

.form-card h2, .register-card h2, .login-card h2, .add-student-card h2 {
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: #222;
    text-align: center;
    letter-spacing: 0.5px;
    font-size: 1.18rem;
}

/* Form field rows */
.form-field-row, .register-field-row, .add-student-field-row, .login-field-row {
    display: flex;
    gap: 1rem;
    width: 100%;
}
.form-field, .register-field, .add-student-field, .login-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* Inputs */
.form-input, .register-input, .add-student-input, .login-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.6rem 0.9rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    background: #fafbfc;
    transition: border 0.2s;
}
.form-input:focus, .register-input:focus, .add-student-input:focus, .login-input:focus {
    outline: none;
    border-color: #4f8cff;
}

/* Buttons */
.form-btn, .register-btn, .login-btn, .add-student-btn {
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem;
    font-size: 1.05rem;
    font-weight: 600;
    background: #4f8cff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
    margin-top: 0.5rem;
}
.form-btn:hover, .register-btn:hover, .login-btn:hover, .add-student-btn:hover {
    background: #3b78d6;
}

/* Footer links */
.form-footer, .register-footer, .login-footer, .add-student-footer {
    font-size: 0.95rem;
    text-align: center;
    margin-top: 0.5rem;
}
.form-footer a, .register-footer a, .login-footer a, .add-student-footer a {
    color: #4f8cff;
    text-decoration: none;
}
.form-footer a:hover, .register-footer a:hover, .login-footer a:hover, .add-student-footer a:hover {
    text-decoration: underline;
}

/* Error and success messages */
.error-message {
    color: #d32f2f;
    font-weight: 500;
    background: #ffeaea;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    text-align: center;
    font-size: 0.95rem;
}
.success-message {
    color: #2e7d32;
    font-weight: 500;
    background: #e8f5e9;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    text-align: center;
    font-size: 0.95rem;
}

/* Floating label styles for date and select */
.floating-label-field {
    position: relative;
    flex: 1;
    margin-bottom: 0;
}
.floating-label-field input,
.floating-label-field select {
    width: 100%;
    padding: 0.9rem 0.9rem 0.4rem 0.9rem;
    font-size: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fafbfc;
    transition: border 0.2s;
    color: #888;
}
.floating-label-field label {
    position: absolute;
    left: 0.9rem;
    top: 0.9rem;
    color: #888;
    font-size: 1rem;
    pointer-events: none;
    background: transparent;
    transition: all 0.2s;
    padding: 0 4px;
}
.floating-label-field input:focus + label,
.floating-label-field input:not(:placeholder-shown) + label,
.floating-label-field select:focus + label,
.floating-label-field select:valid + label {
    top: -0.7rem;
    left: 0.7rem;
    font-size: 0.85rem;
    color: #888;
    background: #fff;
}
.floating-label-field input[type="date"]:focus + label,
.floating-label-field input[type="date"]:not(:placeholder-shown) + label {
    top: -0.7rem;
    left: 0.7rem;
    font-size: 0.85rem;
    color: #888;
    background: #fff;
}

/* Role toggle buttons */
.role-toggle-btn {
    flex: 1 1 0;
    min-width: 130px;
    margin: 0;
    padding: 0.6rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #888;
    background: #f0f0f0;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.role-toggle-btn:hover {
    background: #e0e0e0;
    color: #222;
}
.role-toggle-btn.active {
    background: #43a047;
    color: white;
    border-color: #43a047;
}
.role-toggle-btn.selected {
    background: #43b66c;
    color: #fff;
    border-color: #43b66c;
}
.role-toggle-btn.unselected {
    background: #f2f2f2;
    color: #888;
    border-color: #bdbdbd;
}

/* Password hint */
.register-password-hint, .student-password-hint {
    width: 100%;
    background: transparent;
    padding: 4px 0 0 0;
    margin-top: 2px;
    text-align: left;
    color: #888;
    font-size: 0.95em;
    display: block;
}

/* Page backgrounds */
body.register-bg, body.login-bg, body.add-student-bg {
    min-height: 100vh;
    background: #f5f6fa;
    display: flex;
    align-items: center;
    justify-content: center;
}
