:root {
    --primary: #E88EA5;
    --primary-hover: #d45b78;
    --primary-light: #fff0f3;
    --primary-border: #f8c2cf;
    --primary-glow: rgba(232, 142, 165, 0.25);
    
    --bg-page: #faf7f8;
    --bg-card: #ffffff;
    --bg-card-subtle: #fdf8f9;
    --bg-input: #ffffff;
    
    --text-title: #1e293b;
    --text-body: #475569;
    --text-muted: #94a3b8;
    --text-dim: #cbd5e1;
    
    --border-color: #f1dde2;
    --border-focus: #E88EA5;
    
    --success: #10b981;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    
    --radius: 12px;
    --radius-sm: 8px;
    --radius-pill: 9999px;
    --shadow: 0 4px 20px rgba(232, 142, 165, 0.08);
    --shadow-hover: 0 10px 30px rgba(232, 142, 165, 0.18);
}

[data-theme="dark"] {
    --primary: #E88EA5;
    --primary-hover: #f0a3b6;
    --primary-light: #25161b;
    --primary-border: #44222b;
    --primary-glow: rgba(232, 142, 165, 0.35);
    
    --bg-page: #0a0b10;
    --bg-card: #12131a;
    --bg-card-subtle: #171822;
    --bg-input: #171924;
    
    --text-title: #ffffff;
    --text-body: #d1d5db;
    --text-muted: #8b92a5;
    --text-dim: #4b5268;
    
    --border-color: #272838;
    --border-focus: #E88EA5;
    
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.8);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

body {
    background-color: var(--bg-page);
    color: var(--text-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* NAVBAR */
.navbar {
    height: 72px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

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

.brand-logo-badge {
    background: linear-gradient(135deg, #E88EA5 0%, #f472b6 100%);
    color: white;
    font-weight: 900;
    font-size: 16px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    letter-spacing: 1px;
}

.brand-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-title);
    letter-spacing: -0.5px;
}

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

.nav-center-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    color: var(--text-body);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
    cursor: pointer;
}

.nav-link:hover {
    color: var(--primary-hover);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* THEME TOGGLE BUTTON */
.theme-toggle-btn {
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-body);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

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

/* PILLS & BADGES */
.badge {
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-pink {
    background: var(--primary-light);
    color: var(--primary-hover);
    border: 1px solid var(--primary-border);
}

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

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

.badge-admin {
    background: #fdf2f8;
    color: #db2777;
    border: 1px solid #fbcfe8;
}

.uid-pill {
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-family: monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-body);
}

.balance-pill {
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    color: var(--primary-hover);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.balance-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--primary-glow);
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 10px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 14px var(--primary-glow);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-body);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-subtle);
    border-color: var(--primary);
    color: var(--primary-hover);
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
}

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

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

.btn-lg {
    padding: 14px 26px;
    font-size: 16px;
    border-radius: var(--radius);
}

.btn-block {
    width: 100%;
}

/* LANDING PAGE */
.landing-view {
    flex: 1;
}

.hero-section {
    padding: 80px 20px 60px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    color: var(--primary-hover);
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 52px;
    font-weight: 900;
    color: var(--text-title);
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
}

.gradient-text {
    background: linear-gradient(135deg, #E88EA5 0%, #db2777 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 18px;
    color: var(--text-body);
    line-height: 1.6;
    max-width: 680px;
    margin: 0 auto 36px;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 60px;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    gap: 16px;
}

.metric-item {
    text-align: center;
}

.metric-number {
    font-size: 32px;
    font-weight: 900;
    color: var(--primary-hover);
    letter-spacing: -0.5px;
}

.metric-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.section {
    padding: 80px 20px;
    max-width: 1140px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 48px;
}

.section-tag {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary-hover);
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.section-title {
    font-size: 34px;
    font-weight: 800;
    color: var(--text-title);
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.5;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.feature-icon-box {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    color: var(--primary-hover);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 20px;
}

.feature-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-title);
    margin-bottom: 10px;
}

.feature-desc {
    font-size: 14px;
    color: var(--text-body);
    line-height: 1.6;
}

/* PRICING CALCULATOR CARD */
.pricing-card-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 40px;
    max-width: 760px;
    margin: 0 auto;
    box-shadow: var(--shadow-hover);
    text-align: center;
}

.pricing-rate-large {
    font-size: 54px;
    font-weight: 900;
    color: var(--primary-hover);
    margin-bottom: 4px;
}

.pricing-rate-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.calc-slider-box {
    margin: 30px 0;
}

.range-slider {
    width: 100%;
    accent-color: var(--primary);
    cursor: pointer;
    height: 8px;
}

.calc-output-row {
    display: flex;
    justify-content: space-between;
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-sm);
    padding: 16px 24px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-title);
    margin: 24px 0;
}

