/* ============================================
   MacReplayXC - Modern Design System
   Based on Tabler.io with enhanced theming
   Fork by Un1x
   ============================================ */

/* ============================================
   Global Enhancements
   ============================================ */

:root {
    --macreplay-transition: all 0.2s ease-in-out;
    --macreplay-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --macreplay-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --macreplay-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

/* Global body and page background */
[data-bs-theme="light"] body,
[data-bs-theme="light"] .page,
[data-bs-theme="light"] .page-wrapper {
    background-color: #f8fafc;
    color: #1e293b;
}

[data-bs-theme="dark"] body,
[data-bs-theme="dark"] .page,
[data-bs-theme="dark"] .page-wrapper {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

/* Code element styling */
[data-bs-theme="light"] code {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
}

[data-bs-theme="dark"] code {
    background-color: #f8fafc !important;
    color: #1a1a1a !important;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
}

/* Override Tabler CSS variables - green theme */
:root {
    --tblr-primary: #10b981;
    --tblr-primary-rgb: 16, 185, 129;
}

[data-bs-theme="light"] {
    --tblr-primary: #10b981;
    --tblr-primary-rgb: 16, 185, 129;
    --tblr-link-color: #10b981;
    --tblr-link-hover-color: #059669;
}

[data-bs-theme="dark"] {
    --tblr-body-bg: #1a1a1a;
    --tblr-body-color: #e0e0e0;
    --tblr-card-bg: #2a2a2a;
    --tblr-border-color: #404040;
    --tblr-primary: #10b981;
    --tblr-primary-rgb: 16, 185, 129;
    --tblr-link-color: #10b981;
    --tblr-link-hover-color: #6ee7b7;
    --tblr-bg-surface: #2a2a2a;
    --tblr-bg-surface-secondary: #1f1f1f;
    --tblr-bg-surface-tertiary: #1a1a1a;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.navbar-brand i {
    font-size: 1.5rem;
    vertical-align: middle;
    margin-right: 0.25rem;
}

/* ============================================
   Card System - Enhanced
   ============================================ */

.card {
    border-radius: 0.75rem;
    border: 1px solid;
    transition: var(--macreplay-transition);
    overflow: hidden;
}

[data-bs-theme="light"] .card {
    background-color: #ffffff;
    border-color: #e2e8f0;
    box-shadow: var(--macreplay-shadow-sm);
}

[data-bs-theme="dark"] .card {
    background-color: #2a2a2a;
    border-color: #404040;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.5);
}

/* No hover effects on cards */

/* Portal cards - enhanced design */
.portal-card {
    transition: border-color 0.2s ease;
}

.portal-card:hover {
    border-color: #10b981 !important;
}

.portal-card .avatar {
    width: 3rem;
    height: 3rem;
    font-size: 1.5rem;
}

.card-status-top {
    height: 3px;
}

.card-title {
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.card-subtitle {
    font-size: 0.875rem;
    opacity: 0.7;
}

/* Card header backgrounds - green instead of blue */
.card-header.bg-primary-lt,
.bg-primary-lt {
    background-color: rgba(16, 185, 129, 0.15) !important;
    color: #065f46 !important;
}

.bg-primary {
    background-color: #10b981 !important;
}

.text-primary {
    color: #10b981 !important;
}

/* Light mode */
[data-bs-theme="light"] .card-header.bg-primary-lt,
[data-bs-theme="light"] .bg-primary-lt {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
}

[data-bs-theme="light"] .bg-primary {
    background-color: #10b981 !important;
}

[data-bs-theme="light"] .text-primary {
    color: #10b981 !important;
}

/* Dark mode */
[data-bs-theme="dark"] .card-header.bg-primary-lt,
[data-bs-theme="dark"] .bg-primary-lt {
    background-color: rgba(16, 185, 129, 0.15) !important;
    color: #6ee7b7 !important;
}

[data-bs-theme="dark"] .bg-primary {
    background-color: #10b981 !important;
}

[data-bs-theme="dark"] .text-primary {
    color: #10b981 !important;
}

/* Avatar backgrounds */
.avatar.bg-primary-lt {
    background-color: rgba(16, 185, 129, 0.15) !important;
    color: #065f46 !important;
}

[data-bs-theme="dark"] .avatar.bg-primary-lt {
    background-color: rgba(16, 185, 129, 0.15) !important;
    color: #6ee7b7 !important;
}

/* Genre card active state */
.card.card-active {
    border-color: #10b981 !important;
}

[data-bs-theme="light"] .card.card-active {
    background-color: #d1fae5 !important;
    border-color: #10b981 !important;
}

[data-bs-theme="dark"] .card.card-active {
    background-color: rgba(16, 185, 129, 0.15) !important;
    border-color: #10b981 !important;
}

/* ============================================
   Badge System - Theme Aware
   ============================================ */

.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 0.375rem;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
}

/* Light Theme Badges */
[data-bs-theme="light"] .badge.bg-success {
    background-color: #10b981 !important;
    color: #ffffff !important;
    border-color: #059669;
}

[data-bs-theme="light"] .badge.bg-danger {
    background-color: #ef4444 !important;
    color: #ffffff !important;
    border-color: #dc2626;
}

[data-bs-theme="light"] .badge.bg-warning {
    background-color: #f59e0b !important;
    color: #ffffff !important;
    border-color: #d97706;
}

[data-bs-theme="light"] .badge.bg-info {
    background-color: #10b981 !important;
    color: #ffffff !important;
    border-color: #059669;
}

[data-bs-theme="light"] .badge.bg-primary {
    background-color: #10b981 !important;
    color: #ffffff !important;
    border-color: #059669;
}

[data-bs-theme="light"] .badge.bg-secondary {
    background-color: #64748b !important;
    color: #ffffff !important;
    border-color: #475569;
}

/* Light Theme - "lt" variants (subtle backgrounds) */
[data-bs-theme="light"] .badge.bg-success-lt {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
    border-color: #a7f3d0;
}

[data-bs-theme="light"] .badge.bg-danger-lt {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
    border-color: #fecaca;
}

[data-bs-theme="light"] .badge.bg-warning-lt {
    background-color: #fef3c7 !important;
    color: #92400e !important;
    border-color: #fde68a;
}

[data-bs-theme="light"] .badge.bg-info-lt {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
    border-color: #a7f3d0;
}

[data-bs-theme="light"] .badge.bg-primary-lt {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
    border-color: #a7f3d0;
}

[data-bs-theme="light"] .badge.bg-secondary-lt {
    background-color: #f1f5f9 !important;
    color: #334155 !important;
    border-color: #e2e8f0;
}

/* Dark Theme Badges */
[data-bs-theme="dark"] .badge.bg-success {
    background-color: #059669 !important;
    color: #ffffff !important;
    border-color: #047857;
}

[data-bs-theme="dark"] .badge.bg-danger {
    background-color: #dc2626 !important;
    color: #ffffff !important;
    border-color: #b91c1c;
}

[data-bs-theme="dark"] .badge.bg-warning {
    background-color: #d97706 !important;
    color: #ffffff !important;
    border-color: #b45309;
}

[data-bs-theme="dark"] .badge.bg-info {
    background-color: #555555 !important;
    color: #ffffff !important;
    border-color: #404040;
}

[data-bs-theme="dark"] .badge.bg-primary {
    background-color: #666666 !important;
    color: #ffffff !important;
    border-color: #555555;
}

[data-bs-theme="dark"] .badge.bg-secondary {
    background-color: #4a4a4a !important;
    color: #ffffff !important;
    border-color: #3a3a3a;
}

/* Dark Theme - "lt" variants (subtle backgrounds) */
[data-bs-theme="dark"] .badge.bg-success-lt {
    background-color: rgba(16, 185, 129, 0.15) !important;
    color: #6ee7b7 !important;
    border-color: rgba(16, 185, 129, 0.3);
}

[data-bs-theme="dark"] .badge.bg-danger-lt {
    background-color: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
    border-color: rgba(239, 68, 68, 0.3);
}

[data-bs-theme="dark"] .badge.bg-warning-lt {
    background-color: rgba(245, 158, 11, 0.15) !important;
    color: #fcd34d !important;
    border-color: rgba(245, 158, 11, 0.3);
}

[data-bs-theme="dark"] .badge.bg-info-lt {
    background-color: rgba(85, 85, 85, 0.2) !important;
    color: #b0b0b0 !important;
    border-color: rgba(85, 85, 85, 0.4);
}

[data-bs-theme="dark"] .badge.bg-primary-lt {
    background-color: rgba(102, 102, 102, 0.2) !important;
    color: #c0c0c0 !important;
    border-color: rgba(102, 102, 102, 0.4);
}

[data-bs-theme="dark"] .badge.bg-secondary-lt {
    background-color: rgba(74, 74, 74, 0.2) !important;
    color: #a0a0a0 !important;
    border-color: rgba(74, 74, 74, 0.4);
}

/* ============================================
   Button System
   ============================================ */

.btn {
    font-weight: 500;
    border-radius: 0.5rem;
    transition: var(--macreplay-transition);
    border-width: 1px;
}

.btn-group-sm > .btn, 
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
}

/* Button overrides - green instead of blue */
.btn-primary {
    background-color: #10b981;
    border-color: #059669;
    color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #059669;
    border-color: #047857;
    color: #ffffff;
}

.btn-outline-primary {
    color: #10b981;
    border-color: #10b981;
}

.btn-outline-primary:hover {
    background-color: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

/* Light mode specific */
[data-bs-theme="light"] .btn-primary {
    background-color: #10b981;
    border-color: #059669;
    color: #ffffff;
}

[data-bs-theme="light"] .btn-primary:hover,
[data-bs-theme="light"] .btn-primary:focus {
    background-color: #059669;
    border-color: #047857;
    color: #ffffff;
}

/* Dark mode button overrides */
[data-bs-theme="dark"] .btn-primary {
    background-color: #10b981;
    border-color: #059669;
    color: #ffffff;
}

[data-bs-theme="dark"] .btn-primary:hover,
[data-bs-theme="dark"] .btn-primary:focus {
    background-color: #059669;
    border-color: #047857;
    color: #ffffff;
}

[data-bs-theme="dark"] .btn-outline-primary {
    color: #10b981;
    border-color: #10b981;
}

[data-bs-theme="dark"] .btn-outline-primary:hover {
    background-color: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

[data-bs-theme="dark"] .btn-info {
    background-color: #555555;
    border-color: #404040;
    color: #ffffff;
}

[data-bs-theme="dark"] .btn-info:hover {
    background-color: #666666;
    border-color: #555555;
    color: #ffffff;
}

/* ============================================
   Table System
   ============================================ */

.table-responsive {
    border-radius: 0.75rem;
    overflow: hidden;
}

/* make the table in cards with this class reach the card edges */
.card-table-fullwidth .card-body {
    padding: 0 !important;
}

.card-table-fullwidth .table-responsive {
    border-radius: 0 !important;
    margin: 0;
    overflow: visible !important; /* ensure scaled switches and pseudo-elements aren't clipped */
}

.card-table-fullwidth .table {
    margin-bottom: 0;
}

/* No hover effects */

/* Compact table style for the editor table */
.table-compact th,
.table-compact td {
    padding-top: 0.3rem !important;
    padding-bottom: 0.3rem !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    vertical-align: middle !important;
    font-size: 0.9rem;
    overflow: visible !important; /* avoid clipping of scaled switches */
}


.table-compact thead th {
    font-size: 0.85rem;
    padding-top: 0.2rem !important;
    padding-bottom: 0.2rem !important;
}

.table-compact .form-check {
    margin: 0;
    display: inline-flex; /* align and center the switch vertically */
    align-items: center;
    justify-content: center;
    height: auto; /* allow natural height so switch isn't clipped */
    overflow: visible; /* make sure switch knob isn't hidden */
}

.table-compact .form-check-input {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    vertical-align: middle;
    display: inline-block;
    transform-origin: center center; /* ensure transform scales from center */
    min-width: 0.9rem;
    min-height: 0.9rem;
    box-sizing: content-box;
}

/* Specific tuning for the switch style (form-switch) used in the editor */
.table-compact .form-check.form-switch {
    padding-left: 0;
    padding-right: 0;
}

.table-compact .form-check.form-switch .form-check-input {
    transform: scale(0.8); /* shrink the visual size of the switch */
    margin: 0 0.1rem;
    margin-left: 0.2rem;
    z-index: 1; /* ensure the switch is above other elements */
}

/* Keep the switch at the same scaled size on hover to avoid visual jump/clip */
.table-compact .form-check.form-switch .form-check-input:hover {
    transform: scale(0.8) !important;
}

/* No hover effects in tables */

.table-compact .form-control,
.table-compact .form-select {
    font-size: 0.85rem;
    padding: 0.25rem 0.35rem;
    height: auto;
}

.table-compact .btn {
    padding: 0.25rem 0.35rem;
    font-size: 0.85rem;
}

/* Reduce height for table rows that contain icon-only buttons */
.table-compact td .btn-sm { padding: 0.2rem 0.35rem; }

/* center first column (checkbox column) and constrain width slightly */
.table-compact th:first-child,
.table-compact td:first-child {
    text-align: center;
    width: 60px; /* allow extra space for the switch */
    max-width: 60px;
    padding-left: 0.3rem;
    padding-right: 0.3rem;
}


.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success/Error states */
.success-flash {
    animation: fadeIn 0.5s;
}

.error-flash {
    animation: shake 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Theme-specific styles - use data-bs-theme instead of prefers-color-scheme */
/* Light theme (default) - no overrides needed, Tabler handles it */

/* Dark theme overrides */
[data-bs-theme="dark"] .card {
    background-color: #2a2a2a;
    border-color: #404040;
}

[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: #1f1f1f;
}

[data-bs-theme="dark"] .alert-info {
    background-color: rgba(85, 85, 85, 0.2);
    border-color: rgba(85, 85, 85, 0.4);
    color: #e0e0e0;
}

[data-bs-theme="dark"] .form-hint {
    color: #a0a0a0;
}

/* Light theme - ensure proper colors */
[data-bs-theme="light"] .card {
    background-color: #ffffff;
    border-color: #e2e8f0;
}

[data-bs-theme="light"] .alert-info {
    background-color: #e7f5ff;
    border-color: #b3d9ff;
    color: #1e293b;
}

[data-bs-theme="light"] .form-hint {
    color: #64748b;
}

[data-bs-theme="light"] .card-subtitle {
    color: #64748b;
}

/* ============================================
   Form System
   ============================================ */

.form-control,
.form-select {
    border-radius: 0.5rem;
    border: 1px solid;
    transition: var(--macreplay-transition);
}

[data-bs-theme="light"] .form-control,
[data-bs-theme="light"] .form-select {
    border-color: #cbd5e1;
    background-color: #ffffff;
}

[data-bs-theme="light"] .form-control:focus,
[data-bs-theme="light"] .form-select:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.15);
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    border-color: #404040;
    background-color: #2a2a2a;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    border-color: #666666;
    box-shadow: 0 0 0 0.25rem rgba(102, 102, 102, 0.15);
}

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

.form-hint {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Form switch/checkbox - green instead of blue */
.form-check-input:checked {
    background-color: #10b981;
    border-color: #10b981;
}

.form-check-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.25);
}

.form-switch .form-check-input:checked {
    background-color: #10b981;
}

[data-bs-theme="light"] .form-check-input:checked {
    background-color: #10b981;
    border-color: #10b981;
}

[data-bs-theme="dark"] .form-check-input:checked {
    background-color: #10b981;
    border-color: #10b981;
}

/* Form selectgroup (radio/checkbox groups) */
[data-bs-theme="dark"] .form-selectgroup-label {
    background-color: #2a2a2a;
    border-color: #404040;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .form-selectgroup-input:checked + .form-selectgroup-label {
    background-color: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

[data-bs-theme="dark"] .form-selectgroup-input:focus + .form-selectgroup-label {
    border-color: #10b981;
    box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.25);
}

/* ============================================
   Modal System
   ============================================ */

.modal-content {
    border-radius: 0.75rem;
    border: none;
}

[data-bs-theme="light"] .modal-content {
    background-color: #ffffff;
    box-shadow: var(--macreplay-shadow-lg);
}

[data-bs-theme="dark"] .modal-content {
    background-color: #2a2a2a;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.7);
}

/* Modal backdrop/blur - remove blue tint */
[data-bs-theme="dark"] .modal-backdrop,
[data-bs-theme="dark"] .modal.modal-blur .modal-backdrop {
    background-color: rgba(0, 0, 0, 0.7) !important;
}

[data-bs-theme="dark"] .modal.modal-blur::before {
    background-color: rgba(0, 0, 0, 0.5) !important;
}

.modal-header {
    border-bottom: 1px solid;
    padding: 1.25rem 1.5rem;
}

[data-bs-theme="light"] .modal-header {
    border-color: #e2e8f0;
}

[data-bs-theme="dark"] .modal-header {
    border-color: #404040;
}

.modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid;
    padding: 1rem 1.5rem;
}

