@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

/* ── Dark theme (default) ── */
:root, [data-theme="dark"] {
    --w-primary: #FBA51A;
    --w-primary-dark: #E09310;
    --w-black: #272727;;
    --w-surface: #111111;
    --w-border: rgba(255, 255, 255, 0.08);
    --w-white: #FFFFFF;
    --w-text-muted: rgba(255, 255, 255, 0.45);
    --w-text-secondary: rgba(255, 255, 255, 0.65);
    --w-danger: #ef4444;
    --w-font: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    --w-radius: 10px;
    --w-radius-sm: 6px;

    /* login page specific */
    --w-form-bg:       #111111;
    --w-form-text:     #FFFFFF;
    --w-input-bg:      rgba(255, 255, 255, 0.05);
    --w-input-border:  rgba(255, 255, 255, 0.08);
}

/* ── Light theme ── */
[data-theme="light"] {
    --w-primary: #FBA51A;
    --w-primary-dark: #E09310;
    --w-black: #000000;
    --w-surface: #f4f5f7;
    --w-border: rgba(0, 0, 0, 0.10);
    --w-white: #0f0f0f;
    --w-text-muted: rgba(15, 15, 15, 0.45);
    --w-text-secondary: rgba(15, 15, 15, 0.65);
    --w-danger: #dc2626;
    --w-font: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    --w-radius: 10px;
    --w-radius-sm: 6px;

    --w-form-bg:       #ffffff;
    --w-form-text:     #0f0f0f;
    --w-input-bg:      #f8f9fa;
    --w-input-border:  rgba(0, 0, 0, 0.12);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    font-family: var(--w-font);
    background-color: var(--w-black);
    color: var(--w-white);
    min-height: 100vh;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Layout ── */
.identity-container {
    display: flex;
    min-height: 100vh;
}

.identity-left {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    background-color: var(--w-black);
    background-image: url('/images/Mockup.jpg');
    background-size: cover;
    background-position: center center;
}

.identity-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.92) 0%,
        rgba(0, 0, 0, 0.55) 45%,
        rgba(0, 0, 0, 0.30) 100%
    );
    z-index: 0;
}

.identity-right {
    width: 480px;
    flex-shrink: 0;
    background-color: var(--w-form-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 3.5rem;
    border-left: 1px solid var(--w-border);
    min-height: 100vh;
}

/* ── Right panel header (logo + theme toggle) ── */
.identity-right-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
}

.identity-form-logo-dark {
    display: block;
}

.identity-form-logo-light {
    display: none;
}

[data-theme="light"] .identity-form-logo-dark {
    display: none;
}

[data-theme="light"] .identity-form-logo-light {
    display: block;
}

.identity-theme-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--w-radius-sm);
    border: 1px solid var(--w-border);
    background: transparent;
    color: var(--w-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.identity-theme-btn:hover {
    color: var(--w-white);
    background-color: rgba(128, 128, 128, 0.1);
}

.identity-theme-btn svg {
    width: 15px;
    height: 15px;
}

/* ── Brand side (left) ── */
.identity-brand {
    position: relative;
    z-index: 1;
    max-width: 440px;
}

.identity-brand-logo {
    width: 160px;
    height: auto;
    display: block;
    margin-bottom: 1.75rem;
}

.identity-brand-tagline {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.70);
    line-height: 1.7;
    font-weight: 400;
    margin-bottom: 2rem;
}

.identity-brand-tagline strong {
    color: var(--w-primary);
    font-weight: 700;
}

/* ── Divider line (orange accent) ── */
.identity-brand-line {
    width: 40px;
    height: 3px;
    background-color: var(--w-primary);
    margin: 0 0 1.5rem;
    border-radius: 2px;
}

/* ── Feature list on brand panel ── */
.identity-brand-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.identity-brand-features li {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.60);
    font-weight: 600;
}

.identity-brand-features li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--w-primary);
    flex-shrink: 0;
}

