@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
    --bg-primary: #f4f9fd;
    --bg-secondary: #e6f2fb;
    --bg-card: #ffffff;
    --bg-card-hover: #f7fbfe;
    --bg-sidebar: #ffffff;
    --bg-input: #f6fbff;
    --bg-input-focus: #ffffff;
    --border-color: rgba(36, 135, 206, 0.14);
    --border-light: rgba(36, 135, 206, 0.26);
    --accent-primary: #2487ce;
    --accent-secondary: #1c6da6;
    --accent-gradient: linear-gradient(135deg, #2487ce, #5ab3ef);
    --accent-glow: rgba(36, 135, 206, 0.12);
    --text-primary: #12324a;
    --text-secondary: #4e6980;
    --text-muted: #88a3b9;
    --success: #2487ce;
    --warning: #e0a44a;
    --danger: #f0574a;
    --info: #2487ce;
    --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
    --radius-sm: 4px;
    --radius-md: 5px;
    --radius-lg: 7px;
    --radius-xl: 9px;
    --shadow-sm: 0 1px 3px rgba(15,23,42,0.08);
    --shadow-md: 0 8px 24px rgba(15,23,42,0.10);
    --shadow-lg: 0 18px 46px rgba(15,23,42,0.15);
    --transition: all 0.15s ease;
    --sidebar-width: 248px;
    --header-height: 60px;
}

html[data-theme="dark"] {
    --bg-primary: #07111f;
    --bg-secondary: #0b1728;
    --bg-card: #0f1d31;
    --bg-card-hover: #13243b;
    --bg-sidebar: #0a1626;
    --bg-input: #101f34;
    --bg-input-focus: #14263f;
    --border-color: rgba(148, 163, 184, 0.16);
    --border-light: rgba(96, 165, 250, 0.35);
    --accent-primary: #60a5fa;
    --accent-secondary: #93c5fd;
    --accent-gradient: linear-gradient(135deg, #3b82f6, #38bdf8);
    --accent-glow: rgba(59, 130, 246, 0.18);
    --text-primary: #eff6ff;
    --text-secondary: #b6c5d8;
    --text-muted: #71839b;
    --success: #60a5fa;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.28);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.32);
    --shadow-lg: 0 18px 46px rgba(0,0,0,0.42);
}

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

html { font-size: 14px; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover { color: var(--accent-secondary); }

.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand img {
    height: 48px;
    border-radius: 8px;
}

.sidebar-brand-text {
    font-size: 1.3rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }

.nav-section {
    margin-bottom: 8px;
}

.nav-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 12px 12px 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
    text-decoration: none;
}

.nav-link:hover {
    background: rgba(15,23,42, 0.04);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--accent-glow);
    color: var(--accent-primary);
}

.nav-link.active .nav-icon {
    color: var(--accent-primary);
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
}

