/* ==========================================================================
   Renew PixelPass - CSS Stylesheet
   Thiết kế chuẩn UI/UX: Apple Glassmorphism + Modern Dark Tech Dashboard
   Tối ưu hóa hiển thị Mobile & Desktop - Tương thích 100% Tiếng Việt
   ========================================================================== */

:root {
    /* Color Palette - Dark Theme (Mặc định) */
    --bg-base: #0a0e17;
    --bg-subtle: #0f172a;
    --bg-card: rgba(17, 24, 39, 0.75);
    --bg-card-hover: rgba(30, 41, 59, 0.85);
    --bg-input: rgba(15, 23, 42, 0.85);
    --bg-input-focus: rgba(30, 41, 59, 0.95);
    
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-medium: rgba(255, 255, 255, 0.16);
    --border-accent: rgba(56, 189, 248, 0.5);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-inverse: #0f172a;

    --brand-primary: #38bdf8;
    --brand-secondary: #818cf8;
    --brand-gradient: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
    --brand-gradient-hover: linear-gradient(135deg, #0ea5e9 0%, #4f46e5 100%);

    --accent-success: #10b981;
    --accent-success-bg: rgba(16, 185, 129, 0.12);
    --accent-warning: #f59e0b;
    --accent-warning-bg: rgba(245, 158, 11, 0.12);
    --accent-danger: #ef4444;
    --accent-danger-bg: rgba(239, 68, 68, 0.12);
    --accent-info: #0ea5e9;
    --accent-info-bg: rgba(14, 165, 233, 0.12);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 24px rgba(56, 189, 248, 0.25);

    --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Variables */
[data-theme="light"] {
    --bg-base: #f1f5f9;
    --bg-subtle: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-card-hover: #ffffff;
    --bg-input: #f8fafc;
    --bg-input-focus: #ffffff;
    
    --border-subtle: rgba(0, 0, 0, 0.08);
    --border-medium: rgba(0, 0, 0, 0.16);
    --border-accent: rgba(14, 165, 233, 0.6);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 24px rgba(14, 165, 233, 0.15);
}

/* Base Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
}

/* Background Ambient Lighting */
.bg-ambient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.ambient-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    transform: translateZ(0);
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: #38bdf8;
    top: -150px;
    left: -100px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: #6366f1;
    bottom: -100px;
    right: -100px;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: #ec4899;
    top: 40%;
    right: 20%;
    opacity: 0.08;
}

/* App Container */
.app-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px 60px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ==========================================================================
   Header Navigation
   ========================================================================== */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    gap: 16px;
    flex-wrap: wrap;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--brand-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: var(--shadow-glow);
    flex-shrink: 0;
}

.brand-icon svg {
    width: 22px;
    height: 22px;
}

.brand-text-group {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.02em;
}

.badge-version {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    background: rgba(56, 189, 248, 0.15);
    color: var(--brand-primary);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Queue Pill */
.queue-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.queue-pill .queue-number {
    font-weight: 700;
    color: var(--brand-primary);
    background: rgba(56, 189, 248, 0.12);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

/* Status Indicator */
.status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-success);
    box-shadow: 0 0 10px var(--accent-success);
    animation: pulseGlow 2s infinite ease-in-out;
}

.status-dot.error {
    background: var(--accent-danger);
    box-shadow: 0 0 10px var(--accent-danger);
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.15); }
}

/* Header Buttons */
.btn-icon-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon-label:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-medium);
    transform: translateY(-1px);
}

.btn-theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-theme-toggle:hover {
    color: var(--brand-primary);
    border-color: var(--border-accent);
}

/* ==========================================================================
   Notice & Preflight Banner
   ========================================================================== */
.notice-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.announcement-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.25);
    font-size: 0.88rem;
    color: var(--text-primary);
}

.announcement-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.announcement-text {
    flex: 1;
}

/* Preflight Checklist Cards */
.preflight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.preflight-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.preflight-item:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

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

.preflight-badge-num {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--brand-gradient);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.preflight-info h4 {
    font-size: 0.92rem;
    font-weight: 600;
}

.preflight-info p {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.preflight-arrow {
    color: var(--brand-primary);
    font-size: 1rem;
    font-weight: bold;
}

/* ==========================================================================
   Card / CDK Verification Bar
   ========================================================================== */
.card-section {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.cdk-input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.cdk-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.input-container {
    position: relative;
    flex: 1;
}

.input-container svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.app-input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
}

.app-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--brand-gradient);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: var(--brand-gradient-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.45);
}

.btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* CDK Info Panel (When verified) */
.cdk-dashboard-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    padding: 16px 20px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.cdk-meta-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.meta-value-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-code-display {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-primary);
    background: rgba(56, 189, 248, 0.1);
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.btn-text-action {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-decoration: underline;
    cursor: pointer;
    transition: var(--transition);
}

.btn-text-action:hover {
    color: var(--brand-primary);
}

.quota-center-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.quota-figures {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.quota-avail {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-success);
}

.quota-div {
    font-size: 1rem;
    color: var(--text-muted);
}

.quota-total {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.quota-progress-track {
    width: 140px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.quota-progress-bar {
    height: 100%;
    background: var(--brand-gradient);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.cdk-actions-right {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ==========================================================================
   Service Feature Card (Chuẩn 86ai Engine: Đăng ký trọn gói tự động)
   ========================================================================== */
.service-feature-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-top: 14px;
    border-left: 4px solid var(--brand-primary);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.service-feature-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: rgba(56, 189, 248, 0.12);
    color: var(--brand-primary);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.service-feature-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.service-feature-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.service-feature-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.service-feature-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

/* ==========================================================================
   Service Selection Grid (Legacy reference)
   ========================================================================== */
.service-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.service-card-choice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: var(--bg-input);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.service-card-choice:hover {
    border-color: var(--border-medium);
    background: var(--bg-card-hover);
}

.service-card-choice.active {
    border-color: var(--brand-primary);
    background: rgba(56, 189, 248, 0.05);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.15);
}

.service-radio-custom {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    transition: var(--transition);
}

.service-card-choice.active .service-radio-custom {
    border-color: var(--brand-primary);
}

.service-card-choice.active .service-radio-custom::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--brand-primary);
}

.service-choice-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.service-choice-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.service-title-text {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.service-cost-tag {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.service-desc-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ==========================================================================
   Account Management Section - THE CORE FEATURE
   "Phần mail pass 2fa cho chuẩn"
   ========================================================================== */
.account-section {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Mode Switcher Tabs */
.mode-tabs-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 12px;
}

.mode-tab-buttons {
    display: flex;
    background: var(--bg-input);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    gap: 4px;
}

.btn-tab-mode {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-tab-mode:hover {
    color: var(--text-primary);
}

.btn-tab-mode.active {
    background: var(--brand-gradient);
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.account-stats-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.stat-pill {
    font-size: 0.78rem;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-pill.success {
    background: var(--accent-success-bg);
    color: var(--accent-success);
    border-color: rgba(16, 185, 129, 0.25);
}

.stat-pill.danger {
    background: var(--accent-danger-bg);
    color: var(--accent-danger);
    border-color: rgba(239, 68, 68, 0.25);
}

/* Quick Paste View (Mode 1) */
.quick-paste-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.smart-textarea {
    width: 100%;
    min-height: 160px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.6;
    resize: vertical;
    transition: var(--transition);
}

.smart-textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.quick-paste-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.paste-syntax-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.paste-syntax-hint code {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 5px;
    border-radius: 4px;
    color: var(--brand-primary);
    font-family: inherit;
}

.quick-paste-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Interactive Table View (Mode 2) */
.interactive-table-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.accounts-data-table-container {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-input);
}

.accounts-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.accounts-table th {
    padding: 12px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap;
}

.accounts-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.accounts-table tr:last-child td {
    border-bottom: none;
}

.accounts-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.col-idx {
    width: 44px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.tbl-cell-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.table-input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-family: inherit;
    transition: var(--transition);
}

.table-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    background: var(--bg-input-focus);
}

.table-input.input-invalid {
    border-color: var(--accent-danger);
    background: rgba(239, 68, 68, 0.06);
}

.table-input.input-valid {
    border-color: rgba(16, 185, 129, 0.5);
}

/* TOTP Code Preview Pill in Cell */
.totp-preview-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin-top: 4px;
    cursor: default;
    user-select: all;
}

.totp-countdown-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* 2FA backup code badge */
.backup-code-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--accent-success);
    margin-top: 4px;
}

.btn-table-action {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-table-action:hover {
    color: var(--accent-danger);
    background: rgba(239, 68, 68, 0.1);
}

.table-bottom-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.toolbar-left, .toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Single Mode Form (Mode 3) */
.single-mode-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

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

.field-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.req-star {
    color: var(--accent-danger);
}

.field-hint {
    font-size: 0.74rem;
    color: var(--text-muted);
}

/* Submit Action Button */
.submit-action-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.btn-submit-main {
    width: 100%;
    max-width: 440px;
    padding: 16px 28px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: var(--radius-lg);
    background: var(--brand-gradient);
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-submit-main:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(56, 189, 248, 0.5);
    background: var(--brand-gradient-hover);
}

.btn-submit-main:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ==========================================================================
   Task Dashboard & Progress Tracking
   ========================================================================== */
.tasks-section {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tasks-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-pills-group {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    padding: 3px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    gap: 3px;
    overflow-x: auto;
}

.btn-filter-pill {
    padding: 6px 12px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-filter-pill.active {
    background: var(--bg-card-hover);
    color: var(--brand-primary);
}

.tasks-search-box {
    position: relative;
    min-width: 220px;
}

.tasks-search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.tasks-search-input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.85rem;
}

.tasks-search-input:focus {
    outline: none;
    border-color: var(--brand-primary);
}

/* Task Status Badges */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-status.waiting {
    background: var(--accent-warning-bg);
    color: var(--accent-warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-status.processing {
    background: var(--accent-info-bg);
    color: var(--accent-info);
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.badge-status.success {
    background: var(--accent-success-bg);
    color: var(--accent-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-status.failed {
    background: var(--accent-danger-bg);
    color: var(--accent-danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-status.cancelled {
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-muted);
    border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Task Offer Links */
.offer-link-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-offer-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: var(--brand-primary);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.btn-offer-link:hover {
    background: rgba(56, 189, 248, 0.22);
}

.btn-copy-mini {
    background: none;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-copy-mini:hover {
    color: var(--text-primary);
    border-color: var(--border-medium);
}

/* Empty State */
.empty-state-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    text-align: center;
    gap: 12px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    opacity: 0.6;
}

.empty-state-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.empty-state-desc {
    font-size: 0.85rem;
    max-width: 380px;
}

/* ==========================================================================
   Modals & Overlays
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

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

.modal-container {
    background: var(--bg-subtle);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    background: var(--bg-subtle);
    z-index: 2;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-close-modal:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Guide Step Items */
.guide-step-card {
    display: flex;
    gap: 16px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.guide-step-number {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--brand-gradient);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.guide-step-content h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.guide-step-content p {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.guide-step-content code {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--brand-primary);
    font-family: monospace;
}

/* Toast System */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    pointer-events: auto;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 380px;
}

.toast.success {
    border-left: 4px solid var(--accent-success);
}

.toast.error {
    border-left: 4px solid var(--accent-danger);
}

.toast.info {
    border-left: 4px solid var(--brand-primary);
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateY(-16px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Footer */
.footer {
    text-align: center;
    padding: 24px 0 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer a {
    color: var(--brand-primary);
    text-decoration: none;
}

/* ==========================================================================
   Responsive Adaptations (Mobile Friendly)
   ========================================================================== */
@media (max-width: 768px) {
    .app-container {
        padding: 12px 14px 40px;
        gap: 14px;
    }

    .header {
        padding: 12px 14px;
    }

    .cdk-dashboard-bar {
        grid-template-columns: 1fr;
        gap: 12px;
        text-align: center;
    }

    .meta-value-group {
        justify-content: center;
    }

    .cdk-actions-right {
        justify-content: center;
    }

    .cdk-row {
        flex-direction: column;
    }

    .cdk-row .btn-primary {
        width: 100%;
    }

    .mode-tabs-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .mode-tab-buttons {
        width: 100%;
    }

    .btn-tab-mode {
        flex: 1;
        justify-content: center;
    }

    .table-bottom-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-left, .toolbar-right {
        justify-content: space-between;
    }

    /* Mobile Table Card Layout */
    .accounts-data-table-container {
        background: transparent;
        border: none;
    }

    .accounts-table thead {
        display: none;
    }

    .accounts-table, .accounts-table tbody, .accounts-table tr, .accounts-table td {
        display: block;
        width: 100%;
    }

    .accounts-table tr {
        background: var(--bg-input);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
        margin-bottom: 12px;
        padding: 10px;
    }

    .accounts-table td {
        padding: 6px 0;
        border: none;
    }

    .col-idx {
        text-align: left;
        font-weight: 700;
        color: var(--brand-primary);
    }
}
