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

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #1f2937;
    --light-bg: #f3f4f6;
    --border-color: #e5e7eb;
    --success: #10b981;
    --error: #ef4444;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.875rem;
    color: var(--text-color);
    background-color: #ffffff;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 20px;
}

/* Logo image */
.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 26px;
    width: auto;
    display: block;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s;
    font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: var(--light-bg);
}

/* Features Section */
.features {
    padding: 60px 20px;
    background-color: var(--light-bg);
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Browse Section */
.browse-section {
    padding: 40px 20px;
}

.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.filters input,
.filters select {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

/* Category chips (browse filter) */
.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    flex: 1;
}

.chip {
    padding: 5px 14px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: white;
    color: var(--text-color);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.chip:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.chip-active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Category tags (website cards) */
.cat-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.cat-tag {
    display: inline-block;
    padding: 2px 10px;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
}

.cat-tag-sm {
    padding: 1px 8px;
    font-size: 0.72rem;
}

/* Category multi-selector (form) */
.cat-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fafafa;
    min-height: 48px;
}

.cat-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 4px 12px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.18s;
    background: white;
    user-select: none;
}

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

.cat-checkbox-label:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.cat-checkbox-label.cat-checked {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.cat-checkbox-label.cat-checked input[type=checkbox] {
    accent-color: white;
}

.cat-checkbox-label.cat-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Admin category tags */
.cat-admin-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 4px 10px 4px 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    font-size: 0.82rem;
    color: #2563eb;
}

.cat-admin-tag button {
    color: #6b7280 !important;
    font-size: 1rem !important;
    line-height: 1 !important;
    padding: 0 !important;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.15s;
}

.cat-admin-tag button:hover {
    background: #fee2e2;
    color: #dc2626 !important;
}

.websites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.website-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.website-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.website-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    word-break: break-all;
}

.website-card .price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0.75rem 0;
}

.website-card .stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.website-card .stats div {
    text-align: center;
    padding: 0.5rem;
    background-color: var(--light-bg);
    border-radius: 4px;
}