[data-bs-theme="light"] .modal-footer {
    border-color: #e2e8f0;
}

[data-bs-theme="dark"] .modal-footer {
    border-color: #404040;
}

/* ============================================
   Alert System
   ============================================ */

.alert {
    border-radius: 0.5rem;
    border: 1px solid;
    padding: 1rem 1.25rem;
}

[data-bs-theme="light"] .alert-success {
    background-color: #d1fae5;
    border-color: #a7f3d0;
    color: #065f46;
}

[data-bs-theme="light"] .alert-danger {
    background-color: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

[data-bs-theme="light"] .alert-warning {
    background-color: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
}

[data-bs-theme="light"] .alert-info {
    background-color: #e7f5ff;
    border-color: #b3d9ff;
    color: #1e293b;
}

[data-bs-theme="dark"] .alert-success {
    background-color: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

[data-bs-theme="dark"] .alert-danger {
    background-color: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

[data-bs-theme="dark"] .alert-warning {
    background-color: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}

[data-bs-theme="dark"] .alert-info {
    background-color: #2a2a2a !important;
    border-color: #404040 !important;
    color: #e0e0e0 !important;
}

/* ============================================
   Dropdown System
   ============================================ */

.dropdown-menu {
    border-radius: 0.5rem;
    border: 1px solid;
    padding: 0.5rem;
}

[data-bs-theme="light"] .dropdown-menu {
    background-color: #ffffff;
    border-color: #e2e8f0;
    box-shadow: var(--macreplay-shadow-md);
}

[data-bs-theme="dark"] .dropdown-menu {
    background-color: #2a2a2a;
    border-color: #404040;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.6);
}

.dropdown-item {
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
}

[data-bs-theme="light"] .dropdown-item.active {
    background-color: #10b981;
    color: #ffffff;
}

[data-bs-theme="dark"] .dropdown-item.active {
    background-color: #555555;
    color: #ffffff;
}

/* Theme switcher dropdown - neutral colors */
[data-bs-theme="dark"] #themeDropdown .dropdown-item {
    color: #e0e0e0;
}

[data-bs-theme="dark"] #themeDropdown .dropdown-item:hover {
    background-color: #333333;
    color: #e0e0e0;
}

[data-bs-theme="dark"] #themeDropdown .dropdown-item.active {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

[data-bs-theme="dark"] #themeDropdown .dropdown-item i {
    color: #e0e0e0 !important;
}

