/* Common CSS for Regulatory Database Application */

/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f3f4f6;
}

/* Layout Components */
.main-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Remove max-width constraint for sidebar layouts */
}

/* Standard page container for consistent sizing */
.page-container {
    max-width: 1440px;
    min-height: auto;
    margin: 0 auto;
    padding: 1rem;
}

/* Enhanced Sidebar Styles - Collapsed by Default */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border-right: 1px solid #e5e7eb;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Mobile: Hidden by default */
@media (max-width: 767px) {
    .sidebar {
        width: 280px;
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .content {
        margin-left: 0;
        transition: none;
    }
}

/* Desktop: Completely hidden by default */
@media (min-width: 768px) {
    .sidebar {
        width: 320px;
        transform: translateX(-320px);
    }
    
    .sidebar.expanded {
        width: 320px;
        transform: translateX(0);
    }
    
    .sidebar.open {
        width: 320px;
        transform: translateX(0);
    }
    
    .content {
        margin-left: auto;
        margin-right: auto;
        max-width: 1440px;
        width: 100%;
        padding: 2rem;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .sidebar.expanded + .content,
    .sidebar.open + .content {
        /* margin-left: 320px; */
        margin-right: auto;
        max-width: 1440px;
        width: 100vw;
    }
}

/* Enhanced Content Layout for Better Centering */
@media (min-width: 1400px) {
    .content {
        max-width: 1440px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .sidebar.expanded + .content,
    .sidebar.open + .content {
        /* margin-left: 320px; */
        margin-right: auto;
        max-width: 1440px;
        width: 100vw;
        padding-left: 2rem;
    }
}

/* Extra large screens - better content centering */
@media (min-width: 1600px) {
    .content {
        max-width: 1440px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 3rem;
        padding-right: 3rem;
    }
    
    .sidebar.expanded + .content,
    .sidebar.open + .content {
        /* margin-left: 320px; */
        margin-right: auto;
        max-width: 1440px;
        width: 100vw;
        padding-left: 3rem;
    }
}

/* Sidebar Header */
.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
}

.sidebar-title {
    font-weight: 700;
    font-size: 1.125rem;
    color: #1f2937;
    margin: 0;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.sidebar-toggle {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    background: #e5e7eb;
    transform: scale(1.05);
}

.sidebar-toggle svg {
    width: 16px;
    height: 16px;
    color: #6b7280;
    transition: transform 0.3s ease;
}

/* Sidebar Content */
.sidebar-content {
    padding: 1rem;
    flex: 1;
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-section-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.sidebar-section-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    color: #6b7280;
    flex-shrink: 0;
}

.sidebar-item {
    margin-bottom: 0.5rem;
}

.sidebar-item label {
    font-weight: 500;
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 0.25rem;
    display: block;
}

.sidebar-item input,
.sidebar-item select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: white;
}

.sidebar-item input:focus,
.sidebar-item select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Collapsed State Styles */
@media (min-width: 768px) {
    .sidebar:not(.expanded):not(.open) .sidebar-title,
    .sidebar:not(.expanded):not(.open) .sidebar-section-title span,
    .sidebar:not(.expanded):not(.open) .sidebar-item label,
    .sidebar:not(.expanded):not(.open) .sidebar-item input,
    .sidebar:not(.expanded):not(.open) .sidebar-item select,
    .sidebar:not(.expanded):not(.open) .sidebar-item button:not(.sidebar-toggle) {
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.15s ease, visibility 0.15s ease;
    }
    
    .sidebar:not(.expanded):not(.open) .sidebar-section-title {
        justify-content: center;
        margin-bottom: 1rem;
    }
    
    .sidebar:not(.expanded):not(.open) .sidebar-section {
        text-align: center;
    }
    
    .sidebar:not(.expanded):not(.open) .sidebar-content {
        padding: 0.5rem;
    }
    
    .sidebar:not(.expanded):not(.open) .sidebar-header {
        padding: 0.5rem;
        justify-content: center;
    }
}

/* Expanded State Styles */
.sidebar.expanded .sidebar-title,
.sidebar.open .sidebar-title,
.sidebar.expanded .sidebar-section-title span,
.sidebar.open .sidebar-section-title span,
.sidebar.expanded .sidebar-item label,
.sidebar.open .sidebar-item label,
.sidebar.expanded .sidebar-item input,
.sidebar.open .sidebar-item input,
.sidebar.expanded .sidebar-item select,
.sidebar.open .sidebar-item select {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease 0.1s, visibility 0.3s ease 0.1s;
}

/* Tooltip for Collapsed State */
.sidebar-tooltip {
    position: absolute;
    left: 70px;
    background: #1f2937;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 1001;
    white-space: nowrap;
}

.sidebar-tooltip::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-right-color: #1f2937;
}

.sidebar:not(.expanded):not(.open) .sidebar-section:hover .sidebar-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Mobile Close Button */
.sidebar-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-close:hover {
    background: #e5e7eb;
}

.sidebar-close svg {
    width: 16px;
    height: 16px;
    color: #6b7280;
}

@media (min-width: 768px) {
    .sidebar-close {
        display: none;
    }
}

/* Clear Filters Button */
.sidebar-clear-filters {
    width: 100%;
    padding: 0.75rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1rem;
}

.sidebar-clear-filters:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

@media (max-width: 767px) {
    .sidebar.open ~ .sidebar-overlay {
        opacity: 1;
        visibility: visible;
    }
}

/* Enhanced Main Content Styling */
.content {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: calc(100vh - 4rem);
}

/* Main content container improvements */
#main-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

/* Navigation bar improvements */
nav {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
}

/* Sub-navigation tabs improvements */
.sub-nav-tab {
    backdrop-filter: blur(10px);
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sub-nav-tab:not(.bg-blue-500) {
    background: rgba(255, 255, 255, 0.7);
    border-color: #e2e8f0;
}

.sub-nav-tab:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Table view improvements */
.table-view {
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
}

.table-view h2 {
    color: #1e293b;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Content sections spacing */
.content-section {
    max-width: 100%;
    margin: 0 auto;
}

/* Content height management for large datasets */
.content-with-scroll {
    max-height: 800px;
    overflow-y: auto;
}

/* Better spacing for main container */
.main-container {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    min-height: 100vh;
}

/* Page layout improvements */
@media (min-width: 768px) {
    .content > nav {
        margin-bottom: 2rem;
    }
    
    #main-content {
        margin: 0;
        border-radius: 20px;
    }
    
    .table-view {
        padding: 2rem;
        margin: 0;
        border-radius: 16px;
    }
}

/* Large screen optimizations */
@media (min-width: 1200px) {
    .content-section {
        max-width: 100%;
        padding: 0;
    }
    
    .table-view {
        padding: 2.5rem;
    }
    
    #main-content {
        border-radius: 24px;
    }
}

/* Dashboard Overview Styling */
.dashboard-overview {
    animation: fadeInUp 0.6s ease-out;
}

.dashboard-overview .stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-overview .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #e2e8f0;
}

