/* Interia - Professional Minimalistic Design */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a365d;
    --primary-hover: #2c5282;
    --secondary-color: #718096;
    --success-color: #38a169;
    --warning-color: #ed8936;
    --danger-color: #e53e3e;
    --light-gray: #fafafa;
    --medium-gray: #e2e8f0;
    --dark-gray: #2d3748;
    --text-color: #2d3748;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --white: #ffffff;
    --border-radius: 6px;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --transition: all 0.15s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--light-gray);
    color: var(--text-color);
    line-height: 1.5;
    font-size: 14px;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--white);
    border-right: 1px solid var(--border-color);
    padding: 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-brand {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.sidebar-nav {
    padding: 16px 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 4px;
    text-decoration: none;
    color: var(--text-muted);
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
}

.nav-item:hover {
    background-color: #f7fafc;
    color: var(--text-color);
}

.nav-item.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.nav-item i {
    margin-right: 12px;
    width: 16px;
    font-size: 16px;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.user-info {
    padding: 16px;
    background-color: #f7fafc;
    border-radius: var(--border-radius);
    margin-bottom: 12px;
}

.user-info strong {
    font-size: 14px;
    color: var(--text-color);
}

.user-info small {
    color: var(--text-muted);
    font-size: 12px;
}

/* Main content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 24px 32px; /* Reduced from 32px 40px */
    max-width: 1200px;
}

/* Mobile menu toggle (hidden on desktop) */
.mobile-menu-toggle {
    display: none;
}

/* Dashboard stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px; /* Reduced from 20px */
    margin-bottom: 24px; /* Reduced from 32px */
}

.stat-card {
    background: var(--white);
    padding: 20px; /* Reduced from 24px */
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1;
}

.stat-card.total .stat-number { color: var(--primary-color); }
.stat-card.pending .stat-number { color: var(--warning-color); }
.stat-card.approved .stat-number { color: var(--success-color); }
.stat-card.rejected .stat-number { color: var(--danger-color); }

