﻿:root {
    --primary: #7c3aed;
    --primary-light: #a78bfa;
    --primary-dark: #5b21b6;
    --surface: #ffffff;
    --text: #1e1b2e;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --error: #ef4444;
    --radius-card: 28px;
    --radius-input: 12px;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    min-height: 100vh;
    background: #7c3aed;
    display: flex;
    flex-direction: column;
}

/* ── Reset scoped to this page ── */
.takko-login-page *,
.takko-login-page *::before,
.takko-login-page *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

main, .main, [role="main"] {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    margin: 0 !important;
}

.add-user-form {
    --radius-card: 28px;
}

/* ── Page shell ── */
.takko-login-page {
    width: 100%;
    --surface: #ffffff;
    --text: #1e1b2e;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --error: #ef4444;
    --radius-card: 28px;
    --radius-input: 12px;
    min-height: calc(100vh - 32px);
    background: transparent;
    position: relative;
    font-family: 'Segoe UI', system-ui, sans-serif;
    display: flex;
    flex-direction: column;
}

/* ── Page background ── */
.page-background {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    box-sizing: border-box;
    display: flex;
    padding: 16px;
    flex-direction: column;
    background: transparent;
}

/* ── Background circles container ── */
#bgCircles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

.custom-header,
.full-page-content,
.custom-footer {
    position: relative;
    z-index: 2;
}

/* ── Centered form section ── */
.takko-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding: 24px 16px;
}

/* ── Card ── */
.takko-login-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border-radius: var(--radius-card);
    padding: 36px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 2;
}

/* ── Title ── */
.takko-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    margin-bottom: 28px;
    letter-spacing: -0.5px;
}

/* ── Validation summary ── */
.takko-validation-summary {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--error);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

    .takko-validation-summary:empty {
        display: none;
    }

/* ── Floating-label fields ── */
.takko-field {
    position: relative;
    margin-bottom: 20px;
}

.takko-input {
    width: 100%;
    padding: 16px 14px 8px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-input);
    font-size: 1rem;
    color: var(--text);
    background: transparent;
    outline: none;
    transition: border-color 0.2s;
    appearance: none;
}

    .takko-input:focus {
        border-color: var(--primary);
    }

/* Float the label when input has content or is focused */
.takko-label {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: all 0.18s ease;
    background: var(--surface);
    padding: 0 4px;
}

.takko-input:focus + .takko-label,
.takko-input:not(:placeholder-shown) + .takko-label {
    top: 0;
    font-size: 0.75rem;
    color: var(--primary);
    transform: translateY(-50%);
}

.takko-field-error {
    display: block;
    color: var(--error);
    font-size: 0.78rem;
    margin-top: 4px;
    padding-left: 2px;
}

    .takko-field-error:empty {
        display: none;
    }

/* ── Remember me ── */
.takko-remember {
    margin-bottom: 4px;
}

.takko-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.takko-checkbox {
    display: none;
}

.takko-checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 5px;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.2s, background 0.2s;
}

.takko-checkbox:checked + .takko-checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

    .takko-checkbox:checked + .takko-checkbox-custom::after {
        content: '';
        position: absolute;
        left: 3px;
        top: 0px;
        width: 6px;
        height: 10px;
        border: 2px solid #fff;
        border-top: none;
        border-left: none;
        transform: rotate(45deg);
    }

/* ── Forgot link ── */
.takko-forgot-link {
    display: block;
    text-align: right;
    margin-top: 8px;
    margin-bottom: 24px;
    font-size: 0.875rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.15s;
}

    .takko-forgot-link:hover {
        opacity: 0.75;
        text-decoration: underline;
    }

/* ── Login button ── */
.takko-login-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-input);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    letter-spacing: 0.3px;
}

    .takko-login-btn:hover {
        background: var(--primary-dark);
    }

    .takko-login-btn:active {
        transform: scale(0.98);
    }

/* ── Footer links ── */
.takko-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.takko-link {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}

    .takko-link:hover {
        color: var(--primary);
    }

/* ── Divider ── */
.takko-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 16px;
    color: var(--text-muted);
    font-size: 0.82rem;
}

    .takko-divider::before,
    .takko-divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: var(--border);
    }

/* ── External login buttons ── */
.takko-external-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.takko-external-btn {
    flex: 1;
    min-width: 120px;
    padding: 11px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-input);
    background: transparent;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

    .takko-external-btn:hover {
        border-color: var(--primary);
        background: #f5f3ff;
    }
