/* ═══════════════════════════════════════════════════════════════
 *  Open Eye Chat — Admin Panel Styles
 *  Premium dark theme with glassmorphism
 * ═══════════════════════════════════════════════════════════════ */

/* ── Reset & Variables ────────────────────────────────────────── */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-tertiary: #18181f;
    --bg-card: #13131a;
    --bg-hover: #1e1e28;
    --bg-active: rgba(99, 102, 241, 0.08);
    --border: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent: #6366f1;
    --accent-dark: #4338ca;
    --accent-light: rgba(99, 102, 241, 0.15);
    --green: #10b981;
    --green-bg: rgba(16, 185, 129, 0.1);
    --red: #ef4444;
    --red-bg: rgba(239, 68, 68, 0.1);
    --amber: #f59e0b;
    --amber-bg: rgba(245, 158, 11, 0.1);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* ── App Loading Splash ──────────────────────────────────────── */
.app-loading {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% 40%, rgba(99, 102, 241, 0.08) 0%, var(--bg-primary) 70%);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-loading.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.app-loading-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.app-loading-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    min-width: 120px;
}

/* ── Splash brand logo container ── */
.splash-brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    min-width: 100px;
    position: relative;
}

/* Shimmer placeholder when logo hasn't loaded yet */
.splash-brand-logo:empty::before {
    content: '';
    display: block;
    width: 160px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(
        110deg,
        rgba(99, 102, 241, 0.06) 0%,
        rgba(99, 102, 241, 0.15) 40%,
        rgba(147, 51, 234, 0.15) 60%,
        rgba(99, 102, 241, 0.06) 100%
    );
    background-size: 300% 100%;
    animation: shimmer-loading 2s ease-in-out infinite;
}

@keyframes shimmer-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Logo image inside splash */
.splash-brand-logo .brand-logo-img {
    height: 48px !important;
    width: auto !important;
    display: block;
    animation: splash-logo-reveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards,
               pulse-glow-img 2.5s ease-in-out 0.6s infinite;
    opacity: 0;
}

@keyframes splash-logo-reveal {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

.app-loading-brand-img {
    height: 48px;
    width: auto;
    animation: pulse-glow-img 2s ease-in-out infinite;
}

@keyframes pulse-glow-img {
    0%, 100% { filter: drop-shadow(0 4px 16px rgba(99, 102, 241, 0.3)); }
    50% { filter: drop-shadow(0 4px 24px rgba(99, 102, 241, 0.6)); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 8px 48px rgba(99, 102, 241, 0.6); }
}

.app-loading-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(99, 102, 241, 0.15);
    border-top-color: var(--accent, #6d5dfc);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.app-loading-dots {
    display: flex;
    gap: 6px;
}

.app-loading-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent, #6d5dfc);
    opacity: 0.3;
    animation: dotBounce 1.4s ease-in-out infinite;
}

.app-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.app-loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
    0%, 80%, 100% { opacity: 0.3; transform: scale(1); }
    40% { opacity: 1; transform: scale(1.3); }
}

/* ── Login brand logo container ── */
.login-brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.login-brand-logo .brand-logo-img {
    height: 44px !important;
    width: auto !important;
    display: block;
    margin: 0 auto 16px;
    filter: drop-shadow(0 4px 16px rgba(99, 102, 241, 0.25));
    animation: splash-logo-reveal 0.4s ease-out forwards;
    opacity: 0;
}

/* ── Topbar brand logo ── */
#topbar-logo .brand-logo-img {
    height: 26px !important;
    width: auto !important;
    display: block;
    animation: splash-logo-reveal 0.3s ease-out forwards;
    opacity: 0;
}

/* ── Prevent FOUC: dashboard hidden until JS removes this class ── */
.dashboard-loading {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ── Views ────────────────────────────────────────────────────── */
.view {
    display: none;
}

.view.active {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ═══ LOGIN ═══ */
.login-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 60%);
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    box-shadow: var(--shadow);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-brand-img {
    height: 44px;
    width: auto;
    display: block;
    margin: 0 auto 16px;
    filter: drop-shadow(0 4px 16px rgba(99, 102, 241, 0.25));
}

.login-logo p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── Form Fields ──────────────────────────────────────────────── */
.form-field {
    margin-bottom: 16px;
}

.form-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-light);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: var(--text-muted);
}

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

.form-field-sm {
    width: 100px;
}

.form-field-sm input {
    width: 100%;
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.form-error {
    color: var(--red);
    font-size: 13px;
    padding: 10px 14px;
    background: var(--red-bg);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    width: auto;
}

.btn-primary.btn-secondary {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
}

.btn-primary.btn-secondary:hover:not(:disabled) {
    background: var(--bg-hover);
    box-shadow: none;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 18px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.7;
}

.btn-secondary:hover:not(:disabled) svg {
    opacity: 1;
}

.btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: var(--transition);
}

.btn-green {
    background: var(--green);
    color: #fff;
}

.btn-green:hover {
    background: #059669;
}

.btn-accent {
    background: rgba(99, 102, 241, 0.16);
    color: #c7d2fe;
    border: 1px solid rgba(99, 102, 241, 0.28);
}

.btn-accent:hover {
    background: rgba(99, 102, 241, 0.24);
    color: #fff;
}

.btn-ghost {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    background: var(--red);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: var(--transition);
}

.btn-danger:hover {
    background: #dc2626;
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.icon-btn-green:hover {
    color: var(--green);
    background: var(--green-bg);
}

.icon-btn-red:hover {
    color: var(--red);
    background: var(--red-bg);
}

/* ═══ TOPBAR ═══ */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-brand-img {
    height: 26px;
    width: auto;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-nickname {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.nickname-label {
    font-size: 11px;
    color: var(--text-muted);
}

.nickname-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.nickname-input {
    width: 140px;
    padding: 4px 8px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font);
    outline: none;
}

.nickname-input:focus {
    border-color: var(--accent);
}

.topbar-profile {
    position: relative;
}

.topbar-profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
    outline: none;
}

.topbar-profile-trigger:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.topbar-profile-trigger:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.topbar-avatar {
    position: relative;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    transition: var(--transition);
}

.topbar-profile-trigger:hover .topbar-avatar {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.45);
    transform: scale(1.04);
}

.topbar-avatar-status {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--green);
    border: 2px solid var(--bg-tertiary);
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

.topbar-profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    min-width: 0;
}

.topbar-profile-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
    line-height: 1.2;
}

.topbar-role-badge {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 6px;
    letter-spacing: 0.02em;
    line-height: 1.6;
    text-transform: uppercase;
    background: var(--accent-light);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.topbar-role-badge.role-admin {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.2);
}

.topbar-role-badge.role-super-admin {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.2);
}

.topbar-role-badge.role-operator {
    background: rgba(59, 130, 246, 0.12);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.2);
}

.topbar-chevron {
    color: var(--text-muted);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.topbar-profile.open .topbar-chevron {
    transform: rotate(180deg);
}

/* ── Dropdown ────────────────────────────────────────────── */
.topbar-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 260px;
    background: rgba(19, 19, 26, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.03);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.97);
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.2s;
    z-index: 200;
    overflow: hidden;
}

.topbar-profile.open .topbar-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.topbar-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 14px;
}

.topbar-dropdown-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.topbar-dropdown-user {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.topbar-dropdown-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-dropdown-email {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 0 12px;
}

.topbar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: default;
    transition: var(--transition);
    border: none;
    background: none;
    width: 100%;
    font-family: var(--font);
    text-align: left;
}

.topbar-dropdown-item svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.topbar-dropdown-role-value {
    margin-left: auto;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 6px;
    background: var(--accent-light);
}

.topbar-dropdown-logout {
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: 0 0 var(--radius) var(--radius);
}

.topbar-dropdown-logout:hover {
    background: var(--red-bg);
    color: var(--red);
}

.topbar-dropdown-logout:hover svg {
    color: var(--red);
}

/* ═══ TAB BAR ═══ */
.tab-bar {
    display: flex;
    gap: 2px;
    padding: 10px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tab-bar::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
}

.tab-btn.active {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
}

.tab-badge {
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: var(--red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

/* ═══ MAIN CONTENT ═══ */
.main-content {
    flex: 1;
    overflow: hidden;
}

.tab-panel {
    display: none;
    height: calc(100vh - 120px);
    overflow: hidden;
}

.tab-panel.active {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.tab-header h2 {
    font-size: 18px;
    font-weight: 700;
}

.tab-header p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ═══ CHAT LAYOUT ═══ */
.chat-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: 100%;
}

/* ── Conversation List ────────────────────────────────────────── */
.conv-list-panel {
    width: 340px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.conv-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.conv-search svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.conv-search input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font);
    outline: none;
}

.conv-search input::placeholder {
    color: var(--text-muted);
}

.conv-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border);
}

.conv-count {
    font-size: 11px;
    color: var(--text-muted);
}

.conv-actions {
    display: flex;
    gap: 4px;
}

.conv-list {
    flex: 1;
    overflow-y: auto;
}

.conv-list::-webkit-scrollbar {
    width: 4px;
}

.conv-list::-webkit-scrollbar-track {
    background: transparent;
}

.conv-list::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 2px;
}

.conv-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.conv-item:hover {
    background: var(--bg-hover);
}

.conv-item.active {
    background: var(--bg-active);
    border-left: 3px solid var(--accent);
}

.conv-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.conv-info {
    flex: 1;
    min-width: 0;
}

.conv-info-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.conv-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conv-time {
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
}

.conv-email {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.conv-preview {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 4px;
}

.conv-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.conv-unread {
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: var(--red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot-ai {
    background: var(--accent);
}

.status-dot-waiting {
    background: var(--amber);
    animation: pulse 2s ease-in-out infinite;
}

.status-dot-active {
    background: var(--green);
}

.status-dot-closed {
    background: var(--text-muted);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.conv-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    color: var(--text-muted);
}

.conv-empty svg {
    opacity: 0.3;
    margin-bottom: 12px;
}

.conv-empty p {
    font-size: 13px;
}

/* ── Chat Panel ───────────────────────────────────────────────── */
.chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px;
}

.chat-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--accent);
}

.chat-empty h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.chat-empty p {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 280px;
}

/* Chat Header */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.chat-header-name {
    font-size: 14px;
    font-weight: 600;
}

.chat-header-email {
    font-size: 11px;
    color: var(--text-muted);
}

.chat-header-actions {
    display: flex;
    gap: 8px;
}

/* Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: radial-gradient(circle at 82% 18%, rgba(99, 102, 241, 0.04), transparent 34%), var(--bg-primary);
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 2px;
}

.admin-msg {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.other-msg {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.system-msg {
    display: flex;
    justify-content: center;
    margin: 4px 0;
}

.msg-bubble {
    max-width: min(70%, 820px);
    padding: 12px 17px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
    white-space: pre-wrap;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.admin-msg .msg-bubble {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px 18px 6px 18px;
}

.ai-msg .msg-bubble {
    background: linear-gradient(135deg, rgba(23, 23, 47, 0.98), rgba(18, 18, 39, 0.98));
    border: 1px solid rgba(99, 102, 241, 0.32);
    color: #eef2ff;
    border-radius: 6px 18px 18px 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 14px 30px rgba(0, 0, 0, 0.2);
}

.user-msg .msg-bubble {
    background: linear-gradient(135deg, rgba(39, 39, 42, 0.98), rgba(31, 31, 35, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f4f4f5;
    border-radius: 6px 18px 18px 18px;
}

.system-msg .msg-bubble {
    background: var(--amber-bg);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    font-size: 12px;
    text-align: center;
    border-radius: 20px;
    padding: 6px 16px;
}

.msg-sender {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.msg-time {
    font-size: 10px;
    margin-top: 4px;
    opacity: 0.6;
    padding: 0 4px;
}

.admin-msg .msg-time {
    color: rgba(255, 255, 255, 0.5);
    text-align: right;
}

.typing-row {
    margin-top: -4px;
}

.msg-typing-bubble {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 58px;
    width: auto;
    padding: 12px 14px;
}

.msg-typing-bubble span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #a1a1aa;
    animation: typing-bounce 1.25s ease-in-out infinite;
}

.msg-typing-bubble span:nth-child(2) {
    animation-delay: 0.15s;
}

.msg-typing-bubble span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes typing-bounce {

    0%,
    80%,
    100% {
        transform: translateY(0);
        opacity: 0.45;
    }

    40% {
        transform: translateY(-3px);
        opacity: 1;
    }
}

/* Input Area */
.chat-input-area {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.chat-input-area input {
    flex: 1;
    padding: 12px 16px;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font);
    outline: none;
    transition: var(--transition);
}

.chat-input-area input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.chat-input-area input::placeholder {
    color: var(--text-muted);
}

.send-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.send-btn:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.chat-closed-banner {
    padding: 16px;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
}

/* ═══ SUGGESTIONS LIST ═══ */
.suggestions-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.sug-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 8px;
    transition: var(--transition);
}

.sug-item:hover {
    border-color: var(--border-light);
    background: var(--bg-hover);
}

.sug-info {
    flex: 1;
    min-width: 0;
}

.sug-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.sug-response-preview {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sug-badges {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.sug-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

.sug-badge-operator {
    background: var(--amber-bg);
    color: var(--amber);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.sug-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: var(--transition);
}

.sug-item:hover .sug-actions {
    opacity: 1;
}

/* ═══ EMBED TAB ═══ */
.embed-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.embed-card {
    max-width: 600px;
    text-align: center;
}

.embed-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--accent);
}

.embed-card h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.embed-card p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.embed-card code {
    background: var(--accent-light);
    color: var(--accent);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.code-block {
    position: relative;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: left;
    margin-bottom: 20px;
}

.code-block pre {
    margin: 0;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.code-block code {
    background: transparent;
    color: #a5b4fc;
    font-size: 12px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    padding: 0;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.copy-btn:hover {
    color: var(--accent);
    background: var(--accent-light);
}

.embed-widget-id {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.embed-label {
    font-size: 13px;
    color: var(--text-muted);
}

.embed-widget-id code {
    font-size: 14px;
    font-weight: 600;
}

/* ═══ SETTINGS ═══ */
.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px 40px;
    overflow-y: auto;
    width: 100%;
    flex: 1;
    min-height: 0;
}

.settings-grid::-webkit-scrollbar {
    width: 5px;
}

.settings-grid::-webkit-scrollbar-track {
    background: transparent;
}

.settings-grid::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}

.settings-grid::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ── Settings Accordion Card ─────────────────────────────── */
.settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: clip;
    transition: border-color 0.2s ease;
}

.settings-card:hover {
    border-color: var(--border-light);
}

.settings-card-wide {
    grid-column: 1 / -1;
}

/* ── <details> / <summary> Accordion ─────────────────────── */
.settings-card summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background 0.15s ease;
}

.settings-card summary::-webkit-details-marker {
    display: none;
}

.settings-card summary::marker {
    content: '';
}

