/* Color Palette 1: Modern & Trustworthy */
:root {
    /* Primary Colors */
    --primary: #317cbe;
    --primary-hover: #2563eb;
    --primary-light: #e0f2fe;
    
    /* Secondary Colors */
    --secondary: #4DB6AC;
    --secondary-hover: #3d9a91;
    --secondary-light: #e0f2f1;
    
    /* Accent Colors */
    --accent: #FF6F61;
    --accent-hover: #ff5441;
    --accent-light: #ffe4e1;
    
    /* Text Colors */
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    
    /* Neutral Colors */
    --gray-100: #F8F9FA;
    --gray-200: #E9ECEF;
    --gray-300: #DEE2E6;
    --gray-400: #CED4DA;
    --gray-500: #ADB5BD;
    --gray-600: #6C757D;
    
    /* Background Colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-tertiary: #E9ECEF;
    
    /* Border Colors */
    --border-light: #E1E8ED;
    --border-default: #CED4DA;
    
    /* Status Colors */
    --success: #4DB6AC;
    --danger: #dc3545;
    --warning: #FFC107;
    --info: #317cbe;
    
    /* Common Effects */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --transition-base: all 0.2s ease;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Layout */
    --content-max-width: 800px;
}

body {
    background-color: var(--bg-secondary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
}

/* Links */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Base button styles */
button,
.btn {
    display: inline-block;
    font: inherit;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    background-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

button:hover,
.btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}



/* Success buttons - using secondary color */
.btn-success {
    background-color: var(--secondary);
    color: white;
}

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

/* Danger buttons */
.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Accent buttons - for important CTAs */
.btn-accent {
    background-color: var(--accent);
    color: white;
}

.btn-accent:hover {
    background-color: var(--accent-hover);
}


/* Link buttons */
.btn-link {
    background-color: transparent;
    color: var(--primary);
    box-shadow: none;
    padding: 0;
}

.btn-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
    transform: none;
    box-shadow: none;
}


/* Layout utilities */
.d-flex {
    display: flex !important;
}

.flex-column {
    flex-direction: column !important;
}

.align-items-center {
    align-items: center !important;
}

.align-self-center {
    align-self: center !important;
}

/* Display utilities */
.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

/* Responsive display utilities */
@media (min-width: 768px) {
    .d-md-none {
        display: none !important;
    }
    
    .d-md-block {
        display: block !important;
    }
}

/* Spacing utilities */
.p-2 {
    padding: 0.5rem !important;
}

.me-auto {
    margin-right: auto !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1.25rem !important;
}

.my-3 {
    margin-top: 1.25rem !important;
    margin-bottom: 1.25rem !important;
}

.my-5 {
    margin-top: 3rem !important;
    margin-bottom: 3rem !important;
}

.mx-auto {
    margin-right: auto !important;
    margin-left: auto !important;
}

.px-4 {
    padding-right: 1rem !important;
    padding-left: 1rem !important;
}

.py-8 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    height: 80px;
    padding: 0 20px;
    display: flex;
    align-items: center;
}

.d-flex a {
    font-weight: 600;
    font-size: 1.1em;
}