.stat-label {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== MINIMAL DASHBOARD DESIGN ===== */

/* Page Header Minimal */
.page-header-minimal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.page-header-content {
    flex: 1;
}

.page-title {
    font-size: 1.875rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.25rem 0;
}

.page-subtitle {
    color: #64748b;
    margin: 0;
    font-size: 0.875rem;
}

.page-header-actions {
    flex-shrink: 0;
}

/* Stats Grid Minimal */
.stats-grid-minimal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card-minimal {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.stat-card-minimal:hover {
    border-color: #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.stat-content {
    flex: 1;
}

.stat-card-minimal .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.25rem 0;
}

.stat-card-minimal .stat-label {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0;
    text-transform: none;
    letter-spacing: 0;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    color: #64748b;
}

.stat-card-minimal.pending .stat-icon {
    background: #fef3c7;
    color: #d97706;
}

.stat-card-minimal.approved .stat-icon {
    background: #dcfce7;
    color: #16a34a;
}

.stat-card-minimal.rejected .stat-icon {
    background: #fee2e2;
    color: #dc2626;
}

.stat-icon i {
    font-size: 1.25rem;
}

/* Card Minimal */
.card-minimal {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
}

.card-header-minimal {
    padding: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header-content {
    flex: 1;
}

.card-title-minimal {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.25rem 0;
}

.card-subtitle-minimal {
    color: #64748b;
    font-size: 0.875rem;
    margin: 0;
}

.card-body-minimal {
    padding: 0;
}

/* Table Minimal */
.table-minimal {
    display: flex;
    flex-direction: column;
}

.table-row-minimal {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

.table-row-minimal:hover {
    background: #f8fafc;
}

.table-row-minimal:last-child {
    border-bottom: none;
}

.table-cell-main {
    flex: 1;
    min-width: 0;
}

.request-title {
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.request-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #64748b;
}

.request-client, .request-date {
    white-space: nowrap;
}

.table-cell-status {
    flex-shrink: 0;
    margin-right: 1rem;
}

.status-badge-minimal {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.status-badge-minimal.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge-minimal.status-approved {
    background: #dcfce7;
    color: #166534;
}

.status-badge-minimal.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.table-cell-actions {
    flex-shrink: 0;
}

.actions-minimal {
    display: flex;
    gap: 0.5rem;
}

.action-btn-minimal {
    width: 32px;
    height: 32px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.action-btn-minimal:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
}

.action-btn-minimal.action-btn-danger:hover {
    background: #fee2e2;
    border-color: #fecaca;
    color: #dc2626;
}

/* Button Minimal */
.btn-minimal {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.btn-primary.btn-minimal {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.btn-primary.btn-minimal:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.btn-outline-minimal {
    background: white;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-outline-minimal:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
}

/* Empty State Minimal */
.empty-state-minimal {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: #f1f5f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.empty-state-icon i {
    font-size: 1.5rem;
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
}

.empty-state-description {
    color: #64748b;
    margin: 0 0 1.5rem 0;
}

/* Modal Minimal */
.modal-content-minimal {
    max-width: 600px;
    border-radius: 12px;
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header-minimal {
    padding: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.modal-header-content {
    flex: 1;
}

.modal-title-minimal {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.25rem 0;
}

.modal-subtitle-minimal {
    color: #64748b;
    font-size: 0.875rem;
    margin: 0;
}

.modal-close-minimal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
}

.modal-close-minimal:hover {
    color: #64748b;
}

.modal-body-minimal {
    padding: 1.5rem;
}

.form-grid-minimal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-group-minimal {
    display: flex;
    flex-direction: column;
}

.form-label-minimal {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-control-minimal {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-control-minimal:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control-minimal::placeholder {
    color: #9ca3af;
}

textarea.form-control-minimal {
    resize: vertical;
    min-height: 100px;
}

.file-upload-minimal {
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-upload-minimal:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

.file-upload-content i {
    font-size: 2rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.file-upload-content p {
    color: #1e293b;
    font-weight: 500;
    margin: 0 0 0.25rem 0;
}

.file-upload-content small {
    color: #64748b;
}

.file-list-minimal {
    margin-top: 1rem;
}

.modal-actions-minimal {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .page-header-minimal {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem 0;
        margin-bottom: 1rem;
    }
    
    .page-title {
        font-size: 1.5rem !important;
        margin-bottom: 0.25rem;
    }
    
    .page-subtitle {
        font-size: 0.875rem !important;
        margin-bottom: 0;
    }
    
    .page-header-actions {
        width: 100%;
    }
    
    .page-header-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .stats-grid-minimal {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .stat-card-minimal {
        padding: 1rem;
        min-height: auto;
    }
    
    .stat-number {
        font-size: 1.5rem !important;
        margin-bottom: 0.25rem;
    }
    
    .stat-label {
        font-size: 0.75rem !important;
    }
    
    .stat-icon {
        font-size: 1rem;
    }
    
    .card-minimal {
        margin-bottom: 1rem;
        border-radius: 0.5rem;
    }
    
    .card-header-minimal {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .card-header-content {
        width: 100%;
    }
    
    .card-title-minimal {
        font-size: 1.125rem !important;
        margin-bottom: 0.25rem;
    }
    
    .card-subtitle-minimal {
        font-size: 0.875rem !important;
    }
    
    .card-body-minimal {
        padding: 1rem;
    }
    
    .table-row-minimal {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.75rem;
        border-radius: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .table-cell-main {
        width: 100%;
    }
    
    .table-cell-main h4 {
        font-size: 0.875rem !important;
        margin-bottom: 0.25rem;
    }
    
    .table-cell-main p {
        font-size: 0.75rem !important;
        margin-bottom: 0;
    }
    
    .table-cell-status,
    .table-cell-actions {
        width: 100%;
        margin-right: 0;
    }
    
    .actions-minimal {
        justify-content: flex-start;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .actions-minimal .btn-minimal {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
        min-height: auto;
    }
    
    .empty-state-minimal {
        text-align: center;
        padding: 2rem 1rem;
    }
    
    .empty-state-icon {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .empty-state-title {
        font-size: 1.125rem !important;
        margin-bottom: 0.5rem;
    }
    
    .empty-state-description {
        font-size: 0.875rem !important;
        margin-bottom: 1rem;
    }
    
    .form-grid-minimal {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .modal-content-minimal {
        width: 95%;
        max-width: none;
        margin: 1rem auto;
        max-height: calc(100vh - 2rem);
    }
    
    .modal-header-minimal {
        padding: 1rem;
    }
    
    .modal-body-minimal {
        padding: 1rem;
        max-height: calc(100vh - 8rem);
        overflow-y: auto;
    }
    
    .modal-actions-minimal {
        flex-direction: column-reverse;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .modal-actions-minimal .btn-minimal {
        width: 100%;
        justify-content: center;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    line-height: 1.5;
    min-height: 36px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--text-color);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: #f7fafc;
}

.btn-success {
    background-color: var(--success-color);
    color: var(--white);
    border-color: var(--success-color);
}

.btn-danger {
    background-color: var(--danger-color);
    color: var(--white);
    border-color: var(--danger-color);
}

.btn-outline {
    background-color: var(--white);
    border-color: var(--border-color);
    color: var(--text-muted);
}

.btn-outline:hover {
    background-color: #f7fafc;
    color: var(--text-color);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    min-height: 28px;
}

.btn i {
    margin-right: 6px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.card-header {
    padding: 16px 20px; /* Reduced from 20px 24px */
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fafafa;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
}

.card-body {
    padding: 16px 20px; /* Reduced from 24px */
    max-height: 400px; /* Add max height to prevent excessive white space */
    overflow-y: auto; /* Add scroll if content is too tall */
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px; /* Reduced from 14px for compactness */
}

.table th,
.table td {
    padding: 8px 12px; /* Reduced from 12px 16px */
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    line-height: 1.3; /* Tighter line height */
}

.table th {
    background-color: #fafafa;
    font-weight: 600;
    color: var(--text-color);
    font-size: 12px; /* Reduced from 13px */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 12px; /* Smaller header padding */
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background-color: #fafafa;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background-color: #fef5e7;
    color: #744210;
    border: 1px solid #f6e05e;
}

.status-approved {
    background-color: #f0fff4;
    color: #22543d;
    border: 1px solid #68d391;
}

.status-rejected {
    background-color: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 2000;
    backdrop-filter: blur(2px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fafafa;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition);
}

.modal-close:hover {
    background-color: #f1f5f9;
    color: var(--text-color);
}

.modal-body {
    padding: 24px;
}

/* Form styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-color);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
    background-color: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

/* Search input with icon */
.search-input-container {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

.search-input {
    padding-left: 2.75rem !important;
}

.search-input:focus + .search-icon,
.search-input:not(:placeholder-shown) + .search-icon {
    color: var(--primary-color);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

/* File upload */
.file-upload {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 32px 20px;
    text-align: center;
    transition: var(--transition);
    background-color: #fafafa;
    cursor: pointer;
}

.file-upload:hover {
    border-color: var(--primary-color);
    background-color: #f0f4f8;
}

.file-upload.dragover {
    border-color: var(--primary-color);
    background-color: #e6fffa;
}

.file-upload i {
    color: var(--text-muted);
    margin-bottom: 8px;
}

.file-upload p {
    margin-bottom: 4px;
    color: var(--text-color);
    font-weight: 500;
}

.file-upload small {
    color: var(--text-muted);
}

.file-list {
    margin-top: 16px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: white;
    display: none;
    padding: 8px;
}

.file-list:not(:empty) {
    display: block;
}

.file-count {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    text-align: center;
    padding: 4px;
    background: #f8f9fa;
    border-radius: 4px;
    display: none;
}

.file-count.show {
    display: block;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: #f7fafc;
    border-radius: var(--border-radius);
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
}

.file-info {
    display: flex;
    align-items: center;
}

.file-icon {
    margin-right: 12px;
    color: var(--primary-color);
    font-size: 16px;
}

.file-details span {
    display: block;
}

.file-name {
    font-weight: 500;
    color: var(--text-color);
    font-size: 14px;
}

.file-size {
    font-size: 12px;
    color: var(--text-muted);
}

/* Authentication pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    padding: 20px;
}

.auth-card {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    border: 1px solid #e2e8f0;
}

.auth-card h1 {
    margin: 0 0 8px 0;
    color: #1a202c;
    font-weight: 600;
    font-size: 24px;
    text-align: center;
}

.auth-subtitle {
    margin: 0 0 30px 0;
    color: #6b7280;
    font-size: 14px;
    text-align: center;
    font-weight: 400;
}

.auth-form {
    margin-bottom: 20px;
}

.auth-form .form-control {
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    width: 100%;
    transition: border-color 0.2s ease;
}

.auth-form .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form .btn {
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.auth-form .btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.auth-form .btn-primary:hover {
    background-color: #5a67d8;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    color: #6b7280;
    font-size: 14px;
}

.auth-link a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Alert messages */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid;
}

.alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.alert-warning {
    background-color: #fefbeb;
    color: #a16207;
    border-color: #fde68a;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        font-size: 14px; /* Smaller text for mobile compactness */
        overflow-x: hidden; /* Prevent horizontal scrolling */
        min-height: 100vh; /* Ensure full viewport height */
    }
    
    /* Ensure viewport fits content without scrolling */
    html {
        height: 100%;
    }
    
    /* Allow body to expand beyond viewport if needed */
    body {
        height: auto;
        min-height: 100vh;
        padding-bottom: env(safe-area-inset-bottom, 0); /* Add safe area for mobile devices */
    }
    
    /* Ensure content has enough bottom space on mobile */
    @supports (padding: max(0px)) {
        body {
            padding-bottom: max(1rem, env(safe-area-inset-bottom));
        }
    }
    
    /* Mobile sidebar toggle */
    .mobile-menu-toggle {
        display: block;
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 2001;
        background: var(--primary-color);
        color: var(--white);
        border: none;
        padding: 8px 10px;
        border-radius: 6px;
        box-shadow: var(--shadow);
        cursor: pointer;
        font-size: 16px;
    }
    
    .mobile-menu-toggle:hover {
        background: var(--primary-hover);
    }
    
    /* Sidebar mobile behavior */
    .sidebar {
        position: fixed;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 2000;
        height: 100vh;
        box-shadow: var(--shadow-lg);
        width: 280px; /* Slightly narrower for mobile */
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    /* Mobile overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1999;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    /* Main content mobile */
    .main-content {
        margin-left: 0;
        padding: 60px 1rem 2rem; /* Better padding for minimal dashboard */
        width: 100%;
        min-height: calc(100vh - 60px);
    }
    
    /* Dashboard specific mobile styling */
    .main-content.dashboard {
        padding: 60px 0.75rem 2rem; /* Tighter padding for dashboard */
    }
    
    /* Special handling for approve page on mobile */
    .approve-container {
        margin: 0.1rem auto 0.3rem auto !important; /* Ultra minimal margins */
        padding: 0 4px 0.3rem 4px !important; /* Ultra minimal padding */
        max-width: 100% !important;
    }
    
    /* Ultra compact header for approve page */
    .approve-container .text-center.mb-3 {
        margin-bottom: 0.2rem !important;
    }
    
    .approve-container .text-center h1 {
        font-size: 18px !important;
        margin: 0 0 2px 0 !important;
    }
    
    .approve-container .text-center p {
        font-size: 11px !important;
        margin: 0 0 6px 0 !important;
    }
    
    /* Dashboard stats mobile */
    .stats-grid {
        grid-template-columns: 1fr 1fr; /* Two columns instead of one for compactness */
        gap: 8px;
        margin-bottom: 16px;
    }
    
    .stat-card {
        padding: 12px; /* Reduced padding */
        text-align: center;
    }
    
    .stat-number {
        font-size: 20px; /* Smaller stat numbers */
    }
    
    .stat-label {
        font-size: 12px; /* Smaller labels */
    }
    
    /* Buttons mobile-friendly but compact */
    .btn {
        min-height: 40px; /* Slightly smaller touch target */
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .btn-sm {
        min-height: 32px;
        padding: 6px 10px;
        font-size: 12px;
    }
    
    /* Modal mobile - more compact */
    .modal-content {
        width: 95%;
        margin: 10px 2.5%;
        max-height: calc(100vh - 20px);
        overflow-y: auto;
    }
    
    .modal-header,
    .modal-body {
        padding: 12px; /* Reduced padding */
    }
    
    /* Table mobile - hide table, show cards instead */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Hide table on mobile for requests page */
    .requests .table-responsive {
        display: none;
    }
    
    /* Hide table on mobile for dashboard page */
    .dashboard .table-responsive {
        display: none;
    }
    
    /* Mobile card layout for requests */
    .mobile-requests-list {
        display: block;
        width: 100%;
        overflow: hidden;
    }
    
    .mobile-request-card {
        background: white;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        margin-bottom: 6px;
        margin-left: 0;
        margin-right: 0;
        padding: 8px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        transition: all 0.2s ease;
        position: relative;
        width: 100%;
        box-sizing: border-box;
    }
    
    .mobile-request-card:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        border-color: var(--primary-color);
        transform: translateY(-1px);
    }
    
    .mobile-request-card:last-child {
        margin-bottom: 0;
    }
    
    .mobile-request-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 3px;
        gap: 6px;
    }
    
    .mobile-request-title {
        font-size: 12px;
        font-weight: 600;
        color: var(--text-color);
        margin: 0;
        flex: 1;
        line-height: 1.2;
        word-wrap: break-word;
        overflow-wrap: break-word;
        min-width: 0;
    }
    
    .mobile-request-status {
        flex-shrink: 0;
    }
    
    .mobile-request-status .status-badge {
        font-size: 9px;
        padding: 2px 6px;
        border-radius: 10px;
        line-height: 1;
    }
    
    .mobile-request-details {
        display: flex;
        flex-wrap: wrap;
        gap: 4px 8px;
        margin-bottom: 4px;
        font-size: 10px;
        color: var(--text-muted);
        line-height: 1.2;
    }
    
    .mobile-request-details > div {
        min-width: 0;
        overflow: hidden;
        flex: 0 1 auto;
    }
    
    .mobile-request-details strong {
        color: var(--text-color);
        font-size: 10px;
        font-weight: 600;
        display: inline;
        margin-right: 3px;
    }
    
    .mobile-request-details br + small {
        font-size: 9px;
        line-height: 1.2;
        opacity: 0.8;
    }
    
    .mobile-request-actions {
        display: flex;
        gap: 3px;
        flex-wrap: wrap;
        margin-top: 2px;
    }
    
    .mobile-request-actions .btn-sm {
        flex: 0 0 auto;
        min-width: 50px;
        font-size: 9px;
        padding: 3px 6px;
        min-height: 24px;
        border-radius: 4px;
        line-height: 1;
    }
    
    .mobile-request-actions .btn-sm i {
        margin-right: 2px;
        font-size: 8px;
    }
    
    /* Mobile card layout for dashboard */
    .mobile-dashboard-list {
        display: block;
        width: 100%;
        overflow: hidden;
    }
    
    .mobile-dashboard-card {
        background: white;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        margin-bottom: 4px;
        margin-left: 0;
        margin-right: 0;
        padding: 8px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        transition: all 0.2s ease;
        position: relative;
        width: 100%;
        box-sizing: border-box;
    }
    
    .mobile-dashboard-card:hover {
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
        border-color: var(--primary-color);
        transform: translateY(-1px);
    }
    
    .mobile-dashboard-card:last-child {
        margin-bottom: 0;
    }
    
    .mobile-dashboard-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 3px;
        gap: 6px;
    }
    
    .mobile-dashboard-title {
        font-size: 12px;
        font-weight: 600;
        color: var(--text-color);
        margin: 0;
        flex: 1;
        line-height: 1.2;
        word-wrap: break-word;
        overflow-wrap: break-word;
        min-width: 0;
    }
    
    .mobile-dashboard-status {
        flex-shrink: 0;
    }
    
    .mobile-dashboard-status .status-badge {
        font-size: 9px;
        padding: 2px 6px;
        border-radius: 10px;
        line-height: 1;
    }
    
    .mobile-dashboard-details {
        display: flex;
        flex-wrap: wrap;
        gap: 4px 8px;
        margin-bottom: 4px;
        font-size: 10px;
        color: var(--text-muted);
        line-height: 1.2;
    }
    
    .mobile-dashboard-details > div {
        min-width: 0;
        overflow: hidden;
        flex: 0 1 auto;
    }
    
    .mobile-dashboard-details strong {
        color: var(--text-color);
        font-size: 10px;
        font-weight: 600;
        display: inline;
        margin-right: 3px;
    }
    
    .mobile-dashboard-actions {
        display: flex;
        gap: 3px;
        flex-wrap: wrap;
        margin-top: 2px;
    }
    
    .mobile-dashboard-actions .btn-sm {
        flex: 0 0 auto;
        min-width: 50px;
        font-size: 9px;
        padding: 3px 6px;
        min-height: 24px;
        border-radius: 4px;
        line-height: 1;
    }
    
    .mobile-dashboard-actions .btn-sm i {
        margin-right: 2px;
        font-size: 8px;
    }
    
    .table {
        font-size: 11px;
        min-width: 100%;
        table-layout: fixed;
        width: 100%;
    }
    
    .table th,
    .table td {
        padding: 2px 0.5px;
        white-space: normal;
        font-size: 8px;
        line-height: 1.1;
        word-wrap: break-word;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Dashboard mobile table - ultra compact */
    .dashboard .table th,
    .dashboard .table td {
        padding: 3px 2px; /* Ultra compact for dashboard mobile */
        font-size: 9px; /* Very small text */
        line-height: 1.2; /* Better line height */
        white-space: normal; /* Allow text wrapping */
    }
    
    .dashboard .table th {
        padding: 2px 1px;
        font-size: 8px; /* Tiny headers */
    }
    
    /* Mobile table column width optimization */
    .dashboard .table th:nth-child(1), /* Project */
    .dashboard .table td:nth-child(1) {
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .dashboard .table th:nth-child(2), /* Client */
    .dashboard .table td:nth-child(2) {
        max-width: 60px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .dashboard .table th:nth-child(3), /* Status */
    .dashboard .table td:nth-child(3) {
        max-width: 50px;
    }
    
    .dashboard .table th:nth-child(4), /* Created */
    .dashboard .table td:nth-child(4) {
        max-width: 60px;
        font-size: 8px;
    }
    
    .dashboard .table th:nth-child(5), /* Actions */
    .dashboard .table td:nth-child(5) {
        max-width: 80px;
    }
    
    /* Requests page mobile table optimization */
    .requests .table th,
    .requests .table td {
        padding: 1px 0.5px; /* Ultra minimal padding for requests mobile */
        font-size: 7px; /* Tiny text */
        line-height: 1.0; /* Super tight line height */
        white-space: normal; /* Allow text wrapping */
        word-wrap: break-word; /* Break long words */
        overflow: hidden; /* Hide overflow */
        text-overflow: ellipsis; /* Add ellipsis for overflow */
    }
    
    .requests .table th {
        padding: 1px 0.5px;
        font-size: 6px; /* Micro headers */
    }
    
    .requests .table th:nth-child(1), /* Project Title */
    .requests .table td:nth-child(1) {
        width: 20%; /* Percentage-based width */
        max-width: 50px; /* Even narrower for project titles */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap; /* Keep project titles on one line */
    }
    
    .requests .table th:nth-child(2), /* Client */
    .requests .table td:nth-child(2) {
        width: 15%; /* Percentage-based width */
        max-width: 35px; /* Even narrower for client names */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap; /* Keep client names on one line */
    }
    
    .requests .table th:nth-child(3), /* Status */
    .requests .table td:nth-child(3) {
        width: 12%; /* Percentage-based width */
        max-width: 28px; /* Even narrower for status */
    }
    
    .requests .table th:nth-child(4), /* Created */
    .requests .table td:nth-child(4) {
        width: 15%; /* Percentage-based width */
        max-width: 32px; /* Even narrower for dates */
        font-size: 7px; /* Smaller font */
    }
    
    .requests .table th:nth-child(5), /* Last Updated */
    .requests .table td:nth-child(5) {
        width: 15%; /* Percentage-based width */
        max-width: 32px; /* Even narrower for dates */
        font-size: 7px; /* Smaller font */
    }
    
    .requests .table th:nth-child(6), /* Actions */
    .requests .table td:nth-child(6) {
        width: 23%; /* Percentage-based width for actions */
        max-width: none; /* Remove max-width constraint */
        min-width: 55px; /* Ensure minimum space for actions */
    }
    
    /* Status badges mobile - smaller */
    .status-badge {
        font-size: 6px; /* Micro badges */
        padding: 1px 2px; /* Minimal padding */
        border-radius: 3px; /* Smaller radius */
        line-height: 1.0; /* Tight line height */
    }
    
    /* Approve page status badge alignment */
    .approve-container .status-badge {
        font-size: 9px !important;
        padding: 2px 6px !important;
        flex-shrink: 0 !important; /* Don't shrink */
        display: inline-flex !important;
        align-items: center !important;
    }
    
    /* Action buttons mobile - more compact */
    .table .btn-sm {
        min-height: 18px; /* Ultra small action buttons */
        padding: 0px 2px; /* Minimal padding */
        font-size: 8px; /* Tiny text */
        min-width: 14px; /* Smaller minimum width */
        margin: 0 0.5px; /* Tiny spacing between buttons */
        border-radius: 2px; /* Smaller border radius */
    }
    
    .table .btn-sm i {
        font-size: 6px; /* Tiny icons */
        margin: 0; /* Remove icon margins */
    }
    
    /* Cards mobile - more compact */
    .card {
        margin-bottom: 12px;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }
    
    .card-header,
    .card-body {
        padding: 8px; /* Even more reduced padding */
    }
    
    .card-title {
        font-size: 16px; /* Smaller card titles */
        margin-bottom: 6px;
    }
    
    /* Form mobile - more compact */
    .form-control {
        min-height: 40px; /* Smaller form controls */
        font-size: 14px;
        padding: 10px 12px;
    }

    .form-label {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .form-group {
        margin-bottom: 12px; /* Reduced spacing between form groups */
    }
    
    /* Search form mobile optimization */
    .requests .d-flex.align-center {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem;
    }
    
    .requests .d-flex.align-center .form-group {
        margin-right: 0 !important;
        margin-bottom: 0 !important;
        flex: 1;
    }
    
    .requests .d-flex.align-center .btn {
        width: 100%;
        justify-content: center;
    }    /* Auth pages mobile - more compact */
    .auth-container {
        padding: 10px;
    }
    
    .auth-card {
        padding: 16px; /* Reduced padding */
        margin: 0;
        max-width: 100%;
    }
    
    .auth-card h1 {
        font-size: 20px !important; /* Smaller title */
        margin: 0 0 6px 0 !important;
    }
    
    .auth-subtitle {
        font-size: 12px !important; /* Smaller subtitle */
        margin: 0 0 20px 0 !important;
    }
    
    /* File upload mobile - more compact */
    .file-upload {
        padding: 16px 12px;
        text-align: center;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 8px;
    }
    
    .file-info {
        width: 100%;
        margin-bottom: 6px;
    }
    
    .file-info h4 {
        font-size: 14px;
    }
    
    .file-info p {
        font-size: 12px;
    }
    
    /* Signature pad mobile - more compact */
    .signature-pad {
        height: 60px !important; /* Ultra small signature area for mobile */
        margin-bottom: 4px !important;
    }
    
    /* Form in approve page - ultra compact */
    .approve-container .form-group {
        margin-bottom: 4px !important;
    }
    
    .approve-container .form-label {
        font-size: 12px !important;
        margin-bottom: 2px !important;
    }
    
    .approve-container .form-control {
        min-height: 32px !important;
        font-size: 12px !important;
        padding: 6px 8px !important;
    }
    
    .approve-container .btn {
        min-height: 32px !important;
        padding: 6px 10px !important;
        font-size: 12px !important;
        margin-bottom: 4px !important;
    }
    
    /* Approval form specific mobile optimizations */
    .approve-container .d-flex {
        flex-direction: column !important;
        gap: 3px !important; /* Minimal space between flex items */
        margin-bottom: 0.5rem !important; /* Minimal bottom margin */
    }
    
    .approve-container .d-flex .btn {
        margin-bottom: 2px !important;
        width: 100% !important;
    }
    
    /* Row and column adjustments for mobile */
    .approve-container .row {
        margin: 0 !important;
    }
    
    .approve-container .col-md-6 {
        padding: 0 !important;
        margin-bottom: 4px !important;
    }
    
    /* CAPTCHA mobile - more compact */
    .captcha-container {
        flex-direction: row; /* Keep horizontal on mobile */
        align-items: center;
        gap: 8px;
        justify-content: center;
    }
    
    .captcha-question {
        font-size: 14px; /* Smaller captcha text */
        padding: 8px 10px;
        min-width: 50px;
    }
    
    .captcha-input {
        max-width: 60px !important; /* Smaller captcha input */
        font-size: 14px !important;
    }
    
    /* Status badges mobile - more compact */
    .status-badge {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    /* Action buttons container - more compact */
    .d-flex {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .d-flex .btn {
        flex: 1;
        min-width: 100px;
    }
    
    /* Alert messages - more compact */
    .alert {
        padding: 8px 10px !important;
        margin-bottom: 8px !important;
        font-size: 12px !important;
    }
    
    /* Approve page alert messages */
    .approve-container .alert {
        padding: 6px 8px !important;
        margin-bottom: 6px !important;
        font-size: 12px !important;
    }
    
    /* Compact approve page mobile */
    .approve-container {
        max-width: 100% !important;
        margin: 0.2rem auto 0.5rem auto !important; /* Minimal margins */
        padding: 0 6px 0.5rem 6px !important; /* Minimal padding */
    }
    
    /* Approve page specific mobile optimizations */
    .approve-container .card {
        margin-bottom: 4px !important; /* Extremely small spacing between cards */
    }
    
    /* Last card in approve page needs minimal bottom margin */
    .approve-container .card:last-of-type {
        margin-bottom: 0.5rem !important; /* Minimal bottom space */
    }
    
    .approve-container .card-header {
        padding: 6px 8px !important; /* Ultra compact card headers */
    }
    
    /* Fix the inner flex container in card header */
    .approve-container .card-header .d-flex {
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 8px !important;
    }
    
    .approve-container .card-body {
        padding: 6px 8px !important; /* Ultra compact card body */
    }
    
    .approve-container .card-title {
        font-size: 13px !important; /* Smaller card titles */
        margin: 0 !important; /* Remove default margins */
        flex: 1 !important; /* Take available space */
        text-align: left !important; /* Ensure left alignment */
    }
    
    .approve-container h3 {
        font-size: 13px !important;
        margin-bottom: 2px !important;
    }
    
    .approve-container h4 {
        font-size: 12px !important;
        margin-bottom: 2px !important;
    }
    
    .approve-container p {
        margin-bottom: 4px !important; /* Extremely small paragraph spacing */
        font-size: 12px !important;
        line-height: 1.2 !important;
    }
    
    .approve-container .mt-3 {
        margin-top: 4px !important; /* Reduce mt-3 spacing */
    }
    
    .approve-container .mb-3 {
        margin-bottom: 4px !important; /* Reduce mb-3 spacing */
    }
    
    /* File items in approve page */
    .approve-container .file-item {
        padding: 4px 6px !important;
        margin-bottom: 2px !important;
        flex-direction: row !important; /* Keep horizontal on mobile */
        align-items: center !important;
    }
    
    .approve-container .file-info {
        margin-bottom: 0 !important;
    }
    
    .approve-container .file-details span {
        font-size: 11px !important;
    }
    
    .approve-container .btn-sm {
        padding: 3px 6px !important;
        font-size: 10px !important;
        min-height: 24px !important;
    }
    
    /* Compact spacing utilities for mobile */
    .mb-3 { margin-bottom: 4px !important; }
    .mb-2 { margin-bottom: 3px !important; }
    .mb-1 { margin-bottom: 2px !important; }
    .mt-3 { margin-top: 4px !important; }
    .mt-2 { margin-top: 3px !important; }
    .mt-1 { margin-top: 2px !important; }
    
    /* Compact typography for mobile */
    h1 { font-size: 20px !important; margin-bottom: 6px !important; }
    h2 { font-size: 18px !important; margin-bottom: 4px !important; }
    h3 { font-size: 16px !important; margin-bottom: 4px !important; }
    h4 { font-size: 14px !important; margin-bottom: 2px !important; }
    
    /* Hide desktop-only elements */
    .desktop-only {
        display: none !important;
    }
    
    /* Show mobile-only elements */
    .mobile-only {
        display: block !important;
    }
    
    /* Ensure mobile card lists are visible */
    .mobile-requests-list {
        display: block !important;
    }
    
    .mobile-dashboard-list {
        display: block !important;
    }
}

/* Desktop: hide mobile cards, show table */
@media (min-width: 769px) {
    .mobile-requests-list {
        display: none !important;
    }
    
    .mobile-dashboard-list {
        display: none !important;
    }
    
    .mobile-only {
        display: none !important;
    }
    
    .desktop-only {
        display: block !important;
    }
}

/* Utility classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.w-100 { width: 100%; }

/* Improved spacing and typography */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
    color: white;
}

h1 { font-size: 28px; margin-bottom: 8px; }
h2 { font-size: 20px; margin-bottom: 6px; }
h3 { font-size: 18px; margin-bottom: 6px; }
h4 { font-size: 16px; margin-bottom: 4px; }

p { margin-bottom: 16px; line-height: 1.5; }
small { font-size: 12px; }

/* Image Preview Styles */
.image-preview-container {
    position: relative;
    display: inline-block;
    margin-right: 12px;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.image-preview-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.image-preview {
    width: 80px;
    height: 80px;
    object-fit: cover;
    display: block;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.image-preview-container:hover .image-overlay {
    opacity: 1;
}

.image-overlay i {
    color: white;
    font-size: 18px;
}

/* Image Modal Styles */
.image-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    margin: 2% auto;
}

.image-modal-body {
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0 0 8px 8px;
}

/* File Item Layout Updates */
.file-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
    background: white;
    transition: all 0.2s ease;
}

.file-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.file-item:last-child {
    margin-bottom: 0;
}

.file-info {
    flex: 1;
    display: flex;
    align-items: center;
}

.file-icon {
    font-size: 20px;
    color: var(--primary-color);
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

.file-details {
    flex: 1;
}

.file-name {
    display: block;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 2px;
    word-break: break-word;
}

.file-size {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

/* Copy button improvements */
.copy-btn {
    margin-left: 8px;
    padding: 6px 8px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    font-size: 12px;
}

.copy-btn:hover {
    background: #f7fafc;
    color: var(--text-color);
}

/* Signature pad */
.signature-pad {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--white);
}

/* CAPTCHA styling */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-question {
    font-weight: 600;
    color: #374151;
    font-size: 16px;
    background-color: #f9fafb;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    min-width: 60px;
    text-align: center;
}

.captcha-input {
    max-width: 80px !important;
    text-align: center;
    font-weight: 600;
}

/* Dashboard specific table styling */
.dashboard .card-body {
    padding: 12px 16px; /* Even more compact for dashboard */
}

.dashboard .table {
    margin-bottom: 0; /* Remove bottom margin */
}

.dashboard .table th,
.dashboard .table td {
    padding: 6px 10px; /* Even more compact for dashboard */
    font-size: 12px; /* Smaller text */
}

.dashboard .table th {
    padding: 4px 10px; /* Very compact headers */
    font-size: 11px;
}

/* Requests page specific table styling */
.requests .card-body {
    padding: 12px 16px; /* Even more compact for requests */
}

.requests .table {
    margin-bottom: 0; /* Remove bottom margin */
}

.requests .table th,
.requests .table td {
    padding: 6px 8px; /* Even more compact for requests */
    font-size: 12px; /* Smaller text */
}

.requests .table th {
    padding: 4px 8px; /* Very compact headers */
    font-size: 11px;
}

/* Dashboard no-requests message */
.dashboard .text-center.text-muted {
    margin: 20px 0;
    padding: 20px;
}

/* Loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Approval page desktop base styles */
.approve-container {
    max-width: 1000px;
    margin: 1rem auto;
    padding: 1rem;
}

/* Image hover effects for approval page */
.image-preview-container:hover .image-overlay {
    opacity: 1 !important;
}

/* File grid responsive adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .file-list {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .file-list {
        grid-template-columns: 1fr !important;
    }
}
