/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-body: #0a0a0f;
    --bg-card: rgba(255,255,255,0.04);
    --bg-card-hover: rgba(255,255,255,0.07);
    --bg-input: rgba(255,255,255,0.06);
    --bg-header: #12121a;
    --border: rgba(255,255,255,0.1);
    --border-focus: #c9a84c;
    --text-primary: #f5f5f7;
    --text-secondary: #8a8a9a;
    --text-muted: #5a5a6a;
    --accent: #c9a84c;
    --accent-hover: #e4c76b;
    --danger: #e74c3c;
    --danger-hover: #c0392b;
    --success: #27ae60;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body {
    height: 100%;
    font-family: var(--font);
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Screens */
.screen {
    display: none;
    min-height: 100vh;
}
.screen.active {
    display: flex;
}

/* Login Screen */
#loginScreen {
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
}

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


.login-card h1 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
    text-align: left;
}

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

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

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

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

.form-error {
    font-size: 13px;
    color: var(--danger);
    margin-bottom: 12px;
    text-align: left;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

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

.btn-primary {
    background: var(--accent);
    color: #0a0a0f;
}
.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-outline:hover:not(:disabled) {
    background: var(--bg-card-hover);
    border-color: var(--accent);
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
}
.btn-danger:hover:not(:disabled) {
    background: var(--danger);
    color: #fff;
}

.btn-full {
    width: 100%;
    padding: 12px;
    font-size: 15px;
}

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

/* Dashboard Layout */
#dashboardScreen {
    flex-direction: column;
}

.dash-header {
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.dash-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
}

.dash-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}


.dash-title {
    font-size: 18px;
    font-weight: 600;
}
.dash-title-sub {
    font-weight: 400;
    font-size: 15px;
    color: var(--text-secondary);
}
.dash-version {
    font-family: 'Playfair Display', serif;
    color: var(--accent);
    font-weight: 700;
    font-size: 20px;
}
.dash-author {
    color: var(--accent);
    font-weight: 600;
}

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

.dash-user {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Stats Bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 0 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Navigation */
.dash-nav {
    display: flex;
    gap: 2px;
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    padding: 12px 24px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

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

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Tab Content */
.tab-content {
    display: none;
    margin: 0 auto;
    padding: 20px 24px;
    width: 100%;
}

.tab-content.active {
    display: block;
}

/* Sub-tab navigation */
.tab-subnav {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}

.subtab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .2s, border-color .2s;
}

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

.subtab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.subtab-content {
    display: none;
}

.subtab-content.active {
    display: block;
}

/* Toolbar */
.tab-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.toolbar-left {
    font-size: 14px;
    color: var(--text-secondary);
}

.toolbar-right {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Table */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    background: var(--bg-card);
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    word-break: break-word;
}

.data-table tbody tr:hover {
    background: var(--bg-card-hover);
}

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

.col-check {
    width: 40px;
    text-align: center;
}
.col-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--accent);
}
.col-time { white-space: nowrap; min-width: 140px; }
.col-name { min-width: 120px; }
.col-phone { white-space: nowrap; min-width: 130px; }
.col-email { min-width: 150px; }
.col-desc { min-width: 180px; }
.col-city { min-width: 120px; }
.col-ip { min-width: 120px; font-family: monospace; font-size: 12px; }
.col-url {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Copyable fields */
.copyable {
    cursor: pointer;
    transition: color 0.2s;
    position: relative;
}
.copyable:hover {
    color: var(--accent-light);
}
.copyable:active {
    opacity: 0.6;
}

.col-desc-cell {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 16px;
}

/* Admin Cards */
#adminsList {
    display: grid;
    gap: 16px;
}

.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-card:hover {
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.admin-card.super-admin {
    border-color: var(--accent);
    opacity: 0.85;
    background: linear-gradient(135deg, rgba(201,168,76,0.06) 0%, rgba(201,168,76,0.02) 100%);
}
.admin-card.super-admin:hover {
    border-color: var(--accent);
}

.admin-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.admin-card-header .admin-id {
    font-weight: 600;
    font-size: 16px;
}

.super-admin-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent);
    background: rgba(201, 168, 76, 0.12);
    padding: 3px 10px;
    border-radius: 20px;
}

.admin-card-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.admin-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-section-actions {
    flex-direction: row;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    margin-top: 2px;
}