.nav-link.active .nav-icon,
.nav-link:hover .nav-icon {
    opacity: 1;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.sidebar-cta {
    background: rgba(36,135,206,0.08);
    border: 1px solid rgba(36,135,206,0.18);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.sidebar-cta p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.sidebar-cta .btn {
    font-size: 0.8rem;
    padding: 6px 16px;
}

.deposit-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    background: linear-gradient(150deg, rgba(36,135,206,0.12), rgba(36,135,206,0.03));
    border: 1px solid rgba(36,135,206,0.18);
    border-radius: 8px;
    padding: 16px 6px 16px 18px;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.deposit-cta:hover {
    transform: translateY(-2px);
    border-color: rgba(36,135,206,0.35);
    box-shadow: 0 10px 24px rgba(36,135,206,0.18);
}
.deposit-cta-text {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}
.deposit-cta-title {
    max-width: 92px;
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-primary);
    margin-bottom: 14px;
}
.deposit-cta-btn {
    display: inline-block;
    background: var(--accent-primary);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 7px 18px;
    border-radius: 7px;
    box-shadow: 0 4px 12px rgba(36,135,206,0.28);
}
.deposit-cta:hover .deposit-cta-btn { background: var(--accent-secondary); }
.deposit-cta-img {
    width: 92px;
    height: auto;
    pointer-events: none;
}

.detail-table { width: 100%; border-collapse: collapse; }
.detail-table td {
    padding: 13px 22px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.88rem;
    color: var(--text-primary);
}
.detail-table tr:last-child td { border-bottom: none; }
.detail-table tr:hover td { background: rgba(15,23,42,0.02); }
.detail-key {
    color: var(--text-secondary);
    width: 42%;
    font-weight: 500;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: -0.01em;
}
.text-success { color: var(--success); }

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-area {
    position: relative;
}

.main-content.is-loading .content-area {
    opacity: 0.55;
    transform: translateY(4px);
    pointer-events: none;
}

.page-loading-indicator {
    position: fixed;
    top: calc(var(--header-height) + 22px);
    right: 24px;
    z-index: 220;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(36,135,206,0.18);
    box-shadow: 0 14px 30px rgba(15,23,42,0.10);
    color: var(--text-primary);
    font-size: 0.84rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.main-content.is-loading .page-loading-indicator {
    opacity: 1;
    transform: translateY(0);
}

.page-loading-indicator .spinner {
    width: 16px;
    height: 16px;
}

html[data-theme="dark"] .page-loading-indicator {
    background: rgba(15,23,42,0.94);
    border-color: rgba(96,165,250,0.20);
    box-shadow: 0 16px 30px rgba(2,6,23,0.34);
    color: #e5eefb;
}

.top-header {
    height: var(--header-height);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    background: rgba(255,255,255,0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(36,135,206,0.16), rgba(36,135,206,0.06));
    border: 1px solid rgba(36,135,206,0.18);
    color: var(--accent-primary);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.header-brand svg {
    display: block;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
}
.mobile-toggle:hover { background: rgba(15,23,42,0.05); }

.page-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

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

.header-search-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 38px;
    padding: 0 14px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.header-search-trigger:hover {
    color: var(--text-primary);
    border-color: var(--border-light);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.header-search-trigger span {
    font-size: 0.84rem;
    font-weight: 500;
}

.header-search-trigger kbd,
.page-search-shortcut {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--accent-glow);
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid rgba(36,135,206,0.12);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    border-color: var(--border-light);
    color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.theme-icon {
    display: block;
}

.theme-icon-sun,
html[data-theme="dark"] .theme-icon-moon {
    display: none;
}

html[data-theme="dark"] .theme-icon-sun {
    display: block;
}

html[data-theme="dark"] .top-header {
    background: rgba(7, 17, 31, 0.88);
}

html[data-theme="dark"] .plan-card.current {
    background: linear-gradient(180deg, rgba(36,135,206,0.2), var(--bg-card) 52%);
}

html[data-theme="dark"] table tbody tr:hover td,
html[data-theme="dark"] .detail-table tr:hover td {
    background: rgba(96,165,250,0.06);
}

.balance-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(36,135,206,0.1);
    border: 1px solid rgba(36,135,206,0.22);
    color: var(--success);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    font-family: var(--font-mono);
}

.balance-badge:hover {
    background: rgba(36,135,206,0.16);
    color: var(--success);
}

.user-menu {
    position: relative;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}
.user-avatar:hover { transform: scale(1.05); }

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 8px;
    min-width: 180px;
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 200;
}

.user-dropdown.show { display: block; }

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.user-dropdown-item:hover {
    background: rgba(15,23,42,0.04);
    color: var(--text-primary);
}

.user-dropdown-item.danger { color: var(--danger); }
.user-dropdown-item.danger:hover { background: rgba(239,68,68,0.08); }

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

.table-actions-dropdown {
    position: relative;
}

.export-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.table-actions-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 172px;
    padding: 8px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 120;
}

.table-actions-menu.show {
    display: block;
}

.table-actions-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.84rem;
    text-decoration: none;
    transition: var(--transition);
}

.table-actions-item:hover {
    background: rgba(15,23,42,0.04);
    color: var(--text-primary);
}

.table-actions-item.active {
    background: rgba(36,135,206,0.10);
    color: var(--accent-primary);
    font-weight: 600;
}

.credentials-status-tools {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.credentials-status-refresh {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.status-refresh-icon {
    flex-shrink: 0;
}

.credentials-status-spinner {
    width: 14px;
    height: 14px;
    border-width: 2px;
}

.page-search-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 84px 20px 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.page-search-modal[hidden] {
    display: none !important;
}

.page-search-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.page-search-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(7, 17, 31, 0.5);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.22s ease;
}

.page-search-dialog {
    position: relative;
    width: min(720px, 100%);
    border: 1px solid var(--border-light);
    border-radius: 22px;
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    opacity: 0;
    transform: translateY(14px) scale(0.98);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.page-search-modal.is-open .page-search-backdrop {
    opacity: 1;
}

.page-search-modal.is-open .page-search-dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.page-search-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, var(--bg-card-hover), var(--bg-card));
}

.page-search-icon,
.page-search-close {
    color: var(--text-muted);
}

.page-search-input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
}

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

.page-search-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-card);
    cursor: pointer;
    transition: var(--transition);
}

.page-search-close:hover {
    color: var(--text-primary);
    border-color: var(--border-light);
}

.page-search-body {
    padding: 16px;
}

.page-search-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 4px 14px;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.page-search-results {
    display: grid;
    gap: 10px;
}

.page-search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-card-hover);
    color: var(--text-primary);
    text-decoration: none;
    opacity: 1;
    transform: translateY(0);
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.page-search-item[hidden] {
    display: none !important;
}

.page-search-item:hover,
.page-search-item.active {
    transform: translateY(-1px);
    border-color: var(--border-light);
    box-shadow: var(--shadow-sm);
}

.page-search-item-title {
    font-size: 0.9rem;
    font-weight: 600;
}

.page-search-item-url {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.76rem;
}

.page-search-empty {
    padding: 22px 6px 6px;
    color: var(--text-muted);
    font-size: 0.84rem;
}

.content-area {
    flex: 1;
    padding: 28px;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.card:has(.form-select),
.card:has(.custom-select) {
    overflow: visible;
}

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

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

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 24px;
}