/* Auth Section */
.auth-section {
    padding: 60px 20px;
    background-color: var(--light-bg);
    min-height: calc(100vh - 300px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 100%;
}

.auth-form {
    margin: 1.5rem 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.auth-link {
    text-align: center;
    margin-top: 1rem;
}

.auth-link a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Alerts */
.alert {
    padding: 12px;
    border-radius: 4px;
    margin-top: 1rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background-color: #fee2e2;
    color: #7f1d1d;
    border: 1px solid #fecaca;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    color: var(--text-color);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: var(--primary-color);
}

/* Dashboard */
.dashboard-section {
    padding: 40px 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.dashboard-tabs button {
    background: none;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-color);
    border-bottom: 3px solid transparent;
}

.dashboard-tabs button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

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

.orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.orders-table th,
.orders-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.orders-table th {
    background-color: var(--light-bg);
    font-weight: 600;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.status-pending      { background-color: #fef3c7; color: #92400e; }
.status-paid         { background-color: #bfdbfe; color: #1e3a8a; }
.status-accepted     { background-color: #bbf7d0; color: #065f46; }
.status-completed    { background-color: #d1fae5; color: #065f46; }
.status-rejected     { background-color: #fecaca; color: #7f1d1d; }
.status-refunded     { background-color: #f3f4f6; color: #374151; }
.status-pending-approval { background-color: #fde68a; color: #78350f; }

/* Footer */
.footer {
    background-color: var(--light-bg);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
    color: #6b7280;
    margin-top: 4rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.15s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* ─── Dashboard Variables ───────────────────────────────────────── */
:root {
    --text-dark: #1f2937;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --radius-md: 10px;
    --radius-lg: 14px;
}

/* ─── Dashboard Profile Header ──────────────────────────────────── */
.dash-profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.4rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.dash-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}

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

.dash-username {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-role-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 3px;
}

.dash-role-buyer    { background: #eff6ff; color: #2563eb; }
.dash-role-seller   { background: #f0fdf4; color: #059669; }
.dash-role-admin    { background: #fef3c7; color: #92400e; }

/* ─── Improved Tab Bar ──────────────────────────────────────────── */
.dashboard-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
    background: transparent;
}

.tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 0.8rem 1.1rem;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    border-radius: 6px 6px 0 0;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: #f5f8ff;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
    background: transparent;
}

/* ─── Dashboard Stats Row ───────────────────────────────────────── */
.dash-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.dash-stat-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s;
}

.dash-stat-card:hover {
    box-shadow: var(--shadow-md);
}

.dash-stat-value {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

.dash-stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* ─── Enhanced Orders Table ─────────────────────────────────────── */
.orders-table tbody tr {
    transition: background 0.12s;
}

.orders-table tbody tr:hover {
    background: #f9fafb;
}

.orders-table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

/* ─── Empty State ───────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 3.5rem 1.5rem;
    background: #fafafa;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
}

.empty-state-icon {
    font-size: 2.4rem;
    margin-bottom: 0.65rem;
    line-height: 1;
    opacity: 0.7;
}

.empty-state h4 {
    font-size: 1rem;
    color: #374151;
    margin-bottom: 0.4rem;
}

.empty-state p {
    font-size: 0.88rem;
    color: #9ca3af;
    margin-bottom: 1.25rem;
}

/* ─── Account Settings ──────────────────────────────────────────── */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

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

.settings-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.settings-card-info {
    grid-column: auto;
}

.settings-card-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.settings-card .form-group {
    margin-bottom: 1rem;
}

.settings-card .form-group label {
    font-size: 0.85rem;
    color: #374151;
    margin-bottom: 0.35rem;
}

.settings-card .form-group input {
    padding: 8px 10px;
    font-size: 0.9rem;
    border-radius: 6px;
}

.settings-msg {
    padding: 0.55rem 0.85rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 0.85rem;
    font-weight: 500;
}

.settings-msg-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.settings-msg-error {
    background: #fee2e2;
    color: #7f1d1d;
    border: 1px solid #fecaca;
}

.settings-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0;
    border-bottom: 1px solid #f9fafb;
    font-size: 0.88rem;
    color: #6b7280;
}

.settings-info-row:last-child {
    border-bottom: none;
}

.settings-info-row strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* ─── Section Header Helpers ────────────────────────────────────── */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.section-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* ─── Notification Bell ─────────────────────────────────────────── */
.notif-bell-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.notif-bell-btn {
    position: relative;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    line-height: 1;
}

.notif-bell-btn:hover {
    background: #f3f4f6;
    color: var(--primary-color);
    border-color: #bfdbfe;
}

.notif-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 10px;
    min-width: 17px;
    height: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 2px solid #fff;
    line-height: 1;
}

/* Notification Dropdown Panel */
.notif-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-width: calc(100vw - 24px);
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    z-index: 200;
    overflow: hidden;
}

.notif-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem 0.7rem;
    border-bottom: 1px solid #f3f4f6;
    background: #fafafa;
}

.notif-panel-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text-dark);
}

.notif-mark-all-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    font-weight: 500;
}

.notif-mark-all-btn:hover {
    text-decoration: underline;
}

.notif-list {
    max-height: 380px;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f9fafb;
    cursor: pointer;
    transition: background 0.12s;
    position: relative;
}

.notif-item:hover {
    background: #f9fafb;
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-unread {
    background: #eff6ff;
}

.notif-unread:hover {
    background: #dbeafe;
}

.notif-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.notif-icon-order    { background: #fef3c7; }
.notif-icon-payment  { background: #d1fae5; }
.notif-icon-withdrawal { background: #ede9fe; }
.notif-icon-info     { background: #f3f4f6; }

.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-dark);
    margin-bottom: 0.2rem;
}

.notif-message {
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-time {
    font-size: 0.73rem;
    color: #9ca3af;
    margin-top: 0.3rem;
}

.notif-dot {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}

.notif-empty {
    text-align: center;
    color: #9ca3af;
    font-size: 0.88rem;
    padding: 2.5rem 1rem;
}

.notif-loading {
    color: #6b7280;
}

/* Notifications Tab in Dashboard */
.notif-tab-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.tab-notif-badge {
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 10px;
    min-width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}

.notif-tab-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.notif-tab-item {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    position: relative;
    transition: background 0.12s;
}

.notif-tab-unread {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.notif-tab-icon {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

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

.notif-tab-title {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.notif-tab-msg {
    font-size: 0.87rem;
    color: #4b5563;
    line-height: 1.55;
}

.notif-tab-time {
    font-size: 0.77rem;
    color: #9ca3af;
    margin-top: 0.4rem;
}

.notif-tab-dot {
    width: 9px;
    height: 9px;
    background: var(--primary-color);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
}

/* Legal Pages */
.legal-page {
    padding: 3rem 0 4rem;
}

.legal-header {
    text-align: center;
    padding-bottom: 2rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color);
}

.legal-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.legal-header p {
    color: #6b7280;
    font-size: 1rem;
}

.legal-date {
    font-size: 0.85rem !important;
    color: #9ca3af !important;
}

.legal-body {
    max-width: 800px;
    margin: 0 auto;
}

.legal-section {
    margin-bottom: 2.5rem;
}

.legal-section h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.85rem;
}

.legal-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

.legal-section p {
    color: #374151;
    line-height: 1.75;
    margin-bottom: 0.75rem;
}

/* Legal prose (privacy, terms) */
.legal-prose h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 2rem 0 0.6rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f3f4f6;
}

.legal-prose h2:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 0.5rem;
}

.legal-prose h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
    margin: 1rem 0 0.4rem;
}

.legal-prose p {
    color: #374151;
    line-height: 1.8;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.legal-prose ul {
    color: #374151;
    line-height: 1.8;
    margin: 0.5rem 0 0.75rem 1.5rem;
    font-size: 0.95rem;
}

.legal-prose ul li {
    margin-bottom: 0.35rem;
}

.legal-prose a {
    color: var(--primary-color);
    text-decoration: none;
}

.legal-prose a:hover {
    text-decoration: underline;
}

.legal-prose code {
    background: #f3f4f6;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.88em;
    color: #374151;
}

/* About page */
.about-steps {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 0.75rem;
}

.about-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.about-step-num {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.about-step h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    color: var(--text-dark);
}

.about-step p {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.75rem;
}

.about-feature {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}

.about-feature-icon {
    width: 1.75rem;
    height: 1.75rem;
    background: #d1fae5;
    color: #059669;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.about-feature strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: var(--text-dark);
}

.about-feature p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
}

/* Contact page */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 2.5rem;
    align-items: start;
}

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

.contact-info-panel h2,
.contact-form-panel h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.contact-info-panel p {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.contact-info-item {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.contact-info-icon {
    width: 2.2rem;
    height: 2.2rem;
    background: #eff6ff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    color: var(--primary-color);
}

.contact-info-item strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--text-dark);
}

.contact-info-item p,
.contact-info-item ul {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.65;
}

.contact-info-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-info-item a:hover {
    text-decoration: underline;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-color);
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

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

/* Role Switcher Button */
.role-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 5px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.role-switcher:hover {
    filter: brightness(0.95);
    transform: scale(1.03);
}

/* ─── Browse Table ───────────────────────────────────────────────────────── */

.filter-bar {
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 90px;
}

.filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.filter-group input,
.filter-group select {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 0.88rem;
    background: white;
    width: 100%;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Browse table */
.browse-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.browse-table thead tr {
    background: #f3f4f6;
    border-bottom: 2px solid var(--border-color);
}

.browse-table th {
    padding: 10px 12px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.browse-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.browse-table tbody tr.website-row {
    cursor: pointer;
    transition: background 0.12s;
}

.browse-table tbody tr.website-row:hover {
    background: #f0f9ff;
}

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

.col-url {
    min-width: 180px;
    max-width: 240px;
}

.url-text {
    display: block;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.82rem;
    word-break: break-all;
    line-height: 1.3;
}

.url-desc {
    color: #9ca3af;
    font-size: 0.75rem;
    margin-top: 2px;
    line-height: 1.3;
}

.col-cats {
    min-width: 120px;
    max-width: 180px;
}

.col-cats .cat-tag {
    margin-bottom: 2px;
    display: inline-block;
}

.col-country {
    min-width: 90px;
    white-space: nowrap;
    font-size: 0.82rem;
}

.country-text {
    font-size: 0.75rem;
    color: #6b7280;
}

.col-num {
    text-align: center;
    white-space: nowrap;
    font-size: 0.85rem;
}

.col-price {
    white-space: nowrap;
    font-size: 0.95rem;
    color: #1f2937;
}

.col-completion {
    min-width: 80px;
}

/* Completion bar */
.completion-bar-wrap {
    display: inline-block;
    width: 44px;
    height: 5px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    vertical-align: middle;
    margin-right: 4px;
}

.completion-bar-fill {
    display: block;
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}

/* Link type badges */
.badge-dofollow {
    display: inline-block;
    padding: 2px 8px;
    background: #d1fae5;
    color: #065f46;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.badge-nofollow {
    display: inline-block;
    padding: 2px 8px;
    background: #fee2e2;
    color: #7f1d1d;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.btn-order {
    padding: 5px 14px;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Website detail modal grid */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.detail-cell {
    background: #f9fafb;
    border-radius: 6px;
    padding: 0.65rem 0.75rem;
    text-align: center;
}

.detail-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
}

.detail-lbl {
    font-size: 0.72rem;
    color: #9ca3af;
    margin-top: 2px;
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    .logo-img {
        height: 30px;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .filters {
        flex-direction: column;
    }

    .filters input,
    .filters select {
        width: 100%;
    }

    .dashboard-header {
        flex-direction: column;
    }

    .orders-table {
        font-size: 0.9rem;
    }

    .orders-table th,
    .orders-table td {
        padding: 0.5rem;
    }
}

/* ── Verification badges ─────────────────────────────────────────────────── */

.verif-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.verif-verified {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.verif-unverified {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fdba74;
}

.verif-btn-unverified {
    padding: 3px 10px !important;
    font-size: 0.8rem !important;
    background: #fff7ed !important;
    color: #c2410c !important;
    border: 1px solid #fdba74 !important;
    border-radius: 20px !important;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 600;
}

.verif-btn-unverified:hover {
    background: #fed7aa !important;
}

/* ── Website verification modal steps ───────────────────────────────────── */

.verif-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.verif-step-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.verif-meta-box {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px 14px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.83rem;
    color: #1e293b;
    word-break: break-all;
    cursor: pointer;
    margin-top: 0.4rem;
    user-select: all;
    transition: background 0.15s;
}

.verif-meta-box:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
}

/* ── Admin form messages ─────────────────────────────────────────────────── */

.admin-form-msg {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.88rem;
    margin-top: 0.5rem;
}

.admin-form-msg-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.admin-form-msg-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #86efac;
}

/* ─── Admin Sidebar Layout ──────────────────────────────────────────────── */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 56px);
}
.admin-sidebar {
    width: 210px;
    min-width: 210px;
    background: #0f172a;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.admin-sidebar-brand {
    padding: 1.1rem 1.25rem 0.9rem;
    font-size: 0.67rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #475569;
    border-bottom: 1px solid #1e293b;
}
.admin-sidebar-nav {
    padding: 0.5rem 0;
    flex: 1;
}
.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem 1.25rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: background 0.12s, color 0.12s;
    white-space: nowrap;
}
.admin-nav-item:hover {
    color: #e2e8f0;
    background: rgba(255,255,255,0.05);
    text-decoration: none;
}
.admin-nav-item.active {
    color: #fff;
    background: rgba(99,102,241,0.18);
    border-left-color: #818cf8;
}
.admin-nav-divider {
    height: 1px;
    background: #1e293b;
    margin: 0.4rem 0;
}
.admin-nav-section {
    padding: 0.65rem 1.25rem 0.2rem;
    font-size: 0.63rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #334155;
}
.admin-sidebar-footer {
    border-top: 1px solid #1e293b;
    padding: 0.4rem 0;
}
.admin-main {
    flex: 1;
    padding: 1.75rem 2rem;
    background: #f8fafc;
    overflow-x: auto;
}
@media (max-width: 860px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; min-width: 100%; }
    .admin-sidebar-brand, .admin-nav-section, .admin-sidebar-footer { display: none; }
    .admin-sidebar-nav { display: flex; flex-direction: row; padding: 0; overflow-x: auto; }
    .admin-nav-item { padding: 0.6rem 0.85rem; border-left: none; border-bottom: 3px solid transparent; font-size: 0.78rem; }
    .admin-nav-item.active { border-bottom-color: #818cf8; border-left: none; background: rgba(99,102,241,0.12); }
    .admin-nav-divider { width: 1px; height: auto; margin: 0 0.2rem; }
    .admin-main { padding: 1rem; }
}