.admin-section-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-all-perms {
    font-size: 13px;
    color: var(--text-muted);
}

/* Password & TG ID rows */
.admin-pwd-row,
.admin-tg-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-field {
    width: 140px;
    padding: 7px 12px;
    font-size: 13px;
    font-family: var(--font);
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.admin-field:focus {
    border-color: var(--border-focus);
    background: rgba(201, 168, 76, 0.04);
}

.admin-field::placeholder {
    color: var(--text-muted);
}

.admin-tg-current {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    padding: 4px 8px;
    background: rgba(255,255,255,0.03);
    border-radius: 4px;
    border: 1px solid transparent;
}

.admin-tg-none {
    color: var(--text-muted);
    font-style: italic;
    border-color: transparent;
    background: none;
}

/* Flags rows */
.admin-flags-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.flag-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    padding: 5px 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: all 0.15s;
}

.flag-toggle:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
    background: rgba(255,255,255,0.06);
}

.flag-toggle input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--accent);
    cursor: pointer;
}

.flag-toggle:has(input:checked) {
    color: var(--text-primary);
    background: rgba(201, 168, 76, 0.1);
    border-color: rgba(201, 168, 76, 0.35);
}

/* Remove button */
.admin-remove-btn {
    padding: 6px 16px;
    font-size: 12px;
    font-family: var(--font);
    font-weight: 500;
    color: var(--danger);
    background: transparent;
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.admin-remove-btn:hover {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

/* Add Admin Form */
.add-admin-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.add-admin-form h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
}

.add-admin-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.add-admin-row .form-input {
    flex: 1;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    z-index: 9999;
    animation: toastIn 0.3s ease;
    max-width: 400px;
}

.toast-success {
    background: var(--success);
    color: #fff;
}

.toast-error {
    background: var(--danger);
    color: #fff;
}

.toast-info {
    background: var(--accent);
    color: #0a0a0f;
}

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

/* ─── User Dropdown ─── */
.user-dropdown {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.user-dropdown .dash-user {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s;
}

.user-dropdown .dash-user:hover {
    border-color: var(--accent);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    min-width: 200px;
    background: var(--bg-header);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 200;
    overflow: hidden;
}

.dropdown-menu.open {
    display: block;
}

.dropdown-item {
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text-primary);
    transition: background 0.15s;
    cursor: pointer;
}

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

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

/* ─── Stats Detail Tab ─── */
.stats-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.stat-card-large {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
}

.stat-large-value {
    font-size: 48px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.1;
}

.stat-large-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* ─── History Modal ─── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.6);
}

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

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

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

.modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}

/* ─── Web credentials in admin card ─── */
.admin-web-creds {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
    flex-wrap: wrap;
}

.admin-web-creds .web-creds-field {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 2px 6px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: var(--font);
}

.web-creds-btn {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
}

/* ─── Services Admin Grid ─── */
.admin-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

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

.admin-service-card:hover {
    border-color: rgba(255,255,255,0.2);
}

.admin-service-card.inactive {
    opacity: 0.55;
}

.admin-service-card.editing {
    border-color: var(--accent);
}

/* Card Header */
.asc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border);
}

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

.asc-header-actions {
    display: flex;
    gap: 6px;
}

.asc-header-actions .btn-xs {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    line-height: 1;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.toggle-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: relative;
    width: 36px;
    height: 20px;
    background: var(--text-muted);
    border-radius: 10px;
    transition: background 0.2s;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--success);
}

.toggle-switch input:checked + .toggle-slider::after {
    transform: translateX(16px);
}

.toggle-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Card Body */
.asc-body {
    padding: 16px 14px;
}

.asc-emoji {
    font-size: 36px;
    margin-bottom: 10px;
    line-height: 1;
}

.asc-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
}

.asc-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.4;
    white-space: pre-line;
}

.asc-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
}

/* Card Footer */
.asc-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 8px 14px;
    border-top: 1px solid var(--border);
}

.asc-footer .btn-xs {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 4px;
    line-height: 1;
}

/* Edit mode */
.admin-service-card.editing .asc-emoji-input {
    font-size: 28px;
    width: 60px;
    text-align: center;
    padding: 6px;
    margin-bottom: 10px;
}

.admin-service-card.editing .asc-edit-field {
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 8px;
    font-size: 14px;
    font-family: var(--font);
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.2s;
}

