/**
 * Kiki Academy Authentication Pages Styles
 * Login, Register, Profile, and Student Dashboard
 */

/* ═══════════════════════════════════════════════════════════════
   AUTH PAGE LAYOUT
   ═══════════════════════════════════════════════════════════════ */

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-layout {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    .auth-layout {
        grid-template-columns: 1fr 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════
   AUTH PANEL (Form Side)
   ═══════════════════════════════════════════════════════════════ */

.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-8);
    background: var(--kiki-white);
}

@media (min-width: 768px) {
    .auth-panel {
        padding: var(--space-12);
    }
}

.auth-panel__container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

/* Logo */
.auth-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-10);
}

.auth-logo__image {
    width: 48px;
    height: 48px;
}

.auth-logo__text {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    color: var(--kiki-obsidian);
}

/* Header */
.auth-header {
    margin-bottom: var(--space-8);
}

.auth-header__title {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: var(--weight-bold);
    color: var(--kiki-obsidian);
    margin-bottom: var(--space-2);
}

.auth-header__subtitle {
    font-size: var(--text-base);
    color: var(--kiki-charcoal);
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.auth-form__group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.auth-form__label {
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--kiki-obsidian);
}

.auth-form__input {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    background: var(--kiki-pearl);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    transition: all var(--duration-fast) var(--ease-out);
}

.auth-form__input:focus {
    background: var(--kiki-white);
    border-color: var(--kiki-rose);
    outline: none;
    box-shadow: 0 0 0 4px var(--virtue-elegance-glow);
}

.auth-form__input::placeholder {
    color: var(--kiki-taupe);
}

/* Password Toggle */
.auth-form__password-wrapper {
    position: relative;
}

.auth-form__password-toggle {
    position: absolute;
    right: var(--space-3);
    top: 50%;
    transform: translateY(-50%);
    padding: var(--space-1);
    color: var(--kiki-taupe);
    cursor: pointer;
    transition: color var(--duration-fast) var(--ease-out);
}

.auth-form__password-toggle:hover {
    color: var(--kiki-charcoal);
}

/* Checkbox */
.auth-form__checkbox-group {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.auth-form__checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--kiki-rose);
}

.auth-form__checkbox-label {
    font-size: var(--text-sm);
    color: var(--kiki-charcoal);
}

/* Links Row */
.auth-form__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-form__link {
    font-size: var(--text-sm);
    color: var(--kiki-rose);
    font-weight: var(--weight-medium);
    transition: color var(--duration-fast) var(--ease-out);
}

.auth-form__link:hover {
    color: var(--kiki-rose-dark);
}

/* Submit Button */
.auth-form__submit {
    margin-top: var(--space-2);
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin: var(--space-6) 0;
}

.auth-divider__line {
    flex: 1;
    height: 1px;
    background: var(--kiki-silk);
}

.auth-divider__text {
    font-size: var(--text-sm);
    color: var(--kiki-taupe);
}

/* Social Buttons */
.auth-social {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.auth-social__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--kiki-white);
    border: 2px solid var(--kiki-silk);
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    font-weight: var(--weight-medium);
    color: var(--kiki-obsidian);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.auth-social__btn:hover {
    background: var(--kiki-pearl);
    border-color: var(--kiki-taupe);
}

.auth-social__icon {
    width: 20px;
    height: 20px;
}

/* Footer */
.auth-footer {
    margin-top: var(--space-8);
    text-align: center;
    font-size: var(--text-sm);
    color: var(--kiki-charcoal);
}

.auth-footer__link {
    color: var(--kiki-rose);
    font-weight: var(--weight-semibold);
}

/* ═══════════════════════════════════════════════════════════════
   AUTH VISUAL (Decorative Side)
   ═══════════════════════════════════════════════════════════════ */

.auth-visual {
    display: none;
    position: relative;
    background: linear-gradient(135deg, var(--kiki-rose-light) 0%, var(--kiki-rose) 50%, var(--kiki-rose-dark) 100%);
    overflow: hidden;
}