.card-body.compact {
    padding: 16px 24px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--border-light);
    transform: translateY(-1px);
}

.stat-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.stat-value.accent { color: var(--accent-primary); }
.stat-value.success { color: var(--success); }

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.stat-icon.blue { background: rgba(36,135,206,0.12); color: var(--info); }
.stat-icon.green { background: rgba(36,135,206,0.12); color: var(--success); }
.stat-icon.orange { background: rgba(224,164,74,0.12); color: var(--warning); }
.stat-icon.red { background: rgba(239,68,68,0.12); color: var(--danger); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: var(--accent-primary);
    color: #ffffff;
    font-weight: 600;
}
.btn-primary:hover {
    background: var(--accent-secondary);
    color: #ffffff;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    box-shadow: inset 0 0 0 0 rgba(36,135,206,0);
}
.btn-secondary:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
    background: var(--bg-card-hover);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn-success {
    background: var(--success);
    color: #ffffff;
    font-weight: 600;
}
.btn-success:hover { background: var(--accent-secondary); color: #ffffff; }

.btn-danger {
    background: var(--danger);
    color: #fff;
}
.btn-danger:hover { background: #f36f63; }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 12px;
}
.btn-ghost:hover {
    background: rgba(15,23,42,0.04);
    color: var(--text-primary);
}

.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

.btn:focus,
.btn-copy:focus,
.softphone-panel button:focus,
.call-indicator:focus {
    outline: none;
}

.btn:focus-visible,
.btn-copy:focus-visible,
.softphone-panel button:focus-visible,
.call-indicator:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--accent-primary);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

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

.form-input[readonly] {
    opacity: 0.7;
    cursor: default;
}

.form-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
    cursor: pointer;
    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='%238888a0' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.form-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.custom-select {
    position: relative;
    width: 100%;
    font-size: 0.9rem;
}

.custom-select select {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
    outline: none;
    transition: var(--transition);
}

.custom-select-trigger:hover { border-color: var(--border-light); }

.custom-select.open .custom-select-trigger,
.custom-select-trigger:focus-visible {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.custom-select-arrow {
    display: flex;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.custom-select.open .custom-select-arrow { transform: rotate(180deg); }

.custom-select-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 60;
    padding: 5px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    max-height: 260px;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.custom-select-options::-webkit-scrollbar { width: 6px; }
.custom-select-options::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 6px; }

.custom-select.open .custom-select-options {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.custom-select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    border-radius: calc(var(--radius-sm) - 1px);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

.custom-select-option:hover,
.custom-select-option.active {
    background: rgba(15,23,42, 0.05);
    color: var(--text-primary);
}

.custom-select-option.selected {
    background: var(--accent-glow);
    color: var(--accent-primary);
}

.custom-select-option .check {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0;
}

.custom-select-option.selected .check { opacity: 1; }

.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

.table-wrap::-webkit-scrollbar { height: 6px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }

table {
    width: 100%;
    border-collapse: collapse;
}

table thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

table tbody td {
    padding: 12px 16px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

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

table tbody tr:hover td {
    background: rgba(15,23,42,0.02);
    color: var(--text-primary);
}

.table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-top: 1px solid var(--border-color);
}

.table-pagination.single-page {
    justify-content: flex-end;
}

.pagination-summary {
    color: var(--text-muted);
    font-size: 0.78rem;
    white-space: nowrap;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.pagination-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.pagination-btn.active {
    border-color: var(--accent-primary);
    background: var(--accent-primary);
    color: #fff;
}

.pagination-btn.disabled {
    cursor: default;
    opacity: 0.45;
}

.pagination-btn.disabled:hover {
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.pagination-ellipsis {
    min-width: 20px;
    color: var(--text-muted);
    text-align: center;
}

@media (max-width: 575px) {
    .table-pagination {
        align-items: flex-start;
        flex-direction: column;
    }

    .pagination-controls {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .pagination-nav {
        flex: 1;
    }
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-success { background: rgba(37,99,235,0.12); color: var(--success); }
.badge-warning { background: rgba(245,158,11,0.12); color: var(--warning); }
.badge-danger { background: rgba(239,68,68,0.12); color: var(--danger); }
.badge-info { background: rgba(59,130,246,0.12); color: var(--info); }
.badge-neutral { background: rgba(15,23,42,0.06); color: var(--text-secondary); }

.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert[hidden] {
    display: none !important;
}

.alert-close {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    padding: 0;
    background: transparent;
    color: currentColor;
    cursor: pointer;
    opacity: 0.78;
    transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
    flex-shrink: 0;
}

.alert-close:hover {
    opacity: 1;
    background: rgba(15,23,42,0.08);
    transform: scale(1.04);
}

.alert-close svg {
    display: block;
}

.auth-alert {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-alert-dismiss {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    padding: 0;
    background: transparent;
    color: currentColor;
    opacity: 0.9;
    flex-shrink: 0;
}

.auth-alert-dismiss:hover {
    opacity: 1;
}

.auth-alert-copy span {
    min-width: 0;
}

.auth-alert > span {
    min-width: 0;
}

.alert-error {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.2);
    color: #fca5a5;
}

.alert-success {
    background: rgba(37,99,235,0.1);
    border: 1px solid rgba(37,99,235,0.2);
    color: #1d4ed8;
}

.alert-info {
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.2);
    color: #93c5fd;
}

.alert-warning {
    background: rgba(224,164,74,0.12);
    border: 1px solid rgba(224,164,74,0.22);
    color: #a06410;
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 0.9rem;
}

.copy-wrap {
    position: relative;
    display: flex;
    gap: 8px;
}

.copy-wrap .form-input { flex: 1; }

.btn-copy {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    background: rgba(15,23,42,0.06);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-copy[hidden] {
    display: none !important;
}

.btn-copy:hover {
    background: rgba(15,23,42,0.1);
    color: var(--text-primary);
}

.btn-copy.copied {
    background: rgba(36,135,206,0.12);
    border-color: rgba(36,135,206,0.3);
    color: var(--success);
}

.inline-password-editor {
    margin-top: 10px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.status-dot.online { background: var(--success); box-shadow: 0 0 6px var(--success); }
.status-dot.offline { background: var(--danger); }
.status-dot.away { background: var(--warning); }

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,0.06) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    pointer-events: none;
}

.auth-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,0.04) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    pointer-events: none;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.auth-logo img {
    height: 48px;
    border-radius: 8px;
}

.auth-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--accent-primary);
    font-weight: 500;
}

.auth-inline-actions {
    display: flex;
    justify-content: flex-end;
    margin: -6px 0 16px;
    font-size: 0.84rem;
}

.auth-inline-actions a {
    color: var(--accent-primary);
    font-weight: 500;
    text-decoration: none;
}

.link-button {
    appearance: none;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    color: var(--accent-primary);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

.link-button:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card-hover);
    overflow: hidden;
}

.faq-question {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question svg {
    flex-shrink: 0;
    transition: transform 0.18s ease;
}

.faq-item[open] .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 20px 18px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.7;
}

.faq-answer a {
    color: var(--accent-primary);
    font-weight: 600;
    text-decoration: none;
}

.faq-answer a:hover {
    text-decoration: underline;
}

.faq-answer-wrap {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.24s ease, opacity 0.2s ease;
}

.rates-card-dropdowns {
    overflow: visible;
}

.softphone-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px;
    background: var(--bg-sidebar);
    border-left: 1px solid var(--border-color);
    z-index: 150;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 32px rgba(0,0,0,0.4);
}