.admin-service-card.editing .asc-edit-field:focus {
    border-color: var(--border-focus);
}

.admin-service-card.editing .asc-edit-field.emoji-input {
    font-size: 24px;
    width: 64px;
    text-align: center;
}

.admin-service-card.editing textarea.asc-edit-field {
    min-height: 180px;
    resize: vertical;
}

.admin-service-card.editing .asc-edit-price-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.admin-service-card.editing .asc-edit-price-row select {
    max-width: 80px;
    flex: none;
}

.admin-service-card.editing .asc-edit-price-row .asc-edit-field {
    flex: 1;
    max-width: 180px;
    margin-bottom: 0;
}

/* ─── Responsive ─── */

/* Mobile horizontal scroll for nav */
@media (max-width: 740px) {
    .dash-nav {
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0;
        padding-bottom: 4px;
        max-width: 100%;
    }
    .dash-nav::-webkit-scrollbar {
        display: none;
    }
    .tab-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
    .dash-header-inner {
        padding: 12px 16px;
    }
    .tab-content {
        padding: 16px;
    }
    .tab-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .toolbar-right {
        justify-content: stretch;
    }
    .toolbar-right .btn {
        flex: 1;
    }
    .add-admin-row {
        flex-direction: column;
    }
    .login-card {
        margin: 20px;
    }
}

@media (max-width: 740px) {
    .admin-services-grid {
        grid-template-columns: 1fr;
    }
    .modal-content {
        width: 95%;
    }
    .dash-nav::-webkit-scrollbar {
        display: none;
    }
    .tab-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .stats-bar {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-value {
        font-size: 24px;
    }
}

/* ─── Timeline ─── */
.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -24px;
    top: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-body);
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
}

.timeline-dot.system {
    border-color: var(--text-muted);
}

.timeline-dot.login {
    border-color: var(--success);
}

.timeline-dot.warning {
    border-color: var(--danger);
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
}

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

.timeline-user {
    font-weight: 600;
    font-size: 14px;
    color: var(--accent);
}

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

.timeline-action {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(201, 168, 76, 0.12);
    color: var(--accent);
    margin-bottom: 6px;
}

.timeline-action.login-action {
    background: rgba(39, 174, 96, 0.12);
    color: var(--success);
}

.timeline-action.delete-action {
    background: rgba(231, 76, 60, 0.12);
    color: var(--danger);
}

.timeline-details {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ─── Tab Badge ─── */
.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    margin-left: 6px;
    animation: badgePulse 2s infinite;
}

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

/* ─── Site Notification Banner ─── */
.site-notification {
    position: fixed;
    top: 72px;
    right: 24px;
    z-index: 1500;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    animation: slideInRight 0.3s ease;
    max-width: 320px;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

.sn-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.sn-text {
    font-size: 14px;
    color: var(--text-primary);
    flex: 1;
    line-height: 1.4;
}

.sn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

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

/* ─── Edit App Modal ─── */
#editAppModal .modal-content {
    max-width: 500px;
}

/* ─── Copyable cursor ─── */
.copyable {
    cursor: pointer;
    transition: background 0.15s;
}
.copyable:hover {
    background: rgba(201, 168, 76, 0.1);
    border-radius: 4px;
}
.copy-feedback {
    animation: copyFlash 0.4s ease;
}
@keyframes copyFlash {
    0% { background: rgba(201, 168, 76, 0.3); }
    100% { background: transparent; }
}
.copyable-cell {
    position: relative;
}

/* ─── Favorites ─── */
.fav-toggle {
    cursor: pointer;
    font-size: 18px;
    transition: transform 0.15s;
    display: inline-block;
}
.fav-toggle:hover {
    transform: scale(1.3);
}
.col-fav {
    text-align: center;
    width: 40px;
}
.col-actions {
    white-space: nowrap;
    text-align: center;
    width: 80px;
}
.col-actions .btn-xs {
    padding: 4px 8px;
    font-size: 12px;
}