.settings-card summary:hover {
    background: rgba(255, 255, 255, 0.02);
}

.settings-card summary .section-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── Subtle tinted icon backgrounds ─────────────────────── */
.settings-card--indigo summary .section-icon {
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
}

.settings-card--emerald summary .section-icon {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
}

.settings-card--violet summary .section-icon {
    background: rgba(139, 92, 246, 0.12);
    color: #a78bfa;
}

.settings-card--amber summary .section-icon {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
}

.settings-card--rose summary .section-icon {
    background: rgba(244, 63, 94, 0.12);
    color: #fb7185;
}

.settings-card--green summary .section-icon {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

/* ── Voice Call Settings ────────────────────────────────────── */
.voice-settings-status {
    margin-bottom: 20px;
}

.voice-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
}

.voice-status-badge--active {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.voice-status-badge--inactive {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.voice-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #f4f4f5);
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.voice-section-desc {
    font-size: 12px;
    color: var(--text-muted, #a1a1aa);
    margin: 0 0 16px;
    line-height: 1.5;
}

.voice-storage-section {
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.voice-storage-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.voice-storage-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.voice-gdpr-notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    margin: 16px 0;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    color: #a5b4fc;
    font-size: 12px;
    line-height: 1.5;
}

.voice-gdpr-notice svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.voice-gdpr-notice strong {
    display: block;
    font-size: 13px;
    color: #c7d2fe;
    margin-bottom: 4px;
}

.voice-gdpr-notice p {
    margin: 0;
    color: #a1a1aa;
}

.voice-history-section {
    padding-top: 16px;
}

/* ── Voice History Empty State ─────────────────────────── */
.voice-history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.015);
}

.voice-history-empty-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(99, 102, 241, 0.08) 100%);
    border: 1px solid rgba(139, 92, 246, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(139, 92, 246, 0.5);
    margin-bottom: 14px;
}

.voice-history-empty-text {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary, #a1a1aa);
}

.voice-history-empty-sub {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted, #71717a);
}

.voice-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.btn-sm {
    padding: 6px 12px !important;
    font-size: 12px !important;
}

/* ── Managed Storage Pricing Card ───────────────────────── */
.voice-managed-pricing {
    margin-top: 4px;
}

.voice-managed-pricing-card {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.06) 0%, rgba(16, 185, 129, 0.04) 100%);
    border: 1px solid rgba(34, 197, 94, 0.15);
    border-radius: 14px;
    padding: 20px;
}

.voice-managed-pricing-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.voice-managed-pricing-header h5 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #22c55e;
}

.voice-managed-pricing-desc {
    font-size: 12px;
    color: var(--text-muted, #a1a1aa);
    margin: 0 0 14px;
    line-height: 1.5;
}

.voice-managed-pricing-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 14px;
}

.voice-managed-price-amount {
    font-size: 32px;
    font-weight: 700;
    color: #f4f4f5;
}

.voice-managed-price-interval {
    font-size: 14px;
    color: var(--text-muted, #a1a1aa);
}

.voice-managed-pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.voice-managed-pricing-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #d4d4d8;
}

.voice-managed-pricing-features li svg {
    color: #22c55e;
    flex-shrink: 0;
}

.voice-managed-pricing-actions {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 14px;
}

.voice-managed-pricing-note {
    font-size: 11px;
    color: var(--text-muted, #a1a1aa);
    margin: 10px 0 0;
    line-height: 1.5;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 10px 12px;
}

/* ── Addon Status Bar ──────────────────────────────────── */
.voice-addon-status-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(16, 185, 129, 0.08) 100%);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
}

.voice-addon-status-bar.expired {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(220, 38, 38, 0.08) 100%);
    border-color: rgba(239, 68, 68, 0.25);
}

.voice-addon-status-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #22c55e;
    flex-shrink: 0;
}

.voice-addon-status-bar.expired .voice-addon-status-icon {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.voice-addon-status-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.voice-addon-status-label {
    font-size: 13px;
    font-weight: 600;
    color: #22c55e;
}

.voice-addon-status-bar.expired .voice-addon-status-label {
    color: #ef4444;
}

.voice-addon-status-detail {
    font-size: 11px;
    color: var(--text-muted, #a1a1aa);
}

.voice-addon-renew-btn {
    background: linear-gradient(135deg, #22c55e 0%, #10b981 100%) !important;
}

.voice-addon-renew-btn:hover {
    background: linear-gradient(135deg, #16a34a 0%, #059669 100%) !important;
}

/* ── Addon Pricing Editor (Planlar Tab) ─────────────────── */
.addon-pricing-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.addon-pricing-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 18px;
}

.addon-pricing-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.addon-pricing-item-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #f4f4f5);
}

.addon-pricing-item-desc {
    font-size: 12px;
    color: var(--text-muted, #a1a1aa);
    margin: 0 0 14px;
    line-height: 1.5;
}

.addon-pricing-features-editor {
    margin-top: 12px;
}

.addon-pricing-features-editor label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary, #d4d4d8);
    margin-bottom: 6px;
}

.addon-pricing-features-editor textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-primary, #f4f4f5);
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
}

.settings-card summary .section-info {
    flex: 1;
    min-width: 0;
}

.settings-card summary .section-info h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

.settings-card summary .section-info p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 3px 0 0;
    line-height: 1.3;
}

.settings-card summary .section-chevron {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.settings-card[open] summary .section-chevron {
    transform: rotate(180deg);
}

.settings-card .section-body {
    padding: 20px 20px 32px;
    border-top: 1px solid var(--border);
    max-height: 50vh;
    overflow-y: auto;
}

.settings-card .section-body::-webkit-scrollbar {
    width: 4px;
}

.settings-card .section-body::-webkit-scrollbar-track {
    background: transparent;
}

.settings-card .section-body::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 2px;
}

.settings-card .section-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.settings-card[open] .section-body {
    animation: accordion-open 0.2s ease forwards;
}

@keyframes accordion-open {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Legacy card h3/p (non-accordion fallback) ────────────── */
.settings-card>h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    padding: 22px 22px 0;
}

.settings-card>p {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 18px;
    padding: 0 22px;
}

.settings-message {
    font-size: 12px;
    border-radius: var(--radius);
    padding: 10px 12px;
    margin-bottom: 14px;
}

.settings-message.warning {
    color: #fbbf24;
    background: var(--amber-bg);
    border: 1px solid rgba(245, 158, 11, 0.22);
}

.settings-message.success {
    color: #86efac;
    background: var(--green-bg);
    border: 1px solid rgba(16, 185, 129, 0.22);
}

.settings-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.settings-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 16px;
}

/* ── Widget Visual Editor ─────────────────────────────────── */
.widget-bg-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 16px;
    align-items: stretch;
    margin: 6px 0 16px;
    padding: 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.02);
}

.widget-bg-copy h4 {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 800;
}

.widget-bg-copy p {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.widget-bg-preview {
    min-height: 98px;
    border-radius: var(--radius);
    border: 1px solid rgba(99, 102, 241, 0.28);
    background:
        linear-gradient(180deg, rgba(24, 24, 27, 0.86), rgba(12, 12, 16, 0.9)),
        radial-gradient(circle at 75% 20%, rgba(99, 102, 241, 0.34), transparent 42%),
        #18181b;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 10px;
    overflow: hidden;
}

.widget-bg-preview span {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.42);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
}

/* ── Color Picker Grid — Redesigned ──────────────────────── */
.widget-color-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.widget-color-grid .form-field {
    margin-bottom: 0;
    position: relative;
}

.widget-color-grid .form-field label {
    font-size: 10px;
    margin-bottom: 8px;
}

.widget-color-grid input[type="color"] {
    height: 40px;
    padding: 3px;
    cursor: pointer;
    border-radius: 10px;
    border: 2px solid var(--border-light);
    transition: var(--transition);
}

.widget-color-grid input[type="color"]:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.widget-bg-actions {
    grid-template-columns: repeat(2, minmax(160px, 220px));
    margin-bottom: 16px;
}

.brain-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 14px;
}

.brain-meta code {
    color: var(--accent);
    font-weight: 600;
}

.plan-pill {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--border-light);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
}

.plan-pro,
.plan-enterprise {
    color: #c7d2fe;
    background: rgba(99, 102, 241, 0.14);
    border-color: rgba(99, 102, 241, 0.32);
}

.landing-settings-grid {
    /* inherits flex-direction: column from .settings-grid */
}

/* ── Logo & Favicon branding section ─────────────────── */
.landing-branding-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 900px) {
    .landing-branding-grid { grid-template-columns: 1fr; }
}
.landing-branding-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.landing-branding-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}
.landing-branding-hint {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}
.landing-branding-preview {
    width: 100%;
    height: 120px;
    border-radius: var(--radius);
    border: 2px dashed var(--border-light);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
}
.landing-branding-preview:hover {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.04);
}
.landing-branding-preview img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}
.landing-branding-preview--favicon {
    width: 80px;
    height: 80px;
}
.landing-branding-preview--favicon img {
    max-width: 64px;
    max-height: 64px;
    image-rendering: pixelated;
}
.landing-branding-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 11px;
}
.landing-branding-placeholder svg {
    opacity: 0.4;
}
.landing-branding-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.landing-branding-upload-btn {
    cursor: pointer;
    text-align: center;
    font-size: 12px;
}
.btn-danger {
    background: var(--red) !important;
    border-color: var(--red) !important;
}
.btn-danger:hover {
    background: #dc2626 !important;
}

.landing-repeaters {
    display: grid;
    gap: 12px;
}

.landing-plan-repeaters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-repeater-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.landing-repeater-card h4 {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0;
}

.landing-repeater-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.landing-add-feature-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    border: 1px dashed var(--border-light);
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.landing-add-feature-btn:hover {
    color: #818cf8;
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.04);
}

.landing-highlight-check {
    align-self: end;
    justify-content: flex-start;
    min-height: 44px;
    margin: 0 0 16px;
}

.landing-actions {
    max-width: 520px;
    padding-bottom: 24px;
}

/* ── Landing Sortable Drag-and-Drop ────────────────────────── */
.landing-sortable-list {
    display: grid;
    gap: 12px;
}

.landing-drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 5px;
    cursor: grab;
    color: var(--text-muted);
    opacity: 0.35;
    transition: opacity 0.15s, color 0.15s, background 0.15s;
    flex-shrink: 0;
    margin-right: 2px;
}

.landing-drag-handle:hover {
    opacity: 1;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.06);
}

.landing-drag-handle:active {
    cursor: grabbing;
}

.landing-sortable-card.landing-dragging {
    opacity: 0.35;
    transform: scale(0.97);
    box-shadow: none;
    transition: opacity 0.2s, transform 0.2s;
}

.landing-sortable-card.landing-drag-over {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2), 0 8px 24px rgba(99, 102, 241, 0.12) !important;
}

/* ── Cyan card variant (Footer) ───────────────────────────── */
.settings-card--cyan summary .section-icon {
    background: rgba(34, 211, 238, 0.12);
    color: #22d3ee;
}

/* ── Subsection title inside section-body ──────────────────── */
.landing-subsection-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 18px 0 10px;
    padding: 0;
}

.plan-settings-grid {
    grid-template-columns: 1fr;
}

/* ── Plan Editor Cards ── */
.plan-editor-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.plan-editor-card {
    flex: 0 1 calc((100% - 80px) / 5);
    min-width: 240px;
}

.plan-add-strip {
    width: 100%;
}

/* ── Drag-and-Drop ── */
.plan-editor-card[draggable="true"] {
    cursor: default;
}

.plan-drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 5px;
    cursor: grab;
    color: var(--text-muted);
    opacity: 0.4;
    transition: opacity 0.15s, color 0.15s, background 0.15s;
    flex-shrink: 0;
}

.plan-drag-handle:hover {
    opacity: 1;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.06);
}

.plan-drag-handle:active {
    cursor: grabbing;
}

.plan-editor-card.dragging {
    opacity: 0.35;
    transform: scale(0.97);
    box-shadow: none;
}

.plan-editor-card.drag-over {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2), 0 8px 24px rgba(99, 102, 241, 0.12) !important;
}

.plan-editor-card {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--bg-card);
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.plan-editor-card:hover {
    border-color: var(--border-light);
    box-shadow: 0 8px 30px -6px rgba(0, 0, 0, 0.25);
    transform: translateY(-1px);
}

.plan-editor-card--highlighted {
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow:
        0 0 0 1px rgba(99, 102, 241, 0.1),
        0 8px 32px -8px rgba(99, 102, 241, 0.12);
}

/* ── Card Header ── */
.plan-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 100%);
}

.plan-card-header--indigo {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.1) 0%, rgba(99, 102, 241, 0.02) 100%);
}

.plan-card-header--cyan {
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.08) 0%, rgba(34, 211, 238, 0.01) 100%);
}

.plan-card-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.plan-card-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}

/* ── Plan Key Pill ── */
.plan-key-pill {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}

.plan-key-pill--zinc {
    background: rgba(161, 161, 170, 0.12);
    color: #a1a1aa;
    border: 1px solid rgba(161, 161, 170, 0.2);
}

.plan-key-pill--indigo {
    background: rgba(99, 102, 241, 0.14);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.28);
}

.plan-key-pill--cyan {
    background: rgba(34, 211, 238, 0.1);
    color: #67e8f9;
    border: 1px solid rgba(34, 211, 238, 0.22);
}

/* ── Highlight Toggle ── */
.plan-highlight-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    transition: var(--transition);
    flex-shrink: 0;
}

.plan-highlight-toggle:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-light);
    color: var(--text-secondary);
}

.plan-highlight-toggle input {
    display: none;
}

.plan-highlight-toggle svg {
    transition: var(--transition);
}

.plan-highlight-toggle:has(input:checked) {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.2);
}

.plan-highlight-toggle:has(input:checked) svg {
    fill: #fbbf24;
    stroke: #fbbf24;
}

/* ── Card Sections ── */
.plan-card-section {
    padding: 14px 20px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.plan-card-section:last-child {
    border-bottom: none;
}

.plan-section-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
    padding: 3px 8px 3px 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
}

.plan-section-label svg {
    opacity: 0.45;
    flex-shrink: 0;
    width: 12px;
    height: 12px;
}

/* ── Field Rows ── */
.plan-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.plan-field-row--3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.plan-field-row--4 {
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

.plan-field-row+.plan-field-row {
    margin-top: 8px;
}

.plan-discount-field label {
    color: #34d399;
}

.plan-discount-field input {
    border-color: rgba(52, 211, 153, 0.2);
}

.plan-discount-field input:focus {
    border-color: rgba(52, 211, 153, 0.5);
    box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.1);
}

/* ── Permissions Section ── */
.plan-card-section--perms {
    background: rgba(255, 255, 255, 0.015);
    padding: 14px 20px 16px;
}

.plan-perm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.plan-perm-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.plan-perm-item:hover {
    border-color: var(--border-light);
    background: var(--bg-hover);
}

