/* ==========================================================================
   HitCounters.com - Main Stylesheet
   Blue & White & Gray Theme with Rounded Corners
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables
   -------------------------------------------------------------------------- */
:root {
    --primary-blue: #1e5799;
    --primary-blue-light: #207cca;
    --primary-blue-dark: #164172;
    --secondary-gray: #6c757d;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #343a40;
    --white: #ffffff;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    
    --border-radius: 10px;
    --border-radius-sm: 5px;
    --border-radius-lg: 15px;
    
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
    
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    
    --sidebar-width: 250px;
    --header-height: 60px;
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--light-gray);
    min-height: 100vh;
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-blue-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-blue);
    margin-bottom: 0.5em;
    line-height: 1.3;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col {
    flex: 1;
    padding: 0 10px;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.main-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    color: var(--white);
    padding: 15px 0;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 10px;
    z-index: 1000;
    margin: 10px 20px 0 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo:hover {
    color: var(--white);
}

.logo i {
    font-size: 1.8rem;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-nav a {
    color: var(--white);
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.header-nav a:hover {
    opacity: 1;
    color: var(--white);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-user .username {
    font-weight: 500;
}

.header-user .dropdown {
    position: relative;
}

.dropdown-toggle {
    background: rgba(255,255,255,0.2);
    border: none;
    color: var(--white);
    padding: 8px 15px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-toggle:hover {
    background: rgba(255,255,255,0.3);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    padding: 10px 0;
    display: none;
    z-index: 1001;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--dark-gray);
}

.dropdown-menu a:hover {
    background: var(--light-gray);
}

.dropdown-menu .divider {
    height: 1px;
    background: var(--medium-gray);
    margin: 10px 0;
}

/* --------------------------------------------------------------------------
   Dashboard Layout
   -------------------------------------------------------------------------- */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - var(--header-height));
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    border-radius: var(--border-radius-lg);
    margin: 20px;
    padding: 20px 0;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 2px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--secondary-gray);
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    background: var(--light-gray);
    color: var(--primary-blue);
}

.sidebar-nav a.active {
    background: var(--light-gray);
    color: var(--primary-blue);
    border-left-color: var(--primary-blue);
}

.sidebar-nav a i {
    width: 20px;
    text-align: center;
}

.sidebar-section {
    padding: 15px 20px 5px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--secondary-gray);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.sidebar-nav .submenu {
    list-style: none;
    padding-left: 32px;
}

.sidebar-nav .submenu a {
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Main Content
   -------------------------------------------------------------------------- */
.main-content {
    flex: 1;
    padding: 20px;
    max-width: calc(100% - var(--sidebar-width) - 40px);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title h1 {
    margin: 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--secondary-gray);
    margin-bottom: 10px;
}

.breadcrumb a {
    color: var(--secondary-gray);
}

.breadcrumb a:hover {
    color: var(--primary-blue);
}

.breadcrumb .separator {
    color: var(--medium-gray);
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--medium-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2, .card-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--medium-gray);
    background: var(--light-gray);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* --------------------------------------------------------------------------
   Stat Cards
   -------------------------------------------------------------------------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1.2;
}

.stat-card .stat-label {
    color: var(--secondary-gray);
    font-size: 0.9rem;
    margin-top: 5px;
}

.stat-card.stat-success .stat-value {
    color: var(--success);
}

.stat-card.stat-warning .stat-value {
    color: var(--warning);
}

.stat-card.stat-danger .stat-value {
    color: var(--danger);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-blue-dark);
    color: var(--white);
}

.btn-secondary {
    background: var(--secondary-gray);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--dark-gray);
    color: var(--white);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #218838;
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #c82333;
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
}

.btn-outline:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-gray);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(30, 87, 153, 0.1);
}

.form-control:disabled {
    background: var(--light-gray);
    cursor: not-allowed;
}

.form-text {
    font-size: 0.85rem;
    color: var(--secondary-gray);
    margin-top: 5px;
}

.form-error {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 5px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--medium-gray);
}

.table th {
    background: var(--light-gray);
    font-weight: 600;
    color: var(--primary-blue);
    white-space: nowrap;
}

.table tbody tr:hover {
    background: var(--light-gray);
}

.table .actions {
    white-space: nowrap;
}

.table .actions a,
.table .actions button {
    margin-right: 8px;
}

/* --------------------------------------------------------------------------
   Alerts
   -------------------------------------------------------------------------- */
.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.5;
}

/* Icon at the start of alert */
.alert > i:first-child {
    flex-shrink: 0;
    font-size: 1.1rem;
}

