/* wwwroot/css/site.css */

/* ============================================
   BASE STYLES
   ============================================ */

body {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #1e293b;
}

main {
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 2rem;
}

h1, h2, h3, h4, h5 {
    font-weight: 600;
    color: #1e293b;
}


.card {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
    background: #ffffff;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    color: #1e293b;
}

.table {
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.table thead th {
    background-color: #f1f5f9;
    color: #0f172a;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #cbd5e1;
    padding: 1rem;
}

.table tbody td {
    color: #334155;
    background: #ffffff;
    padding: 1rem;
    vertical-align: middle;
    font-size: 0.9375rem;
}

.table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

.table-hover tbody tr:hover {
    background-color: #f8fafc;
    transform: translateX(2px);
}

.table-hover tbody tr:hover td {
    background-color: #f8fafc;
}

.btn-primary {
    background: linear-gradient(90deg, #0d6efd, #0a58ca);
    border: none;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: linear-gradient(90deg, #0a58ca, #0949b0);
}

.btn-outline-primary {
    transition: all 0.2s ease;
}

.btn-outline-primary:hover {
    background-color: #0d6efd;
    color: white;
}

.alert {
    border-radius: 12px;
}

.text-success {
    color: #10b981 !important;
    font-weight: 600 !important;
}
.text-warning {
    color: #f59e0b !important;
    font-weight: 600 !important;
}
.text-danger  {
    color: #ef4444 !important;
    font-weight: 600 !important;
}

/* ============================================
   SIDEBAR
   ============================================ */

/* Responsywność sidebaru */
@media (max-width: 767.98px) {
    .sidebar {
        width: 100% !important;
        position: relative;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
}
.sidebar {
    position: relative;
    flex-shrink: 0;
    width: 260px;
    min-width: 70px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border-right: 1px solid #cbd5e1;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
}

.logo-circle {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.logo-circle:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.sidebar.collapsed .logo-circle {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
}

.sidebar .sidebar-title {
    color: #64748b !important;
}

.sidebar .nav-link {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0.4rem;
    padding: 0.75rem 1rem !important;
    color: #64748b !important;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar .nav-link:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6 !important;
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.sidebar .nav-link i {
    font-size: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
    color: inherit;
    transition: all 0.3s ease;
    flex-shrink: 0;
}


.sidebar.collapsed .sidebar-text,
.sidebar.collapsed .sidebar-title {
    display: none !important;
}

.sidebar-bottom {
    margin-top: auto;
    padding: 1rem 0 1rem 0;
    border-top: 1px solid #e2e8f0;
}

.sidebar-bottom .nav-link {
    margin-bottom: 1rem;
}

.sidebar-bottom #sidebarToggle {
    margin: 0 auto;
    display: block;
}

.sidebar > .nav {
    flex: 1;
    overflow-y: auto;
}

/* ============================================
   COMPONENTS - METRIC TILES & CHARTS
   ============================================ */

/* CWV and Search Console metric tiles */
.info-icon {
    color: #64748b;
}

.metric-tile-title {
    color: #1e293b;
    font-weight: 600;
}

.metric-tile-value {
    color: #1e293b;
    font-weight: 700;
}

.metric-tile-label {
    color: #64748b;
}

.metric-tile-icon-score {
    color: #3b82f6;
}

.metric-tile-icon-lcp {
    color: #06b6d4;
}

.metric-tile-icon-cls {
    color: #8b5cf6;
}

.metric-tile-icon-inp {
    color: #ef4444;
}

.metric-tile-icon-ctr {
    color: #10b981;
}

.metric-tile-icon-position {
    color: #06b6d4;
}

.metric-tile-icon-impressions {
    color: #8b5cf6;
}

.metric-tile-icon-clicks {
    color: #3b82f6;
}

.metric-badge-good {
    background-color: #dcfce7;
    color: #15803d;
    font-weight: 600;
}

.metric-badge-warning {
    background-color: #fef3c7;
    color: #b45309;
    font-weight: 600;
}

.metric-badge-danger {
    background-color: #fee2e2;
    color: #b91c1c;
    font-weight: 600;
}

.no-data-message {
    color: #94a3b8;
}

/* ============================================
   METRIC TILES - HOVER & ANIMATION
   ============================================ */

/* Even lighter shadows for cards to address darkness */
.shadow-sm {
    box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.025) !important;
}

.card.shadow-sm:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
}

/* Metric tiles styling */
.metric-tile {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.metric-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.metric-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
    border-color: #93c5fd;
}

.metric-tile:hover::before {
    opacity: 1;
}

.metric-tile .card-body {
    position: relative;
    z-index: 1;
}

.metric-tile .card-body h2,
.metric-tile .card-body .text-primary {
    color: #1e293b !important;
    font-weight: 700;
}

.metric-tile .card-body .text-muted {
    color: #64748b !important;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75rem !important;
}

.metric-tile .card-body i {
    opacity: 1;
    transition: transform 0.4s ease;
}

.metric-tile:hover .card-body i {
    transform: scale(1.15) rotate(-5deg);
}

/* Individual metric tile colors */
.metric-tile:nth-child(1) {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #93c5fd;
}

.metric-tile:nth-child(2) {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #86efac;
}

.metric-tile:nth-child(3) {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-color: #c084fc;
}

.metric-tile:nth-child(4) {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #fca5a5;
}

/* Chart card styling */
.chart-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.chart-card .card-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.25rem 1.5rem;
}

.chart-card .card-header h5 {
    color: #1e293b;
    font-weight: 600;
    font-size: 1.1rem;
}

.chart-card .card-body {
    padding: 2rem 1.5rem;
}

.echarts-chart-container {
    height: 320px;
}

/* ============================================
   PAGES - WEBSITE DETAILS
   ============================================ */

/* Search Console alert styling */
.alert-sc-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #3b82f6;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: start;
    color: #1e40af;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.alert-sc-info i {
    color: #3b82f6;
    font-size: 1.5rem;
    margin-top: 0.25rem;
}

.alert-sc-info strong {
    color: #1e293b;
    font-size: 1.05rem;
}

.alert-sc-info .alert-link {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 500;
}

.alert-sc-info .alert-link:hover {
    color: #1d4ed8;
}

/* Details page sections */
.details-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.section-header--no-border {
    padding-bottom: 0;
    border-bottom: none;
}

.section-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.5rem;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Website favicon styling */
.website-favicon {
    width: 48px;
    height: 48px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    flex-shrink: 0;
}

.website-favicon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.favicon-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 1.25rem;
}