[data-bs-theme="light"] #themeDropdown .dropdown-item.active {
    background-color: #f8fafc;
    color: #1a1a1a;
}

/* ============================================
   Navbar System - Modern Single Bar
   ============================================ */

/* Navbar wrapper */
.navbar-wrapper {
    position: sticky;
    top: 0;
    z-index: 1030;
}

[data-bs-theme="light"] .navbar-wrapper {
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

[data-bs-theme="dark"] .navbar-wrapper {
    background-color: #0a0a0a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Main navbar */
.navbar {
    padding: 0.5rem 0;
    border: none;
    background: transparent !important;
}

/* Navbar brand */
.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    padding: 0.5rem 0;
    margin-right: 2rem;
    display: flex;
    align-items: center;
    text-decoration: none;
}

[data-bs-theme="light"] .navbar-brand {
    color: #1e293b;
}

[data-bs-theme="dark"] .navbar-brand {
    color: #ffffff !important;
}

.navbar-brand i {
    color: #10b981;
    font-size: 1.4rem;
    margin-right: 0.5rem;
}

/* Nav links */
.navbar-nav .nav-link {
    padding: 0.5rem 0.875rem;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    margin: 0 0.125rem;
    transition: all 0.15s ease;
}

[data-bs-theme="light"] .navbar-nav .nav-link {
    color: #64748b;
}

[data-bs-theme="light"] .navbar-nav .nav-link:hover {
    color: #1e293b;
    background-color: #f1f5f9;
}

[data-bs-theme="light"] .navbar-nav .nav-link.active {
    color: #ffffff;
    background-color: #10b981;
}

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

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

[data-bs-theme="dark"] .navbar-nav .nav-link.active {
    color: #ffffff;
    background-color: #10b981;
}

/* Nav link icons */
.navbar-nav .nav-link i {
    font-size: 1.1rem;
    vertical-align: -2px;
}

/* Navbar toggler for mobile */
[data-bs-theme="dark"] .navbar-toggler {
    border-color: #404040;
}

[data-bs-theme="dark"] .navbar-toggler-icon {
    filter: invert(1);
}

/* Dropdown in navbar */
.navbar-nav .dropdown-menu {
    margin-top: 0.5rem;
}

/* Container alignment - remove custom padding, let Tabler handle it */
/* Tabler's default container system already provides symmetric padding */

/* ============================================
   Pagination System
   ============================================ */

.pagination {
    gap: 0.25rem;
}

.page-link {
    border-radius: 0.375rem;
    border: 1px solid;
}

[data-bs-theme="light"] .page-link {
    background-color: #ffffff;
    border-color: #cbd5e1;
    color: #475569;
}

[data-bs-theme="light"] .page-item.active .page-link {
    background-color: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

[data-bs-theme="dark"] .page-link {
    background-color: #2a2a2a;
    border-color: #404040;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .page-item.active .page-link {
    background-color: #555555;
    border-color: #555555;
    color: #ffffff;
}

/* ============================================
   Progress Bar System
   ============================================ */

.progress {
    border-radius: 0.5rem;
    overflow: hidden;
}

[data-bs-theme="light"] .progress {
    background-color: #e2e8f0;
}

[data-bs-theme="dark"] .progress {
    background-color: #3a3a3a;
}

.progress-bar {
    transition: width 0.3s ease;
}

/* ============================================
   List Group System
   ============================================ */

.list-group-item {
    border: 1px solid;
}

[data-bs-theme="light"] .list-group-item {
    background-color: #ffffff;
    border-color: #e2e8f0;
}

[data-bs-theme="dark"] .list-group-item {
    background-color: #2a2a2a;
    border-color: #404040;
    color: #e0e0e0;
}

/* ============================================
   Utility Classes
   ============================================ */

.text-muted {
    opacity: 0.7;
}

/* Links - green instead of blue in dark mode */
[data-bs-theme="dark"] a {
    color: #10b981;
}

[data-bs-theme="dark"] a:hover {
    color: #6ee7b7;
}

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

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

[data-bs-theme="dark"] .navbar-brand a,
[data-bs-theme="dark"] .navbar-brand {
    color: #ffffff !important;
}

/* Remove all blue focus rings in dark mode */
[data-bs-theme="dark"] *:focus {
    outline-color: #10b981 !important;
}

[data-bs-theme="dark"] .btn:focus,
[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.25) !important;
}

[data-bs-theme="dark"] .btn-primary:focus {
    box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.4) !important;
}