.plan-perm-item:has(input:checked) {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.06);
    color: var(--text-primary);
}

.plan-perm-item input[type="checkbox"] {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    accent-color: var(--accent);
    flex-shrink: 0;
}

/* ── Plan Card Header Right ── */
.plan-card-header-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* ── Plan Delete Button ── */
.plan-delete-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.plan-delete-btn:hover {
    color: #f87171;
    background: rgba(248, 113, 113, 0.08);
    border-color: rgba(248, 113, 113, 0.2);
}

/* ── Add Plan Strip (minimalist) ── */
.plan-add-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px dashed var(--border-light);
    border-radius: var(--radius);
    background: transparent;
    transition: var(--transition);
}

.plan-add-strip:hover {
    border-color: rgba(99, 102, 241, 0.25);
    background: rgba(99, 102, 241, 0.02);
}

.plan-add-strip-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #818cf8;
    flex-shrink: 0;
}

.plan-add-strip-input {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    transition: var(--transition);
}

.plan-add-strip-input::placeholder {
    color: var(--text-muted);
}

.plan-add-strip-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.12);
}

.plan-add-strip-btn {
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    border-radius: 8px;
    border: none;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.plan-add-strip-btn:hover {
    background: #4f46e5;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* ═══ MODALS ═══ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.4);
    margin: 20px;
    animation: modalIn 0.2s ease;
}

.modal-sm {
    max-width: 380px;
}

.modal-lg {
    max-width: 560px;
}

/* ── Locale Tab Bar (Suggestion Modal) ───────────────────────── */
.sug-locale-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.sug-locale-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.sug-locale-tab {
    padding: 4px 10px;
    border: none;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    color: var(--text-muted);
    background: transparent;
}

.sug-locale-tab:hover {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.sug-locale-tab.active {
    background: var(--accent-light);
    color: #a5b4fc;
}

.sug-locale-tab.has-content {
    color: var(--green);
    background: var(--green-bg);
}

.sug-locale-tab.active.has-content {
    background: var(--accent-light);
    color: #a5b4fc;
}

.btn-translate {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-translate:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-translate:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Status Badge (Icon-based) ───────────────────────────────── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-badge svg {
    width: 12px;
    height: 12px;
}

.status-badge-ai {
    background: var(--accent-light);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.status-badge-waiting_admin {
    background: var(--amber-bg);
    color: var(--amber);
    border: 1px solid rgba(245, 158, 11, 0.2);
    animation: pulse 2s ease-in-out infinite;
}

.status-badge-active {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge-closed {
    background: var(--bg-hover);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(8px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.modal-body {
    padding: 24px;
}

.modal-body p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

/* ═══ TOASTS ═══ */
.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--amber);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--amber-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.toast-body {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.toast-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.toast-action {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
}

/* ═══ LOADING ═══ */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ═══ AUTH TABS ═══ */
.auth-tabs {
    display: flex;
    position: relative;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 28px;
    gap: 4px;
}

.auth-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    z-index: 2;
}

.auth-tab:hover {
    color: var(--text-secondary);
}

.auth-tab.active {
    color: #fff;
}

.auth-tab-indicator {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 6px);
    height: calc(100% - 8px);
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: 8px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.auth-tab-indicator.hidden {
    opacity: 0;
}

.auth-tab-indicator.signup {
    transform: translateX(calc(100% + 4px));
}

/* ═══ AUTH FORMS ═══ */
.auth-form {
    display: none;
    animation: fadeSlideIn 0.3s ease;
}

.auth-form.active {
    display: block;
}

.auth-form-heading {
    margin-bottom: 20px;
}

.auth-form-heading h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

.auth-form-heading p {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.role-hidden {
    display: none !important;
}

.auth-field-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.auth-text-btn {
    border: none;
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 700;
    padding: 0;
}

.auth-text-btn:hover {
    color: #818cf8;
}

.auth-wide-btn {
    display: inline-flex;
    align-items: center;
    width: 100%;
    justify-content: center;
    margin-top: 10px;
    padding: 11px 16px;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══ PASSWORD FIELD ═══ */
.password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field input {
    padding-right: 44px !important;
}

.password-toggle {
    position: absolute;
    right: 8px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.password-toggle.visible {
    color: var(--accent);
}

/* ═══ PASSWORD STRENGTH ═══ */
.password-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.password-strength.visible {
    opacity: 1;
    height: 20px;
}

.strength-bars {
    display: flex;
    gap: 4px;
    flex: 1;
}

.strength-bar {
    height: 4px;
    flex: 1;
    border-radius: 2px;
    background: var(--bg-hover);
    transition: background 0.3s ease;
}

.strength-bar.weak {
    background: #ef4444;
}

.strength-bar.fair {
    background: #f59e0b;
}

.strength-bar.good {
    background: #10b981;
}

.strength-bar.strong {
    background: #6366f1;
}

.strength-text {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    min-width: 50px;
    text-align: right;
}

.strength-text.weak {
    color: #ef4444;
}

.strength-text.fair {
    color: #f59e0b;
}

.strength-text.good {
    color: #10b981;
}

.strength-text.strong {
    color: #6366f1;
}

/* ═══ PASSWORD REQUIREMENTS ═══ */
.pw-requirements {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    margin-top: 10px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.pw-requirements.visible {
    opacity: 1;
    max-height: 100px;
    margin-bottom: 4px;
}

.pw-req {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.pw-req.met {
    color: var(--green);
}

.pw-req-icon {
    font-size: 10px;
    transition: all 0.2s ease;
}

.pw-req.met .pw-req-icon {
    color: var(--green);
}

/* ═══ PASSWORD MATCH ═══ */
.pw-match {
    font-size: 11px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pw-match.match {
    color: var(--green);
}

.pw-match.no-match {
    color: var(--red);
}

/* ═══ FORM SUCCESS ═══ */
.form-success {
    color: var(--green);
    font-size: 13px;
    padding: 12px 14px;
    background: var(--green-bg);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeSlideIn 0.3s ease;
}

.form-success::before {
    content: '✓';
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.form-success a {
    color: var(--green);
    font-weight: 800;
    margin-left: auto;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.btn-signup {
    background: linear-gradient(135deg, #10b981, #059669);
}

.btn-signup:hover:not(:disabled) {
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
}

/* Login card is now taller for signup */
.login-card {
    max-width: 440px;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
    .conv-list-panel {
        width: 280px;
    }

    .embed-content {
        padding: 20px;
    }

    .embed-card h2 {
        font-size: 18px;
    }

    .pw-requirements {
        grid-template-columns: 1fr;
    }

    .settings-grid {
        padding: 16px;
        gap: 12px;
    }

    .settings-form-grid {
        grid-template-columns: 1fr;
    }

    .widget-bg-editor {
        grid-template-columns: 1fr;
    }

    .widget-color-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .widget-bg-actions {
        grid-template-columns: 1fr;
    }

    .landing-plan-repeaters {
        grid-template-columns: 1fr;
    }

    .landing-actions {
        max-width: none;
    }

    .plan-editor-list {
        grid-template-columns: 1fr;
    }

    .plan-field-row,
    .plan-field-row--3,
    .plan-field-row--4 {
        grid-template-columns: 1fr;
    }

    .settings-card summary {
        padding: 12px 16px;
        gap: 10px;
    }

    .settings-card .section-body {
        padding: 16px;
    }

    .settings-card summary .section-icon {
        width: 30px;
        height: 30px;
    }

    .tab-bar {
        padding: 8px 16px;
    }
}

@media (max-width: 480px) {
    .chat-layout {
        flex-direction: column;
    }

    .conv-list-panel {
        width: 100%;
        height: 40%;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .topbar-nickname {
        display: none;
    }

    .login-card {
        padding: 28px 20px;
    }

    .widget-color-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .settings-card summary .section-info h3 {
        font-size: 14px;
    }
}

/* ══════════════════════════════════════════════════════════
   PAYMENT PROVIDER CARDS (Ödeme Tab)
   ══════════════════════════════════════════════════════════ */

.payment-providers-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ── Loading & Empty ── */
.pp-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 56px 24px;
    color: var(--text-muted);
    font-size: 13px;
}

.pp-spinner {
    width: 24px;
    height: 24px;
    border: 2.5px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: ppSpin 0.65s linear infinite;
}

@keyframes ppSpin { to { transform: rotate(360deg); } }

.pp-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 56px 24px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}

/* ── Card ── */
.pp-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--bg-secondary);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s, opacity 0.3s;
}

.pp-card:hover {
    border-color: var(--border-light);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.pp-card--off {
    opacity: 0.55;
}

/* ── Top Row ── */
.pp-top {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
}

/* Icon box */
.pp-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    color: var(--accent);
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}

.pp-card[data-color="indigo"] .pp-icon { color: #818cf8; background: rgba(99, 102, 241, 0.08); border-color: rgba(99, 102, 241, 0.2); }
.pp-card[data-color="blue"] .pp-icon   { color: #60a5fa; background: rgba(59, 130, 246, 0.08); border-color: rgba(59, 130, 246, 0.2); }
.pp-card[data-color="teal"] .pp-icon   { color: #2dd4bf; background: rgba(20, 184, 166, 0.08); border-color: rgba(20, 184, 166, 0.2); }
.pp-card[data-color="emerald"] .pp-icon{ color: #34d399; background: rgba(16, 185, 129, 0.08); border-color: rgba(16, 185, 129, 0.2); }
.pp-card[data-color="orange"] .pp-icon { color: #fb923c; background: rgba(249, 115, 22, 0.08); border-color: rgba(249, 115, 22, 0.2); }

.pp-card--off .pp-icon { color: var(--text-muted); background: var(--bg-tertiary); border-color: var(--border); }

/* Info */
.pp-info { flex: 1; min-width: 0; }

.pp-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pp-name-row h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.pp-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin: 3px 0 0;
    line-height: 1.4;
}

/* Capability badges */
.pp-badge {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 100px;
    letter-spacing: 0.01em;
}

.pp-badge--sub {
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
}

.pp-badge--once {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
}

/* Status badge */
.pp-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 10px;
    flex-shrink: 0;
    white-space: nowrap;
}

.pp-status--ok {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
}

.pp-status--warn {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
}

/* ── Toggle Switch (iOS-style) ── */
.pp-switch {
    flex-shrink: 0;
    cursor: pointer;
    display: block;
}

.pp-switch-input { display: none; }

.pp-switch-track {
    display: block;
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    position: relative;
    transition: background 0.25s, border-color 0.25s;
}

.pp-switch-input:checked + .pp-switch-track {
    background: var(--accent);
    border-color: var(--accent);
}

.pp-switch-knob {
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.pp-switch-input:checked + .pp-switch-track .pp-switch-knob {
    transform: translateX(20px);
}

/* ── Bottom Row ── */
.pp-bottom {
    padding: 0 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pp-mode-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pp-mode-group {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
}

.pp-mode {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.pp-mode:hover:not(.pp-mode--on) {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.06);
}

.pp-mode--on {
    cursor: default;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.pp-mode--on.pp-mode--sandbox {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
}

.pp-mode--on.pp-mode--live {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
}

.pp-mode-hint {
    font-size: 10px;
    color: var(--text-muted);
    opacity: 0.7;
}

/* Env key badges */
.pp-envs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pp-env {
    font-family: 'JetBrains Mono', 'SF Mono', 'Menlo', 'Consolas', monospace;
    font-size: 10px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 7px;
    letter-spacing: -0.01em;
}

.pp-env--ok {
    background: rgba(16, 185, 129, 0.08);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.pp-env--miss {
    background: rgba(239, 68, 68, 0.08);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

/* ── Info Banner ── */
.pp-info-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 14px;
    border: 1px solid rgba(99, 102, 241, 0.15);
    background: rgba(99, 102, 241, 0.04);
    margin-bottom: 4px;
}

.pp-info-banner-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    flex-shrink: 0;
}

.pp-info-banner-content strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #a5b4fc;
    margin-bottom: 4px;
}

.pp-info-banner-content p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.pp-info-banner-content code {
    background: rgba(99, 102, 241, 0.12);
    color: #c7d2fe;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-family: 'JetBrains Mono', 'SF Mono', monospace;
}

/* ══════════════════════════════════════════════════════════════
   PLAN MANAGEMENT CARDS (Profile Tab)
   ══════════════════════════════════════════════════════════════ */

.plan-mgmt-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.plan-mgmt-badge--starter {
    background: rgba(156, 163, 175, 0.1);
    color: #9ca3af;
    border-color: rgba(156, 163, 175, 0.2);
}

.plan-mgmt-badge--pro {
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    border-color: rgba(99, 102, 241, 0.2);
}

.plan-mgmt-badge--enterprise {
    background: rgba(168, 85, 247, 0.1);
    color: #c084fc;
    border-color: rgba(168, 85, 247, 0.2);
}

.plan-mgmt-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.plan-mgmt-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.plan-mgmt-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.plan-mgmt-card--current {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.15);
}

.plan-mgmt-card--highlighted {
    border-color: rgba(99, 102, 241, 0.3);
}

.plan-mgmt-card-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 12px;
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
}

.plan-mgmt-card-badge--current {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.plan-mgmt-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.plan-mgmt-card-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 16px;
}

.plan-mgmt-card-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 16px;
}

.plan-mgmt-card-price .price-amount {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
}

.plan-mgmt-card-price .price-interval {
    font-size: 13px;
    color: var(--text-secondary);
}

.plan-mgmt-card-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.plan-mgmt-card-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.plan-mgmt-card-features li svg {
    flex-shrink: 0;
    color: #22c55e;
}

.plan-mgmt-btn {
    width: 100%;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.plan-mgmt-btn:disabled {
    cursor: default;
    opacity: 0.6;
}

.plan-mgmt-btn--current {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.plan-mgmt-btn--upgrade {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    color: #fff;
    opacity: 1;
}

.plan-mgmt-btn--upgrade:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.plan-mgmt-btn--downgrade {
    opacity: 0.4;
}

/* ══════════════════════════════════════════════════════════════
   PLAN CONTEXT BANNER (Signup Form)
   ══════════════════════════════════════════════════════════════ */

.plan-context-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    margin-bottom: 20px;
}

.plan-context-banner--paid {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.15);
}

.plan-context-banner-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
}

.plan-context-banner--paid .plan-context-banner-icon {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.plan-context-banner-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.plan-context-banner-text strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.plan-context-banner-text span {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ══════════════════════════════════════════════════════════════
   UPGRADE MODAL
   ══════════════════════════════════════════════════════════════ */

.upgrade-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.upgrade-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.upgrade-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.upgrade-modal-overlay.active .upgrade-modal {
    transform: scale(1);
}

.upgrade-modal h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.upgrade-modal p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 20px;
}

.upgrade-modal-providers {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.upgrade-provider-btn {
    padding: 14px 20px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-hover);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.upgrade-provider-btn:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.08);
}

.upgrade-modal-cancel {
    padding: 10px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s;
}

.upgrade-modal-cancel:hover {
    color: var(--text-primary);
}

/* ── Billing Cycle Modal ─────────────────────────────────────── */
.billing-cycle-options {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.billing-cycle-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 18px 14px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: var(--bg-hover);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.billing-cycle-btn:hover {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.06);
}

.billing-cycle-btn--active {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.2);
}

.billing-cycle-label {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.billing-cycle-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.billing-cycle-savings {
    display: inline-block;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* ── Subscription Renewal Banner ─────────────────────────────── */
.plan-renewal-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 14px;
    margin-bottom: 16px;
    animation: plan-banner-pulse 3s ease-in-out infinite;
}

.plan-renewal-banner--grace {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.plan-renewal-banner--expired {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.plan-renewal-banner-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.plan-renewal-banner-content {
    flex: 1;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.plan-renewal-banner-content strong {
    color: var(--text-primary);
}

.plan-renewal-banner--grace .plan-renewal-banner-content strong {
    color: #fbbf24;
}

.plan-renewal-banner--expired .plan-renewal-banner-content strong {
    color: #f87171;
}

.plan-renewal-banner-btn {
    flex-shrink: 0;
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.plan-renewal-banner--grace .plan-renewal-banner-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}

.plan-renewal-banner--expired .plan-renewal-banner-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}

.plan-renewal-banner-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

@keyframes plan-banner-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.88; }
}

/* ── Annual Price + Savings Badge ─────────────────────────────── */
.plan-annual-price {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.plan-savings-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 8px;
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* ── Billing Cycle Label ──────────────────────────────────────── */
.plan-billing-cycle-label {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.15);
    margin-bottom: 8px;
}

/* ══════════════════════════════════════════════════════════════
   TOAST NOTIFICATION SYSTEM
   ══════════════════════════════════════════════════════════════ */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 420px;
    pointer-events: none;
}

/* ── Custom Confirm Dialog ─────────────────────────────────── */
.oec-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: oec-confirm-fade-in 0.15s ease;
}

.oec-confirm-overlay--exiting {
    animation: oec-confirm-fade-out 0.2s ease forwards;
}

@keyframes oec-confirm-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes oec-confirm-fade-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}

.oec-confirm-dialog {
    background: linear-gradient(145deg, #1e1e2e, #181820);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: oec-confirm-slide-in 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.oec-confirm-dialog--exiting {
    animation: oec-confirm-slide-out 0.2s ease forwards;
}

@keyframes oec-confirm-slide-in {
    from { opacity: 0; transform: scale(0.95) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes oec-confirm-slide-out {
    from { opacity: 1; transform: scale(1) translateY(0); }
    to   { opacity: 0; transform: scale(0.95) translateY(8px); }
}

.oec-confirm-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
}

.oec-confirm-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    border: 1px solid;
    display: flex;
    align-items: center;
    justify-content: center;
}

.oec-confirm-title {
    font-size: 15px;
    font-weight: 700;
    color: #fafafa;
    margin: 0 0 4px;
    line-height: 1.3;
}

.oec-confirm-message {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    line-height: 1.5;
}

.oec-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.oec-confirm-btn {
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    font-family: inherit;
}

.oec-confirm-btn--cancel {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

.oec-confirm-btn--cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.oec-confirm-btn--ok {
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.oec-confirm-btn--ok:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.oec-confirm-btn:focus-visible {
    outline: 2px solid rgba(99, 102, 241, 0.5);
    outline-offset: 2px;
}

.oec-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
    min-width: 300px;
}

.oec-toast--visible {
    transform: translateX(0);
    opacity: 1;
}

.oec-toast--exiting {
    transform: translateX(120%);
    opacity: 0;
}

.oec-toast--success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.oec-toast--error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.oec-toast--warning {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.oec-toast--info {
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.oec-toast-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.oec-toast--success .oec-toast-icon {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.oec-toast--error .oec-toast-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.oec-toast--warning .oec-toast-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.oec-toast--info .oec-toast-icon {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

.oec-toast-message {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-primary);
    padding-top: 5px;
}

.oec-toast-close {
    flex-shrink: 0;
    padding: 4px;
    margin: -2px -4px 0 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.oec-toast-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

/* ══════════════════════════════════════════════════════════════
   IYZICO UPGRADE MODAL (Admin Panel) — Premium Dark Theme
   ══════════════════════════════════════════════════════════════ */

.iyzico-upgrade-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.iyzico-upgrade-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.iyzico-upgrade-modal {
    background: var(--bg-card, #141419);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 0 0 1px rgba(99, 102, 241, 0.08),
        0 24px 80px rgba(0, 0, 0, 0.6),
        0 4px 24px rgba(99, 102, 241, 0.06);
    transform: translateY(30px) scale(0.96);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}

.iyzico-upgrade-overlay.active .iyzico-upgrade-modal {
    transform: translateY(0) scale(1);
}

.iyzico-upgrade-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.iyzico-upgrade-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.iyzico-upgrade-lock {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(99, 102, 241, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #818cf8;
}

.iyzico-upgrade-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.iyzico-upgrade-header-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #fff);
}

.iyzico-upgrade-header-sub {
    font-size: 11px;
    color: var(--text-secondary, rgba(255, 255, 255, 0.35));
    letter-spacing: 0.3px;
}

.iyzico-upgrade-close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.iyzico-upgrade-close:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.iyzico-upgrade-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    min-height: 380px;
    max-height: 55vh;
}

.iyzico-upgrade-body > div:not(.iyzico-upgrade-loading) {
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.iyzico-upgrade-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 60px 20px;
    color: var(--text-secondary, rgba(255, 255, 255, 0.4));
    font-size: 13px;
}

.iyzico-upgrade-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(99, 102, 241, 0.15);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: iyzicoUpgSpin 0.8s linear infinite;
}

@keyframes iyzicoUpgSpin {
    to { transform: rotate(360deg); }
}

.iyzico-upgrade-footer {
    padding: 14px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.iyzico-upgrade-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.2px;
}

.iyzico-upgrade-body #iyzipay-checkout-form {
    max-width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.iyzico-upgrade-body iframe {
    border-radius: 14px !important;
    border: none !important;
}

/* ═══════════════════════════════════════════════════════════════
 *  PROFILE TAB — Bento Grid Layout
 * ═══════════════════════════════════════════════════════════════ */

/* ── Dropdown Profile Link ───────────────────────────────────── */
.topbar-dropdown-profile {
    cursor: pointer;
    color: var(--text-secondary);
}

.topbar-dropdown-profile:hover {
    background: var(--accent-light);
    color: var(--accent);
}

.topbar-dropdown-profile:hover svg {
    color: var(--accent);
}

.topbar-dropdown-arrow {
    margin-left: auto;
    opacity: 0.4;
    flex-shrink: 0;
}

.topbar-dropdown-profile:hover .topbar-dropdown-arrow {
    opacity: 1;
}

/* ── Profile Grid ────────────────────────────────────────────── */
/* Mirrors .settings-grid for flex/scroll behavior inside tab-panel */
.profile-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px 40px 48px;
    overflow-y: auto;
    width: 100%;
    flex: 1;
    min-height: 0;
}

.profile-grid::-webkit-scrollbar {
    width: 5px;
}

.profile-grid::-webkit-scrollbar-track {
    background: transparent;
}

.profile-grid::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}

.profile-grid::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ── Profile Card Base ───────────────────────────────────────── */
.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    flex-shrink: 0;
}

.profile-card:hover {
    border-color: var(--border-light);
}

/* ── Profile Accordion (details/summary) ─────────────────────── */
.profile-accordion {
    overflow: clip;
}

.profile-accordion-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background 0.15s ease;
}

.profile-accordion-header::-webkit-details-marker {
    display: none;
}

.profile-accordion-header::marker {
    content: '';
}

.profile-accordion-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.profile-accordion-info {
    flex: 1;
    min-width: 0;
}

.profile-accordion-info h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

.profile-accordion-info p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 3px 0 0;
    line-height: 1.3;
}

.profile-accordion-chevron {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.profile-accordion[open] > .profile-accordion-header .profile-accordion-chevron {
    transform: rotate(180deg);
}

.profile-accordion-body {
    padding: 20px 24px 24px;
    border-top: 1px solid var(--border);
}

.profile-accordion[open] > .profile-accordion-body {
    animation: profile-accordion-open 0.2s ease forwards;
}

@keyframes profile-accordion-open {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Hero Card ───────────────────────────────────────────────── */
.profile-hero {
    position: relative;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.profile-hero:hover {
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.08);
}

.profile-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.1) 0%,
        rgba(139, 92, 246, 0.07) 50%,
        rgba(16, 185, 129, 0.05) 100%);
    pointer-events: none;
}

.profile-hero-bg::after {
    content: '';
    position: absolute;
    top: -60%;
    right: -15%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.profile-hero-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 32px;
    z-index: 1;
}

/* ── Avatar Large ────────────────────────────────────────────── */
.profile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar-large {
    width: 96px;
    height: 96px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3),
                inset 0 0 0 2px rgba(255, 255, 255, 0.08);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.profile-avatar-large:hover {
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.4),
                inset 0 0 0 2px rgba(255, 255, 255, 0.12);
    transform: scale(1.03);
}

.profile-avatar-letter {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    user-select: none;
    line-height: 1;
}

.profile-avatar-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
}

.profile-avatar-upload {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    cursor: pointer;
    transition: opacity 0.25s ease;
    border-radius: 24px;
    color: #fff;
}

.profile-avatar-large:hover .profile-avatar-upload {
    opacity: 1;
}

.profile-avatar-remove {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--red);
    color: #fff;
    border: 2px solid var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 2;
}

.profile-avatar-remove:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* ── Hero Info ────────────────────────────────────────────────── */
.profile-hero-info {
    min-width: 0;
    flex: 1;
}

.profile-hero-name {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-hero-email {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-hero-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.profile-hero-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    border: 1px solid var(--border);
}

.profile-hero-date svg {
    opacity: 0.5;
    flex-shrink: 0;
}

/* ── Section Card ────────────────────────────────────────────── */
.profile-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.profile-section-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.profile-section-header p {
    font-size: 12px;
    color: var(--text-muted);
}

.profile-section-header .section-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.section-icon--indigo {
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.18);
}

.section-icon--emerald {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.18);
}

.section-icon--violet {
    background: rgba(139, 92, 246, 0.12);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.18);
}

.section-icon--red {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.18);
}

.profile-section-header .plan-mgmt-badge {
    margin-left: auto;
}

.profile-section-body {
    padding: 20px 24px 24px;
}

.profile-section-body .settings-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.profile-section-body .form-field {
    margin-bottom: 12px;
}

.profile-section-body .form-field:last-child {
    margin-bottom: 0;
}

.profile-section-body .btn-primary {
    margin-top: 12px;
}

/* ── Password Grid ───────────────────────────────────────────── */
.profile-password-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 8px;
}

.profile-password-grid .form-field {
    margin-bottom: 0;
}

/* ── Password Strength (Profile) ─────────────────────────────── */
#profile-pw-strength {
    margin-bottom: 12px;
}

#profile-pw-strength .strength-bars {
    display: flex;
    gap: 4px;
    margin-bottom: 4px;
}