/* Small favicon for list view */
.website-favicon-small {
    width: 32px;
    height: 32px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    flex-shrink: 0;
}

.website-favicon-small img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.favicon-placeholder-small {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-size: 0.875rem;
}

.section-title {
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.section-subtitle {
    color: #64748b;
    margin: 0.25rem 0 0 0;
    font-size: 0.95rem;
}

.text-muted {
    color: #475569 !important;
}

.text-muted-light {
    color: #64748b !important;
    font-size: 0.85rem;
}

.section-content {
    margin-top: 0;
}

/* ============================================
   SEARCH CONSOLE INTERACTIVE TILES
   ============================================ */

.sc-metric-tile {
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
    user-select: none;
}

/* Dim inactive tiles */
.sc-metric-tile[data-active="false"] {
    opacity: 0.45;
    transform: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}

/* Active tile: lift + coloured top-bar via inset shadow */
.sc-metric-tile[data-active="true"] {
    opacity: 1 !important;
    transform: translateY(-5px) !important;
}

.sc-metric-tile[data-active="true"][data-sc-metric="clicks"] {
    border-color: #3b82f6 !important;
    box-shadow: inset 0 3px 0 #3b82f6, 0 10px 28px rgba(59, 130, 246, 0.18) !important;
}

.sc-metric-tile[data-active="true"][data-sc-metric="impressions"] {
    border-color: #8b5cf6 !important;
    box-shadow: inset 0 3px 0 #8b5cf6, 0 10px 28px rgba(139, 92, 246, 0.18) !important;
}

.sc-metric-tile[data-active="true"][data-sc-metric="ctr"] {
    border-color: #10b981 !important;
    box-shadow: inset 0 3px 0 #10b981, 0 10px 28px rgba(16, 185, 129, 0.18) !important;
}

.sc-metric-tile[data-active="true"][data-sc-metric="position"] {
    border-color: #f59e0b !important;
    box-shadow: inset 0 3px 0 #f59e0b, 0 10px 28px rgba(245, 158, 11, 0.18) !important;
}

/* Keyboard focus ring */
.sc-metric-tile:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 3px;
}

/* ============================================
   CORE WEB VITALS INTERACTIVE TILES
   ============================================ */