/* Legacy wrapper support */
.alert-icon {
    flex-shrink: 0;
    font-size: 1.1rem;
}

.alert-message {
    flex: 1;
    line-height: 1.5;
}

/* Buttons/links pushed to the right */
.alert > .btn,
.alert > a.btn {
    flex-shrink: 0;
    margin-left: auto;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-success > i:first-child,
.alert-success .alert-icon {
    color: #28a745;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-danger > i:first-child,
.alert-danger .alert-icon {
    color: #dc3545;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-warning > i:first-child,
.alert-warning .alert-icon {
    color: #ffc107;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-info > i:first-child,
.alert-info .alert-icon {
    color: #17a2b8;
}

.close-alert {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    padding: 0;
    line-height: 1;
    color: inherit;
    margin-left: auto;
}

.close-alert:hover {
    opacity: 1;
}

@media (max-width: 576px) {
    .alert {
        flex-wrap: wrap;
    }
    
    .alert > .btn,
    .alert > a.btn {
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
        text-align: center;
    }
}

/* --------------------------------------------------------------------------
   Badges
   -------------------------------------------------------------------------- */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
}

.badge-primary {
    background: var(--primary-blue);
    color: var(--white);
}

.badge-success {
    background: var(--success);
    color: var(--white);
}

.badge-warning {
    background: var(--warning);
    color: var(--dark-gray);
}

.badge-danger {
    background: var(--danger);
    color: var(--white);
}

.badge-secondary {
    background: var(--secondary-gray);
    color: var(--white);
}

/* --------------------------------------------------------------------------
   Visit Log / Activity List
   -------------------------------------------------------------------------- */
.visit-list {
    list-style: none;
}

.visit-item {
    padding: 15px 20px;
    border-bottom: 1px solid var(--medium-gray);
    display: grid;
    grid-template-columns: minmax(200px, 300px) 1fr;
    gap: 15px;
}

.visit-item:last-child {
    border-bottom: none;
}

.visit-item:hover {
    background: var(--light-gray);
}

.visit-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.visit-right {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.visit-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--secondary-gray);
}

.visit-meta strong {
    color: var(--dark-gray);
}

.visit-meta i {
    width: 14px;
    text-align: center;
}

.visit-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.visit-location .flag-icon {
    margin-right: 3px;
}

.visit-system {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.visit-system i {
    font-size: 1rem;
    color: var(--secondary-gray);
}

.visit-url {
    font-size: 0.85rem;
    word-break: break-all;
}

.visit-referrer {
    color: var(--success);
    font-size: 0.85rem;
}

.visit-referrer.no-referrer {
    color: var(--danger);
    font-style: italic;
}

.visit-pages {
    margin-top: 8px;
    padding-left: 15px;
    border-left: 2px solid var(--primary-blue-light);
}

.visit-page-item {
    font-size: 0.8rem;
    padding: 3px 0;
    color: var(--secondary-gray);
}

.visit-page-item a {
    color: var(--primary-blue);
}

/* Responsive visit items */
@media (max-width: 768px) {
    .visit-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .visit-left {
        padding-bottom: 10px;
        border-bottom: 1px dashed var(--medium-gray);
    }
}

/* --------------------------------------------------------------------------
   Charts
   -------------------------------------------------------------------------- */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.chart-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.pagination-nav {
    margin-top: 20px;
}

.pagination {
    display: flex;
    list-style: none;
    gap: 5px;
    justify-content: center;
}

.pagination li a,
.pagination li span {
    display: block;
    padding: 8px 14px;
    background: var(--white);
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius-sm);
    color: var(--primary-blue);
}

.pagination li a:hover {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

.pagination li.active span {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

.pagination li.disabled span {
    color: var(--secondary-gray);
    cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Tabs
   -------------------------------------------------------------------------- */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--medium-gray);
    margin-bottom: 20px;
}

.tab {
    padding: 12px 20px;
    color: var(--secondary-gray);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab:hover {
    color: var(--primary-blue);
}

.tab.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* --------------------------------------------------------------------------
   Code Block
   -------------------------------------------------------------------------- */
.code-block {
    background: var(--dark-gray);
    color: #e9ecef;
    padding: 20px;
    border-radius: var(--border-radius);
    overflow-x: auto;
    font-family: 'Fira Code', 'Monaco', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    position: relative;
}

.code-block .copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--white);
    padding: 8px 15px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
}

.code-block .copy-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* --------------------------------------------------------------------------
   Site Selector
   -------------------------------------------------------------------------- */
.site-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.site-selector select {
    min-width: 250px;
}

.site-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: var(--light-gray);
    border-radius: 20px;
    font-size: 0.8rem;
}

.site-badge.verified {
    background: #d4edda;
    color: #155724;
}

.site-badge.unverified {
    background: #fff3cd;
    color: #856404;
}

/* --------------------------------------------------------------------------
   Filters
   -------------------------------------------------------------------------- */
.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-weight: 500;
    white-space: nowrap;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius-sm);
}

