/* =============================================================================
   theme.css – Support Tools | Paid On Results
   Separate stylesheet for all custom styles + dark mode support
   Linked by index.php, settings.php and all future pages
   Production-ready – June 2026
   ============================================================================= */

:root {
    --sidebar-width: 240px;
}

/* Light mode (default) */
body {
    background-color: #f8f9fa;
}

.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: #fff;
    border-right: 1px solid #dee2e6;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 2rem;
}

.nav-link {
    color: #495057;
    border-radius: 8px;
    margin: 2px 8px;
    padding: 10px 14px;
}

.nav-link.active {
    background-color: #e7f1ff;
    color: #0d6efd;
    font-weight: 600;
}

.nav-link:hover {
    background-color: #f1f3f5;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #dee2e6;
}

.welcome-header {
    font-size: 1.85rem;
    font-weight: 700;
}

.holding-card {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

/* Settings page specific */
.table th {
    font-weight: 600;
    color: #495057;
}

.modal-header {
    background-color: #f8f9fa;
}

.status-badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
}

/* Theme cog in sidebar */
#themeCog {
    font-size: 1.1rem;
    opacity: 0.75;
    transition: opacity 0.2s ease;
    line-height: 1;
}

#themeCog:hover {
    opacity: 1;
}

/* =============================================================================
   DARK MODE OVERRIDES (applied when html[data-bs-theme="dark"])
   Bootstrap 5.3+ data-bs-theme handles most components automatically.
   These rules only cover custom elements + strong fixes for Settings page.
   ============================================================================= */
[data-bs-theme="dark"] body {
    background-color: #212529;
}

[data-bs-theme="dark"] .sidebar {
    background: #2b3035;
    border-right: 1px solid #495057;
}

[data-bs-theme="dark"] .nav-link {
    color: #adb5bd;
}

[data-bs-theme="dark"] .nav-link.active {
    background-color: #495057;
    color: #fff;
}

[data-bs-theme="dark"] .nav-link:hover {
    background-color: #495057;
}

[data-bs-theme="dark"] .main-content {
    color: #dee2e6;
}

[data-bs-theme="dark"] .user-avatar {
    border-color: #495057;
}

[data-bs-theme="dark"] .table th {
    color: #adb5bd;
}

[data-bs-theme="dark"] .modal-header {
    background-color: #2b3035;
}

[data-bs-theme="dark"] .card {
    background-color: #2b3035;
    border-color: #495057;
}

[data-bs-theme="dark"] .card-header {
    background-color: #2b3035 !important;
    border-color: #495057;
}

[data-bs-theme="dark"] .card-header.bg-white {
    background-color: #2b3035 !important;
}

[data-bs-theme="dark"] .card-footer {
    background-color: #2b3035;
    border-color: #495057;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #2b3035;
    border-color: #495057;
    color: #dee2e6;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: #343a40;
    border-color: #0d6efd;
    color: #fff;
}

[data-bs-theme="dark"] .text-muted {
    color: #6c757d !important;
}

/* Strong dark mode fixes for Settings table header */
[data-bs-theme="dark"] .table-light {
    --bs-table-bg: #2b3035;
    --bs-table-color: #dee2e6;
    background-color: #2b3035;
    color: #dee2e6;
}

[data-bs-theme="dark"] thead.table-light th {
    background-color: #343a40 !important;
    color: #dee2e6;
    border-color: #495057;
}

[data-bs-theme="dark"] .table {
    border-color: #495057;
}

[data-bs-theme="dark"] .table td,
[data-bs-theme="dark"] .table th {
    border-color: #495057;
}

/* =============================================================================
   TOOL CARDS – Dashboard grid layout (4 per row)
   Nice hover lift + shadow + accent border. Works in light + dark mode.
   ============================================================================= */
.tool-card {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.2s cubic-bezier(0.4, 0.0, 0.2, 1),
                border-color 0.2s ease;
    border: 1px solid #dee2e6;
}

.tool-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1) !important;
    border-color: #0d6efd;
}

.tool-card .card-body {
    padding: 1.5rem;
}

.tool-card .bi {
    transition: transform 0.2s ease;
}

.tool-card:hover .bi {
    transform: scale(1.1);
}

/* Dark mode for tool cards */
[data-bs-theme="dark"] .tool-card {
    border-color: #495057;
    background-color: #2b3035;
}

[data-bs-theme="dark"] .tool-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3) !important;
}

/* =============================================================================
   CONTENT SAFETY CHECKER – Recommendation box (dark mode readability fix)
   Ensures the white recommendation boxes have proper contrast in dark mode.
   Used in safety-checker/index.php for the RECOMMENDATION section.
   ============================================================================= */
.recommendation-box {
    background-color: #f8f9fa;
}

[data-bs-theme="dark"] .recommendation-box {
    background-color: #2b3035;
}