/* Navigation */
.nav {
    display: flex;
    flex-wrap: wrap;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

.nav-item {
    display: block;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 80px;
    left: 0;
    height: calc(100vh - 80px);
    width: 250px;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-right: 1px solid var(--border-light);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar .nav-link {
    color: var(--text-secondary);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    margin: 4px 12px;
    font-weight: 500;
    transition: var(--transition-base);
    border: none;
    display: block;
    background: transparent;
    text-decoration: none;
    cursor: pointer;
}

.sidebar a.nav-link:hover {
    background-color: var(--gray-100);
    color: var(--primary);
    transform: translateX(4px);
}

.sidebar .nav-link.active,
.sidebar .nav-link:focus {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(49, 124, 190, 0.3);
}

/* Sidebar button styles (Add todo list button) */
.sidebar button.nav-link {
    background-color: var(--primary);
    color: white;
}

.sidebar button.nav-link:hover {
    background-color: var(--primary-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.sidebar-add-list-item {
    margin-top: 10px;
}

.sidebar-mobile-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-mobile-header h3 {
    margin: 0;
}

/* Sidebar scrollable content */
.sidebar-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

/* Account Switcher */
.account-switcher {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid var(--border-light);
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.account-switcher-header {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    font-weight: 600;
}

.account-switcher-dropdown {
    position: relative;
}

.account-switcher-toggle {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.account-switcher-toggle:hover {
    border-color: var(--gray-400);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dropdown-arrow {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.account-dropdown-menu {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    margin-bottom: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
}

.account-dropdown-item {
    display: block;
    padding: 10px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--gray-200);
}

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

.account-dropdown-item:hover {
    background-color: var(--bg-secondary);
    color: var(--primary);
}

.account-dropdown-item.active {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

/* Main content */
.container {
    margin-left: 0;
    margin-top: 80px;
}

body:has(.sidebar) .container {
    margin-left: 250px;
}


.container {
    padding: 30px;
    max-width: 100%;
    box-sizing: border-box;
}

#messages {
    position: fixed;
    top: 100px;
    right: 20px;
    width: 360px;
    max-width: calc(100vw - 40px);
    z-index: 1100;
    pointer-events: none;
}

#messages > * {
    pointer-events: auto;
}

/* Flash messages */
.flashes {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.flashes li {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Success flash messages */
.flashes li.success {
    background-color: var(--secondary-light);
    border: 1px solid var(--secondary);
    color: var(--secondary);
}

/* Error flash messages */
.flashes li.error {
    background-color: var(--accent-light);
    border: 1px solid var(--accent);
    color: var(--accent);
}

.flashes li button {
    padding: 2px 8px;
    font-size: 0.75rem;
    margin-left: 12px;
    float: right;
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-light);
}

.flashes li button:hover {
    background-color: var(--gray-100);
    color: var(--text-primary);
}

/* Forms */
.container form {
    max-width: var(--content-max-width);
}

/* Todo list name editing */
h2.todo-list-name {
    cursor: text;
    display: inline-block;
    padding: 8px 12px;
    margin: 0;
    border-radius: 4px;
    transition: var(--transition-base);
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1.2;
    position: relative;
}

h2.todo-list-name:hover {
    background-color: var(--gray-100);
    cursor: text;
}

.todo-list-edit-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.todo-list-name-input {
    font-size: 1.5rem !important;
    font-weight: bold;
    flex: 1;
    padding: 8px 12px !important;
    line-height: 1.2 !important;
    margin: 0;
    border: 2px solid transparent;
    background-color: transparent;
    height: auto !important;
}

.todo-list-name-input:focus {
    border-color: var(--primary);
    background-color: var(--bg-primary);
}

.btn-return {
    padding: 8px 12px;
    font-size: 1.2em;
}


/* Form group styling */
form .mb-3 {
    position: relative;
}

/* Focus-within effect for form groups */
.mb-3:focus-within .form-label {
    color: #317cbe !important;
    font-weight: 600 !important;
}

/* Form controls */
.form-control {
    font: inherit;
    line-height: 1.5;
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    box-sizing: border-box;
}

.form-control:hover {
    border-color: var(--gray-400);
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(49, 124, 190, 0.1);
}

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

.form-control:disabled {
    background-color: var(--bg-secondary);
    opacity: 0.6;
    cursor: not-allowed;
}

/* Radio buttons and checkboxes */
input[type="radio"],
input[type="checkbox"]:not(.task-checkbox) {
    margin-right: 0.5rem;
    cursor: pointer;
}

input[type="radio"]:focus,
input[type="checkbox"]:not(.task-checkbox):focus {
    outline: 2px solid #317cbe;
    outline-offset: 2px;
}

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

/* Align task add form label with todo list name */
.form-label[for="task-name"] {
    padding-left: 12px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.75rem;
    margin-left: -0.75rem;
}

.col-3,
.col-sm-2 {
    flex: 0 0 auto;
    width: 16.666667%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
}

.col-sm-10 {
    flex: 0 0 auto;
    width: 83.333333%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
}

.col-form-label {
    padding-top: calc(0.375rem + 1px);
    padding-bottom: calc(0.375rem + 1px);
    margin-bottom: 0;
    font-size: inherit;
    line-height: 1.5;
}

/* Todo list */
#todo-list {
    max-width: var(--content-max-width);
    overflow-x: hidden;
}

#todo-list > div {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    margin: 8px 0;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    border: 1px solid var(--border-light);
    overflow: hidden;
    word-break: break-word;
    position: relative;
}

#todo-list > div:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--gray-400);
}

#todo-list > div b {
    font-size: 1.1em;
    color: var(--text-primary);
    font-weight: 600;
    transition: all 0.2s ease;
    overflow-wrap: break-word;
    flex: 1;
    margin-right: 10px;
}

/* Task input form - match task display styling */
#task-name {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    /* Let it use the default form-control width */
}

#task-name:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--gray-400);
}

#task-name:focus {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary);
    outline: none;
}