/* --------------------------------------------------------------------------
   Tooltips
   -------------------------------------------------------------------------- */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--dark-gray);
    color: var(--white);
    font-size: 0.8rem;
    border-radius: var(--border-radius-sm);
    white-space: nowrap;
    z-index: 1000;
}

/* --------------------------------------------------------------------------
   Mini Sparkline
   -------------------------------------------------------------------------- */
.sparkline {
    display: inline-block;
    width: 100px;
    height: 25px;
    background: var(--light-gray);
    border-radius: var(--border-radius-sm);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.main-footer {
    background: var(--white);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    padding: 30px 0;
    margin-top: auto;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--secondary-gray);
}

.footer-links a:hover {
    color: var(--primary-blue);
}

.footer-copyright {
    color: var(--secondary-gray);
    font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Public Pages
   -------------------------------------------------------------------------- */
.public-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.public-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
    padding: 40px;
}

.auth-card .logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-card .logo i {
    font-size: 3rem;
    color: var(--primary-blue);
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 30px;
}

.auth-card .form-group:last-of-type {
    margin-bottom: 25px;
}

.auth-card .btn {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--medium-gray);
}

.auth-links a {
    display: block;
    margin-bottom: 10px;
}

/* Turnstile widget */
.cf-turnstile {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

/* --------------------------------------------------------------------------
   Homepage
   -------------------------------------------------------------------------- */
.hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

.hero h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 30px;
}

.hero .btn {
    font-size: 1.1rem;
    padding: 15px 40px;
}

.features {
    padding: 80px 0;
}

.features h2 {
    text-align: center;
    margin-bottom: 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    text-align: center;
    padding: 30px;
}

.feature-card i {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 15px;
}

/* --------------------------------------------------------------------------
   Flag Icons
   -------------------------------------------------------------------------- */
.flag-icon {
    display: inline-block;
    vertical-align: middle;
}

/* --------------------------------------------------------------------------
   Loading Spinner
   -------------------------------------------------------------------------- */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--medium-gray);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* --------------------------------------------------------------------------
   Mobile Menu
   -------------------------------------------------------------------------- */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    -webkit-tap-highlight-color: transparent;
}