#profile-pw-strength .strength-bar {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--border-light);
    transition: background 0.25s ease;
}

#profile-pw-strength .strength-text {
    font-size: 11px;
    font-weight: 600;
    transition: color 0.25s ease;
}

/* ── Form Hint ───────────────────────────────────────────────── */
.form-hint {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    opacity: 0.8;
}

/* ── Plan Section within Profile ─────────────────────────────── */
.profile-plan-section .plan-mgmt-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}
.profile-plan-section .plan-mgmt-card {
    flex: 0 1 280px;
    max-width: 320px;
}

/* ── Danger Zone ─────────────────────────────────────────────── */
.profile-danger-zone {
    border-color: rgba(239, 68, 68, 0.15);
}

.profile-danger-zone:hover {
    border-color: rgba(239, 68, 68, 0.25);
}

.profile-danger-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.profile-danger-item strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
}

.profile-danger-item p {
    font-size: 12px;
    color: var(--text-muted);
}

.profile-danger-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius);
    background: transparent;
    color: var(--red);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.profile-danger-btn:hover {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .profile-grid {
        padding: 16px 16px 36px;
        gap: 14px;
    }

    .profile-hero-content {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
        gap: 16px;
    }

    .profile-hero-meta {
        justify-content: center;
    }

    .profile-avatar-large {
        width: 80px;
        height: 80px;
        border-radius: 20px;
    }

    .profile-avatar-letter {
        font-size: 30px;
    }

    .profile-avatar-img,
    .profile-avatar-upload {
        border-radius: 20px;
    }

    .profile-hero-name {
        font-size: 20px;
    }

    .profile-section-header {
        padding: 16px 16px;
    }

    .profile-section-body {
        padding: 16px 16px 20px;
    }

    .profile-accordion-header {
        padding: 16px 16px;
    }

    .profile-accordion-body {
        padding: 16px 16px 20px;
    }

    .profile-section-body .settings-form-grid {
        grid-template-columns: 1fr;
    }

    .profile-password-grid {
        grid-template-columns: 1fr;
    }

    .profile-danger-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .profile-plan-section .plan-mgmt-cards {
        flex-direction: column;
        align-items: center;
    }
    .profile-plan-section .plan-mgmt-card {
        flex: 0 1 auto;
        width: 100%;
        max-width: 100%;
    }
}

/* ═══════════════════════════════════════════════════════════
   PAYMENT LOADING OVERLAY
   Full-screen blurred overlay shown during payment processing
   ═══════════════════════════════════════════════════════════ */
.payment-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
    background: rgba(10, 10, 14, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.payment-loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.payment-loading-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.payment-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: ppSpin 0.7s linear infinite;
}
.payment-loading-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}
.payment-loading-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   PLAN PERIOD INFO
   Shows subscription dates + days remaining in plan card
   ═══════════════════════════════════════════════════════════ */
.plan-period-info {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.plan-period-date {
    font-size: 12px;
    color: var(--text-muted);
}
.plan-period-remaining {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    width: fit-content;
}
.plan-period-ok {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}
.plan-period-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}
.plan-period-urgent {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    animation: urgentPulse 1.5s ease-in-out infinite;
}
@keyframes urgentPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.plan-mgmt-btn--renew {
    width: 100%;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--accent);
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 4px;
}
.plan-mgmt-btn--renew:hover {
    background: rgba(99, 102, 241, 0.2);
}