[data-bs-theme="dark"] .btn-success:focus {
    box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.4) !important;
}

[data-bs-theme="dark"] .btn-secondary:focus {
    box-shadow: 0 0 0 0.25rem rgba(74, 74, 74, 0.4) !important;
}

.border-start {
    border-left: 3px solid !important;
}

[data-bs-theme="light"] .border-primary {
    border-color: #10b981 !important;
}

[data-bs-theme="dark"] .border-primary {
    border-color: #666666 !important;
}

[data-bs-theme="light"] .border-success {
    border-color: #10b981 !important;
}

[data-bs-theme="dark"] .border-success {
    border-color: #059669 !important;
}

[data-bs-theme="light"] .border-danger {
    border-color: #ef4444 !important;
}

[data-bs-theme="dark"] .border-danger {
    border-color: #dc2626 !important;
}

[data-bs-theme="light"] .border-warning {
    border-color: #f59e0b !important;
}

[data-bs-theme="dark"] .border-warning {
    border-color: #d97706 !important;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    padding: 1.5rem 0;
    margin-top: 3rem;
}

[data-bs-theme="light"] .footer {
    border-top: 1px solid #e2e8f0;
    color: #64748b;
}

[data-bs-theme="dark"] .footer {
    border-top: 1px solid #404040;
    color: #a0a0a0;
}