/* FAQ */
.faq-grid {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.2s;
}

.faq-question {
    padding: 20px 24px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-title);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    padding: 0 24px 20px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-body);
    display: none;
}

.faq-item.open .faq-answer {
    display: block;
}

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

/* FOOTER */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: auto;
}

/* =============================================================
   DASHBOARD LAYOUT (dashboard.mihailow.com)
   ============================================================= */
.dashboard-view {
    display: flex;
    flex: 1;
    min-height: calc(100vh - 72px);
    align-items: stretch;
}

.sidebar {
    width: 260px;
    min-height: 100%;
    flex-shrink: 0;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px 16px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-item {
    background: none;
    border: none;
    outline: none;
    color: var(--text-body);
    font-size: 14px;
    font-weight: 600;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
}

.sidebar-item:hover {
    background: var(--primary-light);
    color: var(--primary-hover);
}

.sidebar-item.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.sidebar-item.admin-tab {
    color: #db2777;
    background: #fdf2f8;
    border: 1px dashed #f472b6;
    margin-top: 12px;
}

[data-theme="dark"] .sidebar-item.admin-tab {
    background: #25121b;
    border-color: #701a40;
    color: #f472b6;
}

.sidebar-item.admin-tab:hover {
    background: #fbcfe8;
}

[data-theme="dark"] .sidebar-item.admin-tab:hover {
    background: #3b1327;
}

.sidebar-item.admin-tab.active {
    background: #db2777;
    color: white;
}

.dash-content {
    flex: 1;
    padding: 36px 48px;
    overflow-y: auto;
}

.pane {
    display: none;
    animation: fadeIn 0.2s ease-in-out;
}

.pane.active {
    display: block;
}

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

.pane-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.pane-title-row h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-title);
}

.pane-title-row p {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* CARDS & FORMS */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-title);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: var(--primary-hover);
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-title);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-title);
    outline: none;
    transition: all 0.2s;
}

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

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.radio-group {
    display: flex;
    gap: 12px;
}

.radio-pill {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-title);
    transition: all 0.2s;
}

.radio-pill input {
    accent-color: var(--primary);
}

/* PLANS SQUARE GRID */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.plan-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.plan-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.plan-card-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-title);
}

.plan-card-quota-bar {
    width: 100%;
    height: 10px;
    background: var(--bg-card-subtle);
    border-radius: var(--radius-pill);
    overflow: hidden;
    margin: 8px 0;
    border: 1px solid var(--border-color);
}

.plan-card-quota-fill {
    height: 100%;
    background: linear-gradient(90deg, #E88EA5, #db2777);
    border-radius: var(--radius-pill);
    transition: width 0.4s ease;
}

.plan-token-box {
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: monospace;
    font-size: 13px;
    color: var(--text-title);
}

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

/* CUTE SEARCHABLE COUNTRY DROPDOWN */
.custom-dropdown {
    position: relative;
    width: 100%;
}

.custom-dropdown-trigger {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-title);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.custom-dropdown-trigger:hover {
    border-color: var(--border-focus);
}

.custom-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-hover);
    z-index: 50;
    max-height: 280px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.custom-dropdown-search-box {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card-subtle);
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-dropdown-search-input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-title);
    outline: none;
}

.custom-dropdown-options {
    overflow-y: auto;
    flex: 1;
}

.custom-dropdown-option {
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-title);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.15s;
}

.custom-dropdown-option:hover {
    background: var(--primary-light);
    color: var(--primary-hover);
}

.custom-dropdown-option.selected {
    background: var(--primary-light);
    color: var(--primary-hover);
    font-weight: 700;
}

/* PROXY TEXTAREA */
.proxy-textarea {
    width: 100%;
    height: 220px;
    padding: 16px;
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: monospace;
    font-size: 13px;
    color: var(--text-title);
    outline: none;
    resize: vertical;
    white-space: pre;
    line-height: 1.6;
}

/* TABLES */
.tx-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.tx-table th {
    background: var(--bg-card-subtle);
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.tx-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-title);
}

/* STANDALONE AUTH SCREEN FOR DASHBOARD.MIHAILOW.COM */
.auth-standalone-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    min-height: calc(100vh - 72px);
}

.auth-standalone-box {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow-hover);
}

/* MODAL OVERLAY */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 20px;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 32px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-hover);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-title);
    margin-bottom: 6px;
}

.modal-header p {
    font-size: 13px;
    color: var(--text-muted);
}

/* TOAST */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-title);
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-hover);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

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

.hidden {
    display: none !important;
}

@media (max-width: 900px) {
    .dashboard-view {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .dash-content {
        padding: 24px 16px;
    }
    .hero-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}