/* Subscription queue badge and info */
.plan-mgmt-card-badge--queued {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.plan-queue-info {
    margin-top: 10px;
    padding: 10px 12px;
    background: rgba(99, 102, 241, 0.06);
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, 0.12);
}
.plan-queue-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.plan-queue-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
    border-top: 1px solid rgba(99, 102, 241, 0.08);
    font-size: 12px;
    line-height: 1.4;
}
.plan-queue-item:first-of-type {
    border-top: none;
}
.plan-queue-arrow {
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
    font-size: 14px;
}
.plan-queue-transition {
    color: var(--text-secondary);
}
.plan-queue-transition strong {
    color: var(--text-primary);
    font-weight: 600;
}
.plan-queue-transition em {
    color: var(--text-muted);
    font-style: normal;
    font-size: 11px;
}
.plan-queue-item--starter {
    opacity: 0.7;
}
.plan-queue-item--starter .plan-queue-arrow {
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
 *  i18n — LOCALE SWITCHER
 * ═══════════════════════════════════════════════════════════════ */

.locale-switcher {
    position: relative;
    margin-right: 8px;
}

.locale-switcher-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.locale-switcher-trigger:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-light);
    color: var(--text-primary);
}

.locale-switcher-trigger svg:first-child {
    opacity: 0.6;
}

.locale-chevron {
    opacity: 0.4;
    transition: transform 0.2s ease;
}

.locale-dropdown.open ~ .locale-switcher-trigger .locale-chevron,
.locale-switcher:has(.locale-dropdown.open) .locale-chevron {
    transform: rotate(180deg);
}

.locale-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 170px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    padding: 6px;
    z-index: 100;
    display: none;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.locale-dropdown.open {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.locale-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.locale-option:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.locale-option.active {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
}

.locale-flag {
    font-size: 16px;
    line-height: 1;
}

/* ═══════════════════════════════════════════════════════════════
 *  i18n — LOCALIZABLE FIELD COMPONENT
 * ═══════════════════════════════════════════════════════════════ */

.localizable-field {
    position: relative;
}

.localizable-field .locale-tab-bar {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.localizable-field .locale-tab {
    padding: 3px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    line-height: 1.4;
}

.localizable-field .locale-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-light);
    color: var(--text-secondary);
}

.localizable-field .locale-tab.active {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent);
}

.localizable-field .locale-tab.has-value {
    border-color: rgba(34, 197, 94, 0.3);
    color: rgba(34, 197, 94, 0.8);
}

.localizable-field .locale-tab.active.has-value {
    border-color: var(--accent);
    color: var(--accent);
}

.translate-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent);
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-left: auto;
    white-space: nowrap;
}

.translate-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent);
}

.translate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.translate-btn .translate-icon {
    font-size: 13px;
    line-height: 1;
}

.translate-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius);
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.translate-all-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent);
}

.translate-all-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════
 *  i18n — RTL SUPPORT (Arabic)
 * ═══════════════════════════════════════════════════════════════ */

[dir="rtl"] .topbar-left {
    order: 2;
}

[dir="rtl"] .topbar-right {
    order: 1;
}

[dir="rtl"] .locale-dropdown {
    right: auto;
    left: 0;
}

[dir="rtl"] .locale-switcher {
    margin-right: 0;
    margin-left: 8px;
}

[dir="rtl"] .translate-btn {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .conv-list-panel {
    border-right: none;
    border-left: 1px solid var(--border);
}

[dir="rtl"] .topbar-dropdown {
    right: auto;
    left: 0;
}

[dir="rtl"] .topbar-dropdown-arrow {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .locale-option {
    text-align: right;
}

/* ═══════════════════════════════════════════════════════════════
 *  i18n — RESPONSIVE
 * ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .locale-switcher {
        margin-right: 4px;
    }

    .locale-switcher-trigger span {
        display: none;
    }

    .locale-dropdown {
        right: -10px;
        min-width: 150px;
    }

    .localizable-field .locale-tab {
        padding: 2px 6px;
        font-size: 10px;
    }
}


/* ═══════════════════════════════════════════════════════════════
 * SITE NAME TYPOGRAPHY EDITOR
 * ═══════════════════════════════════════════════════════════════ */

/* Purple accent for the accordion card */
.settings-card--purple .section-icon {
    background: rgba(168, 85, 247, 0.12);
    color: #c084fc;
}

/* Two-column layout for Part 1 & Part 2 */
.site-name-editor {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .site-name-editor {
        grid-template-columns: 1fr;
    }
}

/* Each part panel */
.site-name-part {
    border: 1px solid var(--border-light, rgba(255,255,255,0.06));
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.015);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.site-name-part:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Part header with numbered badge */
.site-name-part-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.part-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
}

.part-badge--1 {
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
}

.part-badge--2 {
    background: rgba(168, 85, 247, 0.12);
    color: #c084fc;
}

.part-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--text-tertiary, #71717a);
    text-transform: uppercase;
}

/* Font select dropdown */
/* ── Custom Font Picker (fp-*) ────────────────────────────── */
.font-picker {
    position: relative;
}

.fp-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius, 10px);
    border: 1px solid var(--border-light, rgba(255,255,255,0.08));
    background: var(--bg-tertiary, #27272a);
    color: var(--text-primary, #fafafa);
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    text-align: left;
}

.fp-trigger:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.fp-trigger--open {
    border-color: var(--accent, #6366f1) !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.fp-trigger-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.fp-chevron {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    color: var(--text-tertiary, #71717a);
    transition: transform 0.2s;
}

.fp-trigger--open .fp-chevron {
    transform: rotate(180deg);
}

/* Dropdown panel */
.fp-dropdown {
    position: absolute;
    z-index: 100;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    border-radius: 14px;
    border: 1px solid var(--border-light, rgba(255,255,255,0.08));
    background: var(--bg-secondary, #18181b);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
}

.fp-dropdown--open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Search bar */
.fp-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light, rgba(255,255,255,0.05));
}

.fp-search-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    color: var(--text-tertiary, #71717a);
}

.fp-search-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-primary, #fafafa);
    font-size: 13px;
    outline: none;
    padding: 0;
}

.fp-search-input::placeholder {
    color: var(--text-tertiary, #52525b);
}

.fp-search-clear {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 2px;
    border: none;
    background: transparent;
    color: var(--text-tertiary, #71717a);
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.fp-search-clear:hover {
    color: var(--text-primary, #fafafa);
    background: rgba(255, 255, 255, 0.08);
}

/* Font list */
.fp-list {
    max-height: 288px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.fp-list::-webkit-scrollbar {
    width: 4px;
}

.fp-list::-webkit-scrollbar-track {
    background: transparent;
}

.fp-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* Category header */
.fp-category {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 8px 14px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary, #71717a);
    background: var(--bg-secondary, #18181b);
    border-bottom: 1px solid var(--border-light, rgba(255,255,255,0.04));
}

/* Font option */
.fp-option {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 14px;
    border: none;
    background: transparent;
    color: var(--text-secondary, #a1a1aa);
    cursor: pointer;
    text-align: left;
    transition: background 0.12s, color 0.12s;
}

.fp-option:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary, #fafafa);
}

.fp-option--selected {
    background: rgba(99, 102, 241, 0.08) !important;
    color: var(--accent, #818cf8) !important;
}

.fp-option-name {
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.fp-check {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    color: var(--accent, #6366f1);
}

.fp-empty {
    padding: 24px 14px;
    text-align: center;
    font-size: 13px;
    color: var(--text-tertiary, #52525b);
}

/* Weight select dropdown (native <select>) */
.font-select {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius, 10px);
    border: 1px solid var(--border-light, rgba(255,255,255,0.08));
    background: var(--bg-tertiary, #27272a);
    color: var(--text-primary, #fafafa);
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.font-select:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.font-select:focus {
    outline: none;
    border-color: var(--accent, #6366f1);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.font-select option {
    font-weight: 400;
    color: var(--text-primary, #fafafa);
    background: var(--bg-tertiary, #27272a);
    padding: 4px 8px;
}

/* Slider row: two slider-cols side-by-side */
.slider-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.slider-col label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-tertiary, #71717a);
    margin-bottom: 8px;
}

.slider-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-input-group input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    outline: none;
}

.slider-input-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent, #6366f1);
    border: 2px solid #18181b;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(99, 102, 241, 0.4);
    transition: transform 0.15s, box-shadow 0.15s;
}

.slider-input-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
}

.slider-input-group input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent, #6366f1);
    border: 2px solid #18181b;
    cursor: pointer;
}

.slider-input-group input[type="number"] {
    width: 52px;
    padding: 6px 4px;
    border-radius: 8px;
    border: 1px solid var(--border-light, rgba(255,255,255,0.08));
    background: var(--bg-tertiary, #27272a);
    color: var(--text-primary, #fafafa);
    font-size: 12px;
    text-align: center;
    -moz-appearance: textfield;
    outline: none;
}

.slider-input-group input[type="number"]::-webkit-outer-spin-button,
.slider-input-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.slider-input-group input[type="number"]:focus {
    border-color: var(--accent, #6366f1);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Mini preview per part */
.site-name-mini-preview {
    border: 1px solid var(--border-light, rgba(255,255,255,0.04));
    border-radius: 10px;
    background: #09090b;
    padding: 16px;
    text-align: center;
    margin-top: 4px;
}

.preview-label {
    display: block;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary, #71717a);
    margin-bottom: 10px;
}

.preview-text {
    color: var(--text-primary, #fafafa);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
    line-height: 1.15;
}

/* Combined preview */
.site-name-combined-preview {
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255,255,255,0.015), rgba(255,255,255,0.005));
    padding: 24px;
    text-align: center;
}

.combined-preview-text {
    color: var(--text-primary, #fafafa);
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Responsive: slider row collapses */
@media (max-width: 480px) {
    .slider-row {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════
   USER ACCESS MANAGEMENT — Kullanıcılar Tab
   ═══════════════════════════════════════════════════════════════ */

.user-access-header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.user-access-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-secondary, rgba(255,255,255,0.06));
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
}

.user-access-search input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary, #e5e5e5);
    font-size: 0.85rem;
    width: 180px;
}

.user-access-search input::placeholder {
    color: var(--text-muted, rgba(255,255,255,0.35));
}

/* Stats Cards */
.user-access-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.user-stat-card {
    background: var(--bg-secondary, rgba(255,255,255,0.04));
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border-left: 3px solid var(--text-muted, rgba(255,255,255,0.2));
}

.user-stat-card.user-stat--active { border-left-color: #22c55e; }
.user-stat-card.user-stat--blocked { border-left-color: #ef4444; }
.user-stat-card.user-stat--expired { border-left-color: #f59e0b; }

.user-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #e5e5e5);
}

.user-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary, rgba(255,255,255,0.5));
    font-weight: 500;
}

/* User List */
.user-access-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.user-access-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-muted, rgba(255,255,255,0.3));
    gap: 0.5rem;
}

/* ── User Access Loading Screen ────────────────────────────── */
.ua-loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    gap: 2rem;
    opacity: 1;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.ua-loading-screen.ua-loading-fadeout {
    opacity: 0;
    pointer-events: none;
}

/* Animated logo icon */
.ua-loading-icon {
    position: relative;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ua-loading-icon svg {
    width: 36px;
    height: 36px;
    color: #818cf8;
    animation: uaIconFloat 2.4s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(129, 140, 248, 0.4));
    position: relative;
    z-index: 2;
}

.ua-loading-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #6366f1;
    border-right-color: rgba(99, 102, 241, 0.3);
    animation: uaRingSpin 1.8s linear infinite;
}

.ua-loading-ring--outer {
    width: 72px;
    height: 72px;
    top: 0;
    left: 0;
    border-top-color: #6366f1;
    border-right-color: rgba(99, 102, 241, 0.2);
}

.ua-loading-ring--inner {
    width: 54px;
    height: 54px;
    top: 9px;
    left: 9px;
    border-top-color: #a78bfa;
    border-right-color: rgba(167, 139, 250, 0.15);
    animation-direction: reverse;
    animation-duration: 1.3s;
}

/* Loading text */
.ua-loading-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.ua-loading-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #fff);
    letter-spacing: 0.3px;
}

.ua-loading-dots {
    display: inline-flex;
    gap: 4px;
    margin-left: 2px;
}

.ua-loading-dots span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #818cf8;
    animation: uaDotPulse 1.4s ease-in-out infinite;
}

.ua-loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.ua-loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

.ua-loading-subtitle {
    font-size: 12px;
    color: var(--text-muted, rgba(255,255,255,0.35));
    font-weight: 400;
}

/* Skeleton cards */
.ua-loading-skeletons {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 700px;
}

.ua-skeleton-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-secondary, rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    animation: uaSkeletonPulse 1.8s ease-in-out infinite;
}

.ua-skeleton-card:nth-child(2) {
    animation-delay: 0.15s;
    opacity: 0.7;
}

.ua-skeleton-card:nth-child(3) {
    animation-delay: 0.3s;
    opacity: 0.4;
}

.ua-skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(147, 51, 234, 0.1));
    flex-shrink: 0;
}

.ua-skeleton-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ua-skeleton-line {
    height: 10px;
    border-radius: 6px;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.04) 0%,
        rgba(255,255,255,0.08) 50%,
        rgba(255,255,255,0.04) 100%);
    background-size: 200% 100%;
    animation: uaShimmer 1.5s ease-in-out infinite;
}

.ua-skeleton-line--name {
    width: 45%;
}

.ua-skeleton-line--email {
    width: 65%;
    opacity: 0.5;
}

.ua-skeleton-badges {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.ua-skeleton-badge {
    width: 52px;
    height: 22px;
    border-radius: 6px;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.04) 0%,
        rgba(255,255,255,0.08) 50%,
        rgba(255,255,255,0.04) 100%);
    background-size: 200% 100%;
    animation: uaShimmer 1.5s ease-in-out infinite;
}

/* Stat skeleton for the top cards */
.ua-stat-skeleton {
    display: inline-block;
    width: 32px;
    height: 28px;
    border-radius: 6px;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.04) 0%,
        rgba(255,255,255,0.1) 50%,
        rgba(255,255,255,0.04) 100%);
    background-size: 200% 100%;
    animation: uaShimmer 1.5s ease-in-out infinite;
    vertical-align: middle;
}

/* Keyframes */
@keyframes uaIconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes uaRingSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes uaDotPulse {
    0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1.2); }
}

@keyframes uaSkeletonPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes uaShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.user-access-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-secondary, rgba(255,255,255,0.04));
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: 12px;
    padding: 1rem 1.25rem;
    transition: background 0.2s, border-color 0.2s;
    cursor: pointer;
}

.user-access-card:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.15);
}

.user-access-card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #9333ea);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    flex-shrink: 0;
}

.user-access-card-info {
    flex: 1;
    min-width: 0;
}

