/* ========================================
   🎵 Worship Schedule Manager - Modern Dark UI
   ======================================== */

:root {
    /* Primary Colors - Vibrant Purple/Blue Gradient Theme */
    --primary-gradient: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%);
    --primary-color: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #a78bfa;

    /* Secondary Colors */
    --secondary-color: #94a3b8;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #f43f5e;
    --info-color: #06b6d4;

    /* Dark Theme Colors */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
    --border-light: #475569;

    /* Accent Colors */
    --accent-purple: #a855f7;
    --accent-pink: #ec4899;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-green: #22c55e;

    /* Glass Effect */
    --glass-bg: rgba(30, 41, 59, 0.8);
    --glass-border: rgba(148, 163, 184, 0.1);

    /* Shadows - for dark theme */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.3);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Base Styles
   ======================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Typography
   ======================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 0.5em;
}

h1 {
    font-size: 1.75rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

h4 {
    font-size: 1.125rem;
}

@media (min-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }
}

h1:focus {
    outline: none;
}

/* ========================================
   Links & Buttons
   ======================================== */

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    transition: all var(--transition);
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 50%, #2563eb 100%);
    color: white;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    color: white;
    border: none;
}

.btn-outline-primary {
    background: transparent;
    border: 1.5px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-outline-secondary {
    background: transparent;
    border: 1.5px solid var(--border-light);
    color: var(--text-secondary);
}

.btn-outline-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.btn-outline-danger {
    background: transparent;
    border: 1.5px solid var(--danger-color);
    color: var(--danger-color);
}

.btn-outline-danger:hover {
    background: var(--danger-color);
    color: white;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
    outline: none;
}

/* ========================================
   Cards - Modern Dark Design
   ======================================== */

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all var(--transition);
    backdrop-filter: blur(10px);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--border-light);
}

.card-header {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
}

/* Gradient Cards */
.card.bg-primary {
    background: var(--primary-gradient) !important;
    border: none;
    box-shadow: var(--shadow-glow);
}

.card.bg-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    border: none;
}

.card.bg-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
    border: none;
}

.card.bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    border: none;
    color: white !important;
}

.card.bg-warning .card-subtitle,
.card.bg-warning .card-title {
    color: white !important;
}

/* ========================================
   Statistics Cards
   ======================================== */

.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    font-size: 1.5rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ========================================
   Forms - Dark Theme
   ======================================== */

.form-control {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25), 0 0 15px rgba(139, 92, 246, 0.15);
    outline: none;
    background-color: var(--bg-secondary);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-select {
    display: block;
    width: 100%;
    padding: 0.625rem 2.5rem 0.625rem 0.875rem;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius);
    transition: all var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25), 0 0 15px rgba(139, 92, 246, 0.15);
    outline: none;
    background-color: var(--bg-secondary);
}

.form-label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-control {
    border-radius: 0 var(--radius) var(--radius) 0;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--text-secondary);
    background-color: var(--bg-tertiary);
    border: 1.5px solid var(--border-color);
    border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
}

.form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0.125rem;
    border: 1.5px solid var(--border-light);
    border-radius: 0.25rem;
    transition: all var(--transition);
    background-color: var(--bg-tertiary);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    border-color: var(--success-color);
}

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

.validation-message {
    color: var(--danger-color);
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}

/* ========================================
   Tables - Dark Theme
   ======================================== */

.table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: collapse;
    color: var(--text-primary);
}

.table thead th {
    background: var(--bg-tertiary);
    padding: 0.875rem 1rem;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9375rem;
    color: var(--text-primary);
}

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

.table-hover tbody tr {
    transition: background-color var(--transition-fast);
}

.table-hover tbody tr:hover {
    background-color: rgba(139, 92, 246, 0.08);
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mobile Table Styles */
@media (max-width: 768px) {
    .table-mobile-cards thead {
        display: none;
    }

    .table-mobile-cards tbody tr {
        display: block;
        background: var(--bg-secondary);
        border-radius: var(--radius-lg);
        margin-bottom: 0.75rem;
        padding: 1rem;
        box-shadow: var(--shadow);
        border: 1px solid var(--border-color);
    }

    .table-mobile-cards tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .table-mobile-cards tbody td:last-child {
        border-bottom: none;
    }

    .table-mobile-cards tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.75rem;
        text-transform: uppercase;
        color: var(--text-secondary);
    }
}