/* ── Form side (right) ── */
.identity-form-header {
    margin-bottom: 2.25rem;
}

.identity-form-logo-dark,
.identity-form-logo-light {
    width: 120px;
    height: auto;
}

.identity-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--w-form-text);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0.375rem;
}

.identity-subtitle {
    font-size: 0.9375rem;
    color: var(--w-text-secondary);
    font-weight: 400;
    line-height: 1.5;
}

/* ── Form elements ── */
.form-group {
    margin-bottom: 1.125rem;
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--w-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--w-input-bg);
    border: 1px solid var(--w-input-border);
    border-radius: var(--w-radius-sm);
    color: var(--w-form-text);
    font-family: var(--w-font);
    font-size: 1rem;
    font-weight: 400;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    outline: none;
    -webkit-appearance: none;
}

.form-input:focus {
    border-color: var(--w-primary);
    background-color: rgba(251, 165, 26, 0.04);
}

.form-input::placeholder {
    color: var(--w-text-muted);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 1.5rem;
    margin-top: 0.25rem;
}

.form-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--w-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.form-check label {
    font-size: 0.875rem;
    color: var(--w-text-muted);
    cursor: pointer;
    user-select: none;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8125rem 1.5rem;
    border: none;
    border-radius: var(--w-radius-sm);
    font-family: var(--w-font);
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease, opacity 0.15s ease;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    width: 100%;
    background-color: var(--w-primary);
    color: var(--w-black);
    margin-top: 0.5rem;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--w-primary-dark);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--w-white);
}

.btn-secondary:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.12);
}

/* ── Validation messages ── */
.field-hint {
    display: none;
}

.field-validation-error {
    display: block;
    font-size: 0.8125rem;
    color: #fca5a5;
    font-weight: 600;
    margin-top: 0.375rem;
    line-height: 1.4;
}

.form-input.input-validation-error {
    border-color: var(--w-danger);
}

/* ── Alerts ── */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--w-radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    line-height: 1.5;
    font-weight: 600;
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.alert-success {
    background-color: rgba(34, 197, 94, 0.12);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

/* ── Scope consent list ── */
.scope-list {
    list-style: none;
    margin: 1rem 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.scope-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background-color: rgba(251, 165, 26, 0.06);
    border: 1px solid rgba(251, 165, 26, 0.15);
    border-radius: var(--w-radius-sm);
    font-size: 0.875rem;
    color: var(--w-white);
}

.scope-icon {
    color: var(--w-primary);
    font-size: 1rem;
    flex-shrink: 0;
}

.btn-group {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn-group .btn {
    flex: 1;
}

/* ── Error page ── */
.error-code {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--w-primary);
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.error-message {
    color: var(--w-text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.error-back {
    margin-top: 2rem;
}

/* ── Header actions (lang select + theme toggle) ── */
.identity-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.identity-lang-select {
    height: 36px;
    padding: 0 2rem 0 0.75rem;
    border-radius: var(--w-radius-sm);
    border: 1px solid var(--w-border);
    background-color: var(--w-input-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888888' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    color: var(--w-text-secondary);
    font-family: var(--w-font);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.identity-lang-select:hover {
    border-color: var(--w-input-border);
    color: var(--w-form-text);
    background-color: rgba(128, 128, 128, 0.08);
}

.identity-lang-select:focus {
    border-color: var(--w-primary);
    background-color: rgba(251, 165, 26, 0.04);
}

.identity-lang-select option {
    background-color: #1a1a1a;
    color: #ffffff;
    font-family: var(--w-font);
    font-weight: 600;
}

[data-theme="light"] .identity-lang-select option {
    background-color: #ffffff;
    color: #0f0f0f;
}

/* ── Responsive: stack on small screens ── */
@media (max-width: 768px) {
    .identity-container {
        flex-direction: column;
    }

    .identity-left {
        display: none;
    }

    .identity-right {
        width: 100%;
        padding: 2.5rem 1.5rem;
        border-left: none;
        min-height: 100vh;
    }
}