.user-access-card-name {
    font-weight: 600;
    color: var(--text-primary, #e5e5e5);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-access-card-email {
    font-size: 0.8rem;
    color: var(--text-secondary, rgba(255,255,255,0.5));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-access-card-badges {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

.user-access-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.user-access-badge--plan {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

.user-access-badge--active {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.user-access-badge--expired {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.user-access-badge--blocked {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.user-access-badge--extended {
    background: rgba(34, 211, 238, 0.15);
    color: #22d3ee;
}

.user-access-badge--force_expired {
    background: rgba(249, 115, 22, 0.15);
    color: #fb923c;
}

.user-access-badge--none {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted, rgba(255,255,255,0.35));
}

.user-access-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.user-access-card-actions .btn-sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.72rem;
}

/* Detail Modal */
.user-access-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.user-access-modal {
    background: var(--bg-card, #1a1a2e);
    border: 1px solid var(--border, rgba(255,255,255,0.1));
    border-radius: 16px;
    width: 90vw;
    max-width: 720px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

.user-access-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
    position: sticky;
    top: 0;
    background: var(--bg-card, #1a1a2e);
    z-index: 1;
}

.user-access-modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary, #e5e5e5);
}

.user-access-modal-body {
    padding: 1.5rem;
}

/* Modal Sections */
.user-modal-section {
    margin-bottom: 1.5rem;
}

.user-modal-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary, rgba(255,255,255,0.6));
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border, rgba(255,255,255,0.06));
}

.user-modal-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.user-modal-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.user-modal-info-label {
    font-size: 0.75rem;
    color: var(--text-muted, rgba(255,255,255,0.35));
}

.user-modal-info-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary, #e5e5e5);
}

/* Editable User Modal */
.user-modal-edit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.user-modal-edit-grid .form-field label {
    display: block;
    font-size: 11px;
    color: var(--text-muted, rgba(255,255,255,0.4));
    margin-bottom: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.user-modal-edit-grid .form-field input,
.user-modal-edit-grid .form-field select {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: var(--text-primary, #e5e5e5);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.user-modal-edit-grid .form-field input:focus,
.user-modal-edit-grid .form-field select:focus {
    border-color: var(--accent, #6d5dfc);
    box-shadow: 0 0 0 2px rgba(109, 93, 252, 0.15);
}

.user-modal-readonly {
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    border: 1px solid transparent;
    font-size: 13px;
    color: var(--text-muted, rgba(255,255,255,0.5));
}

.user-modal-edit-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.user-modal-edit-msg {
    font-size: 12px;
    font-weight: 500;
    transition: color 0.2s;
}

.user-modal-edit-msg.success {
    color: #34d399;
}

.user-modal-edit-msg.error {
    color: #f87171;
}

.user-modal-pw-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.user-modal-pw-wrap input {
    padding-right: 40px !important;
}

.user-modal-pw-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted, rgba(255,255,255,0.4));
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, opacity 0.2s;
}

.user-modal-pw-toggle:hover {
    color: var(--text-primary, #e5e5e5);
}

/* Modal Action Buttons */
.user-modal-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.user-modal-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    background: var(--bg-secondary, rgba(255,255,255,0.04));
    color: var(--text-primary, #e5e5e5);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.user-modal-action-btn:hover {
    background: rgba(255,255,255,0.08);
}

.user-modal-action-btn--block {
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.user-modal-action-btn--block:hover {
    background: rgba(239, 68, 68, 0.12);
}

.user-modal-action-btn--expire {
    border-color: rgba(249, 115, 22, 0.3);
    color: #fb923c;
}

.user-modal-action-btn--expire:hover {
    background: rgba(249, 115, 22, 0.12);
}

.user-modal-action-btn--extend {
    border-color: rgba(34, 211, 238, 0.3);
    color: #22d3ee;
}

.user-modal-action-btn--extend:hover {
    background: rgba(34, 211, 238, 0.12);
}

.user-modal-action-btn--restore {
    border-color: rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.user-modal-action-btn--restore:hover {
    background: rgba(34, 197, 94, 0.12);
}

/* Action Form (inline in modal) */
.user-action-form {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: 10px;
}

.user-action-form .form-field {
    margin-bottom: 0.75rem;
}

.user-action-form label {
    font-size: 0.8rem;
}

.user-action-form input,
.user-action-form textarea,
.user-action-form select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border, rgba(255,255,255,0.1));
    background: var(--bg-secondary, rgba(255,255,255,0.05));
    color: var(--text-primary, #e5e5e5);
    font-size: 0.85rem;
}

.user-action-form-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 0.75rem;
}

/* Audit Log Table */
.user-audit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.user-audit-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    color: var(--text-secondary, rgba(255,255,255,0.5));
    border-bottom: 1px solid var(--border, rgba(255,255,255,0.1));
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-audit-table td {
    padding: 0.5rem 0.75rem;
    color: var(--text-primary, #e5e5e5);
    border-bottom: 1px solid var(--border, rgba(255,255,255,0.04));
    vertical-align: top;
}

.user-audit-table tr:hover td {
    background: rgba(255,255,255,0.03);
}

.audit-action-badge {
    display: inline-flex;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.audit-action-badge--block_temp,
.audit-action-badge--block_permanent { background: rgba(239,68,68,0.15); color: #f87171; }
.audit-action-badge--force_expire { background: rgba(249,115,22,0.15); color: #fb923c; }
.audit-action-badge--extend { background: rgba(34,211,238,0.15); color: #22d3ee; }
.audit-action-badge--restore { background: rgba(34,197,94,0.15); color: #4ade80; }

/* Global Audit Log (Denetim Günlüğü accordion) */
.user-audit-log-container {
    max-height: 400px;
    overflow-y: auto;
}

.user-audit-log-container::-webkit-scrollbar { width: 4px; }
.user-audit-log-container::-webkit-scrollbar-track { background: transparent; }
.user-audit-log-container::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }

.global-audit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.global-audit-table thead th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
    color: var(--text-secondary, rgba(255,255,255,0.6));
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    background: var(--bg-card, #1a1b23);
    z-index: 1;
}

.global-audit-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s ease;
}

.global-audit-table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}

.global-audit-table td {
    padding: 0.6rem 0.75rem;
    color: var(--text-primary, #e5e5e5);
    white-space: nowrap;
}

.global-audit-table td:last-child {
    white-space: normal;
    max-width: 250px;
    word-break: break-word;
}

.audit-user-name {
    font-weight: 600;
    color: var(--text-primary, #e5e5e5);
}

/* Toast */
.user-access-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.75rem 1.5rem;
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 20000;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(1rem); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .user-access-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .user-access-card {
        flex-wrap: wrap;
    }
    .user-access-card-badges {
        flex-wrap: wrap;
    }
    .user-modal-info-grid {
        grid-template-columns: 1fr;
    }
    .user-modal-actions {
        grid-template-columns: 1fr;
    }
    .user-access-header-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .user-access-search input {
        width: 100%;
    }
}

/* ═══════════════════════════════════════════════════════════════
   TWO-FACTOR AUTHENTICATION (2FA) STYLES
   ═══════════════════════════════════════════════════════════════ */

/* Login 2FA Form */
.tfa-login-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(5,150,105,0.08));
    border: 1px solid rgba(16,185,129,0.25);
    border-radius: 14px;
    margin: 0 auto 12px;
    color: #10b981;
}

.tfa-login-desc {
    font-size: 13px;
    color: var(--text-secondary, rgba(255,255,255,0.5));
    margin-top: 4px;
    line-height: 1.5;
}

.tfa-code-field {
    font-family: 'Courier New', monospace !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    letter-spacing: 6px !important;
    text-align: center !important;
    padding: 14px 16px !important;
}

.tfa-login-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    margin-bottom: 8px;
}

.tfa-login-actions .auth-text-btn {
    font-size: 12px;
}

/* Profile 2FA Section */
.tfa-section {
    margin-top: 4px;
}

.tfa-divider {
    height: 1px;
    background: var(--border-light, rgba(255,255,255,0.06));
    margin: 24px 0 20px;
}

.tfa-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.tfa-header-info h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary, #fafafa);
    margin: 0 0 4px;
}

.tfa-header-info h4 svg {
    color: #10b981;
    flex-shrink: 0;
}

.tfa-header-info p {
    font-size: 13px;
    color: var(--text-secondary, rgba(255,255,255,0.5));
    margin: 0;
    line-height: 1.5;
}

/* Status Badge */
.tfa-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    background: rgba(255,255,255,0.06);
    color: var(--text-muted, rgba(255,255,255,0.35));
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.3s;
}

.tfa-status-badge.tfa-active {
    background: rgba(16,185,129,0.12);
    color: #34d399;
    border-color: rgba(16,185,129,0.25);
}

.tfa-status-badge.tfa-inactive {
    background: rgba(255,255,255,0.04);
    color: var(--text-muted, rgba(255,255,255,0.35));
    border-color: rgba(255,255,255,0.06);
}

.tfa-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.tfa-status-badge.tfa-active .tfa-status-dot {
    background: #34d399;
    box-shadow: 0 0 6px rgba(52,211,153,0.5);
}

/* 2FA Info Card */
.tfa-info-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-light, rgba(255,255,255,0.06));
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

.tfa-info-method {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary, rgba(255,255,255,0.6));
    margin-bottom: 4px;
}

.tfa-info-method strong {
    color: var(--text-primary, #fafafa);
}

.tfa-info-recovery {
    font-size: 12px;
    color: var(--text-muted, rgba(255,255,255,0.35));
}

/* Method Selector Cards */
.tfa-method-selector {
    margin-bottom: 16px;
}

.tfa-method-label {
    font-size: 13px;
    color: var(--text-secondary, rgba(255,255,255,0.6));
    margin: 0 0 12px;
    font-weight: 500;
}

.tfa-method-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.tfa-method-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 16px;
    border: 1px solid var(--border-light, rgba(255,255,255,0.08));
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    cursor: pointer;
    transition: all 0.25s;
    text-align: center;
    color: var(--text-secondary, rgba(255,255,255,0.6));
}

.tfa-method-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.15);
    color: var(--text-primary, #fafafa);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.tfa-method-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tfa-method-icon--email {
    background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.08));
    border: 1px solid rgba(99,102,241,0.2);
    color: #818cf8;
}

.tfa-method-icon--totp {
    background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(5,150,105,0.08));
    border: 1px solid rgba(16,185,129,0.2);
    color: #34d399;
}

.tfa-method-title {
    font-size: 13px;
    font-weight: 600;
    color: inherit;
}

.tfa-method-desc {
    font-size: 11px;
    color: var(--text-muted, rgba(255,255,255,0.35));
    line-height: 1.4;
}

/* Setup Area */
.tfa-setup-area {
    margin-bottom: 14px;
}

.tfa-qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-light, rgba(255,255,255,0.06));
    border-radius: 14px;
    margin-bottom: 16px;
}

.tfa-qr-container img {
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.08);
}

.tfa-qr-manual {
    text-align: center;
}

.tfa-qr-manual p {
    font-size: 12px;
    color: var(--text-muted, rgba(255,255,255,0.35));
    margin: 0 0 6px;
}

.tfa-qr-secret {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent, #818cf8);
    background: rgba(99,102,241,0.08);
    padding: 6px 12px;
    border-radius: 6px;
    letter-spacing: 2px;
    user-select: all;
    word-break: break-all;
}

.tfa-setup-code-input {
    width: 100%;
    margin-bottom: 12px;
}

.tfa-setup-code-input input {
    font-family: 'Courier New', monospace;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 4px;
    text-align: center;
    padding: 12px;
}

/* Recovery Codes */
.tfa-recovery-container {
    padding: 20px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-light, rgba(255,255,255,0.06));
    border-radius: 14px;
    margin-bottom: 16px;
}

.tfa-recovery-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary, #fafafa);
    margin: 0 0 6px;
}

.tfa-recovery-warning {
    font-size: 12px;
    color: #fbbf24;
    margin: 0 0 14px;
    line-height: 1.5;
}

.tfa-recovery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.tfa-recovery-code {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #fafafa);
    background: rgba(255,255,255,0.05);
    padding: 8px 12px;
    border-radius: 8px;
    text-align: center;
    letter-spacing: 2px;
    border: 1px solid rgba(255,255,255,0.06);
    user-select: all;
}

.tfa-recovery-copy-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--border-light, rgba(255,255,255,0.08));
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary, rgba(255,255,255,0.6));
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.tfa-recovery-copy-btn:hover {
    background: rgba(255,255,255,0.07);
    color: var(--text-primary, #fafafa);
}

/* 2FA Actions */
.tfa-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.tfa-enable-btn {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border-color: transparent !important;
}

.tfa-enable-btn:hover {
    background: linear-gradient(135deg, #059669, #047857) !important;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border-color: transparent !important;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
}

.tfa-disable-btn {
    background: rgba(239,68,68,0.1) !important;
    border: 1px solid rgba(239,68,68,0.25) !important;
    color: #f87171 !important;
}

.tfa-disable-btn:hover {
    background: rgba(239,68,68,0.2) !important;
}

/* Responsive */
@media (max-width: 480px) {
    .tfa-method-cards {
        grid-template-columns: 1fr;
    }
    .tfa-recovery-grid {
        grid-template-columns: 1fr;
    }
    .tfa-header {
        flex-direction: column;
    }
}


/* ══════════════════════════════════════════════════════════════
   FIELD-LEVEL TYPOGRAPHY PANEL (Collapsible)
   ══════════════════════════════════════════════════════════════ */

.field-typo-panel {
    margin: -4px 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    overflow: visible;
    transition: border-color 0.2s;
}

.field-typo-panel[open] {
    border-color: rgba(139, 92, 246, 0.25);
}

.field-typo-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    list-style: none;
    user-select: none;
    transition: color 0.15s, background 0.15s;
}

.field-typo-toggle::-webkit-details-marker { display: none; }

.field-typo-toggle:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.field-typo-toggle svg {
    opacity: 0.5;
    flex-shrink: 0;
}

.field-typo-panel[open] .field-typo-toggle {
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.field-typo-panel[open] .field-typo-toggle svg {
    opacity: 1;
    color: #8b5cf6;
}

.field-typo-body {
    padding: 20px;
    animation: fieldTypoSlideIn 0.2s ease-out;
    overflow: visible;
}

/* Force inner grids to single-column for full width inside typo panel */
.field-typo-body .settings-form-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
}

/* Slider row inside typo panel — always full width single column stack */
.field-typo-body .slider-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.field-typo-body .slider-col {
    width: 100%;
}

.field-typo-body .slider-col label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: block;
}

.field-typo-body .slider-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.field-typo-body .slider-input-group input[type="range"] {
    flex: 1;
    min-width: 0;
}

.field-typo-body .slider-input-group input[type="number"] {
    width: 60px;
    flex-shrink: 0;
}

/* Ensure font picker inside typo panel has visible dropdown */
.field-typo-body .font-picker {
    position: relative;
    z-index: 10;
}

.field-typo-body .fp-dropdown {
    min-width: 240px;
}

/* When typo panel is inside a 2-col grid, span full width */
.settings-form-grid > div > .field-typo-panel,
.settings-form-grid + .field-typo-panel {
    grid-column: 1 / -1;
}

@keyframes fieldTypoSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════════
   WIDGET STATUS — Live Indicator
   ══════════════════════════════════════════════════════════════ */