.cwv-metric-tile {
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
    user-select: none;
}

.cwv-metric-tile[data-active="false"] {
    opacity: 0.45;
    transform: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}

.cwv-metric-tile[data-active="true"] {
    opacity: 1 !important;
    transform: translateY(-5px) !important;
}

.cwv-metric-tile[data-active="true"][data-cwv-metric="score"] {
    border-color: #3b82f6 !important;
    box-shadow: inset 0 3px 0 #3b82f6, 0 10px 28px rgba(59, 130, 246, 0.18) !important;
}

.cwv-metric-tile[data-active="true"][data-cwv-metric="lcp"] {
    border-color: #06b6d4 !important;
    box-shadow: inset 0 3px 0 #06b6d4, 0 10px 28px rgba(6, 182, 212, 0.18) !important;
}

.cwv-metric-tile[data-active="true"][data-cwv-metric="cls"] {
    border-color: #8b5cf6 !important;
    box-shadow: inset 0 3px 0 #8b5cf6, 0 10px 28px rgba(139, 92, 246, 0.18) !important;
}

.cwv-metric-tile[data-active="true"][data-cwv-metric="inp"] {
    border-color: #ef4444 !important;
    box-shadow: inset 0 3px 0 #ef4444, 0 10px 28px rgba(239, 68, 68, 0.18) !important;
}

.cwv-metric-tile:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 3px;
}

/* Device toggle styling */
.device-toggle {
    display: inline-flex;
    gap: 0.75rem;
    padding: 0.5rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.device-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    color: #64748b;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.device-btn i {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.device-btn:hover {
    background: rgba(59, 130, 246, 0.05);
    border-color: #93c5fd;
    color: #3b82f6;
}

.device-btn:hover i {
    transform: scale(1.1);
}

.device-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #3b82f6;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.device-btn.active i {
    transform: scale(1.05);
}

/* ============================================
   TABLE STYLES
   ============================================ */

/* Light themed table for organization list */
.details-section .table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.details-section .table thead {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.details-section .table thead th {
    color: #1e293b;
    font-weight: 600;
    padding: 1rem;
    border: none;
    background: transparent;
}

.details-section .table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
}

.details-section .table tbody tr:hover {
    background: #f8fafc;
}

.details-section .table tbody tr:last-child {
    border-bottom: none;
}

.details-section .table tbody td {
    color: #475569;
    padding: 1rem;
    font-weight: 500;
    border: none;
}

.details-section .table code {
    background: #eff6ff;
    color: #1e40af;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    border: 1px solid #bfdbfe;
}