.softphone-panel.open {
    transform: translateX(0);
}

.softphone-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.softphone-header-title {
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.softphone-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    transition: var(--transition);
}
.softphone-close:hover { background: rgba(15,23,42,0.06); color: var(--text-primary); }

.softphone-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.phone-reg-bar {
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.phone-reg-bar .status-dot { flex-shrink: 0; }

.phone-login {
    padding: 16px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.phone-login-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 2px;
}

.phone-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.phone-field label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.phone-field .phone-input {
    text-align: left;
}

.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.phone-input:-webkit-autofill,
.phone-input:-webkit-autofill:hover {
    -webkit-text-fill-color: var(--text-primary);
    -webkit-box-shadow: 0 0 0 1000px var(--bg-input) inset;
    box-shadow: 0 0 0 1000px var(--bg-input) inset;
    caret-color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.form-input:-webkit-autofill:focus,
.phone-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-primary);
    -webkit-box-shadow: 0 0 0 1000px var(--bg-input-focus) inset, 0 0 0 3px var(--accent-glow);
    box-shadow: 0 0 0 1000px var(--bg-input-focus) inset, 0 0 0 3px var(--accent-glow);
    caret-color: var(--text-primary);
    border: 1px solid var(--accent-primary);
}

.phone-login-status {
    font-size: 0.8rem;
    min-height: 1em;
    line-height: 1.4;
}

.phone-logout {
    margin-left: auto;
    background: none;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-family: inherit;
    padding: 3px 11px;
    border-radius: 100px;
    cursor: pointer;
    transition: var(--transition);
}

.phone-logout:hover {
    color: var(--danger);
    border-color: var(--danger);
}

.phone-display {
    padding: 20px 18px 16px;
    text-align: center;
    flex-shrink: 0;
}

.phone-number-display {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    word-break: break-all;
    min-height: 38px;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
}

.phone-number-display.empty {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 1rem;
}

.phone-timer {
    font-size: 1rem;
    color: var(--accent-primary);
    font-variant-numeric: tabular-nums;
    margin-top: 4px;
}

.phone-call-status {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.phone-input-wrap {
    padding: 0 14px 10px;
    flex-shrink: 0;
}

.phone-input {
    width: 100%;
    padding: 9px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    text-align: center;
    letter-spacing: 0.04em;
    outline: none;
    transition: var(--transition);
}
.phone-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.dialpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 6px 14px;
    flex-shrink: 0;
}

.dialpad-key {
    aspect-ratio: 1.5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(15,23,42,0.03);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.12s ease;
    font-family: inherit;
    color: var(--text-primary);
    user-select: none;
    -webkit-user-select: none;
}

.dialpad-key:hover {
    background: rgba(15,23,42,0.07);
}