.widget-status-live {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.widget-status-live.is-online {
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.widget-status-live.is-offline {
    background: rgba(239, 68, 68, 0.06);
    border-color: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.status-live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #52525b;
    flex-shrink: 0;
    transition: background 0.3s ease;
}

.widget-status-live.is-online .status-live-dot {
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    animation: statusPulse 2s ease-in-out infinite;
}

.widget-status-live.is-offline .status-live-dot {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

@keyframes statusPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.08); }
}

/* ═══════════════════════════════════════════════════════════════
   TEAM MANAGEMENT MODULE
   ═══════════════════════════════════════════════════════════════ */

/* Limit badge */
.team-limit-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 10px;
    background: rgba(109, 93, 252, 0.08);
    border: 1px solid rgba(109, 93, 252, 0.15);
    color: var(--accent, #6d5dfc);
    font-size: 13px;
    font-weight: 600;
}

/* Limit progress bar */
.team-limit-bar-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.team-limit-bar {
    flex: 1;
    height: 8px;
    border-radius: 99px;
    background: rgba(255,255,255,0.06);
    overflow: hidden;
}

.team-limit-bar-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #6d5dfc, #8b7df8);
    transition: width 0.5s ease, background 0.3s;
}

.team-limit-label {
    font-size: 12px;
    color: var(--text-muted, rgba(255,255,255,0.4));
    white-space: nowrap;
    min-width: 200px;
    text-align: right;
}

/* Add operator section */
.team-add-section {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.team-add-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #e5e5e5);
    margin-bottom: 14px;
}

.team-add-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.team-add-form .form-field {
    flex: 1;
}

.team-add-form .form-field label {
    display: block;
    font-size: 11px;
    color: var(--text-muted, rgba(255,255,255,0.4));
    margin-bottom: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.team-add-form .form-field input {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: var(--text-primary, #e5e5e5);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.team-add-form .form-field input:focus {
    border-color: var(--accent, #6d5dfc);
    box-shadow: 0 0 0 2px rgba(109, 93, 252, 0.15);
}

.team-add-form .btn-primary {
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 38px;
}

.team-add-msg {
    font-size: 12px;
    font-weight: 500;
    margin-top: 10px;
    min-height: 16px;
}

.team-add-msg.success { color: #34d399; }
.team-add-msg.error { color: #f87171; }

/* Temp password banner */
.team-temp-pw-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: linear-gradient(135deg, rgba(109, 93, 252, 0.08), rgba(139, 125, 248, 0.04));
    border: 1px solid rgba(109, 93, 252, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    position: relative;
    animation: teamBannerIn 0.3s ease;
}

@keyframes teamBannerIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.team-temp-pw-icon {
    font-size: 28px;
    flex-shrink: 0;
    margin-top: 2px;
}

.team-temp-pw-content {
    flex: 1;
}

.team-temp-pw-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #e5e5e5);
    margin-bottom: 4px;
}

.team-temp-pw-content p {
    font-size: 12px;
    color: var(--text-muted, rgba(255,255,255,0.5));
    margin: 0 0 10px;
}

.team-temp-pw-value {
    display: inline-block;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #6d5dfc;
    background: rgba(109, 93, 252, 0.1);
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid rgba(109, 93, 252, 0.2);
    user-select: all;
}

.team-temp-pw-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted, rgba(255,255,255,0.4));
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.team-temp-pw-close:hover { color: var(--text-primary, #e5e5e5); }

/* Team members table */
.team-list-section {
    margin-top: 4px;
}

.team-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.team-table thead th {
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, rgba(255,255,255,0.35));
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.team-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s;
}

.team-table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}

.team-table tbody td {
    padding: 12px;
    vertical-align: middle;
    color: var(--text-primary, #e5e5e5);
}

/* Member name cell */
.team-member-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(109, 93, 252, 0.3), rgba(139, 125, 248, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #c4b5fd;
    flex-shrink: 0;
}

.team-member-email {
    color: var(--text-muted, rgba(255,255,255,0.5));
    font-size: 12px;
}

.team-member-date {
    color: var(--text-muted, rgba(255,255,255,0.4));
    font-size: 12px;
}

/* Role select */
.team-role-select {
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: var(--text-primary, #e5e5e5);
    font-size: 12px;
    cursor: pointer;
    outline: none;
}

.team-role-select:focus {
    border-color: var(--accent, #6d5dfc);
}

.team-role-label {
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary, #a3a3a3);
    font-size: 12px;
    font-weight: 500;
}

/* Status badge */
.team-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.team-status--active {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.2);
}

.team-status--suspended {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

/* Action buttons */
.team-member-actions {
    display: flex;
    gap: 6px;
}

.team-action-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    color: var(--text-muted, rgba(255,255,255,0.4));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.team-action-btn:hover {
    border-color: rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: var(--text-primary, #e5e5e5);
}

.team-action-btn--remove:hover {
    border-color: rgba(248, 113, 113, 0.3);
    background: rgba(248, 113, 113, 0.08);
    color: #f87171;
}

.team-action-btn--suspend:hover {
    border-color: rgba(251, 191, 36, 0.3);
    background: rgba(251, 191, 36, 0.08);
    color: #fbbf24;
}

.team-action-btn--activate:hover {
    border-color: rgba(52, 211, 153, 0.3);
    background: rgba(52, 211, 153, 0.08);
    color: #34d399;
}

/* Empty state */
.team-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 48px 24px;
    text-align: center;
    color: var(--text-muted, rgba(255,255,255,0.35));
}

.team-empty p {
    margin: 0;
    font-size: 14px;
}

.team-empty-hint {
    font-size: 12px !important;
    color: var(--text-muted, rgba(255,255,255,0.25));
}

/* Loading state */
.team-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: var(--text-muted, rgba(255,255,255,0.35));
    font-size: 13px;
}

.team-loading-dots {
    display: flex;
    gap: 4px;
}

.team-loading-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent, #6d5dfc);
    animation: teamDot 1.4s infinite ease-in-out both;
}

.team-loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.team-loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes teamDot {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Responsive */
@media (max-width: 768px) {
    .team-add-form {
        flex-direction: column;
        align-items: stretch;
    }

    .team-limit-bar-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .team-limit-label {
        text-align: left;
        min-width: auto;
    }

    .team-table {
        font-size: 12px;
    }

    .team-table thead th,
    .team-table tbody td {
        padding: 8px 6px;
    }

    .team-member-avatar {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
}

/* ══════════════════════════════════════════════════════════════
   MULTI-SITE MANAGEMENT (Enterprise)
   ══════════════════════════════════════════════════════════════ */

/* Site Selector Dropdown (Conversation List) */
.site-selector-container {
    padding: 10px 12px 4px;
    position: relative;
    z-index: 90;
}

/* ── Custom Dropdown: Trigger Button ─────────────────────── */
.site-dropdown {
    position: relative;
}

.site-dropdown__trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.07), rgba(139, 92, 246, 0.04));
    border: 1px solid rgba(99, 102, 241, 0.12);
    color: var(--text-primary, #f4f4f5);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.site-dropdown__trigger:hover {
    border-color: rgba(99, 102, 241, 0.28);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.06));
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.06);
}

.site-dropdown__trigger:focus-visible,
.site-dropdown.open .site-dropdown__trigger {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.07));
}

.site-dropdown__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent, #818cf8);
    opacity: 0.65;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.site-dropdown__trigger:hover .site-dropdown__icon {
    opacity: 0.9;
}

.site-dropdown__label {
    flex: 1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.01em;
}

.site-dropdown__badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent, #818cf8);
    background: rgba(99, 102, 241, 0.1);
    border-radius: 6px;
    padding: 2px 7px;
    line-height: 1.4;
    flex-shrink: 0;
}

.site-dropdown__badge:empty {
    display: none;
}

.site-dropdown__chevron {
    display: flex;
    align-items: center;
    color: var(--text-muted, #71717a);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s;
    flex-shrink: 0;
}

.site-dropdown.open .site-dropdown__chevron {
    transform: rotate(180deg);
    color: var(--accent, #818cf8);
}

/* ── Custom Dropdown: Panel ──────────────────────────────── */
.site-dropdown__panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: rgba(18, 18, 28, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset,
        0 1px 0 rgba(255, 255, 255, 0.04) inset;
    padding: 5px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transition:
        opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.2s;
    max-height: 240px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.site-dropdown.open .site-dropdown__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.site-dropdown__panel::-webkit-scrollbar {
    width: 4px;
}

.site-dropdown__panel::-webkit-scrollbar-track {
    background: transparent;
}

.site-dropdown__panel::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.2);
    border-radius: 4px;
}

/* ── Custom Dropdown: Option Items ───────────────────────── */
.site-dropdown__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    border: 1px solid transparent;
    position: relative;
}

.site-dropdown__item:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.1);
}

.site-dropdown__item.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.08));
    border-color: rgba(99, 102, 241, 0.18);
}

.site-dropdown__item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    color: #fff;
}

.site-dropdown__item-icon.all-sites {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.site-dropdown__item-icon.site-icon {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent, #818cf8);
    font-size: 11px;
    letter-spacing: 0.03em;
}

.site-dropdown__item-text {
    flex: 1;
    min-width: 0;
}

.site-dropdown__item-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary, #f4f4f5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.site-dropdown__item-domain {
    font-size: 11px;
    color: var(--text-muted, #71717a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    margin-top: 1px;
}

.site-dropdown__item-check {
    display: none;
    color: var(--accent, #818cf8);
    flex-shrink: 0;
}

.site-dropdown__item.active .site-dropdown__item-check {
    display: flex;
}

/* ══════════════════════════════════════════════════════════════
   MULTI-SITE TABLE UI (Enterprise)
   ══════════════════════════════════════════════════════════════ */

/* ── Container ─────────────────────────────────────────────── */
.ms-container {
    width: 100%;
    padding: 32px 40px 24px;
}

/* ── Header ────────────────────────────────────────────────── */
.ms-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.ms-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ms-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary, #fafafa);
    margin: 0;
    letter-spacing: -0.01em;
}

.ms-usage-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* ── Add Site Form ─────────────────────────────────────────── */
.ms-add-form {
    position: relative;
    background: rgba(99, 102, 241, 0.04);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: 14px;
    padding: 20px 20px 16px;
    margin-bottom: 20px;
    animation: msFormIn 0.2s ease-out;
}

@keyframes msFormIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ms-add-form-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted, rgba(255, 255, 255, 0.35));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    z-index: 1;
}

.ms-add-form-close:hover {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

.ms-add-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding-right: 36px;
}

.ms-add-form .form-row label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary, rgba(255, 255, 255, 0.6));
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ms-add-form .form-row input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary, #e5e5e5);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.ms-add-form .form-row input:focus {
    border-color: var(--accent, #6d5dfc);
    box-shadow: 0 0 0 3px rgba(109, 93, 252, 0.12);
}

.ms-add-submit {
    width: 100%;
    margin-top: 14px;
    justify-content: center;
}

/* Meta status indicator */
.ms-meta-status {
    font-size: 10px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

.ms-meta-status--loading { color: #fbbf24; }
.ms-meta-status--success { color: #34d399; }
.ms-meta-status--error   { color: var(--text-muted, rgba(255, 255, 255, 0.3)); }

/* ── Inline Edit (table cells) ─────────────────────────────── */
.ms-inline-edit {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ms-inline-input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 6px;
    color: var(--text-primary, #e5e5e5);
    font-size: 12px;
    padding: 4px 8px;
    outline: none;
    width: 100%;
    min-width: 80px;
    max-width: 200px;
    transition: border-color 0.15s;
}

.ms-inline-input:focus {
    border-color: var(--accent, #6d5dfc);
    box-shadow: 0 0 0 2px rgba(109, 93, 252, 0.1);
}

.ms-inline-save {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    border: none;
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}

.ms-inline-save:hover {
    background: rgba(52, 211, 153, 0.25);
}

.ms-inline-cancel {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    border: none;
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}

.ms-inline-cancel:hover {
    background: rgba(248, 113, 113, 0.2);
}

/* Editable cell hover indicator */
.ms-editable {
    cursor: text;
    position: relative;
    border-radius: 4px;
    padding: 2px 4px;
    margin: -2px -4px;
    transition: background 0.15s;
}

.ms-editable:hover {
    background: rgba(255, 255, 255, 0.04);
}

.ms-editable::after {
    content: '';
    position: absolute;
    right: -14px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    opacity: 0;
    transition: opacity 0.15s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.3)' stroke-width='2'%3E%3Cpath d='M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z'/%3E%3C/svg%3E");
    background-size: contain;
}

.ms-editable:hover::after {
    opacity: 1;
}

/* ── Toolbar ───────────────────────────────────────────────── */
.ms-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.ms-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex: 1;
    max-width: 320px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ms-search-wrap:focus-within {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

.ms-search-wrap svg {
    color: var(--text-muted, rgba(255, 255, 255, 0.3));
    flex-shrink: 0;
}

.ms-search {
    background: transparent;
    border: none;
    color: var(--text-primary, #e5e5e5);
    font-size: 13px;
    outline: none;
    width: 100%;
}

.ms-search::placeholder {
    color: var(--text-muted, rgba(255, 255, 255, 0.3));
}

.ms-rows-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
}

.ms-rows-selector select {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary, #e5e5e5);
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
}

/* ── Table ─────────────────────────────────────────────────── */
.ms-table-wrap {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.015);
}

.ms-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ms-table thead {
    background: rgba(255, 255, 255, 0.03);
}

.ms-table th {
    padding: 11px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted, rgba(255, 255, 255, 0.45));
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    white-space: nowrap;
    user-select: none;
}

.ms-th-sortable {
    cursor: pointer;
    transition: color 0.15s;
}

.ms-th-sortable:hover {
    color: var(--text-primary, #e5e5e5);
}

.ms-th-sortable.ms-sorted-asc .ms-sort-icon,
.ms-th-sortable.ms-sorted-desc .ms-sort-icon {
    color: var(--accent, #818cf8);
}

.ms-th-sortable.ms-sorted-asc .ms-sort-icon::after { content: '↑'; }
.ms-th-sortable.ms-sorted-desc .ms-sort-icon::after { content: '↓'; }

.ms-sort-icon {
    font-size: 10px;
    margin-left: 4px;
    opacity: 0.5;
}

.ms-th-sortable.ms-sorted-asc .ms-sort-icon,
.ms-th-sortable.ms-sorted-desc .ms-sort-icon {
    opacity: 1;
}

.ms-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.12s;
    cursor: pointer;
}

.ms-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.04);
}

.ms-table tbody tr:last-child {
    border-bottom: none;
}

.ms-table td {
    padding: 12px 16px;
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    vertical-align: middle;
}

/* Cell styles */
.ms-cell-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--text-primary, #fafafa);
}

.ms-cell-label .ms-row-num {
    color: var(--text-muted, rgba(255, 255, 255, 0.25));
    font-size: 11px;
    font-weight: 400;
    min-width: 18px;
}

.ms-cell-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-left: 6px;
}