/* ============================================
   Scrollbar Styling
   ============================================ */

[data-bs-theme="light"] ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

[data-bs-theme="light"] ::-webkit-scrollbar-track {
    background: #f1f5f9;
}

[data-bs-theme="light"] ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

[data-bs-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

[data-bs-theme="dark"] ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-track {
    background: #1a1a1a;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 5px;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #555555;
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .table-compact th,
    .table-compact td {
        font-size: 0.8rem;
        padding: 0.25rem !important;
    }
}

/* ============================================
   Toast Notifications
   ============================================ */

.toast-container {
    margin-top: 60px; /* Below navbar */
}

.toast {
    border-radius: 0.5rem;
    box-shadow: var(--macreplay-shadow-lg);
    min-width: 350px;
    max-width: 400px;
}

[data-bs-theme="light"] .toast {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
}

[data-bs-theme="dark"] .toast {
    background-color: #2a2a2a;
    border: 1px solid #404040;
}

.toast-header {
    border-bottom: 1px solid;
    padding: 0.75rem 1rem;
}

[data-bs-theme="light"] .toast-header {
    background-color: #f8fafc;
    border-bottom-color: #e2e8f0;
    color: #1e293b;
}

[data-bs-theme="dark"] .toast-header {
    background-color: #1f1f1f;
    border-bottom-color: #404040;
    color: #e0e0e0;
}

.toast-header .avatar {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-body {
    padding: 0.75rem 1rem;
}

[data-bs-theme="light"] .toast-body {
    color: #1e293b;
}

[data-bs-theme="dark"] .toast-body {
    color: #e0e0e0;
}

.toast .btn-close {
    opacity: 0.6;
}

.toast .btn-close:hover {
    opacity: 1;
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .navbar,
    .footer,
    .btn,
    .d-print-none {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000;
        box-shadow: none;
    }
} 