@media (min-width: 1024px) {
    .auth-visual {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.auth-visual__content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: var(--space-12);
    color: var(--kiki-white);
}

.auth-visual__icon {
    font-size: 6rem;
    margin-bottom: var(--space-6);
    animation: float 6s ease-in-out infinite;
}

.auth-visual__title {
    font-family: var(--font-heading);
    font-size: var(--text-4xl);
    font-weight: var(--weight-bold);
    margin-bottom: var(--space-4);
}

.auth-visual__text {
    font-size: var(--text-lg);
    opacity: 0.9;
    max-width: 400px;
    margin: 0 auto;
    line-height: var(--leading-relaxed);
}

/* Decorative Elements */
.auth-visual::before {
    content: "";
    position: absolute;
    top: -20%;
    right: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
}

.auth-visual::after {
    content: "";
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
}

/* ═══════════════════════════════════════════════════════════════
   PROFILE PAGE
   ═══════════════════════════════════════════════════════════════ */

.profile-page {
    min-height: 100vh;
    background: var(--kiki-cream);
}

.profile-header {
    padding: var(--space-16) 0 var(--space-10);
    background: linear-gradient(180deg, var(--kiki-pearl) 0%, var(--kiki-cream) 100%);
}

.profile-header__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-6);
    text-align: center;
}

@media (min-width: 768px) {
    .profile-header__container {
        flex-direction: row;
        text-align: left;
    }
}

/* Avatar */
.profile-avatar {
    position: relative;
}

.profile-avatar__image {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--kiki-rose-light), var(--kiki-rose));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--kiki-white);
    border: 4px solid var(--kiki-white);
    box-shadow: var(--shadow-lg);
}

.profile-avatar__tier {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    background: var(--kiki-white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-lg);
    box-shadow: var(--shadow-md);
}

.profile-header__info {
    flex: 1;
}

.profile-header__name {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: var(--weight-bold);
    color: var(--kiki-obsidian);
    margin-bottom: var(--space-1);
}

.profile-header__tier {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    background: var(--tier-emerald-light);
    color: var(--tier-emerald-dark);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-2);
}

.profile-header__joined {
    font-size: var(--text-sm);
    color: var(--kiki-taupe);
}

.profile-header__actions {
    display: flex;
    gap: var(--space-3);
}

/* Profile Content */
.profile-content {
    padding: var(--space-10) 0 var(--space-20);
}

.profile-content__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
}

@media (min-width: 1024px) {
    .profile-content__grid {
        grid-template-columns: 2fr 1fr;
    }
}

/* Profile Card */
.profile-card {
    background: var(--kiki-white);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-6);
}

.profile-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--kiki-silk);
}

.profile-card__title {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    color: var(--kiki-obsidian);
}

.profile-card__edit {
    font-size: var(--text-sm);
    color: var(--kiki-rose);
    font-weight: var(--weight-medium);
}

/* Profile Info Grid */
.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
}

.profile-info-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.profile-info-item__label {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--kiki-taupe);
}

.profile-info-item__value {
    font-size: var(--text-base);
    color: var(--kiki-obsidian);
}

/* Settings List */
.settings-list {
    display: flex;
    flex-direction: column;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--kiki-silk);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item__info {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.settings-item__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--kiki-pearl);
    border-radius: var(--radius-lg);
    font-size: var(--text-lg);
}

.settings-item__text h4 {
    font-weight: var(--weight-medium);
    color: var(--kiki-obsidian);
    margin-bottom: var(--space-1);
}

.settings-item__text p {
    font-size: var(--text-sm);
    color: var(--kiki-taupe);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch__slider {
    position: absolute;
    inset: 0;
    background: var(--kiki-silk);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.toggle-switch__slider::before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: var(--kiki-white);
    border-radius: var(--radius-full);
    transition: all var(--duration-fast) var(--ease-out);
    box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .toggle-switch__slider {
    background: var(--kiki-rose);
}

.toggle-switch input:checked + .toggle-switch__slider::before {
    transform: translateX(20px);
}

/* ═══════════════════════════════════════════════════════════════
   ERROR STATES
   ═══════════════════════════════════════════════════════════════ */

.auth-form__error {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: var(--color-error-light);
    color: var(--color-error);
    font-size: var(--text-sm);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
}

.auth-form__error svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.auth-form__input--error {
    border-color: var(--color-error);
}

.auth-form__input--error:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.auth-form__field-error {
    font-size: var(--text-xs);
    color: var(--color-error);
    margin-top: var(--space-1);
}