.dialpad-key:active {
    background: var(--accent-glow);
    border-color: rgba(37,99,235,0.35);
    transform: scale(0.95);
}

.dialpad-key .digit {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1;
}

.dialpad-key .letters {
    font-size: 0.55rem;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 1px;
}

.phone-action-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 14px;
    flex-shrink: 0;
}

.btn-call {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--success);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    box-shadow: none;
    flex-shrink: 0;
}

.btn-call:hover {
    transform: scale(1.05);
    background: #1d4ed8;
}

.btn-call.hangup {
    background: var(--danger);
    box-shadow: none;
}

.btn-call.hangup:hover {
    background: #f36f63;
}

.btn-call svg {
    width: 24px;
    height: 24px;
    color: #ffffff;
    stroke: #ffffff;
    fill: none;
}

.btn-call.hangup svg {
    fill: #fff;
    stroke: none;
}

.btn-phone-aux {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(15,23,42,0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}
.btn-phone-aux:hover { background: rgba(15,23,42,0.1); color: var(--text-primary); }

.call-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 14px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.call-control-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(15,23,42,0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.call-control-btn:hover { background: rgba(15,23,42,0.1); color: var(--text-primary); }
.call-control-btn.active { background: var(--accent-glow); color: var(--accent-primary); border-color: rgba(36,135,206,0.35); }

.nav-link.phone-toggle {
    margin-top: 2px;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
}
.nav-link.phone-toggle:focus,
.nav-link.phone-toggle:focus-visible {
    outline: none;
    box-shadow: none;
}
.nav-link.phone-toggle .nav-icon { color: var(--success); opacity: 1; }
.nav-link.phone-toggle:hover {
    background: rgba(15,23,42,0.04);
    color: var(--text-primary);
}

.call-indicator {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--success);
    color: #ffffff;
    padding: 10px 18px 10px 14px;
    border-radius: 100px;
    display: none;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    z-index: 140;
    font-size: 0.85rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    animation: callPulse 2s ease infinite;
}

.call-indicator.visible { display: flex; }

@keyframes callPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.72; }
}

.call-indicator svg { width: 18px; height: 18px; }

.softphone-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 149;
}
.softphone-overlay.show { display: block; }

@media (max-width: 991px) {
    .softphone-panel { width: 100%; max-width: 360px; }
}

@media (max-width: 575px) {
    .softphone-panel { max-width: 100%; }
    .phone-number-display { font-size: 1.3rem; }
}

.twofa-qr {
    text-align: center;
    padding: 24px;
    background: white;
    border-radius: var(--radius-md);
    display: inline-block;
    margin: 16px auto;
}

.twofa-secret {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    background: var(--bg-input);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    text-align: center;
    word-break: break-all;
    color: var(--accent-primary);
}