/* ─── Mobile improvements for admin panel ─── */
@media (max-width: 740px) {
    /* Dashboard header */
    .dash-title {
        font-size: 14px;
        text-align: center;
    }
    .dash-title-sub {
        display: block;
        width: 100%;
        font-size: 12px;
        margin-top: 2px;
    }
    .dash-header-right {
        gap: 8px;
    }
    .dash-user {
        font-size: 12px;
        padding: 4px 8px;
    }
    .user-dropdown .dash-user {
        padding: 4px 8px;
    }

    /* Dropdown menu on mobile */
    .dropdown-menu {
        right: -8px;
        min-width: 180px;
    }

    /* Stats bar */
    .stats-bar {
        padding: 0 16px;
        gap: 10px;
        margin: 16px auto 0;
    }
    .stat-card {
        padding: 14px;
    }
    .stat-value {
        font-size: 24px;
    }
    .stat-label {
        font-size: 11px;
    }

    /* Navigation tabs */
    .dash-nav {
        padding: 0 16px;
        margin: 16px auto 0;
    }
    .tab-btn {
        padding: 10px 14px;
        font-size: 13px;
    }

    /* Tables */
    .table-wrap {
        border-left: none;
        border-right: none;
        border-radius: 0;
        margin: 0 -16px;
    }
    .data-table th,
    .data-table td {
        padding: 8px 10px;
        font-size: 13px;
    }
    .col-desc {
        max-width: 120px;
    }
    .col-url {
        max-width: 120px;
    }
    .col-time {
        min-width: 100px;
        font-size: 12px;
    }
    .col-phone {
        min-width: 100px;
    }

    /* Admin cards */
    .admin-card {
        padding: 12px 14px;
    }
    .admin-pwd-row,
    .admin-tg-row {
        flex-direction: column;
        align-items: stretch;
    }
    .admin-field {
        width: 100%;
    }
    .admin-flags-row {
        gap: 8px;
    }
    .admin-remove-btn {
        align-self: flex-end;
    }
    .add-admin-row {
        flex-direction: column;
    }

    /* Services */
    .admin-services-grid {
        grid-template-columns: 1fr;
    }
    .asc-header {
        padding: 8px 12px;
    }
    .asc-body {
        padding: 12px;
    }
    .asc-emoji {
        font-size: 28px;
        margin-bottom: 8px;
    }
    .asc-title {
        font-size: 14px;
    }
    .asc-desc {
        font-size: 12px;
    }
    .asc-price {
        font-size: 14px;
    }

    /* Stats detail */
    .stats-detail-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .stat-card-large {
        padding: 20px 14px;
    }
    .stat-large-value {
        font-size: 36px;
    }
    .stat-large-label {
        font-size: 12px;
    }

    /* Modal */
    .modal-content {
        width: 98%;
        max-height: 90vh;
    }
    .modal-header {
        padding: 12px 16px;
    }
    .modal-header h2 {
        font-size: 16px;
    }
    .modal-body {
        padding: 12px 16px;
    }
    #historyUserFilter {
        font-size: 11px !important;
        padding: 4px 6px !important;
    }

    /* Toolbar buttons */
    .tab-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .toolbar-left {
        font-size: 13px;
    }
    .toolbar-right {
        justify-content: stretch;
    }
    .toolbar-right .btn {
        flex: 1;
        font-size: 12px;
        padding: 6px 10px;
        text-align: center;
    }

    /* Empty state */
    .empty-state {
        padding: 40px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    /* Header */
    .dash-header-inner {
        padding: 10px 12px;
    }
    .dash-title {
        font-size: 12px;
    }
    .dash-title-sub {
        font-size: 11px;
    }

    /* Tabs */
    .dash-nav {
        padding: 0 12px;
        margin: 12px auto 0;
        gap: 0;
    }
    .tab-btn {
        padding: 8px 10px;
        font-size: 12px;
    }
    .tab-content {
        padding: 12px;
    }

    /* Stats bar */
    .stat-value {
        font-size: 20px;
    }
    .stat-card {
        padding: 10px;
    }

    /* Tables - compact */
    .data-table th,
    .data-table td {
        padding: 6px 8px;
        font-size: 12px;
    }
    .col-check {
        width: 30px;
    }
    .col-check input[type="checkbox"] {
        width: 14px;
        height: 14px;
    }
    .col-fav {
        width: 30px;
    }
    .fav-toggle {
        font-size: 14px;
    }
    .col-time {
        min-width: 80px;
        font-size: 11px;
    }
    .col-actions {
        width: 100px;
    }
    .col-actions .btn-xs {
        font-size: 11px;
        padding: 3px 6px;
    }
    .col-ip {
        min-width: 100px;
        font-size: 11px;
        font-family: monospace;
    }

    /* Services */
    .asc-emoji {
        font-size: 24px;
    }
    .asc-price strong {
        font-size: 1.2rem;
    }
    .admin-service-card.editing .asc-edit-field {
        font-size: 13px;
        padding: 6px 8px;
    }

    /* Modal */
    .modal-content {
        width: 100%;
        border-radius: 12px;
    }
    .modal-header {
        padding: 10px 12px;
    }
    .modal-body {
        padding: 10px 12px;
    }

    /* Stats page */
    .stats-detail-grid {
        grid-template-columns: 1fr;
    }

    /* Dropdown */
    .dropdown-menu {
        right: -4px;
        min-width: 160px;
    }
    .dropdown-item {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* ─── Mobile Bottom Navigation ─── */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(18, 18, 26, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    z-index: 200;
    padding: 4px 8px;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom, 8px);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 4px;
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 10px;
    font-family: var(--font);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    flex: 1;
    min-width: 0;
}

.mobile-nav-item .mnav-icon {
    font-size: 20px;
    line-height: 1;
}

.mobile-nav-item .mnav-label {
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.mobile-nav-item.active {
    color: var(--accent);
    background: rgba(201, 168, 76, 0.1);
}

/* ─── Mobile Cards ─── */
.mobile-cards {
    display: none;
    flex-direction: column;
    gap: 12px;
}

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

.mobile-card:hover {
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.mobile-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    padding-right: 40px;
    border-bottom: 1px solid var(--border);
}

.mobile-card-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    word-break: break-word;
}

.mobile-card-meta {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.mobile-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.mobile-card-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.mobile-card-value {
    font-size: 14px;
    color: var(--text-secondary);
    word-break: break-word;
    text-align: right;
}

.mobile-card-value.copyable {
    color: var(--accent);
    cursor: pointer;
}

.mobile-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.mobile-card-actions .btn {
    flex: 1;
    font-size: 12px;
    padding: 8px;
}

.mobile-card-checkbox {
    position: absolute;
    top: 16px;
    right: 16px;
}

.mobile-card-checkbox input {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
    cursor: pointer;
}

.mobile-card-fav {
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.15s;
    line-height: 1;
}

.mobile-card-fav:hover {
    transform: scale(1.2);
}

/* ─── Responsive: Mobile Cards & Bottom Nav ─── */
@media (max-width: 740px) {
    .dash-nav {
        display: none !important;
    }

    .mobile-bottom-nav {
        display: flex;
    }

    #dashboardScreen {
        padding-bottom: 72px;
    }

    .tab-content {
        padding-bottom: 80px;
    }

    .table-wrap {
        display: none !important;
    }

    .mobile-cards {
        display: flex;
    }

    .toast {
        bottom: 80px;
        right: 12px;
        left: 12px;
        max-width: none;
    }
}

/* ── Separator between content editor and services ── */
.content-divider {
    border: none;
    border-top: 2px solid var(--border);
    margin: 24px -20px;
}

.services-section {
    margin-top: 8px;
}

.services-section .tab-toolbar {
    padding: 12px 20px;
}

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

.document-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
}