.ms-badge-primary {
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
}

.ms-cell-domain {
    font-family: 'SFMono-Regular', 'Consolas', monospace;
    font-size: 12px;
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
}

.ms-cell-count {
    font-variant-numeric: tabular-nums;
    text-align: center;
}

/* Status badge */
.ms-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.ms-status--active {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
}

.ms-status--inactive {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
}

.ms-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.ms-cell-date {
    font-size: 12px;
    color: var(--text-muted, rgba(255, 255, 255, 0.35));
}

/* Actions column */
.ms-cell-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.ms-action-btn {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.ms-action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text-primary, #fafafa);
}

.ms-action-btn--danger:hover {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

/* Empty state */
.ms-empty-row td {
    text-align: center;
    padding: 48px 16px;
    color: var(--text-muted, rgba(255, 255, 255, 0.3));
    font-size: 13px;
    cursor: default !important;
}

/* ── Pagination ────────────────────────────────────────────── */
.ms-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding: 0 4px;
    flex-wrap: wrap;
    gap: 8px;
}

.ms-pagination-info {
    font-size: 12px;
    color: var(--text-muted, rgba(255, 255, 255, 0.35));
}

.ms-pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ms-page-btn {
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary, rgba(255, 255, 255, 0.6));
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.ms-page-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary, #fafafa);
}

.ms-page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.ms-page-indicator {
    font-size: 12px;
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
    min-width: 40px;
    text-align: center;
}

/* ══════════════════════════════════════════════════════════════
   EMBED CODE MODAL
   ══════════════════════════════════════════════════════════════ */

.ms-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: msOverlayIn 0.2s ease-out;
}

@keyframes msOverlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.ms-modal {
    background: var(--bg-card, #1e1e2e);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    width: 90%;
    max-width: 640px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: msModalIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes msModalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.ms-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 22px 24px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ms-modal-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary, #fafafa);
    margin: 0;
}

.ms-modal-subtitle {
    font-size: 12px;
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
    margin: 4px 0 0;
}

.ms-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}

.ms-modal-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary, #fafafa);
}

.ms-modal-body {
    padding: 20px 24px 24px;
}

.ms-modal-loading {
    text-align: center;
    padding: 32px 0;
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
    font-size: 13px;
}

.ms-modal-code {
    position: relative;
}

.ms-modal-code pre {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 16px;
    font-size: 12px;
    line-height: 1.6;
    overflow-x: auto;
    color: #a5b4fc;
    font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
}

.ms-modal-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary, rgba(255, 255, 255, 0.6));
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s;
}

.ms-modal-copy-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
}

.ms-modal-widget-id {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ms-modal-widget-id label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted, rgba(255, 255, 255, 0.35));
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ms-modal-widget-id code {
    font-size: 12px;
    color: var(--text-secondary, rgba(255, 255, 255, 0.55));
    font-family: 'SFMono-Regular', 'Consolas', monospace;
}

.ms-modal-error {
    text-align: center;
    padding: 24px 0;
    color: #f87171;
    font-size: 13px;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .ms-container { padding: 20px 16px; }
    .ms-header { flex-direction: column; align-items: flex-start; }
    .ms-add-form-grid { grid-template-columns: 1fr; }
    .ms-toolbar { flex-direction: column; align-items: stretch; }
    .ms-search-wrap { max-width: none; }
    .ms-table { font-size: 12px; }
    .ms-table th,
    .ms-table td { padding: 10px 10px; }
    .ms-modal { width: 95%; }
}

/* ═══════════════════════════════════════════════════════════════
   VOICE CALL — Admin Panel Styles
   ═══════════════════════════════════════════════════════════════ */

/* ── Incoming Call Overlay ───────────────────────────────────── */
.voice-incoming-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    animation: voice-overlay-in 0.3s ease;
}

@keyframes voice-overlay-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.voice-incoming-content {
    background: linear-gradient(145deg, rgba(24, 24, 32, 0.98), rgba(16, 16, 22, 0.99));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 40px 48px;
    text-align: center;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: voice-content-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes voice-content-in {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.voice-incoming-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(147, 51, 234, 0.15));
    border: 2px solid rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a5b4fc;
    margin: 0 auto 16px;
    position: relative;
}

.voice-incoming-pulse {
    position: absolute;
    width: 80px;
    height: 80px;
    top: 40px;
    left: 50%;
    margin-left: -40px;
    border-radius: 50%;
    border: 2px solid rgba(34, 197, 94, 0.5);
    animation: voice-pulse 1.5s ease-out infinite;
    pointer-events: none;
}

@keyframes voice-pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2); opacity: 0; }
}

.voice-incoming-name {
    font-size: 20px;
    font-weight: 700;
    color: #f4f4f5;
    margin: 0 0 4px;
}

.voice-incoming-label {
    font-size: 14px;
    color: #a1a1aa;
    margin: 0 0 28px;
    animation: voice-label-pulse 1.5s ease-in-out infinite;
}

@keyframes voice-label-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.voice-incoming-actions {
    display: flex;
    gap: 24px;
    justify-content: center;
}

.voice-incoming-reject,
.voice-incoming-accept {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.voice-incoming-reject {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.voice-incoming-reject:hover {
    background: rgba(239, 68, 68, 0.35);
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.voice-incoming-accept {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.voice-incoming-accept:hover {
    background: rgba(34, 197, 94, 0.35);
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

/* ── Active Call Floating Bar ────────────────────────────────── */
.voice-active-overlay {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 99998;
    animation: voice-bar-in 0.3s ease;
}

@keyframes voice-bar-in {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.voice-active-content {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, rgba(24, 24, 32, 0.96), rgba(16, 16, 22, 0.98));
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 16px;
    padding: 12px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.voice-active-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(16, 185, 129, 0.1));
    border: 1px solid rgba(34, 197, 94, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #22c55e;
    flex-shrink: 0;
}

.voice-active-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.voice-active-name {
    font-size: 13px;
    font-weight: 600;
    color: #f4f4f5;
}

.voice-active-timer {
    font-size: 12px;
    font-weight: 500;
    color: #22c55e;
    font-variant-numeric: tabular-nums;
}

.voice-active-controls {
    display: flex;
    gap: 8px;
    margin-left: 8px;
}

.voice-ctrl-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #e4e4e7;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.voice-ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.voice-ctrl-btn.active {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.voice-hangup-btn {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #f87171 !important;
}

.voice-hangup-btn:hover {
    background: rgba(239, 68, 68, 0.35) !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

/* ── Call History Table ──────────────────────────────────────── */

/* Toolbar: search + per-page */
.ch-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.ch-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex: 1;
    max-width: 340px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ch-search-wrap:focus-within {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

.ch-search-wrap svg {
    color: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.ch-search {
    background: transparent;
    border: none;
    color: #e5e5e5;
    font-size: 13px;
    outline: none;
    width: 100%;
}

.ch-search::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.ch-search-clear {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 16px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.15s;
}

.ch-search-clear:hover {
    color: #f87171;
}

.ch-rows-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.ch-rows-selector select {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e5e5e5;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
}

/* Table wrapper */
.ch-table-wrap {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.015);
}

.call-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.call-history-table thead {
    background: rgba(255, 255, 255, 0.03);
}

.call-history-table th {
    text-align: left;
    padding: 11px 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    user-select: none;
}

.call-history-table td {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #e4e4e7;
}

.call-history-table tbody tr {
    transition: background 0.12s;
}

.call-history-table tbody tr:hover td {
    background: rgba(99, 102, 241, 0.04);
}

.call-history-table tbody tr:last-child td {
    border-bottom: none;
}

/* Sortable headers */
.ch-th-sortable {
    cursor: pointer;
    transition: color 0.15s;
}

.ch-th-sortable:hover {
    color: #e5e5e5;
}

.ch-sort-icon {
    font-size: 10px;
    margin-left: 3px;
    opacity: 0.5;
}

.ch-sorted-asc .ch-sort-icon,
.ch-sorted-desc .ch-sort-icon {
    color: #818cf8;
    opacity: 1;
}

/* Status badges */
.call-status-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.call-status-ended {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.call-status-missed {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.call-status-rejected {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.call-status-failed {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.call-status-active {
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
}

.call-status-ringing {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

/* Action buttons */
.call-action-btn {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.call-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fafafa;
}

.call-play-btn {
    border-color: rgba(99, 102, 241, 0.25);
    background: rgba(99, 102, 241, 0.08);
    color: #818cf8;
}

.call-play-btn:hover {
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.4);
    transform: scale(1.05);
}

.call-delete-btn:hover {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.25);
    color: #f87171;
}

.call-actions-cell,
.call-recording-cell {
    text-align: center;
}

.call-no-recording {
    color: rgba(255, 255, 255, 0.2);
}

/* Pagination */
.ch-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding: 0 4px;
    flex-wrap: wrap;
    gap: 8px;
}

.ch-pagination-info {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
}

.ch-pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ch-page-btn {
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.ch-page-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fafafa;
}

.ch-page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.ch-page-indicator {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    min-width: 40px;
    text-align: center;
}

/* Inline audio player */
.voice-inline-player {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 10px 16px;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 10px;
    animation: voice-player-in 0.2s ease;
}

@keyframes voice-player-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.voice-player-info {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #a5b4fc;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.voice-inline-player audio {
    flex: 1;
    height: 32px;
    border-radius: 6px;
}

.call-player-close {
    flex-shrink: 0;
}

.call-player-close:hover {
    background: rgba(248, 113, 113, 0.12) !important;
    border-color: rgba(248, 113, 113, 0.25) !important;
    color: #f87171 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .ch-toolbar { flex-direction: column; align-items: stretch; }
    .ch-search-wrap { max-width: none; }
    .call-history-table { font-size: 12px; }
    .call-history-table th,
    .call-history-table td { padding: 9px 8px; }
}

/* ── Voice Player Modal ──────────────────────────────────────── */
.vpm-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: vpm-fade-in 0.2s ease;
}

@keyframes vpm-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.vpm-content {
    background: linear-gradient(145deg, #1e1e2e, #181820);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    width: 90%;
    max-width: 520px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    animation: vpm-slide-in 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}

@keyframes vpm-slide-in {
    from { opacity: 0; transform: scale(0.95) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.vpm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.vpm-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vpm-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(147, 51, 234, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a5b4fc;
}

.vpm-title {
    font-size: 16px;
    font-weight: 700;
    color: #fafafa;
    margin: 0;
}

.vpm-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin: 2px 0 0;
}

.vpm-close {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}

.vpm-close:hover {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

.vpm-body {
    padding: 20px 24px 24px;
}

.vpm-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.vpm-meta-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.vpm-meta-label {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.vpm-meta-value {
    font-size: 13px;
    color: #e4e4e7;
    font-weight: 500;
}

.vpm-player-area {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    min-height: 52px;
}

.vpm-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    padding: 8px 0;
}

.vpm-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-top-color: #818cf8;
    border-radius: 50%;
    animation: vpm-spin 0.8s linear infinite;
}

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

.vpm-audio-wrap audio {
    width: 100%;
    height: 40px;
    border-radius: 8px;
    outline: none;
}

.vpm-error {
    color: #f87171;
    font-size: 13px;
    text-align: center;
    padding: 8px 0;
}

.vpm-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
    gap: 8px;
}

.vpm-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    background: rgba(99, 102, 241, 0.08);
    color: #a5b4fc;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
}

.vpm-download-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.35);
}

/* ═══════════════════════════════════════════════════════════════
   VIDEO CALL — Floating Draggable + Resizable Modal (avm-*)
   ═══════════════════════════════════════════════════════════════ */

.avm-modal {
    position: fixed;
    z-index: 99998;
    width: 360px;
    min-width: 280px;
    max-width: 90vw;
    border-radius: 16px;
    background: linear-gradient(145deg, #1a1a2e, #13131d);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 0 40px rgba(99, 102, 241, 0.08);
    animation: avm-enter 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    transition: box-shadow 0.3s, border-color 0.3s;
    user-select: none;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.avm-modal:hover {
    box-shadow:
        0 24px 72px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 0 50px rgba(99, 102, 241, 0.12);
}

.avm-modal.avm-resizing {
    transition: none !important;
    border-color: rgba(99, 102, 241, 0.35);
}

@keyframes avm-enter {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Modal Header (drag handle) ── */
.avm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    cursor: grab;
    border-radius: 16px 16px 0 0;
    flex-shrink: 0;
}

.avm-header:active {
    cursor: grabbing;
}

.avm-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.avm-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
    animation: avm-pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes avm-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(34, 197, 94, 0.5); }
    50% { opacity: 0.7; box-shadow: 0 0 16px rgba(34, 197, 94, 0.7); }
}

.avm-contact-name {
    font-size: 12px;
    font-weight: 600;
    color: #e4e4e7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.avm-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.avm-timer {
    font-size: 12px;
    font-weight: 600;
    color: #22c55e;
    font-variant-numeric: tabular-nums;
    background: rgba(34, 197, 94, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid rgba(34, 197, 94, 0.15);
}

/* ── Video Area ── */
.avm-video-wrap {
    position: relative;
    width: 100%;
    flex: 1 1 auto;
    min-height: 160px;
    background: #0a0a14;
    overflow: hidden;
}

.avm-remote {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #0a0a14;
    display: block;
}

.avm-local {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 25%;
    max-width: 120px;
    min-width: 60px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    background: #1a1a2e;
    z-index: 5;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s, border-color 0.3s;
}

.avm-local:hover {
    border-color: rgba(99, 102, 241, 0.4);
}

/* Placeholder when remote video hasn't arrived yet */
.avm-no-video {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.2);
    z-index: 2;
    pointer-events: none;
}

.avm-no-video svg {
    opacity: 0.3;
}

.avm-no-video span {
    font-size: 11px;
    animation: avm-waiting 2s ease-in-out infinite;
}

@keyframes avm-waiting {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* ── Controls Bar ── */
.avm-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0 0 16px 16px;
    flex-shrink: 0;
}

.avm-ctrl {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #e4e4e7;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.avm-ctrl:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.avm-ctrl-active {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #f87171 !important;
}

.avm-hangup {
    width: 40px;
    height: 40px;
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.avm-hangup:hover {
    background: rgba(239, 68, 68, 0.35);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
    transform: scale(1.08);
}

/* ── Resize Handle (bottom-right corner) ── */
.avm-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    cursor: nwse-resize;
    z-index: 10;
    background: transparent;
    border-radius: 0 0 16px 0;
}

.avm-resize-handle::after {
    content: '';
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    border-right: 2px solid rgba(255, 255, 255, 0.2);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    transition: border-color 0.2s;
}

.avm-resize-handle:hover::after {
    border-color: rgba(99, 102, 241, 0.6);
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .avm-modal {
        min-width: 240px;
    }
}
