/* Elegant & Classic Style for Hotel Management App */

/* Typography */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: 0.01em;
}

/* Elegant Tables */
.elegant-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    background: #ffffff;
    display: table;
}

.elegant-table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    display: block;
    position: relative;
}

.elegant-table thead {
    background: linear-gradient(to bottom, #f8f9fa 0%, #f1f3f5 100%);
    border-bottom: 2px solid #dee2e6;
}

.elegant-table thead th {
    padding: 14px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    border-right: 1px solid #e9ecef;
}

.elegant-table thead th:last-child {
    border-right: none;
}

.elegant-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.elegant-table tbody tr:hover {
    background-color: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.elegant-table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.elegant-table tbody tr:nth-child(even):hover {
    background-color: #f1f3f5;
}

.elegant-table tbody td {
    padding: 16px 20px;
    font-size: 0.875rem;
    color: #212529;
    border-right: 1px solid #f1f3f5;
}

.elegant-table tbody td:last-child {
    border-right: none;
}

/* Elegant Badges */
.elegant-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
    border: 1px solid;
    letter-spacing: 0.02em;
}

.elegant-badge-primary {
    background-color: #e7f3ff;
    color: #0066cc;
    border-color: #b3d9ff;
}

.elegant-badge-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-color: #a5d6a7;
}

.elegant-badge-warning {
    background-color: #fff3e0;
    color: #e65100;
    border-color: #ffcc80;
}

.elegant-badge-danger {
    background-color: #ffebee;
    color: #c62828;
    border-color: #ef9a9a;
}

.elegant-badge-secondary {
    background-color: #f5f5f5;
    color: #616161;
    border-color: #e0e0e0;
}

/* Elegant Buttons */
.elegant-btn {
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 4px;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.elegant-btn-primary {
    background-color: #ffffff;
    color: #495057;
    border-color: #dee2e6;
}

.elegant-btn-primary:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.elegant-btn-action {
    padding: 6px 12px;
    font-size: 0.8125rem;
    background-color: #ffffff;
    color: #495057;
    border-color: #dee2e6;
    border-radius: 4px;
}

.elegant-btn-action:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

.elegant-btn-edit {
    color: #0066cc;
    border-color: #b3d9ff;
    background-color: #e7f3ff;
}

.elegant-btn-edit:hover {
    background-color: #d0e7ff;
    border-color: #80c1ff;
}

.elegant-btn-delete {
    color: #c62828;
    border-color: #ef9a9a;
    background-color: #ffebee;
}

.elegant-btn-delete:hover {
    background-color: #ffcdd2;
    border-color: #e57373;
}

.elegant-btn-success {
    background-color: #ffffff;
    color: #2e7d32;
    border-color: #a5d6a7;
}

.elegant-btn-success:hover {
    background-color: #e8f5e9;
}

/* Elegant Cards */
.elegant-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
}

.elegant-table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    display: block;
    position: relative;
}

.elegant-card-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(to bottom, #fafbfc 0%, #f8f9fa 100%);
}

.elegant-card-body {
    padding: 20px;
}

/* Elegant Inputs */
.elegant-input {
    padding: 10px 14px;
    font-size: 0.875rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    transition: all 0.2s ease;
    width: 100%;
}

.elegant-input:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.elegant-select {
    padding: 10px 14px;
    font-size: 0.875rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: #ffffff;
    transition: all 0.2s ease;
    width: 100%;
}

.elegant-select:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

/* Elegant Modal */
.elegant-modal {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border: 1px solid #e9ecef;
}

.elegant-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(to bottom, #fafbfc 0%, #f8f9fa 100%);
}

.elegant-modal-body {
    padding: 24px;
}

.elegant-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e9ecef;
    background: #fafbfc;
}