.totp-input {
    letter-spacing: 0.3em;
    font-size: 1.4rem;
    font-weight: 600;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.search-input {
    width: 100%;
    max-width: 300px;
    padding: 8px 14px 8px 36px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23555568' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px center;
}

.search-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.table-search-form {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: min(100%, 560px);
}

.table-search-form .search-input {
    flex: 1;
    max-width: none;
}

@media (max-width: 700px) {
    .table-card-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .table-search-form {
        flex-wrap: wrap;
        justify-content: flex-start;
        width: 100%;
    }

    .table-search-form .search-input {
        flex-basis: 100%;
    }
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99;
}

@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.show {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-toggle {
        display: flex;
    }

    .content-area {
        padding: 20px 16px;
    }

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

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

    .stat-grid {
        grid-template-columns: 1fr;
    }

    .top-header {
        padding: 0 16px;
    }

    .phone-number {
        font-size: 1.4rem;
    }
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    max-width: 360px;
}

.toast-success {
    background: rgba(36,135,206,0.15);
    border: 1px solid rgba(36,135,206,0.3);
    color: var(--accent-secondary);
}

.toast-error {
    background: rgba(239,68,68,0.15);
    border: 1px solid rgba(239,68,68,0.3);
    color: #fca5a5;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-light);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.tab {
    padding: 10px 16px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: inherit;
}

.tab:hover { color: var(--text-secondary); }
.tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.hero-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin-bottom: 20px;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.hero-card::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(36,135,206,0.08), transparent 62%);
    pointer-events: none;
}
.hero-card::after {
    content: '';
    position: absolute;
    bottom: -60%;
    right: 18%;
    width: 360px;
    height: 360px;
    background: none;
    pointer-events: none;
}
.hero-left { position: relative; z-index: 1; min-width: 260px; }
.hero-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 14px;
}
.hero-status .pulse-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 0 rgba(36,135,206,0.45);
    animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
    0% { box-shadow: 0 0 0 0 rgba(36,135,206,0.45); }
    70% { box-shadow: 0 0 0 8px rgba(36,135,206,0); }
    100% { box-shadow: 0 0 0 0 rgba(36,135,206,0); }
}
.hero-title {
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 8px;
}
.hero-title .accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.hero-meta .dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-muted); display: inline-block; }
.hero-right {
    position: relative;
    z-index: 1;
    text-align: right;
    min-width: 180px;
}
.hero-balance-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.hero-balance {
    font-size: 2.6rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-balance-unit { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.hero-manage {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    padding: 7px 14px;
    border-radius: 100px;
    transition: var(--transition);
}
.hero-manage:hover { color: var(--text-primary); border-color: var(--accent-primary); background: var(--accent-glow); }

.feature-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.feature-badge {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 13px;
    transition: var(--transition);
}
.feature-badge:hover { border-color: var(--border-light); transform: translateY(-1px); }
.feature-badge-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: var(--accent-glow);
    color: var(--accent-primary);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.feature-badge-title { font-size: 0.88rem; font-weight: 600; }
.feature-badge-sub { font-size: 0.74rem; color: var(--text-muted); margin-top: 1px; }

.stat-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.stat-card-head .stat-label { margin-bottom: 0; }
.stat-card-head .stat-icon { margin-bottom: 0; width: 34px; height: 34px; }
.stat-sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 6px; }
.stat-sub.up { color: var(--success); }
.stat-sub.down { color: var(--danger); }

.dashboard-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.chart-wrap {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 200px;
    padding: 12px 4px 0;
}
.chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    height: 100%;
    justify-content: flex-end;
}
.chart-bar-track {
    width: 100%;
    max-width: 46px;
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.chart-bar {
    width: 100%;
    max-width: 46px;
    min-height: 4px;
    background: var(--accent-primary);
    border-radius: 2px 2px 0 0;
    position: relative;
    transition: filter 0.2s ease;
    animation: growBar 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.chart-bar:hover { filter: brightness(1.2); }
.chart-bar:hover .chart-tip { opacity: 1; transform: translate(-50%, -6px); }
@keyframes growBar { from { transform: scaleY(0); transform-origin: bottom; } to { transform: scaleY(1); } }
.chart-tip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translate(-50%, 0);
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}
.chart-label { font-size: 0.72rem; color: var(--text-muted); }

.dest-list { display: flex; flex-direction: column; gap: 16px; }
.dest-item { display: flex; flex-direction: column; gap: 6px; }
.dest-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.83rem;
}
.dest-name { font-weight: 500; display: flex; align-items: center; gap: 8px; }
.dest-flag {
    width: 20px; height: 20px; border-radius: 5px;
    background: var(--accent-glow);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem;
}
.dest-value { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.dest-bar-track {
    height: 6px;
    background: rgba(15,23,42,0.05);
    border-radius: 100px;
    overflow: hidden;
}
.dest-bar-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 100px;
    animation: growWidth 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
@keyframes growWidth { from { width: 0 !important; } }

.dash-split {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    align-items: start;
}
@media (max-width: 991px) {
    .dash-split { grid-template-columns: 1fr; }
    .hero-right { text-align: left; }
    .hero-card { flex-direction: column; }
}

.sidebar-brand-text,
.auth-logo-text {
    font-family: var(--font-mono);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.stat-value,
.hero-balance,
.hero-balance-unit,
.phone-number-display,
.phone-timer,
.dest-value,
.totp-input,
.call-indicator,
.chart-tip,
.chart-label {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.stat-value { font-weight: 600; letter-spacing: -0.02em; }
.hero-balance { font-weight: 600; }

table tbody td {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: -0.01em;
}

.nav-section-title,
.stat-label,
.hero-balance-label {
    font-family: var(--font-mono);
    font-weight: 500;
}

.hero-card {
    border-left: 2px solid var(--accent-primary);
}

.card-title {
    letter-spacing: -0.01em;
}

body.phone-open .toast-container { right: 340px; }

/* White and blue dashboard additions */
.card-subtitle {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.detail-action {
    display: inline-flex;
    margin-left: 12px;
    color: var(--accent-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.76rem;
    font-weight: 600;
}

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

.plan-card {
    display: flex;
    flex-direction: column;
    min-height: 245px;
    padding: 22px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.plan-card.current {
    border-color: var(--accent-primary);
    background: linear-gradient(180deg, rgba(36,135,206,0.08), #ffffff 52%);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.plan-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    margin-bottom: 20px;
}

.plan-card-top-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.plan-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: var(--accent-glow);
    color: var(--accent-primary);
}

.plan-card h2 {
    color: var(--text-primary);
    font-size: 1.08rem;
    line-height: 1.3;
    margin-bottom: 6px;
}

.plan-card-id {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-card-hover);
}

.plan-card p {
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.82rem;
    margin-bottom: 22px;
}

.billing-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
    gap: 20px;
    align-items: stretch;
}

.billing-grid > .card {
    margin-bottom: 0;
}

.password-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

.password-grid > .card {
    margin-bottom: 0;
}

.password-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.password-section-heading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.password-section-copy {
    margin-bottom: 18px;
}

.device-session-list {
    display: flex;
    flex-direction: column;
}

.device-session-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

.device-session-item:first-child {
    border-top: 0;
}

.device-session-main {
    min-width: 0;
}

.device-session-name {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--text-primary);
    font-weight: 600;
}

.device-session-meta,
.device-session-side {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.device-session-side {
    margin-top: 0;
    text-align: right;
    white-space: nowrap;
}

.device-session-form {
    display: inline-flex;
}

.oxapay-mark {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 100px;
    background: var(--accent-glow);
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 600;
}

.money-input {
    position: relative;
}

.money-input > span {
    position: absolute;
    top: 50%;
    left: 14px;
    z-index: 1;
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-weight: 600;
    transform: translateY(-50%);
}

.money-input .form-input {
    padding-left: 32px;
    font-family: var(--font-mono);
}

.payment-note {
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 0.75rem;
    line-height: 1.5;
    text-align: center;
}

.bonus-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(36,135,206,0.16);
    background: linear-gradient(180deg, rgba(36,135,206,0.08), rgba(36,135,206,0.03));
}

.bonus-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(36,135,206,0.12);
    color: var(--accent-primary);
    flex-shrink: 0;
}

.bonus-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bonus-copy b {
    color: var(--text-primary);
    font-size: 0.86rem;
}

.bonus-copy span {
    color: var(--text-secondary);
    font-size: 0.79rem;
    line-height: 1.55;
}

.credit-preview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.preview-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-card-hover);
}