/* Mobile overlay when sidebar is open */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.sidebar-overlay.show {
    display: block;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .sidebar {
        width: 200px;
    }

    .main-content {
        max-width: calc(100% - 200px - 40px);
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    /* Header: show hamburger + logo + user dropdown only */
    .header-nav {
        display: none;
    }

    .header-content {
        padding: 0 12px;
    }

    .logo {
        font-size: 1.2rem;
    }

    .logo i {
        font-size: 1.4rem;
    }

    .main-header {
        margin: 5px 8px 0 8px;
        padding: 10px 0;
        border-radius: 10px;
    }

    /* Sidebar: slide-in drawer */
    .dashboard-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 280px;
        position: fixed;
        top: 0;
        left: -300px;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        z-index: 999;
        transition: left 0.3s ease;
        overflow-y: auto;
        padding-top: 15px;
    }

    .sidebar.open {
        left: 0;
    }

    /* Main content: full width */
    .main-content {
        max-width: 100%;
        padding: 12px 10px;
    }

    /* Page headers: stack vertically */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .page-header .btn,
    .page-header a.btn {
        width: 100%;
        justify-content: center;
    }

    /* Stat grids: 2 columns */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Tables: horizontal scroll + compact */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -10px;
        padding: 0 10px;
    }

    .table th,
    .table td {
        padding: 10px 8px;
        font-size: 0.82rem;
        white-space: nowrap;
    }

    /* Allow site name column to wrap */
    .table td:first-child {
        white-space: normal;
        min-width: 120px;
    }

    /* Cards: tighter padding */
    .card-body {
        padding: 15px 12px;
    }

    .card-header {
        padding: 12px 15px;
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Filters: stack vertically */
    .filters {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select,
    .filter-group input {
        flex: 1;
        min-width: 0;
    }

    /* Visit items */
    .visit-item {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    /* Tabs: scrollable */
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
    }

    .tab {
        white-space: nowrap;
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    /* Charts: smaller on mobile */
    .chart-container {
        height: 220px;
    }

    /* Pagination: compact */
    .pagination li a,
    .pagination li span {
        padding: 6px 10px;
        font-size: 0.82rem;
    }

    /* Breadcrumb */
    .breadcrumb {
        font-size: 0.8rem;
        flex-wrap: wrap;
    }

    /* Site selector */
    .site-selector {
        flex-direction: column;
        align-items: stretch;
    }

    .site-selector select {
        min-width: unset;
        width: 100%;
    }

    /* Buttons: full-width on small screens */
    .btn-lg {
        width: 100%;
        justify-content: center;
    }

    /* Code blocks */
    .code-block {
        font-size: 0.75rem;
        padding: 12px;
    }

    /* Public pages */
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .auth-card {
        padding: 25px 16px;
    }

    /* Footer */
    .main-footer {
        padding: 20px 0;
    }

    .footer-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .footer-copyright {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 13px;
    }

    .main-content {
        padding: 10px 8px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-card .stat-value {
        font-size: 2rem;
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.3rem; }
    h3 { font-size: 1.15rem; }

    .card-body {
        padding: 12px 10px;
    }

    /* Stack buttons vertically */
    .page-header {
        gap: 8px;
    }

    .btn {
        font-size: 0.82rem;
        padding: 8px 14px;
    }
}

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */
@media print {
    .sidebar,
    .main-header,
    .main-footer,
    .btn,
    .filters {
        display: none !important;
    }
    
    .main-content {
        max-width: 100%;
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--secondary-gray); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }

.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

.position-relative { position: relative; }
.position-absolute { position: absolute; }



/* --------------------------------------------------------------------------
   Header Sign Up Button (Green)
   -------------------------------------------------------------------------- */
.btn-signup {
    background: var(--success) !important;
    color: var(--white) !important;
    border: 2px solid var(--success) !important;
    padding: 8px 20px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-signup:hover {
    background: #218838 !important;
    border-color: #218838 !important;
    color: var(--white) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* --------------------------------------------------------------------------
   New Homepage Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 50%, #2989d8 100%);
    padding: 80px 0 100px;
    margin-top: 30px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-section .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    color: var(--white);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-badge i {
    color: #ffc107;
}

.hero-content h1 {
    color: var(--white);
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, #a8d8ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.btn-hero-primary {
    background: var(--white);
    color: var(--primary-blue);
    padding: 16px 32px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
    color: var(--primary-blue);
}

.btn-hero-secondary {
    background: transparent;
    color: var(--white);
    padding: 16px 32px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    border: 2px solid rgba(255, 255, 255, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    color: var(--white);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 32px;
}

.hero-stat {
    display: flex;
    flex-direction: column;
}

.hero-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
}

.hero-stat-label {
    font-size: 0.85rem;
    opacity: 0.8;
}

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
}

/* Hero Dashboard Preview */
.hero-visual {
    display: flex;
    justify-content: center;
}

.hero-dashboard-preview {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    width: 100%;
    max-width: 480px;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.3s ease;
}

.hero-dashboard-preview:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.preview-header {
    background: var(--light-gray);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--medium-gray);
}

.preview-dots {
    display: flex;
    gap: 6px;
}

.preview-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--medium-gray);
}

.preview-dots span:first-child { background: #ff5f57; }
.preview-dots span:nth-child(2) { background: #ffbd2e; }
.preview-dots span:last-child { background: #28ca42; }

.preview-title {
    font-size: 0.85rem;
    color: var(--secondary-gray);
    font-weight: 500;
}

.preview-content {
    padding: 24px;
}

.preview-stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.preview-stat-card {
    background: var(--light-gray);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
}

.preview-stat-card i {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-bottom: 8px;
    display: block;
}

.preview-stat-num {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-gray);
    display: block;
}

.preview-stat-label {
    font-size: 0.8rem;
    color: var(--secondary-gray);
}

.preview-chart {
    background: var(--light-gray);
    border-radius: var(--border-radius);
    padding: 20px;
    height: 80px;
    display: flex;
    align-items: center;
}

.chart-line {
    width: 100%;
    height: 100%;
}

/* --------------------------------------------------------------------------
   Features Section - Updated
   -------------------------------------------------------------------------- */
.features-section {
    padding: 100px 0;
    background: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-badge {
    display: inline-block;
    background: rgba(30, 87, 153, 0.1);
    color: var(--primary-blue);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--secondary-gray);
    margin: 0;
}

.features-section .features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.features-section .feature-card {
    background: var(--white);
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    text-align: left;
    transition: all 0.3s ease;
}

.features-section .feature-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 10px 40px rgba(30, 87, 153, 0.1);
    transform: translateY(-5px);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon i {
    font-size: 1.5rem;
    color: var(--white);
}

.features-section .feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--dark-gray);
}

.features-section .feature-card p {
    color: var(--secondary-gray);
    margin: 0;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   CTA Section - Updated
   -------------------------------------------------------------------------- */
.cta-section {
    padding: 80px 0;
    background: var(--light-gray);
}

.cta-card {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    border-radius: var(--border-radius-lg);
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.cta-card::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
}

.cta-content {
    position: relative;
    z-index: 1;
    flex: 1;
}

.cta-content h2 {
    color: var(--white);
    font-size: 2rem;
    margin-bottom: 12px;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.cta-features {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.cta-features span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.cta-features i {
    color: #28ca42;
}

.cta-action {
    position: relative;
    z-index: 1;
}

.btn-cta {
    background: var(--white);
    color: var(--primary-blue);
    padding: 18px 36px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
    color: var(--primary-blue);
}

/* --------------------------------------------------------------------------
   Responsive - Homepage
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .hero-section .container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-dashboard-preview {
        transform: none;
        max-width: 400px;
    }
    
    .features-section .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cta-card {
        flex-direction: column;
        text-align: center;
        padding: 40px;
    }
    
    .cta-features {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0 80px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .hero-stat-divider {
        width: 60px;
        height: 1px;
    }
    
    .hero-visual {
        display: none;
    }
    
    .features-section {
        padding: 60px 0;
    }
    
    .features-section .features-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .cta-card {
        padding: 30px 20px;
    }
    
    .cta-content h2 {
        font-size: 1.5rem;
    }
    
    .cta-features {
        flex-direction: column;
        gap: 12px;
    }
}



/* --------------------------------------------------------------------------
   Features Page Styles
   -------------------------------------------------------------------------- */
.page-hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 50%, #2989d8 100%);
    padding: 80px 0;
    text-align: center;
    color: var(--white);
    margin-top: 30px;
}

.page-hero h1 {
    color: var(--white);
    font-size: 2.8rem;
    margin: 0 auto 16px auto;  /* center any max-width-constrained h1 */
}

.page-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Same for any other block elements that landing pages give a max-width;
   without these, the block sits at the left of the container and only the
   text inside it centers, which looks misaligned. */
.page-hero .hero-cta,
.page-hero > .container > div[style*="max-width"] {
    margin-left: auto;
    margin-right: auto;
}

.page-hero .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-hero .hero-badge i {
    color: #ffc107;
}

/* Hero buttons — auto-promote .btn-primary / .btn-outline / .btn-secondary
   inside any .page-hero so they read on the dark blue gradient instead of
   being blue-on-blue / transparent-on-blue (the original landing pages used
   .btn-hero-primary / .btn-hero-secondary by hand; the platform/install/help
   pages built later just use .btn-primary etc., so this rule normalizes
   them everywhere). */
.page-hero .btn-primary,
.page-hero .btn.btn-primary {
    background: #ffffff;
    color: var(--primary-blue);
    border: 2px solid #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
.page-hero .btn-primary:hover,
.page-hero .btn.btn-primary:hover {
    background: #f9fafb;
    color: var(--primary-blue);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.page-hero .btn-outline,
.page-hero .btn.btn-outline,
.page-hero .btn-secondary,
.page-hero .btn.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.55);
    font-weight: 600;
}
.page-hero .btn-outline:hover,
.page-hero .btn.btn-outline:hover,
.page-hero .btn-secondary:hover,
.page-hero .btn.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.85);
    color: #ffffff;
}

/* Hero badge polish — make sure the icon is visible whether it's a brand
   (.fab) or a solid (.fas) glyph, and the spacing looks right. */
.page-hero .hero-badge {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Features Detailed Section */
.features-detailed {
    padding: 80px 0;
    background: var(--white);
}

.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 100px;
}

.feature-row:last-child {
    margin-bottom: 0;
}

.feature-row.reverse {
    direction: rtl;
}

.feature-row.reverse > * {
    direction: ltr;
}

.feature-badge {
    display: inline-block;
    background: rgba(30, 87, 153, 0.1);
    color: var(--primary-blue);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feature-content h2 {
    font-size: 2rem;
    margin-bottom: 16px;
    color: var(--dark-gray);
}

.feature-content > p {
    font-size: 1.1rem;
    color: var(--secondary-gray);
    line-height: 1.7;
    margin-bottom: 24px;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 1rem;
    color: var(--dark-gray);
}

.feature-list li i {
    color: var(--success);
    font-size: 0.9rem;
}

/* Feature Visual Cards */
.feature-visual {
    display: flex;
    justify-content: center;
}

.feature-card-preview {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--medium-gray);
}

/* Live Stat Preview */
.preview-stat-large {
    text-align: center;
    padding: 20px;
}

.preview-stat-large i {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 16px;
    display: block;
}

.preview-stat-large .stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--dark-gray);
    display: block;
    line-height: 1;
}