/* Elegant Header */
.elegant-header {
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Elegant Sidebar */
.elegant-sidebar {
    background: #343a40;
    border-right: 1px solid #495057;
}

/* Custom Teal/Turquoise color to replace indigo/purple - #03A9A3 */
.bg-teal-custom {
    background-color: #03A9A3;
}

.bg-teal-custom:hover {
    background-color: #028a85;
}

.bg-teal-custom-light {
    background-color: #e0f7f6;
}

.bg-teal-custom-lighter {
    background-color: #f0fcfb;
}

.text-teal-custom {
    color: #03A9A3;
}

.text-teal-custom-dark {
    color: #028a85;
}

.border-teal-custom {
    border-color: #03A9A3;
}

.ring-teal-custom {
    --tw-ring-color: #03A9A3;
}

.focus\:ring-teal-custom:focus {
    --tw-ring-color: #03A9A3;
}

/* Replace indigo classes */
.bg-indigo-50 { background-color: #f0fcfb !important; }
.bg-indigo-100 { background-color: #e0f7f6 !important; }
.bg-indigo-200 { background-color: #c1efed !important; }
.bg-indigo-300 { background-color: #a2e7e4 !important; }
.bg-indigo-400 { background-color: #51d7d2 !important; }
.bg-indigo-500 { background-color: #2ac7c1 !important; }
.bg-indigo-600 { background-color: #03A9A3 !important; }
.bg-indigo-700 { background-color: #028a85 !important; }
.bg-indigo-800 { background-color: #026b67 !important; }
.bg-indigo-900 { background-color: #014c49 !important; }

.text-indigo-50 { color: #f0fcfb !important; }
.text-indigo-100 { color: #e0f7f6 !important; }
.text-indigo-200 { color: #c1efed !important; }
.text-indigo-300 { color: #a2e7e4 !important; }
.text-indigo-400 { color: #51d7d2 !important; }
.text-indigo-500 { color: #2ac7c1 !important; }
.text-indigo-600 { color: #03A9A3 !important; }
.text-indigo-700 { color: #028a85 !important; }
.text-indigo-800 { color: #026b67 !important; }
.text-indigo-900 { color: #014c49 !important; }

.border-indigo-50 { border-color: #f0fcfb !important; }
.border-indigo-100 { border-color: #e0f7f6 !important; }
.border-indigo-200 { border-color: #c1efed !important; }
.border-indigo-300 { border-color: #a2e7e4 !important; }
.border-indigo-400 { border-color: #51d7d2 !important; }
.border-indigo-500 { border-color: #2ac7c1 !important; }
.border-indigo-600 { border-color: #03A9A3 !important; }
.border-indigo-700 { border-color: #028a85 !important; }
.border-indigo-800 { border-color: #026b67 !important; }
.border-indigo-900 { border-color: #014c49 !important; }

.ring-indigo-50 { --tw-ring-color: #f0fcfb !important; }
.ring-indigo-100 { --tw-ring-color: #e0f7f6 !important; }
.ring-indigo-200 { --tw-ring-color: #c1efed !important; }
.ring-indigo-300 { --tw-ring-color: #a2e7e4 !important; }
.ring-indigo-400 { --tw-ring-color: #51d7d2 !important; }
.ring-indigo-500 { --tw-ring-color: #2ac7c1 !important; }
.ring-indigo-600 { --tw-ring-color: #03A9A3 !important; }
.ring-indigo-700 { --tw-ring-color: #028a85 !important; }
.ring-indigo-800 { --tw-ring-color: #026b67 !important; }
.ring-indigo-900 { --tw-ring-color: #014c49 !important; }

.focus\:ring-indigo-50:focus { --tw-ring-color: #f0fcfb !important; box-shadow: 0 0 0 3px rgba(240, 252, 251, 0.1) !important; }
.focus\:ring-indigo-100:focus { --tw-ring-color: #e0f7f6 !important; box-shadow: 0 0 0 3px rgba(224, 247, 246, 0.1) !important; }
.focus\:ring-indigo-200:focus { --tw-ring-color: #c1efed !important; box-shadow: 0 0 0 3px rgba(193, 239, 237, 0.1) !important; }
.focus\:ring-indigo-300:focus { --tw-ring-color: #a2e7e4 !important; box-shadow: 0 0 0 3px rgba(162, 231, 228, 0.1) !important; }
.focus\:ring-indigo-400:focus { --tw-ring-color: #51d7d2 !important; box-shadow: 0 0 0 3px rgba(81, 215, 210, 0.1) !important; }
.focus\:ring-indigo-500:focus { --tw-ring-color: #2ac7c1 !important; box-shadow: 0 0 0 3px rgba(3, 169, 163, 0.1) !important; }
.focus\:ring-indigo-600:focus { --tw-ring-color: #03A9A3 !important; box-shadow: 0 0 0 3px rgba(3, 169, 163, 0.1) !important; }
.focus\:ring-indigo-700:focus { --tw-ring-color: #028a85 !important; box-shadow: 0 0 0 3px rgba(2, 138, 133, 0.1) !important; }
.focus\:ring-indigo-800:focus { --tw-ring-color: #026b67 !important; box-shadow: 0 0 0 3px rgba(2, 107, 103, 0.1) !important; }
.focus\:ring-indigo-900:focus { --tw-ring-color: #014c49 !important; box-shadow: 0 0 0 3px rgba(1, 76, 73, 0.1) !important; }

.focus\:border-indigo-500:focus { border-color: #2ac7c1 !important; }
.focus\:border-indigo-600:focus { border-color: #03A9A3 !important; }

.from-indigo-50 { --tw-gradient-from: #f0fcfb !important; }
.from-indigo-100 { --tw-gradient-from: #e0f7f6 !important; }
.from-indigo-200 { --tw-gradient-from: #c1efed !important; }
.from-indigo-300 { --tw-gradient-from: #a2e7e4 !important; }
.from-indigo-400 { --tw-gradient-from: #51d7d2 !important; }
.from-indigo-500 { --tw-gradient-from: #2ac7c1 !important; }
.from-indigo-600 { --tw-gradient-from: #03A9A3 !important; }
.from-indigo-700 { --tw-gradient-from: #028a85 !important; }
.from-indigo-800 { --tw-gradient-from: #026b67 !important; }
.from-indigo-900 { --tw-gradient-from: #014c49 !important; }

.to-indigo-50 { --tw-gradient-to: #f0fcfb !important; }
.to-indigo-100 { --tw-gradient-to: #e0f7f6 !important; }
.to-indigo-200 { --tw-gradient-to: #c1efed !important; }
.to-indigo-300 { --tw-gradient-to: #a2e7e4 !important; }
.to-indigo-400 { --tw-gradient-to: #51d7d2 !important; }
.to-indigo-500 { --tw-gradient-to: #2ac7c1 !important; }
.to-indigo-600 { --tw-gradient-to: #03A9A3 !important; }
.to-indigo-700 { --tw-gradient-to: #028a85 !important; }
.to-indigo-800 { --tw-gradient-to: #026b67 !important; }
.to-indigo-900 { --tw-gradient-to: #014c49 !important; }

.hover\:bg-indigo-100:hover { background-color: #e0f7f6 !important; }
.hover\:bg-indigo-200:hover { background-color: #c1efed !important; }
.hover\:bg-indigo-600:hover { background-color: #03A9A3 !important; }
.hover\:bg-indigo-700:hover { background-color: #028a85 !important; }

.hover\:text-indigo-50:hover { color: #f0fcfb !important; }
.hover\:text-indigo-100:hover { color: #e0f7f6 !important; }
.hover\:text-indigo-200:hover { color: #c1efed !important; }
.hover\:text-indigo-300:hover { color: #a2e7e4 !important; }
.hover\:text-indigo-400:hover { color: #51d7d2 !important; }
.hover\:text-indigo-500:hover { color: #2ac7c1 !important; }
.hover\:text-indigo-600:hover { color: #03A9A3 !important; }
.hover\:text-indigo-700:hover { color: #028a85 !important; }
.hover\:text-indigo-800:hover { color: #026b67 !important; }
.hover\:text-indigo-900:hover { color: #014c49 !important; }

.hover\:border-indigo-50:hover { border-color: #f0fcfb !important; }
.hover\:border-indigo-100:hover { border-color: #e0f7f6 !important; }
.hover\:border-indigo-200:hover { border-color: #c1efed !important; }
.hover\:border-indigo-300:hover { border-color: #a2e7e4 !important; }
.hover\:border-indigo-400:hover { border-color: #51d7d2 !important; }
.hover\:border-indigo-500:hover { border-color: #2ac7c1 !important; }
.hover\:border-indigo-600:hover { border-color: #03A9A3 !important; }
.hover\:border-indigo-700:hover { border-color: #028a85 !important; }
.hover\:border-indigo-800:hover { border-color: #026b67 !important; }
.hover\:border-indigo-900:hover { border-color: #014c49 !important; }

/* Replace purple classes */
.bg-purple-50 { background-color: #f0fcfb !important; }
.bg-purple-100 { background-color: #e0f7f6 !important; }
.bg-purple-200 { background-color: #c1efed !important; }
.bg-purple-300 { background-color: #a2e7e4 !important; }
.bg-purple-400 { background-color: #51d7d2 !important; }
.bg-purple-500 { background-color: #2ac7c1 !important; }
.bg-purple-600 { background-color: #03A9A3 !important; }
.bg-purple-700 { background-color: #028a85 !important; }
.bg-purple-800 { background-color: #026b67 !important; }
.bg-purple-900 { background-color: #014c49 !important; }

.text-purple-50 { color: #f0fcfb !important; }
.text-purple-100 { color: #e0f7f6 !important; }
.text-purple-200 { color: #c1efed !important; }
.text-purple-300 { color: #a2e7e4 !important; }
.text-purple-400 { color: #51d7d2 !important; }
.text-purple-500 { color: #2ac7c1 !important; }
.text-purple-600 { color: #03A9A3 !important; }
.text-purple-700 { color: #028a85 !important; }
.text-purple-800 { color: #026b67 !important; }
.text-purple-900 { color: #014c49 !important; }

.border-purple-50 { border-color: #f0fcfb !important; }
.border-purple-100 { border-color: #e0f7f6 !important; }
.border-purple-200 { border-color: #c1efed !important; }
.border-purple-300 { border-color: #a2e7e4 !important; }
.border-purple-400 { border-color: #51d7d2 !important; }
.border-purple-500 { border-color: #2ac7c1 !important; }
.border-purple-600 { border-color: #03A9A3 !important; }
.border-purple-700 { border-color: #028a85 !important; }
.border-purple-800 { border-color: #026b67 !important; }
.border-purple-900 { border-color: #014c49 !important; }

.hover\:bg-purple-50:hover { background-color: #f0fcfb !important; }
.hover\:bg-purple-100:hover { background-color: #e0f7f6 !important; }
.hover\:bg-purple-200:hover { background-color: #c1efed !important; }
.hover\:bg-purple-300:hover { background-color: #a2e7e4 !important; }
.hover\:bg-purple-400:hover { background-color: #51d7d2 !important; }
.hover\:bg-purple-500:hover { background-color: #2ac7c1 !important; }
.hover\:bg-purple-600:hover { background-color: #03A9A3 !important; }
.hover\:bg-purple-700:hover { background-color: #028a85 !important; }

.hover\:text-purple-600:hover { color: #03A9A3 !important; }
.hover\:text-purple-700:hover { color: #028a85 !important; }
.hover\:text-purple-800:hover { color: #026b67 !important; }

.focus\:border-purple-500:focus { border-color: #2ac7c1 !important; }
.focus\:border-purple-600:focus { border-color: #03A9A3 !important; }

.ring-purple-50 { --tw-ring-color: #f0fcfb !important; }
.ring-purple-100 { --tw-ring-color: #e0f7f6 !important; }
.ring-purple-200 { --tw-ring-color: #c1efed !important; }
.ring-purple-300 { --tw-ring-color: #a2e7e4 !important; }
.ring-purple-400 { --tw-ring-color: #51d7d2 !important; }
.ring-purple-500 { --tw-ring-color: #2ac7c1 !important; }
.ring-purple-600 { --tw-ring-color: #03A9A3 !important; }
.ring-purple-700 { --tw-ring-color: #028a85 !important; }
.ring-purple-800 { --tw-ring-color: #026b67 !important; }
.ring-purple-900 { --tw-ring-color: #014c49 !important; }

.focus\:ring-purple-50:focus { --tw-ring-color: #f0fcfb !important; box-shadow: 0 0 0 3px rgba(240, 252, 251, 0.1) !important; }
.focus\:ring-purple-100:focus { --tw-ring-color: #e0f7f6 !important; box-shadow: 0 0 0 3px rgba(224, 247, 246, 0.1) !important; }
.focus\:ring-purple-200:focus { --tw-ring-color: #c1efed !important; box-shadow: 0 0 0 3px rgba(193, 239, 237, 0.1) !important; }
.focus\:ring-purple-300:focus { --tw-ring-color: #a2e7e4 !important; box-shadow: 0 0 0 3px rgba(162, 231, 228, 0.1) !important; }
.focus\:ring-purple-400:focus { --tw-ring-color: #51d7d2 !important; box-shadow: 0 0 0 3px rgba(81, 215, 210, 0.1) !important; }
.focus\:ring-purple-500:focus { --tw-ring-color: #2ac7c1 !important; box-shadow: 0 0 0 3px rgba(3, 169, 163, 0.1) !important; }
.focus\:ring-purple-600:focus { --tw-ring-color: #03A9A3 !important; box-shadow: 0 0 0 3px rgba(3, 169, 163, 0.1) !important; }
.focus\:ring-purple-700:focus { --tw-ring-color: #028a85 !important; box-shadow: 0 0 0 3px rgba(2, 138, 133, 0.1) !important; }
.focus\:ring-purple-800:focus { --tw-ring-color: #026b67 !important; box-shadow: 0 0 0 3px rgba(2, 107, 103, 0.1) !important; }
.focus\:ring-purple-900:focus { --tw-ring-color: #014c49 !important; box-shadow: 0 0 0 3px rgba(1, 76, 73, 0.1) !important; }

.from-purple-50 { --tw-gradient-from: #f0fcfb !important; }
.from-purple-100 { --tw-gradient-from: #e0f7f6 !important; }
.from-purple-200 { --tw-gradient-from: #c1efed !important; }
.from-purple-300 { --tw-gradient-from: #a2e7e4 !important; }
.from-purple-400 { --tw-gradient-from: #51d7d2 !important; }
.from-purple-500 { --tw-gradient-from: #2ac7c1 !important; }
.from-purple-600 { --tw-gradient-from: #03A9A3 !important; }
.from-purple-700 { --tw-gradient-from: #028a85 !important; }
.from-purple-800 { --tw-gradient-from: #026b67 !important; }
.from-purple-900 { --tw-gradient-from: #014c49 !important; }

.to-purple-50 { --tw-gradient-to: #f0fcfb !important; }
.to-purple-100 { --tw-gradient-to: #e0f7f6 !important; }
.to-purple-200 { --tw-gradient-to: #c1efed !important; }
.to-purple-300 { --tw-gradient-to: #a2e7e4 !important; }
.to-purple-400 { --tw-gradient-to: #51d7d2 !important; }
.to-purple-500 { --tw-gradient-to: #2ac7c1 !important; }
.to-purple-600 { --tw-gradient-to: #03A9A3 !important; }
.to-purple-700 { --tw-gradient-to: #028a85 !important; }
.to-purple-800 { --tw-gradient-to: #026b67 !important; }
.to-purple-900 { --tw-gradient-to: #014c49 !important; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .elegant-table thead th,
    .elegant-table tbody td {
        padding: 10px 12px;
        font-size: 0.75rem;
    }
    
    .elegant-table thead th {
        font-size: 0.7rem;
        padding: 8px 10px;
    }
    
    .elegant-table tbody td {
        padding: 10px 8px;
    }
    
    /* Make table wrapper scrollable on mobile */
    .elegant-table-wrapper {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        overflow-x: auto;
    }
    
    /* Better button sizing on mobile */
    .elegant-btn {
        padding: 10px 14px;
        font-size: 0.875rem;
    }
    
    .elegant-btn-action {
        padding: 8px 10px;
        font-size: 0.75rem;
    }
    
    /* Form inputs responsive */
    .elegant-input,
    .elegant-select {
        padding: 12px 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Card padding on mobile */
    .elegant-card-body {
        padding: 16px;
    }
    
    .elegant-card-header {
        padding: 16px;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .elegant-table thead th,
    .elegant-table tbody td {
        padding: 12px 16px;
        font-size: 0.8125rem;
    }
}

/* Mobile hamburger menu button */
.mobile-menu-btn {
    display: block;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 50;
    background-color: #03A9A3;
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.mobile-menu-btn:hover {
    background-color: #028a85;
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

@media (min-width: 1024px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* Responsive form grids */
@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr !important;
    }
    
    .form-grid-2 {
        grid-template-columns: 1fr !important;
    }
    
    .form-grid-3 {
        grid-template-columns: 1fr !important;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .form-grid-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Responsive button groups */
@media (max-width: 640px) {
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group button,
    .btn-group a {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-group button:last-child,
    .btn-group a:last-child {
        margin-bottom: 0;
    }
}

/* Better spacing on mobile */
@media (max-width: 768px) {
    .container-padding {
        padding: 1rem;
    }
    
    .section-spacing {
        margin-bottom: 1.5rem;
    }
}

/* Responsive table - horizontal scroll on mobile */
@media (max-width: 1024px) {
    .elegant-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: block;
        width: 100%;
    }
    
    .elegant-table {
        min-width: 800px; /* Ensure table doesn't get too compressed */
    }
}

/* ========== Global responsive: sidebar, pages, forms, CRUD, buttons ========== */

/* Viewport and touch */
html {
    -webkit-text-size-adjust: 100%;
}
body {
    overflow-x: hidden;
}

/* Main content area: allow horizontal scroll only inside tables/cards */
#main-content {
    overflow-x: hidden;
}
#main-content main {
    min-width: 0;
}

/* Responsive tables: always scrollable on small screens */
@media (max-width: 767px) {
    .elegant-table-wrapper,
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    .elegant-table {
        min-width: 600px;
    }
}

/* Forms: full-width inputs on mobile */
@media (max-width: 767px) {
    form input[type="text"],
    form input[type="email"],
    form input[type="number"],
    form input[type="date"],
    form input[type="password"],
    form input[type="search"],
    form select,
    form textarea {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    /* Form sections: allow wrap */
    form .flex-wrap > * {
        min-width: 0;
    }
}

/* Buttons: wrap and touch-friendly on mobile */
@media (max-width: 767px) {
    .flex.gap-2,
    .flex.gap-3,
    .flex.gap-4 {
        flex-wrap: wrap;
    }
    /* Action button groups (e.g. Edit, Delete): minimum touch target */
    .elegant-btn-action,
    button:not(.mobile-menu-btn),
    a.bg-indigo-600,
    a.bg-blue-600,
    a.bg-red-600 {
        min-height: 44px;
        min-width: 44px;
        padding: 0.5rem 0.75rem;
    }
}

/* Page header: allow wrap so title + buttons don't overflow */
@media (max-width: 639px) {
    header .flex {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
}
