/* ══════════════════════════════════════════════════
   IDZORA Auth — Styles
   ══════════════════════════════════════════════════ */

.iz-auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 60vh;
    padding: 48px 16px;
}

.iz-auth-card {
    width: 100%;
    max-width: 480px;
    background: var(--iz-white, #fff);
    border: 1px solid var(--iz-border, #e0e5ed);
    border-radius: 16px;
    padding: 40px 32px;
    box-shadow: 0 4px 24px rgba(16, 28, 54, 0.06);
}

.iz-auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.iz-auth-logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--iz-blue, #0866FF);
    margin-bottom: 16px;
}

.iz-auth-header h2 {
    font-size: 1.4rem;
    color: var(--iz-night, #101C36);
    margin: 0 0 6px;
}

.iz-auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.iz-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.iz-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--iz-night, #101C36);
}

.iz-label .required {
    color: var(--iz-red, #D94052);
}

.iz-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--iz-border, #d0d5dd);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--iz-glacier, #F5F8FF);
    color: var(--iz-night, #101C36);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.iz-input:focus {
    outline: none;
    border-color: var(--iz-blue, #0866FF);
    box-shadow: 0 0 0 3px rgba(8, 102, 255, 0.12);
}

.iz-input.iz-input--error {
    border-color: var(--iz-red, #D94052);
}

.iz-input--code {
    text-align: center;
    font-family: 'Space Grotesk', monospace;
    font-size: 1.3rem;
    letter-spacing: 0.15em;
}

.iz-textarea {
    resize: vertical;
    min-height: 80px;
}

.iz-input-wrapper {
    position: relative;
}

.iz-input-wrapper .iz-input {
    padding-right: 44px;
}

.iz-toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--iz-muted, #8892a4);
    cursor: pointer;
    padding: 4px;
}

.iz-form-row {
    display: flex;
    gap: 14px;
}

.iz-form-row--2col > * {
    flex: 1;
    min-width: 0;
}

.iz-form-row--between {
    justify-content: space-between;
    align-items: center;
}

.iz-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--iz-muted, #5a6578);
}

.iz-checkbox input[type="checkbox"] {
    margin-top: 2px;
    accent-color: var(--iz-blue, #0866FF);
}

.iz-checkbox a {
    color: var(--iz-blue, #0866FF);
}

.iz-link {
    font-size: 0.85rem;
    color: var(--iz-blue, #0866FF);
    text-decoration: none;
}

.iz-link:hover {
    text-decoration: underline;
}

/* ─── Password strength ─── */

.iz-password-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.iz-password-bar {
    flex: 1;
    height: 4px;
    background: var(--iz-border, #e0e5ed);
    border-radius: 4px;
    overflow: hidden;
}

.iz-password-bar__fill {
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width 0.3s, background 0.3s;
}

.iz-password-label {
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 60px;
}

/* ─── Buttons ─── */

.iz-btn--lg {
    padding: 14px 24px;
    font-size: 1rem;
}

.iz-btn--block {
    width: 100%;
}

.iz-btn--danger {
    color: var(--iz-red, #D94052);
    border-color: var(--iz-red, #D94052);
}

.iz-btn--danger:hover {
    background: var(--iz-red, #D94052);
    color: #fff;
}

.iz-btn-loader {
    display: inline-flex;
    align-items: center;
}

.iz-spinner {
    animation: iz-spin 1s linear infinite;
}

@keyframes iz-spin {
    to { transform: rotate(360deg); }
}

/* ─── Alerts ─── */

.iz-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.88rem;
    margin-bottom: 16px;
}

.iz-alert--success {
    background: rgba(22, 184, 166, 0.1);
    color: #0d7d6f;
    border: 1px solid rgba(22, 184, 166, 0.2);
}

.iz-alert--error {
    background: rgba(217, 64, 82, 0.08);
    color: #b93344;
    border: 1px solid rgba(217, 64, 82, 0.15);
}

.iz-alert--warning {
    background: rgba(217, 144, 22, 0.08);
    color: #9a6e0a;
    border: 1px solid rgba(217, 144, 22, 0.15);
}

.iz-alert--info {
    background: rgba(8, 102, 255, 0.06);
    color: #0550cc;
    border: 1px solid rgba(8, 102, 255, 0.12);
}

/* ─── Auth Footer ─── */

.iz-auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--iz-border, #e0e5ed);
    font-size: 0.88rem;
    color: var(--iz-muted, #5a6578);
}

.iz-auth-footer a {
    color: var(--iz-blue, #0866FF);
    font-weight: 600;
}

/* ─── Auth Icons ─── */

.iz-auth-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.5rem;
    font-weight: 700;
}

.iz-auth-icon--success {
    background: rgba(22, 184, 166, 0.1);
    color: var(--iz-turquoise, #16B8A6);
}

.iz-auth-icon--error {
    background: rgba(217, 64, 82, 0.08);
    color: var(--iz-red, #D94052);
}

/* ─── Profile ─── */

.iz-profile-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 16px;
}

.iz-profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px 0;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--iz-border, #e0e5ed);
}

.iz-avatar {
    border-radius: 50%;
    border: 3px solid var(--iz-blue, #0866FF);
}

.iz-profile-info h1 {
    font-size: 1.4rem;
    margin: 0 0 2px;
    color: var(--iz-night, #101C36);
}

.iz-profile-badges {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
    flex-wrap: wrap;
}

.iz-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.iz-badge--plan {
    background: var(--iz-blue, #0866FF);
    color: #fff;
}

.iz-badge--professionnel {
    background: linear-gradient(135deg, #0866FF, #16B8A6);
}

.iz-badge--vip {
    background: linear-gradient(135deg, #D99016, #D94052);
}

.iz-badge--verified {
    background: rgba(22, 184, 166, 0.1);
    color: #0d7d6f;
}

.iz-badge--warning {
    background: rgba(217, 144, 22, 0.1);
    color: #9a6e0a;
}

.iz-badge--active {
    background: rgba(22, 184, 166, 0.1);
    color: #0d7d6f;
}

/* ─── Profile Tabs ─── */

.iz-profile-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--iz-border, #e0e5ed);
    margin-bottom: 24px;
    overflow-x: auto;
}

.iz-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--iz-muted, #5a6578);
    cursor: pointer;
    position: relative;
    white-space: nowrap;
}

.iz-tab--active {
    color: var(--iz-blue, #0866FF);
}

.iz-tab--active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--iz-blue, #0866FF);
    border-radius: 2px 2px 0 0;
}

.iz-tab-panel[hidden] {
    display: none;
}

/* ─── Security Section ─── */

.iz-security-section {
    padding: 20px 0;
    border-bottom: 1px solid var(--iz-border, #e0e5ed);
}

.iz-security-section:last-child {
    border-bottom: none;
}

.iz-security-section h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    color: var(--iz-night, #101C36);
}

.iz-2fa-setup {
    margin-top: 16px;
    padding: 20px;
    background: var(--iz-glacier, #F5F8FF);
    border-radius: 12px;
    border: 1px solid var(--iz-border, #e0e5ed);
}

.iz-2fa-qr {
    text-align: center;
    margin: 16px 0;
}

.iz-backup-codes {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.iz-backup-codes code {
    padding: 6px;
    background: var(--iz-white, #fff);
    border: 1px solid var(--iz-border, #e0e5ed);
    border-radius: 6px;
    text-align: center;
    font-size: 0.82rem;
    font-family: 'Space Grotesk', monospace;
}

/* ─── Subscription ─── */

.iz-subscription-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    background: var(--iz-glacier, #F5F8FF);
    border: 1px solid var(--iz-border, #e0e5ed);
    border-radius: 12px;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.iz-subscription-plan {
    font-size: 1.3rem;
    margin: 4px 0;
    color: var(--iz-blue, #0866FF);
}

.iz-limits-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
}

.iz-limits-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--iz-border, #e0e5ed);
    font-size: 0.9rem;
}

.iz-limits-list li:last-child {
    border-bottom: none;
}

/* ─── Sessions ─── */

.iz-sessions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.iz-session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--iz-border, #e0e5ed);
    border-radius: 10px;
    margin-bottom: 8px;
    background: var(--iz-white, #fff);
}

.iz-session-item__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.iz-session-item__device {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--iz-night, #101C36);
    text-transform: capitalize;
}

.iz-session-item__ip {
    font-size: 0.8rem;
    color: var(--iz-muted, #8892a4);
}

.iz-session-item__date {
    font-size: 0.8rem;
    color: var(--iz-muted, #8892a4);
}

/* ─── Responsive ─── */

@media (max-width: 600px) {
    .iz-auth-card {
        padding: 28px 20px;
    }

    .iz-form-row--2col {
        flex-direction: column;
    }

    .iz-profile-header {
        flex-direction: column;
        text-align: center;
    }

    .iz-profile-badges {
        justify-content: center;
    }

    .iz-subscription-card {
        flex-direction: column;
        text-align: center;
    }

    .iz-backup-codes {
        grid-template-columns: repeat(2, 1fr);
    }
}