.preview-stat-large .stat-label {
    font-size: 1rem;
    color: var(--secondary-gray);
    display: block;
    margin-top: 8px;
}

.preview-stat-large .stat-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Log Preview */
.log-preview {
    padding: 20px;
}

.log-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    margin-bottom: 10px;
}

.log-item:last-child {
    margin-bottom: 0;
}

.log-flag {
    font-size: 1.5rem;
}

.log-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.log-location {
    font-weight: 600;
    color: var(--dark-gray);
    font-size: 0.95rem;
}

.log-page {
    font-size: 0.8rem;
    color: var(--primary-blue);
}

.log-time {
    font-size: 0.8rem;
    color: var(--secondary-gray);
}

/* Geo Preview */
.geo-preview {
    padding: 20px;
}

.geo-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.geo-item:last-child {
    margin-bottom: 0;
}

.geo-flag {
    font-size: 1.3rem;
}

.geo-country {
    width: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark-gray);
}

.geo-bar {
    flex: 1;
    height: 8px;
    background: var(--medium-gray);
    border-radius: 10px;
    overflow: hidden;
}

.geo-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-blue-light));
    border-radius: 10px;
}

.geo-percent {
    width: 40px;
    text-align: right;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark-gray);
}

/* Referrer Preview */
.referrer-preview {
    padding: 20px;
}