/* ========================================
   Badges - Dark Theme
   ======================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    line-height: 1.4;
}

.badge.bg-primary {
    background: rgba(139, 92, 246, 0.2) !important;
    color: #a78bfa;
}

.badge.bg-success {
    background: rgba(34, 197, 94, 0.2) !important;
    color: #4ade80;
}

.badge.bg-warning {
    background: rgba(245, 158, 11, 0.2) !important;
    color: #fbbf24;
}

.badge.bg-danger {
    background: rgba(244, 63, 94, 0.2) !important;
    color: #fb7185;
}

.badge.bg-info {
    background: rgba(6, 182, 212, 0.2) !important;
    color: #22d3ee;
}

.badge.bg-secondary {
    background: rgba(148, 163, 184, 0.2) !important;
    color: var(--text-secondary);
}

.badge-solid.bg-primary {
    background: var(--primary-gradient) !important;
    color: white !important;
}

.badge-solid.bg-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    color: white !important;
}

/* ========================================
   Modals - Dark Theme
   ======================================== */

.modal {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.modal-dialog {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: auto;
    z-index: 1051;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), var(--shadow-glow);
    border: 1px solid var(--border-color);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    color: var(--text-primary);
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.btn-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    opacity: 0.7;
    filter: invert(1);
}

.btn-close:hover {
    opacity: 1;
    background: var(--border-light);
}

/* ========================================
   Spinner & Loading - Dark Theme
   ======================================== */

.spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 3px;
    border-color: var(--primary-color);
    border-right-color: transparent;
}

.loading-skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ========================================
   List Groups - Dark Theme
   ======================================== */

.list-group {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    list-style: none;
}

.list-group-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border: none;
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-fast);
    color: var(--text-primary);
}

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

.list-group-item:hover {
    background: var(--bg-tertiary);
}

.list-group-flush .list-group-item:first-child {
    border-top: none;
}

/* ========================================
   Content Area - Dark Theme
   ======================================== */

.content {
    padding-top: 1rem;
    padding-bottom: 2rem;
}

.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
}

/* ========================================
   Error Boundary - Dark Theme
   ======================================== */

.blazor-error-boundary {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    padding: 1rem 1rem 1rem 3.5rem;
    color: white;
    border-radius: var(--radius);
    margin: 1rem;
    position: relative;
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.4);
}

.blazor-error-boundary::before {
    content: "⚠️";
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.blazor-error-boundary::after {
    content: "Ocorreu um erro inesperado.";
}

/* ========================================
   Utilities - Dark Theme
   ======================================== */

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--primary-gradient);
}

.rounded-xl {
    border-radius: var(--radius-xl);
}

.rounded-2xl {
    border-radius: var(--radius-2xl);
}

.shadow-modern {
    box-shadow: var(--shadow-lg);
}

.shadow-glow {
    box-shadow: var(--shadow-glow);
}

/* ========================================
   Animations - Enhanced for Dark Theme
   ======================================== */

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Glow animation for interactive elements */
@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
    }

    50% {
        box-shadow: 0 0 25px rgba(139, 92, 246, 0.5);
    }
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* ========================================
   Responsive Utilities
   ======================================== */

@media (max-width: 640px) {
    .hide-mobile {
        display: none !important;
    }

    .btn-mobile-full {
        width: 100%;
        justify-content: center;
    }

    .card-body {
        padding: 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }
}

@media (min-width: 641px) {
    .hide-desktop {
        display: none !important;
    }
}

/* ========================================
   Form Floating Labels
   ======================================== */

.form-floating>.form-control-plaintext::placeholder,
.form-floating>.form-control::placeholder {
    color: var(--text-muted);
    text-align: end;
}

