/* Google Universal Analytics Inspired Styles */

:root {
    --primary-color: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #4285f4;
    --secondary-color: #5f6368;
    --success-color: #34a853;
    --warning-color: #fbbc04;
    --danger-color: #ea4335;
    --info-color: #4285f4;
    --light-gray: #f8f9fa;
    --medium-gray: #e8eaed;
    --dark-gray: #5f6368;
    --border-color: #dadce0;
    --sidebar-bg: #ffffff;
    --sidebar-border: #e8eaed;
    --card-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
}

/* Global Styles */
body {
    font-family: 'Google Sans', Roboto, Arial, sans-serif;
    background-color: var(--light-gray);
    color: #202124;
    font-size: 14px;
    line-height: 1.4;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    box-shadow: 0 2px 10px 0 rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 0 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.sidebar .nav-link {
    font-weight: 400;
    color: var(--dark-gray);
    padding: 12px 24px;
    border-radius: 0;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.sidebar .nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(26, 115, 232, 0.04);
    border-left-color: var(--primary-color);
}

.sidebar .nav-link.active {
    color: var(--primary-color);
    background-color: rgba(26, 115, 232, 0.12);
    border-left-color: var(--primary-color);
    font-weight: 500;
}

.sidebar-heading {
    font-size: 11px;
    letter-spacing: 0.5px;
    font-weight: 500;
    color: var(--secondary-color);
    text-transform: uppercase;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Main Content */
main {
    margin-left: 250px;
    padding: 2rem;
}

/* Mobile Menu Styles */
.mobile-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    width: 100%;
}

.mobile-menu-content {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    max-height: 70vh;
    overflow-y: auto;
    padding: 1rem 0;
}

.mobile-menu-section {
    margin-bottom: 1.5rem;
}

.mobile-menu-header {
    font-size: 11px;
    letter-spacing: 0.5px;
    font-weight: 600;
    color: var(--secondary-color);
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--medium-gray);
}

.mobile-menu-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--dark-gray);
    text-decoration: none;
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
}

.mobile-menu-item:hover {
    color: var(--primary-color);
    background-color: rgba(26, 115, 232, 0.04);
    border-left-color: var(--primary-color);
    text-decoration: none;
}

.mobile-menu-item.active {
    color: var(--primary-color);
    background-color: rgba(26, 115, 232, 0.12);
    border-left-color: var(--primary-color);
    font-weight: 500;
}

.mobile-main {
    padding-top: 1rem;
}

@media (max-width: 768px) {
    main {
        margin-left: 0;
        padding: 1rem;
    }

    .mobile-main {
        padding-top: 0;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

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

    /* Ensure mobile menu stays above other content */
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        border: 1px solid var(--border-color);
        border-top: none;
        box-shadow: var(--card-shadow);
    }
}

/* Cards */
.card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    font-weight: 500;
}

.card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    font-weight: 500;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn:hover {
    box-shadow: 0 1px 3px 0 rgba(60,64,67,0.3), 0 4px 8px 3px rgba(60,64,67,0.15);
    transform: translateY(-1px);
}

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

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

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-warning {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
    color: #202124;
}

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

/* Tables */
.table {
    font-size: 14px;
}

.table thead th {
    border-bottom: 2px solid var(--border-color);
    font-weight: 500;
    color: var(--secondary-color);
    background-color: #f8f9fa;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(26, 115, 232, 0.04);
}

/* Metrics Cards */
.border-left-primary {
    border-left: 4px solid var(--primary-color) !important;
}

.border-left-success {
    border-left: 4px solid var(--success-color) !important;
}

.border-left-info {
    border-left: 4px solid var(--info-color) !important;
}

.border-left-warning {
    border-left: 4px solid var(--warning-color) !important;
}