.referrer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    margin-bottom: 10px;
}

.referrer-item:last-child {
    margin-bottom: 0;
}

.referrer-item i {
    font-size: 1.3rem;
    width: 24px;
    text-align: center;
}

.referrer-name {
    flex: 1;
    font-weight: 600;
    color: var(--dark-gray);
}

.referrer-count {
    font-size: 0.85rem;
    color: var(--secondary-gray);
}

/* Device Preview */
.device-preview {
    padding: 20px;
}

.device-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.device-item:last-child {
    margin-bottom: 0;
}

.device-item > i {
    font-size: 1.5rem;
    color: var(--primary-blue);
    width: 30px;
    text-align: center;
}

.device-info {
    flex: 1;
}

.device-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark-gray);
    margin-bottom: 6px;
}

.device-bar {
    height: 8px;
    background: var(--medium-gray);
    border-radius: 10px;
    overflow: hidden;
}

.device-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-blue-light));
    border-radius: 10px;
}

.device-percent {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-gray);
    width: 40px;
    text-align: right;
}

/* Code Preview */
.code-preview {
    padding: 0;
    overflow: hidden;
}

.code-header {
    background: var(--dark-gray);
    color: var(--white);
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.code-content {
    background: #2d2d2d;
    padding: 20px;
    overflow-x: auto;
}

.code-content code {
    color: #a8d8ff;
    font-family: 'Fira Code', 'Monaco', monospace;
    font-size: 0.85rem;
    white-space: nowrap;
}

.code-note {
    background: var(--light-gray);
    padding: 12px 20px;
    font-size: 0.85rem;
    color: var(--secondary-gray);
    display: flex;
    align-items: center;
    gap: 8px;
}

.code-note i {
    color: var(--primary-blue);
}

/* More Features Section */
.more-features {
    padding: 80px 0;
    background: var(--light-gray);
}

.features-grid-small {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card-small {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 28px;
    text-align: center;
    border: 1px solid var(--medium-gray);
    transition: all 0.3s ease;
}

.feature-card-small:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 10px 30px rgba(30, 87, 153, 0.1);
    transform: translateY(-3px);
}

.feature-icon-small {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.feature-icon-small i {
    font-size: 1.3rem;
    color: var(--white);
}

.feature-card-small h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--dark-gray);
}

.feature-card-small p {
    font-size: 0.9rem;
    color: var(--secondary-gray);
    margin: 0;
    line-height: 1.5;
}