.document-card-header {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.document-card textarea {
    width: 100%;
    min-height: 200px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    color: var(--text-primary);
    font-family: monospace;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
}

.document-card textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.document-card-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.doc-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.doc-tab-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 16px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.doc-tab-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.doc-tab-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #111;
    font-weight: 600;
}

.doc-editor {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.doc-editor-area {
    width: 100%;
    min-height: 320px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.7;
    white-space: normal;
    overflow-y: auto;
    outline: none;
}

.doc-editor-area:focus {
    border-color: var(--accent);
}

.doc-editor-area h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem;
    color: var(--text-primary);
}

.doc-editor-area p {
    margin: 0.5rem 0;
}

.doc-editor-area ul, .doc-editor-area ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.doc-editor-area li {
    margin: 0.25rem 0;
}

.doc-editor-area a {
    color: var(--accent);
    text-decoration: underline;
}

.doc-editor-area table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 13px;
}

.doc-editor-area th, .doc-editor-area td {
    border: 1px solid var(--border);
    padding: 8px 10px;
    text-align: left;
}

.doc-editor-area th {
    background: rgba(201,168,76,0.1);
    font-weight: 600;
}

.doc-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}

.doc-tool-btn {
    padding: 4px 10px;
    font-size: 12px;
    min-width: 32px;
}