.dashboard-overview .stat-number {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.dashboard-overview .stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Animation keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced button styling */
.nav-current, .nav-link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Mobile responsive improvements */
@media (max-width: 767px) {
    .dashboard-overview {
        margin-bottom: 1.5rem;
    }
    
    .dashboard-overview .bg-white {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .dashboard-overview .stat-card {
        padding: 1rem;
    }
    
    .dashboard-overview .stat-number {
        font-size: 1.75rem;
    }
}

/* Responsive adjustments for standard page sizing */
@media (max-width: 767px) {
    .main-container {
        min-height: 100vh;
    }
    .page-container {
        max-width: 100%;
        padding: 0.5rem;
    }
    .content {
        margin-left: 0;
        max-width: 100%;
        padding: 1rem;
    }
}

@media (min-width: 1441px) {
    .page-container {
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
        border-radius: 12px;
        background: white;
        margin-top: 2rem;
        margin-bottom: 2rem;
    }
    .content {
        max-width: 1200px; /* Slightly smaller for very large screens */
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    background-color: #f5f5f5;
}

::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

/* DataTables Customizations */
.dataTables_wrapper {
    padding: 0;
}

/* Removed all table-specific CSS overrides - using DataTables defaults */

/* Basic table styling - all tables */
table.display {
    width: 100%;
}

table.display th,
table.display td {
    padding: 8px 12px;
    vertical-align: top;
}

/* Text wrapping for data-loader.js */
.table-cell-wrap {
    white-space: normal !important;
    word-wrap: break-word !important;
}

/* Legacy CSS removed - now handled dynamically by DataTables column classification */

.dataTables_filter input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    margin-left: 8px;
}

.dataTables_length select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    margin: 0 8px;
}

table.dataTable thead th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
}