/* Features Page Responsive */
@media (max-width: 1024px) {
    .feature-row {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .page-hero {
        padding: 60px 0;
    }
    
    .page-hero h1 {
        font-size: 2rem;
    }
    
    .feature-row {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-bottom: 60px;
    }
    
    .feature-row.reverse {
        direction: ltr;
    }
    
    .feature-content h2 {
        font-size: 1.6rem;
    }
    
    .feature-card-preview {
        max-width: 100%;
    }
    
    .features-grid-small {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .features-grid-small {
        grid-template-columns: 1fr;
    }
    
    .geo-country {
        width: 80px;
        font-size: 0.8rem;
    }
}

/* --------------------------------------------------------------------------
   Flag Icons Styling (CDN)
   -------------------------------------------------------------------------- */
.fi {
    width: 24px;
    height: 18px;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    background-size: cover;
    flex-shrink: 0;
}

.log-flag {
    width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.log-flag .fi {
    width: 24px;
    height: 18px;
}

.geo-item .fi {
    width: 24px;
    height: 18px;
}


/* --------------------------------------------------------------------------
   Auth Header (Icon + Two-line Greeting)
   -------------------------------------------------------------------------- */
.auth-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 30px;
    text-align: left;
}

.auth-header > i {
    font-size: 3.5rem;
    color: var(--primary-blue);
    line-height: 1;
}

.auth-greeting {
    display: flex;
    flex-direction: column;
}

.greeting-time {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1.2;
}

.greeting-subtitle {
    font-size: 1.1rem;
    color: var(--secondary-gray);
    font-weight: 400;
    margin-top: 2px;
}

/* Hide old standalone logo if present */
.auth-card .logo {
    display: none;
}

/* Remove old h1 margin if still present in auth-card */
.auth-card > h1 {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .auth-header {
        gap: 12px;
    }
    
    .auth-header > i {
        font-size: 2.5rem;
    }
    
    .greeting-time {
        font-size: 1.3rem;
    }
    
    .greeting-subtitle {
        font-size: 1rem;
    }
}


/* --------------------------------------------------------------------------
   About Page Styles
   -------------------------------------------------------------------------- */
.about-section {
    padding: 80px 0;
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--secondary-gray);
    margin-bottom: 16px;
}

.about-image {
    display: flex;
    justify-content: center;
}

.about-icon-box {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px rgba(30, 87, 153, 0.3);
}

.about-icon-box i {
    font-size: 6rem;
    color: var(--white);
}

/* Values Section */
.values-section {
    padding: 80px 0;
    background: var(--light-gray);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.value-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    border: 1px solid var(--medium-gray);
    transition: all 0.3s ease;
}

.value-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 10px 30px rgba(30, 87, 153, 0.1);
    transform: translateY(-3px);
}

.value-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.value-icon i {
    font-size: 1.5rem;
    color: var(--white);
}

.value-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--dark-gray);
}

.value-card p {
    color: var(--secondary-gray);
    margin: 0;
    line-height: 1.6;
}

/* Stats Section */
.stats-section {
    padding: 80px 0;
    background: var(--white);
}

.stats-grid-large {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.stat-item {
    text-align: center;
    padding: 30px;
}

.stat-item .stat-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-blue);
    display: block;
    line-height: 1.2;
}

.stat-item .stat-label {
    font-size: 1rem;
    color: var(--secondary-gray);
    margin-top: 8px;
    display: block;
}

/* --------------------------------------------------------------------------
   Pricing Page Styles
   -------------------------------------------------------------------------- */
.pricing-section {
    padding: 80px 0;
    background: var(--white);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: start;
}

.pricing-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    border: 2px solid var(--medium-gray);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.pricing-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 10px 40px rgba(30, 87, 153, 0.15);
}

.pricing-card.featured {
    border-color: var(--primary-blue);
    box-shadow: 0 10px 40px rgba(30, 87, 153, 0.2);
    transform: scale(1.05);
}

.pricing-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary-blue);
    color: var(--white);
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 0 0 0 var(--border-radius);
}

.pricing-header {
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid var(--medium-gray);
}

.pricing-header h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--dark-gray);
}

.pricing-price {
    margin-bottom: 12px;
}

.price-amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.price-period {
    font-size: 1rem;
    color: var(--secondary-gray);
}

.pricing-description {
    color: var(--secondary-gray);
    margin: 0;
}

.pricing-features {
    padding: 30px;
}

.pricing-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--light-gray);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li i {
    width: 20px;
    text-align: center;
}

.pricing-features li .fa-check {
    color: var(--success);
}

.pricing-features li .fa-times {
    color: var(--secondary-gray);
}

.pricing-features li.disabled {
    color: var(--secondary-gray);
}