/* Drag handle */
.drag-handle {
    cursor: grab;
    color: var(--text-muted);
    font-size: 20px;
    padding: 0 8px;
    margin-left: auto;
    user-select: none;
    transition: color 0.2s ease;
}

.drag-handle:hover {
    color: var(--primary);
}

.drag-handle:active {
    cursor: grabbing;
}

/* Sortable ghost - the placeholder while dragging */
.sortable-ghost {
    opacity: 0.4;
    background-color: var(--primary-light);
    transform: scale(1.02);
}

/* Dragging state */
.sortable-drag {
    cursor: grabbing !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: rotate(2deg);
}

/* Checkbox styling */
#todo-list input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 32px;
    height: 32px;
    background: linear-gradient(145deg, var(--bg-primary), var(--gray-200));
    border: 3px solid var(--border-light);
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 
                0 1px 3px rgba(0, 0, 0, 0.1),
                inset 0 1px 2px rgba(255, 255, 255, 0.9);
    margin-right: 16px;
    flex-shrink: 0;
    vertical-align: middle;
}

#todo-list input[type="checkbox"]:hover {
    border-color: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(49, 124, 190, 0.15), 
                0 2px 4px rgba(49, 124, 190, 0.1),
                inset 0 1px 2px rgba(255, 255, 255, 0.9);
}

#todo-list input[type="checkbox"]:checked {
    background: linear-gradient(145deg, var(--primary), var(--primary-hover));
    border-color: var(--primary-hover);
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2), 
                0 1px 3px rgba(37, 99, 235, 0.15),
                inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

#todo-list input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: white;
    font-size: 20px;
    font-weight: bold;
    animation: checkmark-pop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

#todo-list input[type="checkbox"]:checked ~ b {
    color: var(--text-muted);
    text-decoration: line-through;
    opacity: 0.7;
}

@keyframes checkmark-pop {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(-45deg);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3) rotate(10deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Tabs */
.nav-tabs {
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 0;
}

.nav-tabs .nav-link {
    margin-bottom: -2px;
    padding: 12px 24px;
    background: var(--bg-secondary);
    border: none;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s ease;
    margin-right: 4px;
    position: relative;
    display: inline-block;
    text-decoration: none;
}

.nav-tabs .nav-link:hover {
    background-color: var(--gray-300);
    color: var(--primary);
    transform: translateY(-2px);
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    background-color: var(--bg-primary);
    border-bottom: 2px solid var(--bg-primary);
    box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.05);
}

.nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--primary);
    border-radius: 3px 3px 0 0;
}