.preview-card.highlight {
    border-color: var(--border-light);
    background: linear-gradient(180deg, rgba(36,135,206,0.1), rgba(36,135,206,0.03));
}

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

.preview-value {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 600;
}

.balance-summary {
    background: linear-gradient(145deg, #1c6da6, #2487ce 55%, #5ab3ef);
    border: 0;
    box-shadow: 0 18px 40px rgba(36,135,206,0.22);
}

.balance-summary .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 28px;
}

.balance-summary-label {
    color: rgba(255,255,255,0.74);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.balance-summary strong {
    display: block;
    margin: 10px 0 8px;
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: clamp(2rem, 4vw, 2.7rem);
    line-height: 1.15;
}

.balance-summary p {
    color: rgba(255,255,255,0.78);
    font-size: 0.82rem;
}

.payment-steps {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: auto;
    padding-top: 24px;
    color: #ffffff;
    font-size: 0.78rem;
}

.payment-steps span {
    display: flex;
    align-items: center;
    gap: 9px;
}

.payment-steps b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    font-family: var(--font-mono);
    font-size: 0.7rem;
}

.softphone-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.softphone-item {
    padding: 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, var(--bg-card-hover), rgba(36,135,206,0.03));
}

.softphone-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.softphone-top h3,
.tutorial-webphone-copy h3,
.tutorial-block h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.softphone-top p,
.tutorial-webphone-copy p,
.tutorial-block p,
.tutorial-note,
.tutorial-mini {
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.6;
}

.platform-pills,
.example-pills,
.tutorial-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.platform-pill,
.example-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--accent-glow);
    border: 1px solid var(--border-light);
    color: var(--accent-primary);
    font-size: 0.76rem;
    font-weight: 600;
}

.tutorial-kv {
    display: grid;
    gap: 12px;
}

.tutorial-kv > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card-hover);
}

.tutorial-kv span {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.tutorial-kv strong {
    color: var(--text-primary);
    font-size: 0.82rem;
    text-align: right;
}

.tutorial-note {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: rgba(36,135,206,0.06);
    border: 1px solid rgba(36,135,206,0.12);
}

.tutorial-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tutorial-step {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 14px;
    align-items: flex-start;
}

.tutorial-step b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--accent-primary);
    color: #fff;
    font-family: var(--font-mono);
}

.tutorial-step strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-primary);
    font-size: 0.88rem;
}

.tutorial-step p {
    color: var(--text-secondary);
    font-size: 0.83rem;
}

.tutorial-block + .tutorial-block {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--border-color);
}

.tutorial-code-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 14px 0;
}

.tutorial-code-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.tutorial-code-list code {
    color: var(--accent-primary);
    background: transparent;
    font-size: 0.86rem;
}

.tutorial-code-list span {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-align: right;
}

.tutorial-webphone-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
}

.tutorial-webphone-preview {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
    align-items: center;
}

.tutorial-webphone-copy {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tutorial-webphone-mock {
    background: linear-gradient(180deg, var(--bg-card), var(--bg-card-hover));
    border: 1px solid var(--border-light);
    border-radius: 18px;
    padding: 16px;
    box-shadow: var(--shadow-md);
}

.webphone-mini-bar {
    width: 64px;
    height: 6px;
    border-radius: 999px;
    background: rgba(36,135,206,0.2);
    margin: 0 auto 16px;
}

.webphone-mini-screen {
    padding: 18px 14px;
    margin-bottom: 14px;
    border-radius: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-align: center;
    font-weight: 600;
}

.webphone-mini-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.webphone-mini-pad span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    background: rgba(36,135,206,0.08);
    border: 1px solid rgba(36,135,206,0.12);
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-weight: 600;
}

.tutorial-contact-list a {
    color: #ffffff;
    text-decoration: underline;
}