.pricing-footer {
    padding: 20px 30px 30px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* FAQ Section */
.faq-section {
    padding: 80px 0;
    background: var(--light-gray);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.faq-item {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 24px;
    border: 1px solid var(--medium-gray);
}

.faq-item h4 {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--dark-gray);
}

.faq-item h4 i {
    color: var(--primary-blue);
    margin-top: 2px;
}

.faq-item p {
    color: var(--secondary-gray);
    margin: 0;
    line-height: 1.6;
    padding-left: 28px;
}

/* --------------------------------------------------------------------------
   Support Page Styles
   -------------------------------------------------------------------------- */
.support-section {
    padding: 80px 0;
    background: var(--white);
}

.support-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.support-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    border: 1px solid var(--medium-gray);
    transition: all 0.3s ease;
}

.support-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 10px 30px rgba(30, 87, 153, 0.1);
}

.support-card-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.support-card-icon i {
    font-size: 1.3rem;
    color: var(--white);
}

.support-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--dark-gray);
}

.support-card > p {
    color: var(--secondary-gray);
    margin-bottom: 20px;
    line-height: 1.6;
}

.support-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.support-links li {
    margin-bottom: 8px;
}

.support-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-blue);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.support-links a:hover {
    color: var(--primary-blue-dark);
    padding-left: 5px;
}

.support-links a i {
    font-size: 0.7rem;
}

/* Contact Section */
.contact-section {
    padding: 80px 0;
    background: var(--light-gray);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: start;
}

.contact-info h2 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.contact-info > p {
    color: var(--secondary-gray);
    line-height: 1.7;
    margin-bottom: 30px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 16px;
}

.contact-method i {
    width: 45px;
    height: 45px;
    background: var(--white);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    font-size: 1.2rem;
    box-shadow: var(--shadow);
}

.contact-method div {
    display: flex;
    flex-direction: column;
}

.contact-method strong {
    color: var(--dark-gray);
    font-size: 0.95rem;
}

.contact-method span {
    color: var(--secondary-gray);
    font-size: 0.9rem;
}

.contact-form-wrapper {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
}

.contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* --------------------------------------------------------------------------
   Legal Pages Styles (Privacy & Terms)
   -------------------------------------------------------------------------- */
.legal-section {
    padding: 60px 0;
    background: var(--white);
}

.legal-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 60px;
    align-items: start;
}

.legal-nav {
    position: sticky;
    top: 100px;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    padding: 24px;
}

.legal-nav h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--dark-gray);
}

.legal-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.legal-nav li {
    margin-bottom: 8px;
}

.legal-nav a {
    color: var(--secondary-gray);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: block;
    padding: 4px 0;
}

.legal-nav a:hover {
    color: var(--primary-blue);
    padding-left: 5px;
}

.legal-body section {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--medium-gray);
}

.legal-body section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.legal-body h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--primary-blue);
}

.legal-body h3 {
    font-size: 1.15rem;
    margin: 24px 0 12px;
    color: var(--dark-gray);
}

.legal-body p {
    color: var(--secondary-gray);
    line-height: 1.8;
    margin-bottom: 16px;
}

.legal-body ul {
    color: var(--secondary-gray);
    line-height: 1.8;
    margin-bottom: 16px;
    padding-left: 24px;
}

.legal-body li {
    margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   Responsive - About, Pricing, Support, Legal Pages
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-image {
        order: -1;
    }
    
    .about-icon-box {
        width: 180px;
        height: 180px;
    }
    
    .about-icon-box i {
        font-size: 4rem;
    }
    
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid-large {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 450px;
        margin: 0 auto;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    .legal-content {
        grid-template-columns: 1fr;
    }
    
    .legal-nav {
        position: static;
    }
}

@media (max-width: 768px) {
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid-large {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .stat-item .stat-value {
        font-size: 2.2rem;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .support-cards {
        grid-template-columns: 1fr;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-form-wrapper {
        padding: 30px 20px;
    }
    
    .contact-form .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid-large {
        grid-template-columns: 1fr;
    }
    
    .pricing-header {
        padding: 24px 20px;
    }
    
    .price-amount {
        font-size: 2.5rem;
    }
    
    .pricing-features {
        padding: 24px 20px;
    }
}

/* Bot/Quality indicators */
.visit-item.visit-bot {
    background-color: rgba(220, 53, 69, 0.05);
    border-left: 3px solid var(--danger);
}

.visit-item .badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    margin-left: 5px;
    vertical-align: middle;
}

.quality-indicators {
    display: inline-flex;
    gap: 5px;
    margin-left: 5px;
}

.quality-indicators i {
    font-size: 0.85rem;
}

/* Quality score colors */
.quality-good { color: var(--success); }
.quality-fair { color: var(--warning); }
.quality-poor { color: var(--danger); }
.quality-bot { color: var(--danger); }