.form-floating>.form-control-plaintext:focus::placeholder,
.form-floating>.form-control:focus::placeholder {
    text-align: start;
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* ========================================
   Empty States
   ======================================== */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
}

.empty-state-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    max-width: 300px;
}

/* ========================================
   Button Groups
   ======================================== */

.btn-group {
    display: inline-flex;
    border-radius: var(--radius);
    overflow: hidden;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-radius: var(--radius) 0 0 var(--radius);
}

.btn-group .btn:last-child {
    border-radius: 0 var(--radius) var(--radius) 0;
}

.btn-group-sm .btn {
    padding: 0.375rem 0.625rem;
}

/* ========================================
   Header Components (UserMenu & OrganizationSelector)
   ======================================== */

/* Mobile Header Dropdowns */
.mobile-header .dropdown {
    position: relative;
}

.mobile-header .dropdown-toggle {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    white-space: nowrap;
    border-color: rgba(255, 255, 255, 0.3);
}

.mobile-header .dropdown-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Organization Selector Button */
.organization-selector-btn {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border: 1.5px solid rgba(255, 255, 255, 0.4) !important;
    color: white !important;
    background: rgba(255, 255, 255, 0.1);
}

.organization-selector-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: white !important;
    color: white !important;
}

/* User Menu Button */
.user-menu-btn {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    color: white !important;
}

.user-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
}

.mobile-header .dropdown-menu {
    min-width: 220px;
    margin-top: 0.5rem;
}

/* User Avatar/Badge in Mobile Header */
.mobile-header .rounded-circle {
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.mobile-header .badge.rounded-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Desktop Sidebar UserMenu */
@media (min-width: 769px) {
    .header-actions .dropdown {
        margin-left: auto;
    }
}

/* Dropdown Improvements - Dark Theme */
.dropdown {
    position: relative;
    z-index: 1000;
}

.dropdown-menu {
    background: var(--bg-secondary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), var(--shadow-glow);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    animation: dropdown-show 0.15s ease-out;
    z-index: 1001;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: transparent;
}

@keyframes dropdown-show {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    padding: 0.625rem 1rem;
    border-radius: var(--radius);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    color: var(--text-primary);
}

.dropdown-item:hover {
    background-color: var(--bg-tertiary);
}

.dropdown-item.active {
    background: var(--primary-gradient);
    color: white;
}

.dropdown-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem;
}

/* ========================================
   Alerts - Dark Theme
   ======================================== */

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    margin-bottom: 1rem;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.alert-danger {
    background: rgba(244, 63, 94, 0.15);
    border-color: rgba(244, 63, 94, 0.3);
    color: #fb7185;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

.alert-info {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.3);
    color: #22d3ee;
}

.alert-primary {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.3);
    color: #a78bfa;
}

/* ========================================
   Dark Text Utilities
   ======================================== */

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

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

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

.text-success {
    color: #4ade80 !important;
}

.text-danger {
    color: #fb7185 !important;
}

.text-warning {
    color: #fbbf24 !important;
}

.text-info {
    color: #22d3ee !important;
}

.text-white {
    color: white !important;
}

/* ========================================
   Global Link Styles
   ======================================== */

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: #a78bfa;
}

/* ========================================
   Scrollbar Styling (Dark Theme)
   ======================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--bg-tertiary) var(--bg-primary);
}

/* ========================================
   Auth Pages - Dark Theme Override
   ======================================== */

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

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

/* Google Login Button - Dark Theme */
.btn-outline-dark {
    background: var(--bg-tertiary);
    border: 1.5px solid var(--border-light);
    color: var(--text-primary);
}

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

.btn-outline-dark:focus {
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

/* Auth Card Override */
.shadow-lg {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

/* Divider line in auth pages */
hr {
    border-color: var(--border-color);
    opacity: 0.5;
}

/* Auth page divider text */
.bg-white.px-3 {
    background-color: var(--bg-secondary) !important;
}

/* Small muted text */
.text-muted {
    color: var(--text-muted) !important;
}

.small {
    color: var(--text-secondary);
}

/* Form check labels */
.form-check-label {
    color: var(--text-primary);
}