.download-grid,
.support-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.download-platform-card,
.support-card-link {
    display: block;
    height: 100%;
    padding: 20px;
    border-radius: 20px;
    background: linear-gradient(180deg, var(--bg-card), var(--bg-card-hover));
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.download-platform-card:hover,
.support-card-link:hover {
    transform: translateY(-2px);
    border-color: rgba(36,135,206,0.24);
    box-shadow: var(--shadow-md);
}

.download-platform-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.download-platform-icon,
.support-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(36,135,206,0.1);
    border: 1px solid rgba(36,135,206,0.12);
    color: var(--accent-primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.download-platform-title,
.support-card-copy strong {
    display: block;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
}

.download-platform-subtitle,
.support-card-copy span {
    display: block;
    color: var(--text-secondary);
    font-size: 0.83rem;
    margin-top: 4px;
}

.download-app-list {
    display: grid;
    gap: 12px;
}

.download-app-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.download-app-item:hover {
    transform: translateY(-1px);
    border-color: rgba(36,135,206,0.22);
    background: var(--bg-card);
}

.download-app-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(36,135,206,0.08);
    color: var(--accent-primary);
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}

.download-app-copy {
    min-width: 0;
    flex: 1;
}

.download-app-copy strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.download-app-copy span {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 3px;
}

.download-app-arrow {
    color: var(--text-muted);
    font-size: 1rem;
    flex-shrink: 0;
}

.support-card-link {
    display: flex;
    align-items: center;
    gap: 16px;
}

.support-card-copy {
    min-width: 0;
}

.support-card-copy p {
    margin-top: 10px;
    color: var(--text-primary);
    font-size: 0.84rem;
    font-weight: 600;
}

.support-card-copy small {
    display: block;
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 0.77rem;
}

.webphone-frame-shell {
    border: 1px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(36,135,206,0.05), var(--bg-card));
    box-shadow: var(--shadow-md);
}

.webphone-frame-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
}

.webphone-live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 0 6px rgba(36,135,206,0.12);
}

.webphone-frame {
    display: block;
    width: 100%;
    min-height: 720px;
    border: 0;
    background: var(--bg-card);
}

.phone-client-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
    align-items: start;
}

.phone-client-card {
    overflow: hidden;
}

.phone-client-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.phone-client-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(36,135,206,0.12);
    color: var(--accent-primary);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.phone-client-badge[data-state="ready"],
.phone-client-badge[data-state="live"],
.phone-client-badge[data-state="connected"] {
    background: rgba(16,185,129,0.14);
    color: #10b981;
}

.phone-client-badge[data-state="calling"],
.phone-client-badge[data-state="ringing"],
.phone-client-badge[data-state="connecting"] {
    background: rgba(36,135,206,0.12);
    color: var(--accent-primary);
}

.phone-client-badge[data-state="offline"],
.phone-client-badge[data-state="error"] {
    background: rgba(239,68,68,0.12);
    color: #ef4444;
}

.phone-client-display {
    padding-top: 8px;
}

.phone-client-dialpad {
    padding-top: 0;
    max-width: 360px;
    width: 100%;
    margin: 0 auto;
}

.phone-client-actions,
.phone-client-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.phone-client-actions {
    justify-content: center;
    max-width: 360px;
    width: 100%;
    margin: 0 auto;
}

.phone-client-toolbar {
    justify-content: space-between;
    max-width: 360px;
    width: 100%;
    margin: 0 auto;
}

.phone-end-btn {
    min-width: 118px;
}

.phone-help-card .card-body {
    display: flex;
    flex-direction: column;
}

.phone-help-kv strong {
    max-width: 240px;
}

.phone-debug-panel {
    border-top: 1px solid var(--border-color);
    padding-top: 18px;
}

.phone-debug-panel summary {
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: 600;
    list-style: none;
}

.phone-debug-panel summary::-webkit-details-marker {
    display: none;
}

.phone-debug-panel summary::after {
    content: '+';
    float: right;
    color: var(--accent-primary);
}

.phone-debug-panel[open] summary::after {
    content: '-';
}

.phone-debug-log {
    margin-top: 14px;
    min-height: 200px;
    resize: vertical;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.5;
}

@media (max-width: 800px) {
    .billing-grid,
    .password-grid {
        grid-template-columns: 1fr;
    }

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

    .download-grid,
    .support-grid,
    .tutorial-webphone-grid,
    .tutorial-webphone-preview {
        grid-template-columns: 1fr;
    }

    .phone-client-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575px) {
    .plan-grid {
        grid-template-columns: 1fr;
    }

    .plan-card {
        min-height: 220px;
    }

    .softphone-top,
    .tutorial-kv > div,
    .tutorial-code-list > div {
        flex-direction: column;
        align-items: flex-start;
    }

    .download-platform-card,
    .support-card-link {
        padding: 16px;
    }

    .dashboard-stats-grid {
        grid-template-columns: 1fr;
    }

    .header-search-trigger span,
    .header-search-trigger kbd,
    .page-search-item-url,
    .page-search-shortcut {
        display: none;
    }

    .tutorial-kv strong,
    .tutorial-code-list span {
        text-align: left;
    }

    .webphone-frame {
        min-height: 620px;
    }

    .phone-client-actions,
    .phone-client-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .phone-end-btn,
    .phone-client-toolbar .btn {
        width: 100%;
    }
}