/* Forms */
.form-control {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.form-label {
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.form-select {
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #e8f5e8;
    color: #137333;
}

.alert-warning {
    background-color: #c33809;
    color: #ffffff;
}

.alert-danger {
    background-color: #d94c3f;
    color: #ffffff;
}

.alert-info {
    background-color: #e8f0fe;
    color: #1967d2;
}

/* Charts */
canvas {
    border-radius: 4px;
}

/* Login Page */
.login-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.hero-section {
    background: linear-gradient(135deg, #e8e8e8 0%, #ffffff 100%);
    color: white;
}

.feature-icon {
    opacity: 0.8;
}

/* Dashboard specific */
.text-lg {
    font-size: 1.5rem;
    font-weight: 600;
}

.text-xs {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.font-weight-bold {
    font-weight: 600 !important;
}

.text-gray-800 {
    color: #202124 !important;
}

.text-gray-300 {
    color: #9aa0a6 !important;
}

.text-white-75 {
    color: rgba(255, 255, 255, 0.75) !important;
}

.text-white-25 {
    color: rgba(255, 255, 255, 0.25) !important;
}

/* Custom report builder */
.form-select[multiple] {
    min-height: 200px;
}

.form-select[multiple] option:checked {
    background-color: var(--primary-color);
    color: white;
}

/* Real-time page */
.activity-feed {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.activity-item:hover {
    background-color: var(--light-gray);
}

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

/* Refresh indicator styles */
.refresh-pulse {
    width: 8px;
    height: 8px;
    background-color: #6c757d;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.refresh-pulse.active {
    background-color: #28a745;
    animation: pulse 2s infinite;
}

.refresh-pulse.loading {
    background-color: #007bff;
    animation: spin 1s linear infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 8px rgba(40, 167, 69, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Breakdown lists */
.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.breakdown-item:hover {
    background-color: #f8f9fa;
    padding-left: 8px;
    margin-left: -8px;
    margin-right: -8px;
    padding-right: 8px;
}

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

/* Metric card animation */
.ua-metric-value {
    transition: all 0.3s ease;
}

/* Activity feed animations */
.activity-feed {
    max-height: 400px;
    overflow-y: auto;
}

.activity-feed::-webkit-scrollbar {
    width: 4px;
}

.activity-feed::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.activity-feed::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.activity-feed::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Progress bars */
.progress {
    height: 6px;
    border-radius: 3px;
    background-color: var(--medium-gray);
}

.progress-bar {
    border-radius: 3px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }

    .btn-toolbar .btn-group {
        margin-bottom: 0.5rem;
    }

    .table-responsive {
        font-size: 12px;
    }
}

/* DataTables custom styling */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* UA Metric Change Colors */
.ua-metric-change.positive {
    color: #1b7b2c !important;
}

.ua-metric-change.negative {
    color: #d73027 !important;
}

.ua-metric-change.neutral {
    color: #9aa0a6 !important;
}

/* Loading Bar */
.loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: rgba(0, 0, 0, 0.1);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-bar.show {
    opacity: 1;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    width: 0%;
    animation: loading-progress 2s ease-in-out infinite;
}

@keyframes loading-progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* GA4 Loading Popup Styles */
.ga4-loading-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.ga4-loading-popup.show {
    display: flex;
}

.ga4-loading-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-width: 400px;
    width: 90%;
}

.ga4-loading-spinner {
    margin-bottom: 20px;
}

.ga4-loading-content h5 {
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
}

.ga4-loading-content p {
    color: #666;
    margin-bottom: 0;
    font-size: 14px;
}

/* Heatmap Container */
.heatmap-container {
    min-height: 300px !important;
    position: relative;
    padding: 20px;
    overflow: hidden;
}

.heatmap-grid {
    display: grid;
    grid-template-columns: 60px repeat(24, 1fr);
    grid-template-rows: 40px repeat(7, 1fr);
    gap: 1px;
    height: 100%;
    width: 100%;
    font-size: 12px;
    font-family: Roboto, Arial, sans-serif;
}

.heatmap-hour-label {
    display: flex;
    align-items: end;
    justify-content: center;
    padding-bottom: 5px;
    color: #5f6368;
    font-size: 11px;
    writing-mode: horizontal-tb;
}

.heatmap-day-label {
    display: flex;
    align-items: center;
    justify-content: end;
    padding-right: 8px;
    color: #5f6368;
    font-weight: 500;
    font-size: 12px;
}

.heatmap-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.heatmap-cell:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 10;
}

.heatmap-cell-0 { background-color: #f8f9fa; }
.heatmap-cell-1 { background-color: #e3f2fd; }
.heatmap-cell-2 { background-color: #bbdefb; }
.heatmap-cell-3 { background-color: #90caf9; }
.heatmap-cell-4 { background-color: #64b5f6; }
.heatmap-cell-5 { background-color: #42a5f5; }
.heatmap-cell-6 { background-color: #2196f3; }
.heatmap-cell-7 { background-color: #1e88e5; }
.heatmap-cell-8 { background-color: #1976d2; }
.heatmap-cell-9 { background-color: #1565c0; }

/* Tooltip */
.heatmap-tooltip {
    position: absolute;
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-family: Roboto, Arial, sans-serif;
    pointer-events: none;
    z-index: 1000;
    display: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
    padding: 0.25rem 0.5rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin: 0 2px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white !important;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--medium-gray);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Loading states */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Utility classes */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.bg-success {
    background-color: var(--success-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.bg-warning {
    background-color: var(--warning-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.bg-danger {
    background-color: var(--danger-color) !important;
}

.text-info {
    color: var(--info-color) !important;
}

.bg-info {
    background-color: var(--info-color) !important;
}

/* Gradient backgrounds for cards */
.bg-gradient-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
}

.bg-gradient-success {
    background: linear-gradient(45deg, var(--success-color), #4caf50);
}

.bg-gradient-info {
    background: linear-gradient(45deg, var(--info-color), #03a9f4);
}

.bg-gradient-warning {
    background: linear-gradient(45deg, var(--warning-color), #ff9800);
}

.bg-gradient-danger {
    background: linear-gradient(45deg, var(--danger-color), #f44336);
}

/* Universal Analytics Sidebar Styles */
.ua-sidebar {
    position: fixed !important;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    background-color: #f8f9fa;
    border-right: 1px solid #e1e4e8;
    width: 250px;
    overflow-y: auto;
    font-family: 'Roboto', Arial, sans-serif;
}

.ua-sidebar-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* UA Header */
.ua-header {
    padding: 20px 16px 16px;
    border-bottom: 1px solid #e1e4e8;
    background-color: #fff;
}

.ua-title {
    font-size: 24px;
    font-weight: 500;
    color: #000000;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.ua-analytics-section {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e1e4e8;
}

.ua-analytics-icon {
    margin-right: 12px;
    font-size: 18px;
}

.ua-analytics-text {
    font-size: 16px;
    font-weight: 400;
    color: #5f6368;
}

/* UA Menu */
.ua-menu {
    flex: 1;
    padding: 8px 0;
    background-color: #f8f9fa;
}

.ua-menu-item {
    position: relative;
}

.ua-menu-item.ua-active > .ua-nav-link,
.ua-submenu-item.ua-active > .ua-nav-link {
    background-color: #e8f0fe;
    border-left: 4px solid #1a73e8;
    color: #1a73e8;
    font-weight: 500;
}

.ua-nav-link {
    display: flex;
    align-items: center;
    padding: 8px 16px 8px 20px;
    color: #5f6368;
    text-decoration: none;
    font-size: 14px;
    line-height: 20px;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.ua-nav-link:hover {
    background-color: #e8eaed;
    color: #202124;
    text-decoration: none;
}

.ua-nav-icon {
    margin-right: 12px;
    font-size: 16px;
    width: 16px;
    text-align: center;
    color: #5f6368;
}

.ua-nav-text {
    font-size: 14px;
}

/* Menu Toggle */
.ua-menu-toggle {
    display: flex;
    align-items: center;
    padding: 8px 16px 8px 12px;
    color: #5f6368;
    cursor: pointer;
    font-size: 14px;
    line-height: 20px;
    transition: all 0.2s ease;
    user-select: none;
}

.ua-menu-toggle:hover {
    background-color: #e8eaed;
    color: #202124;
}

.ua-toggle-icon {
    margin-right: 8px;
    font-size: 12px;
    width: 12px;
    text-align: center;
    transition: transform 0.2s ease;
}

.ua-expandable.ua-expanded .ua-toggle-icon {
    transform: rotate(90deg);
}

/* Section Headers */
.ua-section-header {
    padding: 16px 16px 8px;
    margin-top: 8px;
}

.ua-section-header span {
    font-size: 11px;
    font-weight: 500;
    color: #80868b;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

/* Submenu */
.ua-submenu {
    display: none;
    background-color: #f8f9fa;
    border-left: 1px solid #e8eaed;
    margin-left: 28px;
    overflow: hidden;
}

.ua-expandable.ua-expanded .ua-submenu {
    display: block;
}

/* Submenu Items */
.ua-submenu-item {
    position: relative;
}

.ua-submenu-item .ua-nav-link {
    padding: 8px 16px 8px 32px;
    color: #5f6368;
    text-decoration: none;
    font-size: 14px;
    line-height: 20px;
    transition: all 0.2s ease;
    display: block;
    border-left: 4px solid transparent;
}

.ua-submenu-item .ua-nav-link:hover {
    background-color: #e8eaed;
    color: #202124;
    text-decoration: none;
}

.ua-submenu-item.ua-active .ua-nav-link {
    color: #1a73e8;
    background-color: rgba(26, 115, 232, 0.12);
    border-left-color: #1a73e8;
    font-weight: 500;
}

/* Menu Toggle Animation */
.ua-toggle-icon {
    transition: transform 0.2s ease;
}

.ua-submenu-item {
    position: relative;
}

.ua-submenu-item .ua-nav-link {
    padding: 6px 16px 6px 24px;
    font-size: 14px;
    border-left: none;
}

.ua-submenu-item.ua-active .ua-nav-link {
    background-color: #e8f0fe;
    color: #1a73e8;
    font-weight: 500;
    border-left: 4px solid #1a73e8;
    margin-left: -4px;
}

/* Footer */
.ua-footer {
    padding: 16px;
    border-top: 1px solid #e1e4e8;
    margin-top: auto;
}

.ua-footer .btn {
    color: #5f6368;
    font-size: 14px;
    border: none;
    background: none;
    box-shadow: none;
    padding: 8px 0;
}

.ua-footer .btn:hover {
    background-color: #f1f3f4;
    transform: none;
    box-shadow: none;
}

/* User Info in Footer */
.ua-user-info {
    color: #5f6368;
    font-size: 13px;
    padding: 8px 0;
    font-weight: 500;
    border-bottom: 1px solid #e1e4e8;
    margin-bottom: 12px;
}

/* Main content adjustment for UA sidebar */
main {
    margin-left: 250px !important;
    padding: 24px;
}

/* Responsive UA Sidebar */
@media (max-width: 768px) {
    .ua-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .ua-sidebar.show {
        transform: translateX(0);
    }

    main {
        margin-left: 0 !important;
        padding: 16px;
    }
}

/* Universal Analytics Dashboard Styles */
.ua-metric-card {
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    padding: 16px;
    text-align: center;
    height: 100%;
}

.ua-metric-label {
    font-size: 12px;
    color: #5f6368;
    margin-bottom: 4px;
}

.ua-metric-value {
    font-size: 24px;
    font-weight: 400;
    color: #202124;
    margin-bottom: 4px;
}

.ua-metric-change {
    font-size: 11px;
    font-weight: 500;
}

/* These styles are now defined at the end of the file */

.ua-chart-container {
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    padding: 16px;
    height: 300px;
}

.ua-panel {
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.ua-panel-header {
    padding: 16px;
    border-bottom: 1px solid #e1e4e8;
    background: #f8f9fa;
}

h6 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #202124;
}

.ua-panel-body {
    padding: 16px;
}

.ua-tabs {
    margin-top: 8px;
}

.ua-tab {
    display: inline-block;
    padding: 8px 16px;
    font-size: 12px;
    color: #5f6368;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-right: 16px;
}

.ua-tab.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
}

.ua-realtime-widget {
    background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%);
    color: white;
    border-radius: 4px;
    overflow: hidden;
}

.ua-realtime-header {
    padding: 20px;
    text-align: center;
}

.ua-realtime-number {
    display: block;
    font-size: 48px;
    font-weight: 300;
    line-height: 1;
}

.ua-realtime-label {
    font-size: 16px;
    opacity: 0.9;
}

.ua-realtime-chart {
    padding: 0 20px;
    height: 80px;
}

.ua-realtime-pages,
.ua-realtime-countries,
.ua-realtime-devices {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.1);
}

.ua-realtime-section {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 12px;
}

.ua-page-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 13px;
}

.ua-page-url {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ua-page-users {
    font-weight: 500;
    margin-left: 8px;
}

.ua-realtime-footer {
    padding: 12px 20px;
    text-align: center;
    background: rgba(0, 0, 0, 0.1);
}

.ua-realtime-footer a {
    color: white;
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.ua-map-container {
    margin-bottom: 16px;
}

.ua-country-list {
    font-size: 13px;
}

.ua-country-item {
    display: grid;
    grid-template-columns: 1fr 60px 40px;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f1f3f4;
}

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

.ua-country-name {
    color: #202124;
}

.ua-country-bar {
    background: #f1f3f4;
    border-radius: 2px;
    height: 4px;
    position: relative;
}

.ua-country-progress {
    background: #4285f4;
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.ua-country-percent {
    text-align: right;
    color: #5f6368;
    font-size: 12px;
}

.heatmap-container {
    height: 120px;
    position: relative;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ua-metric-card {
        margin-bottom: 16px;
    }

    .ua-realtime-number {
        font-size: 36px;
    }

    .ua-country-item {
        grid-template-columns: 1fr 50px 35px;
        gap: 6px;
    }
}

/* Print styles */
@media print {
    .ua-sidebar,
    .btn-toolbar,
    .alert-container,
    .no-print {
        display: none !important;
    }

    main {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .card, .ua-panel, .ua-metric-card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        break-inside: avoid;
        margin-bottom: 1rem;
    }
}

/* Remove dropdown shadows */
.dropdown-menu {
    box-shadow: none !important;
    border: 1px solid #dee2e6;
}

/* Remove shadows from alert boxes */
.alert {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}

/* Remove Bootstrap shadows */
.shadow, .shadow-sm, .shadow-lg {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}

/* Specifically target alert warning with comprehensive shadow removal */
.alert-warning {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    filter: none !important;
}

/* Force remove shadows from button and nested elements */
.btn-link, .btn-link:hover, .btn-link:focus {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    filter: none !important;
    transform: none !important;
}

/* UTM Preset Tag Styles */
.preset-tags-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    align-items: start;
}

.preset-tag-wrapper {
    width: 100%;
}

.preset-tag {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 50px;
    display: flex;
    align-items: center;
}

.preset-tag:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.preset-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 8px;
}

.ga4-count {
    background: #28a745;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-right: 8px;
    font-weight: 500;
}

.btn-remove {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 12px;
    padding: 2px 4px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.preset-tag:hover .btn-remove {
    opacity: 1;
}

.btn-remove:hover {
    color: #c82333;
}

/* UTM Template Form Styles */
.template-container {
    max-width: 1200px;
    margin: 0 auto;
}

.template-column {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 24px;
    height: fit-content;
}

.template-column-header {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    padding-bottom: 16px;
}

.template-form .form-control {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 12px;
    transition: all 0.15s ease;
    font-size: 14px;
}

.template-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(26, 115, 232, 0.25);
}

/* UTM Field Styling */
.utm-field-container {
    position: relative;
}

.utm-field-icon {
    margin-right: 8px;
}

.utm-field-strict::after {
    content: '●';
    color: var(--danger-color);
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    z-index: 10;
}

.utm-field-flexible::after {
    content: '●';
    color: var(--success-color);
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    z-index: 10;
}

.field-validation-error {
    border-color: var(--danger-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.field-validation-success {
    border-color: var(--success-color) !important;
}

/* Preview Styles */
.preview-url {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: var(--light-gray);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    word-break: break-all;
    font-size: 14px;
}

.preview-badge {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 12px;
    margin: 2px;
    display: inline-block;
}

/* Field Legend */
.field-legend {
    font-size: 12px;
    margin-bottom: 16px;
    padding: 8px 12px;
    background: var(--light-gray);
    border-radius: 6px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    margin-right: 16px;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.legend-strict { 
    background-color: var(--danger-color); 
}

.legend-flexible { 
    background-color: var(--success-color); 
}

/* Custom Date Picker Styles */
.custom-calendar {
    max-width: 400px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    font-family: 'Google Sans', Roboto, Arial, sans-serif;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-nav {
    background: none;
    border: none;
    font-size: 18px;
    color: #5f6368;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
}

.calendar-nav:hover {
    background-color: #f1f3f4;
}

.calendar-month-year {
    font-size: 16px;
    font-weight: 500;
    color: #202124;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 8px;
    text-align: center;
}

.calendar-weekday {
    font-size: 12px;
    font-weight: 500;
    color: #5f6368;
    padding: 8px 4px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day {
    background: none;
    border: none;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 14px;
    color: #202124;
    margin: 2px;
}

.calendar-day:hover {
    background-color: #e8f0fe;
}

.calendar-day.selected {
    background-color: #1a73e8;
    color: white;
}

.calendar-day.range {
    background-color: #e8f0fe;
    border-radius: 0;
}

.calendar-day.range-start {
    background-color: #1a73e8;
    color: white;
    border-radius: 50% 0 0 50%;
}

.calendar-day.range-end {
    background-color: #1a73e8;
    color: white;
    border-radius: 0 50% 50% 0;
}

.calendar-day.other-month {
    color: #9aa0a6;
}

.calendar-day.disabled {
    color: #e8eaed;
    cursor: not-allowed;
}

.date-input-group {
    margin-bottom: 20px;
}

.date-input-group label {
    font-size: 14px;
    font-weight: 500;
    color: #5f6368;
    margin-bottom: 8px;
}

.date-picker {
    background-color: #f8f9fa;
    border: 1px solid #dadce0;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    color: #202124;
    cursor: pointer;
}

.date-picker:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 1px #1a73e8;
}

/* Modern Date Range Dropdown */
.ua-date-selector {
    position: relative;
    display: inline-block;
}

.ua-date-selector .dropdown-toggle {
    background: #ffffff;
    border: 1px solid #e0e4e7;
    color: #3c4043;
    font-size: 14px;
    font-weight: 500;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    min-width: 160px;
    justify-content: space-between;
}

.ua-date-selector .dropdown-toggle:hover {
    border-color: #4285f4;
    background: #fafbff;
    box-shadow: 0 2px 6px rgba(66, 133, 244, 0.1);
}

.ua-date-selector .dropdown-toggle:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.ua-date-selector .dropdown-toggle::after {
    border: none;
    content: "▼";
    font-size: 10px;
    color: #5f6368;
    margin-left: auto;
}

.ua-date-selector .dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 8px;
    min-width: 200px;
    margin-top: 4px;
    background: #ffffff;
}

.ua-date-selector .dropdown-item {
    padding: 10px 16px;
    font-size: 14px;
    color: #3c4043;
    border: none;
    background: none;
    border-radius: 6px;
    margin: 2px 0;
    transition: all 0.15s ease;
    font-weight: 400;
}

.ua-date-selector .dropdown-item:hover {
    background: #f1f3f4;
    color: #1a73e8;
    transform: translateY(-1px);
}

.ua-date-selector .dropdown-item.active {
    background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%);
    color: white;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

.ua-date-selector .dropdown-item.active:hover {
    background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
    color: white;
    transform: translateY(-1px);
}

.ua-date-selector .dropdown-divider {
    margin: 8px 0;
    border-color: #e8eaed;
}

/* Selected Items Display */
.selected-items-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 20px;
}

.selected-item {
    display: inline-block;
    background: #1a73e8;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.selected-items-list:empty::after {
    content: "None selected";
    color: #9aa0a6;
    font-style: italic;
    font-size: 11px;
}

/* ===== MODERN TABLE STYLES ===== */
.modern-table {
    background: white;
    border-radius: 0;
    overflow: hidden;
    border: none;
    margin-bottom: 0;
    box-shadow: none;
}

.modern-table .table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.modern-table thead th {
    background: #fafbfc;
    border: none;
    border-bottom: 1px solid #e1e5e9;
    color: #5f6368;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 12px 16px;
    position: relative;
}

.modern-table thead th:first-child {
    padding-left: 20px;
}

.modern-table thead th:last-child {
    padding-right: 20px;
}

.modern-table tbody tr {
    transition: background-color 0.15s ease;
    border: none;
}

.modern-table tbody tr:hover {
    background: #f8f9fa;
}

.modern-table tbody td {
    border: none;
    border-bottom: 1px solid #f1f3f4;
    padding: 16px 16px;
    vertical-align: middle;
    color: #202124;
    font-size: 14px;
}

.modern-table tbody td:first-child {
    padding-left: 20px;
    font-weight: 500;
}

.modern-table tbody td:last-child {
    padding-right: 20px;
}

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

/* Progress bar styling for percentage columns */
.progress-cell {
    position: relative;
    min-width: 100px;
}

.progress-bar-bg {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: #f3f4f6;
    border-radius: 2px;
    transform: translateY(-50%);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 2px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.percentage-text {
    position: relative;
    z-index: 1;
    font-weight: 600;
    color: #374151;
    font-size: 13px;
}

/* Metric badge styling */
.metric-badge {
    display: inline-flex;
    align-items: center;
    padding: 0;
    background: transparent;
    color: black;
    border-radius: 0;
    font-weight: 400;
    font-size: 14px;
    min-width: auto;
    justify-content: flex-start;
    border: none;
}



/* Icon alignment in tables */
.modern-table .table-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    vertical-align: middle;
}

/* Status indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34a853;
}

.status-dot.warning {
    background: #fbbc04;
}

.status-dot.error {
    background: #ea4335;
}

/* Modern table mobile responsive */
@media (max-width: 768px) {
    .modern-table thead th {
        padding: 12px 16px;
        font-size: 12px;
    }

    .modern-table tbody td {
        padding: 12px 16px;
    }

    .modern-table thead th:first-child,
    .modern-table tbody td:first-child {
        padding-left: 20px;
    }

    .modern-table thead th:last-child,
    .modern-table tbody td:last-child {
        padding-right: 20px;
    }
}