.doc-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.doc-title-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.doc-title-row label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.doc-title-input {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 15px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s ease;
}

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

/* Document preview styles inside editor */
.doc-editor-area h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.doc-editor-area .page-header {
    margin-bottom: 2.5rem;
}

.doc-editor-area .page-label {
    display: none;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.doc-editor-area .page-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.doc-editor-area .page-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.doc-editor-area .content-section {
    margin-bottom: 2rem;
}

.doc-editor-area .content-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--accent-light);
}

.doc-editor-area .content-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
    color: var(--text-primary);
}

.doc-editor-area .content-section p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.doc-editor-area .content-section ul,
.doc-editor-area .content-section ol {
    color: var(--text-secondary);
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.doc-editor-area .content-section li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.doc-editor-area .content-section a {
    color: var(--accent-light);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.doc-editor-area .info-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.doc-editor-area .info-box h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.doc-editor-area .info-box p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

.doc-editor-area .price-table .price-cell {
    font-weight: 600;
    color: var(--accent-light);
    white-space: nowrap;
}

/* Review Cards */
.admin-reviews-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-review-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    transition: background .2s;
}

.admin-review-card.inactive {
    opacity: .5;
}

.admin-review-card.editing {
    border-color: var(--accent);
}

.arc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
}

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

.arc-header-actions {
    display: flex;
    gap: 6px;
}

.arc-body .arc-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-style: italic;
}

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

.arc-initials {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: #000;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.arc-info {
    display: flex;
    flex-direction: column;
}

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

.arc-role {
    font-size: 12px;
    color: var(--text-muted);
}

/* Editing fields */
.arc-edit-field {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 8px 10px;
    font-size: 14px;
    font-family: inherit;
    margin-bottom: 8px;
}

.arc-edit-field:focus {
    outline: none;
    border-color: var(--border-focus);
}

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

.arc-edit-row {
    display: flex;
    gap: 8px;
}

.arc-edit-row .arc-edit-field {
    flex: 1;
}

.arc-footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

/* ── Header Bell ── */
.header-bell {
    position: relative;
    cursor: pointer;
    padding: 6px 10px;
    margin-right: 4px;
    border-radius: 8px;
    transition: background 0.2s;
    user-select: none;
}
.header-bell:hover { background: rgba(255,255,255,0.06); }
.bell-icon { font-size: 1.3rem; }
.bell-badge {
    position: absolute;
    top: 0;
    right: 2px;
    background: #e44;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 8px;
    padding: 0 4px;
}

/* ── Notification List ── */
.notif-list { max-height: 460px; overflow-y: auto; }
.notif-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}
.notif-item:hover { background: var(--bg-card-hover); }
.notif-item.unread { background: rgba(201,168,76,0.06); }
.notif-item.unread:hover { background: rgba(201,168,76,0.12); }
.notif-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    margin-top: 6px;
    border-radius: 50%;
    background: var(--accent);
}
.notif-item.read .notif-icon { opacity: 0.4; }
.notif-body { flex: 1; min-width: 0; }
.notif-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.notif-text {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    white-space: pre-line;
}
.notif-time {
    font-size: 0.72rem;
    color: var(--text-secondary);
    opacity: 0.8;
    margin-top: 4px;
}
.notif-icon {
    font-size: 1rem;
    min-width: 20px;
    text-align: center;
    margin-top: 2px;
}
.notif-item.unread .notif-title { color: var(--accent-light); }

/* ─── Metrika Modal ─── */
.metrika-id-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.metrika-id-row .form-input {
    flex: 1;
}
.metrika-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 16px 0;
}
.metrika-link {
    display: block;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}
.metrika-link:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    text-decoration: none;
    color: var(--text-primary);
}

/* ── Email settings modal ── */
#emailList {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.email-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.email-row .form-input {
    flex: 1;
}
.email-row .btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
    padding: 0;
}
.email-row .btn-icon:hover {
    background: rgba(220,38,38,0.15);
    border-color: #dc2626;
    color: #dc2626;
}
#emailAddBtn {
    width: 100%;
}

/* ── Review photo ── */
.review-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
    flex-shrink: 0;
}