.tab-content {
    padding: 2rem;
    background-color: var(--bg-primary);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tab-content > .tab-pane {
    display: none;
}

.tab-content > .tab-pane.active,
.tab-content > .tab-pane.show.active {
    display: block;
}


/* Admin page styles */
.blog-container,
.article-container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Mobile styles */
@media (max-width: 768px) {
    /* Form adjustments for mobile */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea,
    select,
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .col-sm-2,
    .col-sm-10 {
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }
    
    .col-form-label {
        padding-top: 0;
        margin-bottom: 0.5rem;
    }
    
    .sidebar {
        display: none;
    }
    
    .sidebar.mobile-active {
        display: block;
        width: 100%;
        left: 0;
        right: 0;
        z-index: 1002;
        background: white;
    }
    
    .container,
    body:has(.sidebar) .container {
        margin-left: 0;
    }
    
    
    .container {
        padding: 15px;
        width: 100%;
        overflow-x: hidden;
    }
    
    #messages {
        margin-left: 0;
    }
    
    body > div:first-child {
        padding: 0 10px;
    }
    
    .mobile-back-btn {
        display: inline-flex;
        align-items: center;
        padding: 8px 16px;
        margin-right: 10px;
        background-color: transparent;
        color: var(--primary);
        box-shadow: none;
        font-size: 1.2em;
    }
    
    .mobile-back-btn:hover {
        background-color: var(--gray-200);
        transform: none;
        box-shadow: none;
    }
    
    
    .sidebar .nav-link {
        margin: 4px 16px;
        padding: 16px 24px;
        font-size: 1.1em;
    }
    
    /* Fix todo list overflow on mobile */
    #todo-list {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    #todo-list > div {
        padding: 12px 16px;
        margin: 6px 0;
    }
    
    /* Ensure task add form doesn't overflow */
    .container form .mb-3 {
        max-width: 100%;
    }
    
    /* Fix messages position on mobile */
    #messages {
        right: 10px;
        width: calc(100vw - 30px);
        max-width: 360px;
    }
    
    /* Drag handle on mobile */
    .drag-handle {
        font-size: 24px;
        padding: 0 12px;
        min-width: 44px;
        text-align: center;
    }
}

/* Table styles */
.table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.table thead th {
    padding: 16px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    border-bottom: 2px solid var(--border-light);
}

.table thead th:nth-child(odd) {
    background-color: var(--gray-300);
}

.table thead th:nth-child(even) {
    background-color: var(--gray-200);
}

.table tbody tr {
    transition: var(--transition-base);
}

.table tbody tr:nth-child(odd) {
    background-color: var(--bg-primary);
}

.table tbody tr:nth-child(even) {
    background-color: var(--bg-secondary);
}

.table tbody tr:hover {
    background-color: var(--gray-200);
}

.table tbody td {
    padding: 16px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
}

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

/* Responsive table styles using data-label attributes */
@media screen and (max-width: 768px) {
    /* Hide the table header on mobile */
    .table.responsive-table thead {
        display: none;
    }

    /* Make table elements block-level for vertical layout */
    .table.responsive-table,
    .table.responsive-table tbody,
    .table.responsive-table tr,
    .table.responsive-table td {
        display: block;
        width: 100%;
    }

    /* Style each row as a card */
    .table.responsive-table tr {
        margin-bottom: 1.5rem;
        border: 1px solid var(--border-light);
        border-radius: var(--radius-md);
        background-color: var(--bg-primary);
        box-shadow: var(--shadow-sm);
        overflow: hidden;
    }

    /* Style table cells for vertical layout - 2 column layout */
    .table.responsive-table td {
        display: flex;
        text-align: left;
        padding: 0.75rem 1rem;
        position: relative;
        border: none;
        border-bottom: 1px solid var(--border-light);
    }

    /* Remove border from last cell */
    .table.responsive-table tr td:last-child {
        border-bottom: none;
    }

    /* Use data-label as the left column header */
    .table.responsive-table td::before {
        content: attr(data-label);
        flex: 0 0 40%;
        font-weight: 600;
        color: var(--text-primary);
        padding-right: 1rem;
    }

    /* Alternating row backgrounds in mobile view */
    .table.responsive-table td:nth-child(even) {
        background-color: var(--bg-secondary);
    }

    /* Special handling for cells with forms - full width */
    .table.responsive-table td:has(form) {
        display: block;
    }

    .table.responsive-table td:has(form)::before {
        display: block;
        margin-bottom: 0.5rem;
    }
}

/* Button size variants */
.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* Utility classes */
.gap-2 {
    gap: 0.5rem !important;
}

.me-2 {
    margin-right: 0.5rem !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

/* Vertical align */
.align-middle {
    vertical-align: middle !important;
}

/* Card styles */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.card-body {
    flex: 1 1 auto;
    padding: 1.25rem;
}

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

.card-text {
    margin-bottom: 1rem;
}

/* Form check styles */
.form-check {
    display: block;
    margin-bottom: 0.5rem;
}

.form-check-input {
    margin-right: 0.5rem;
}

.form-check-label {
    cursor: pointer;
}

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

/* Desktop only styles */
@media (min-width: 769px) {
    .mobile-back-btn {
        display: none;
    }
    
    body:has(.sidebar) .container {
        width: calc(100% - 250px);
    }
}