.details-section .table .btn-config {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    color: #ffffff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.details-section .table .btn-config:hover {
    background: linear-gradient(90deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    color: #ffffff;
}

.details-section .table .btn-config i {
    margin-right: 0.25rem;
}

.details-section .table .btn-config--settings {
    background: linear-gradient(90deg, #64748b, #475569);
}

.details-section .table .btn-config--settings:hover {
    background: linear-gradient(90deg, #475569, #334155);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.4);
}

/* ============================================
   DATE RANGE PICKER
   ============================================ */

.date-range-picker-wrapper {
    position: sticky;
    top: 1rem;
    z-index: 100;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.date-range-picker {
    display: inline-flex;
    gap: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.35rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.date-range-picker.scrolled {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 1);
}

.date-range-picker .btn-check {
    display: none;
}

.date-range-picker label.btn.btn-outline-primary {
    background: transparent;
    border: none;
    color: #64748b;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.date-range-picker label.btn.btn-outline-primary:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
    border-color: transparent;
    transform: translateY(-1px);
}

.date-range-picker .btn-check:checked + label.btn.btn-outline-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    font-weight: 600;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

/* ============================================
   SIDEBAR TOGGLE BUTTON
   ============================================ */

#sidebarToggle {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    color: #ffffff;
    transition: all 0.3s ease;
}

#sidebarToggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* ============================================
   AUTH PAGES & FORMS
   ============================================ */

.auth-card {
    background: #ffffff;
    backdrop-filter: blur(10px);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.auth-input {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    color: #1e293b;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.auth-input:focus {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.1);
    color: #1e293b;
}

.auth-input::placeholder {
    color: #475569;
}

.auth-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 10px;
    padding: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    transition: all 0.3s ease;
}

.auth-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

/* Form inputs and selects */
.form-control,
.form-select {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    color: #1e293b;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.1);
    color: #1e293b;
    outline: none;
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-label {
    color: #334155;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Form select dropdown options */
.form-select option {
    background: #ffffff;
    color: #1e293b;
}

/* Cancel button styling */
.btn-outline-secondary {
    border-color: #cbd5e1;
    color: #64748b;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
    color: #475569;
}

/* ============================================
   MOBILE BOTTOM NAVIGATION
   ============================================ */

.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    padding: 0.5rem 0;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    flex: 1;
    color: #64748b;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.25rem;
    border-radius: 8px;
    transition: color 0.2s ease;
}

.mobile-nav-item i {
    font-size: 1.3rem;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    color: #3b82f6;
}

/* ============================================
   PAGE TOOLBAR
   ============================================ */

.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.625rem 1rem;
    gap: 0.75rem;
}

.page-toolbar-meta {
    color: #64748b;
    font-size: 0.875rem;
}

.page-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 767.98px) {
    main {
        padding: 1rem !important;
        padding-bottom: 5rem !important;
    }

    .details-section {
        padding: 1rem;
    }

    .section-title {
        font-size: 1.1rem;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .section-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .section-header .ms-auto {
        width: 100%;
    }

    .section-header .ms-auto .btn {
        width: 100%;
        text-align: center;
    }

    .date-range-picker-wrapper {
        position: static;
        justify-content: center;
        margin-bottom: 1rem;
    }

    .chart-card .card-body {
        padding: 1rem;
    }

    .echarts-chart-container {
        height: 200px;
    }

    .metric-tile .card-body {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }

    .metric-tile .card-body .fs-1 {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    .device-toggle {
        width: 100%;
        justify-content: center;
    }

    .device-btn {
        flex: 1;
        justify-content: center;
    }

    .page-toolbar {
        flex-wrap: wrap;
    }

    .page-toolbar-actions {
        width: 100%;
    }

    .page-toolbar-actions .btn {
        flex: 1;
        justify-content: center;
    }
}

/* ============================================
   ORGANIZATION WEBSITES LIST
   ============================================ */

.org-website-item {
    background: transparent;
    border-color: rgba(148, 163, 184, 0.15);
}

.org-website-url {
    color: #1e293b;
    font-weight: 500;
}

.org-website-icon {
    color: #94a3b8;
}

.org-website-arrow {
    color: #94a3b8;
    padding: 0.2rem 0.5rem;
}

.badge-active {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    font-size: 0.7rem;
}

.badge-inactive {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    font-size: 0.7rem;
}

/* Website page nav (Overview / Recommendations tabs) */
.website-page-nav {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0;
}

.website-page-nav__item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    border-radius: 4px 4px 0 0;
    transition: color 0.15s, border-color 0.15s;
}

.website-page-nav__item:hover {
    color: #1e293b;
    border-bottom-color: #cbd5e1;
}

.website-page-nav__item.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

/* Lighthouse Recommendations */
.lh-all-clear {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    color: #166534;
    font-size: 0.9rem;
}

.lh-group-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.lh-list {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.lh-item {
    border-bottom: 1px solid #e2e8f0;
}

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

.lh-item-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    min-height: 2.75rem;
}

.lh-score-dot {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.lh-score-dot--poor {
    background: #f97316;
}

.lh-score-dot--needs-improvement {
    background: #eab308;
}

.lh-title {
    font-size: 0.875rem;
    color: #1e293b;
    flex: 1 1 0;
    min-width: 0;
}

.lh-spacer {
    flex: 1 1 0;
}

.lh-savings {
    font-size: 0.75rem;
    font-weight: 600;
    color: #ea580c;
    white-space: nowrap;
    flex-shrink: 0;
}

.lh-savings--info {
    color: #64748b;
    font-weight: 400;
}

.lh-expand-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0.25rem;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.lh-expand-btn:hover {
    color: #475569;
    background: #f1f5f9;
}

.lh-expand-btn[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.lh-expand-btn i {
    display: block;
    transition: transform 0.2s;
}

.lh-description {
    padding: 0.5rem 0.875rem 0.75rem 2.125rem;
    font-size: 0.8125rem;
    color: #475569;
    line-height: 1.5;
    border-top: 1px solid #f1f5f9;
}

.lh-description a {
    color: #3b82f6;
    text-decoration: none;
}

.lh-description a:hover {
    text-decoration: underline;
}