/* Column Controls */
.column-controls {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.column-toggle {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    margin: 3px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid;
    min-height: 28px;
    user-select: none;
}

.column-toggle.column-visible {
    background: #d1fae5;
    color: #065f46;
    border-color: #10b981;
}

.column-toggle.column-hidden {
    background: #fee2e2;
    color: #dc2626;
    border-color: #dc2626;
    border-style: dashed;
    animation: pulse-hidden 2s infinite;
}

.column-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.column-toggle.column-visible:hover {
    background: #a7f3d0;
}

.column-toggle.column-hidden:hover {
    background: #fecaca;
    animation: none;
}

@keyframes pulse-hidden {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.3s;
}

.modal-overlay.active {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

/* Document Edit Modal with PDF Viewer */
.document-edit-modal .modal-content {
    max-width: 1400px;
    width: 95%;
}

.modal-split-container {
    display: flex;
    gap: 2rem;
    height: 600px;
}

.pdf-viewer-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #f9fafb;
}

.pdf-header {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
    color: #374151;
}

.pdf-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

.form-fields-panel {
    flex: 1;
    overflow-y: auto;
    padding-right: 1rem;
}

.form-fields-panel .space-y-4 {
    margin-top: 0;
}

/* Responsive Design for Document Modal */
@media (max-width: 1024px) {
    .document-edit-modal .modal-content {
        max-width: 95%;
    }
    
    .modal-split-container {
        flex-direction: column;
        height: auto;
    }
    
    .pdf-viewer-panel {
        height: 400px;
        margin-bottom: 1.5rem;
    }
    
    .form-fields-panel {
        padding-right: 0;
    }
}

/* Project Header */
.project-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Breadcrumb */
.breadcrumb-separator {
    color: #6b7280;
    margin: 0 8px;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.status-active {
    background-color: #d1fae5;
    color: #065f46;
}

.status-badge.status-completed {
    background-color: #e0e7ff;
    color: #3730a3;
}

.status-badge.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-badge.status-on-hold {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-badge.status-in-review {
    background-color: #fef3c7;
    color: #92400e;
}

/* Priority Badges */
.priority-high {
    background-color: #fee2e2;
    color: #991b1b;
}

.priority-medium {
    background-color: #fef3c7;
    color: #92400e;
}

.priority-low {
    background-color: #d1fae5;
    color: #065f46;
}

/* Filter Section */
.filter-section {
    display: none;
}

.filter-section.active {
    display: block;
}

/* Table Cells - Handle Longer Content */
.table-cell-truncate {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-cell-wrap {
    max-width: 300px;
    word-wrap: break-word;
    white-space: normal;
}

/* Navigation Buttons */
.nav-current {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.nav-link {
    transition: all 0.2s;
}

.nav-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Sub Navigation Tabs */
.sub-nav-tab {
    transition: all 0.2s;
}

.sub-nav-tab:hover {
    transform: translateY(-1px);
}

/* Form Styles */
.form-input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #4b5563;
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.3);
}

/* Card Styles */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.card-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

/* Statistics Cards */
.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    transition: all 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    margin-top: 0.5rem;
}

/* User Profile Styles */
.user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-dropdown {
    min-width: 16rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    z-index: 50;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utility Classes */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shadow-soft {
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.shadow-medium {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.shadow-strong {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.gradient-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.gradient-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.gradient-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.gradient-red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .mobile-hidden {
        display: none;
    }
    
    .mobile-full-width {
        width: 100%;
    }
    
    .mobile-text-center {
        text-align: center;
    }
    
    .mobile-p-4 {
        padding: 1rem;
    }
}

@media (min-width: 768px) {
    .desktop-hidden {
        display: none;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

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

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

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

.slide-in-left {
    animation: slideInLeft 0.3s ease-in-out;
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Focus Styles for Accessibility */
.focus-ring:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.focus-ring-inset:focus {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break-inside-avoid {
        break-inside: avoid;
    }
    
    .print-break-before {
        break-before: page;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .column-toggle.column-visible {
        border-width: 3px;
        font-weight: 600;
    }
    
    .column-toggle.column-hidden {
        border-width: 3px;
        font-weight: 600;
    }
    
    .btn-primary, .btn-secondary, .btn-success, .btn-danger {
        border: 2px solid currentColor;
    }
}

/* Progress Bar Components */
.progress-bar {
    width: 100px;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #3b82f6;
    transition: width 0.3s ease;
}

/* Additional Status Badge Variants */
.status-badge.status-cancelled {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-badge.status-in-review {
    background-color: #fef3c7;
    color: #92400e;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}