/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Fullscreen Chat Styles */
.chat-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    min-width: 100vw;
    background: #f4f6f8;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.chat-header {
    background: #1f4d78;
    color: #fff;
    padding: 16px 24px;
    font-size: 22px;
    font-weight: 600;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.chat-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 18px 16px 12px 16px;
    background: #f4f6f8;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-input-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
    gap: 10px;
}

.chat-input-row input[type="text"],
.chat-input-row textarea {
    flex: 1 1 auto;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.chat-input-row input[type="text"]:focus,
.chat-input-row textarea:focus {
    border-color: #1f4d78;
    outline: none;
}

.chat-input-row button {
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    background: #1f4d78;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.chat-input-row button:hover {
    background: #163b5a;
}

/* Make sure chat page disables scroll on body */
body.chat-fullscreen {
    overflow: hidden;
    height: 100vh;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .chat-wrapper {
        width: 100vw;
        height: 100vh;
        min-width: 100vw;
        min-height: 100vh;
        border-radius: 0;
    }

    .chat-header {
        font-size: 18px;
        padding: 12px 10px;
    }

    .chat-messages {
        padding: 10px 4px 8px 4px;
        font-size: 15px;
    }

    .chat-input-row {
        padding: 8px 4px;
        gap: 6px;
    }

    .chat-input-row button {
        font-size: 14px;
        padding: 8px 12px;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========== GLOBAL & BODY ========== */
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
    min-height: 100vh;
    padding-bottom: 40px;
    color: #1F2937;
    display: flex;
    flex-direction: column;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(124, 58, 237, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ========== NAVBAR ========== */
.navbar {
    background: linear-gradient(135deg, #1E40AF 0%, #1E3A8A 100%);
    color: #ffffff;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 40px;
}

.nav-brand {
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #ffffff;
    display: flex;
    align-items: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-brand::before {
    content: "▶";
    margin-right: 0.8rem;
    color: #7C3AED;
    font-size: 1.4rem;
}

.nav-user {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-user span {
    color: #e2e8f0;
    font-size: 0.95rem;
    font-weight: 500;
}

.admin-badge {
    background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
    color: #ffffff;
    padding: 0.45rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 25px;
    position: relative;
    z-index: 1;
}

/* Full Width Container */
.container-full {
    width: 100%;
    margin: 0 auto;
    padding: 0 30px;
}

/* Auth Container */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-box {
    background: #ffffff;
    padding: 45px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(44, 62, 80, 0.1);
    width: 100%;
    max-width: 450px;
}

.auth-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #1e3a5f;
    font-size: 1.8rem;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
}

.auth-link a {
    color: #4299e1;
    text-decoration: none;
    font-weight: 600;
}

/* Dashboard Grid - Optimized for many cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-top: 30px;
    animation: fadeIn 0.6s ease-in;
    max-width: 1400px;
}

/* Limit to max 3 columns on very large screens */
@media (min-width: 1600px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .section-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Dashboard Section Headers */
.dashboard-section {
    margin-top: 32px;
    margin-bottom: 16px;
}

.dashboard-section:first-child {
    margin-top: 0;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 16px;
    padding-left: 12px;
    border-left: 4px solid #3B82F6;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

/* Premium Card Styles */
.card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #E5E7EB;
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3B82F6, #8B5CF6);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: #3B82F6;
}

.card:hover::before {
    height: 5px;
}

.card h2 {
    margin-top: 4px;
    margin-bottom: 12px;
    color: #1F2937;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card p {
    color: #6B7280;
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 0.9rem;
    font-weight: 400;
}

.card-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    flex-direction: row;
}

.card-actions .btn {
    flex: 1;
    min-width: 140px;
}

/* Form */
.form-container {
    background: #ffffff;
    padding: 36px;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(44, 62, 80, 0.06);
    max-width: 680px;
    margin: 0 auto;
}

.form-container h1 {
    margin-bottom: 25px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1f4d78;
    box-shadow: 0 0 0 3px rgba(31, 77, 120, 0.06);
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.form-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Premium Buttons */
.btn {
    border: none;
    padding: 1rem 1.8rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    vertical-align: middle;
    line-height: normal;
    text-align: center;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(113, 128, 150, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(113, 128, 150, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c53030 0%, #9b2c2c 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(229, 62, 62, 0.4);
}

.btn-logout {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: #ffffff;
    border: none;
    padding: 0.65rem 1.3rem;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(229, 62, 62, 0.3);
}

.btn-logout:hover {
    background: linear-gradient(135deg, #c53030 0%, #9b2c2c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.4);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert.error {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.alert.success {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

/* Table */
.table-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background: #1f4d78;
    color: white;
}

/* Ensure header links inherit the white color and don't show default link styling */
table thead a {
    color: inherit;
    text-decoration: none;
}

table thead a:hover {
    color: #ffffff;
    text-decoration: underline;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

table tbody tr:hover {
    background: #f1f3f5;
}

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

.action-buttons {
    display: flex;
    gap: 5px;
}

/* Status Badges */
.status-badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-in-progress {
    background: #cfe2ff;
    color: #084298;
}

.status-completed {
    background: #d1e7dd;
    color: #0f5132;
}

/* Filter Box */
.filter-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-row input,
.filter-row select {
    flex: 1;
    min-width: 200px;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
}

.filter-row input:focus,
.filter-row select:focus {
    outline: none;
    border-color: #1f4d78;
}

/* Responsive - Large screens */
@media (min-width: 1400px) and (max-width: 1599px) {

    .dashboard-grid,
    .section-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Responsive - Medium-Large tablets and small desktops */
@media (max-width: 1200px) {

    .dashboard-grid,
    .section-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 1024px) {

    .dashboard-grid,
    .section-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 18px;
    }
}

/* Tablet */
@media (max-width: 900px) {

    .dashboard-grid,
    .section-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: 20px;
    }

    .navbar {
        flex-direction: column;
        gap: 15px;
        padding: 1rem 1.5rem;
    }

    .nav-brand {
        font-size: 1.4rem;
    }

    .nav-user {
        flex-direction: row;
        justify-content: center;
        width: 100%;
        flex-wrap: wrap;
        gap: 10px;
    }

    .nav-user .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .container {
        padding: 0 15px;
    }

    .dashboard-grid,
    .section-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .section-title {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .card {
        padding: 20px;
    }

    .card h2 {
        font-size: 1.1rem;
    }

    .card p {
        font-size: 0.85rem;
        margin-bottom: 16px;
    }

    .filter-row {
        flex-direction: column;
    }

    .filter-row input,
    .filter-row select {
        width: 100%;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
    }

    .card-actions {
        flex-direction: column;
    }

    .card-actions .btn {
        min-width: 100%;
    }
}

/* Mobile - Small phones */
@media (max-width: 480px) {
    .navbar {
        padding: 0.8rem 1rem;
    }

    .nav-brand {
        font-size: 1.2rem;
    }

    .nav-brand::before {
        font-size: 1.1rem;
        margin-right: 0.5rem;
    }

    .container {
        padding: 0 12px;
    }

    .card {
        padding: 16px;
        border-radius: 12px;
    }

    .card h2 {
        font-size: 1rem;
        gap: 8px;
    }

    .card p {
        font-size: 0.8rem;
    }

    .btn {
        padding: 0.75rem 1.2rem;
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 0.95rem;
        padding-left: 8px;
        border-left-width: 3px;
    }

    /* Mobile-specific improvements */
    .container-full {
        padding: 0 12px;
    }

    .form-container {
        padding: 20px;
        border-radius: 8px;
    }

    .auth-box {
        padding: 25px;
    }

    /* Make tables scroll horizontally on mobile */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 12px;
    }

    table {
        min-width: 600px;
        /* Ensure table doesn't get too cramped */
        font-size: 0.85rem;
    }

    table th,
    table td {
        padding: 8px;
    }

    /* Better button spacing on mobile */
    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    /* Improve touch targets */
    .btn-sm {
        padding: 8px 14px;
        font-size: 13px;
        min-height: 36px;
        /* Better touch target */
    }

    /* Filter box adjustments */
    .filter-box {
        padding: 15px;
    }

    .filter-row .btn {
        width: 100%;
    }
}

/* Pagination */
.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 12px 0 18px 0;
    flex-wrap: wrap;
}

.pagination .btn {
    padding: 6px 10px;
    font-size: 13px;
}

/* removed empty rule previously causing lint warnings */
.pagination .current,
.pagination .btn.current {
    background: #1f4d78;
    color: #fff !important;
    pointer-events: none;
}

.pagination .disabled,
.pagination .btn.disabled {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}

.pagination a.page-link {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
    color: #1f4d78;
    border: 1px solid rgba(31, 77, 120, 0.06);
    background: #ffffff;
}

.pagination a.page-link:hover {
    background: #f1f3f5;
    color: #163b5a;
}

/* Footer styles */
.site-footer {
    text-align: center;
    padding: 20px;
    background: #f4f6f8;
    color: #666;
    font-size: 0.9rem;
    margin-top: auto;
    width: 100%;
    border-top: 1px solid #e0e0e0;
}

.site-footer strong {
    color: #1f4d78;
}

/* Location Buttons */
.location-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.location-buttons form {
    width: 100%;
}

.location-buttons button {
    width: 100%;
    padding: 1rem 1.8rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.location-in {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.location-in:hover {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

.location-out {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(237, 137, 54, 0.3);
}

.location-out:hover {
    background: linear-gradient(135deg, #dd6b20 0%, #c05621 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(237, 137, 54, 0.4);
}

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

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

/* Category-based card accent colors */
.card.category-location::before {
    background: linear-gradient(90deg, #10B981, #059669);
}

.card.category-chat::before {
    background: linear-gradient(90deg, #8B5CF6, #7C3AED);
}

.card.category-tasks::before {
    background: linear-gradient(90deg, #3B82F6, #2563EB);
}

.card.category-staff::before {
    background: linear-gradient(90deg, #F59E0B, #D97706);
}

.card.category-reports::before {
    background: linear-gradient(90deg, #06B6D4, #0891B2);
}

.card.category-inquiries::before {
    background: linear-gradient(90deg, #EC4899, #DB2777);
}

.card.category-users::before {
    background: linear-gradient(90deg, #EF4444, #DC2626);
}

.card.category-routine::before {
    background: linear-gradient(90deg, #F97316, #EA580C);
}

/* Admission Form Styles */
#formsTable {
    margin-top: 20px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    overflow: hidden;
}

#formsTable thead {
    background: linear-gradient(135deg, #1E40AF 0%, #1E3A8A 100%);
}

#formsTable thead th {
    color: #ffffff;
    font-weight: 600;
    padding: 14px 12px;
    font-size: 0.9rem;
    text-align: left;
    border-bottom: 2px solid #1E3A8A;
}

#formsTable tbody tr {
    transition: background-color 0.2s ease;
}

#formsTable tbody tr:hover {
    background-color: #F9FAFB;
}

#formsTable tbody td {
    padding: 12px;
    vertical-align: middle;
    border-bottom: 1px solid #E5E7EB;
}

#formsTable tbody tr:last-child td {
    border-bottom: none;
}

/* Form controls inside table */
#formsTable .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #E5E7EB;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    background-color: #ffffff;
}

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

#formsTable select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

#formsTable input[type="date"].form-control {
    cursor: pointer;
}

#formsTable input[type="tel"].form-control::placeholder {
    color: #9CA3AF;
    font-size: 13px;
}

/* Remove row button styling */
#formsTable .remove-row {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 6px;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

/* Add row button styling */
#addRow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#addRow::before {
    content: '+';
    font-size: 18px;
    font-weight: bold;
}

/* Table container for better mobile support */
.table-bordered {
    border-collapse: separate;
    border-spacing: 0;
}

/* Responsive table for admission form */
@media (max-width: 768px) {
    #formsTable {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
    }

    #formsTable thead th {
        padding: 12px 8px;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    #formsTable tbody td {
        padding: 10px 8px;
        min-width: 120px;
    }

    #formsTable .form-control {
        font-size: 13px;
        padding: 8px 10px;
    }

    #formsTable select.form-control {
        background-position: right 8px center;
        padding-right: 30px;
    }

    #formsTable .remove-row {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {

    #formsTable thead th,
    #formsTable tbody td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }

    #formsTable tbody td:first-child,
    #formsTable tbody td:nth-child(2) {
        min-width: 140px;
    }

    #formsTable tbody td:nth-child(3) {
        min-width: 160px;
    }

    #formsTable tbody td:last-child {
        min-width: 50px;
        text-align: center;
    }
}

/* Bootstrap-like Grid Utilities for Filter Forms */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -7.5px;
    margin-left: -7.5px;
}

.col-md-2,
.col-md-3,
.col-md-4,
.col-md-6 {
    position: relative;
    width: 100%;
    padding-right: 7.5px;
    padding-left: 7.5px;
}

@media (min-width: 768px) {
    .col-md-2 {
        flex: 0 0 16.666667%;
        max-width: 16.666667%;
    }

    .col-md-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }

    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Utility Classes */
.d-flex {
    display: flex !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

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

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

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.w-100 {
    width: 100% !important;
}

.text-muted {
    color: #6B7280 !important;
}

/* Table Utilities */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-hover tbody tr {
    transition: background-color 0.15s ease-in-out;
}

.table-hover tbody tr:hover {
    background-color: #F9FAFB !important;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}

.badge-warning {
    background-color: #F59E0B;
}

.badge-primary {
    background-color: #3B82F6;
}

.badge-success {
    background-color: #10B981;
}

.badge-secondary {
    background-color: #6B7280;
}

.badge-info {
    background-color: #06B6D4;
}

/* Button Variants */
.btn-info {
    background: linear-gradient(135deg, #06B6D4 0%, #0891B2 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.btn-info:hover {
    background: linear-gradient(135deg, #0891B2 0%, #0e7490 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Pagination */
.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
}

.page-item {
    margin: 0 3px;
}

.page-item.active .page-link {
    background-color: #1E40AF;
    border-color: #1E40AF;
    color: #ffffff;
}

.page-link {
    position: relative;
    display: block;
    padding: 0.5rem 0.75rem;
    color: #1E40AF;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.page-link:hover {
    background-color: #F3F4F6;
    border-color: #1E40AF;
    color: #1E3A8A;
}

.justify-content-center {
    justify-content: center !important;
}

/* Alert Styles */
.alert-success {
    background-color: #D1FAE5;
    border: 1px solid #A7F3D0;
    color: #065F46;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

/* Container Fluid */
.container-fluid {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* Enhanced Filter Form Styling */
.row.mb-4 select.form-control,
.row.mb-4 input.form-control {
    height: 42px;
    padding: 8px 12px;
    font-size: 14px;
    border: 2px solid #D1D5DB;
    border-radius: 8px;
    background-color: #FFFFFF;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #374151;
}

.row.mb-4 select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%234B5563' d='M11.293 4.293L7 8.586 2.707 4.293A1 1 0 00.293 5.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    cursor: pointer;
}

.row.mb-4 input.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    padding-left: 40px;
}

.row.mb-4 select.form-control:hover,
.row.mb-4 input.form-control:hover {
    border-color: #9CA3AF;
}

.row.mb-4 select.form-control:focus,
.row.mb-4 input.form-control:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.row.mb-4 input.form-control::placeholder {
    color: #9CA3AF;
    font-weight: 400;
}

/* Filter button enhancement */
.row.mb-4 .btn-secondary {
    height: 42px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
}

/* WhatsApp Button Styling */
.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #ECFDF5;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid #A7F3D0;
}

.whatsapp-btn:hover {
    background-color: #D1FAE5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
}

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

.whatsapp-btn svg {
    transition: transform 0.2s ease;
}

.whatsapp-btn:hover svg {
    transform: scale(1.1);
}