/* BRMSystem Main Style */
/* Base Colors */
:root {
    --primary-green: #004D2E;
    --sidebar-bg: #004D2E;
    --sidebar-text: #ffffff;
    --header-bg: #e6f0ec;
    --site-bg: #ffffff;
    --text-black: #000000;
    --accent-green: #2ecc71;
}

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

body {
    font-family: 'SolaimanLipi', 'Siyam Rupali', Arial, sans-serif;
    background-color: var(--site-bg);
    color: var(--text-black);
}

/* Auth Pages */
/* Login Page Enhancements */
.login-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #004D2E 0%, #002b1a 100%);
    padding: 20px;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem 2.5rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 420px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-box img.logo {
    width: 90px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.login-box h2 {
    color: var(--primary-green);
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.form-group {
    margin-bottom: 1.2rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #444;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #eee;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
    background: #fcfcfc;
}

.form-control:focus {
    border-color: var(--primary-green);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 77, 46, 0.1);
    outline: none;
}

.btn-login {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-green) 0%, #00361f 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 77, 46, 0.2);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 77, 46, 0.3);
}

.btn-google {
    width: 100%;
    padding: 0.8rem;
    background-color: #fff;
    color: #444;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 0.95rem;
    cursor: pointer;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-google:hover {
    background-color: #f8f9fa;
    border-color: #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-google img {
    width: 20px !important;
    height: 20px !important;
    display: inline-block !important;
}

.or-divider {
    margin: 1.8rem 0;
    display: flex;
    align-items: center;
    text-align: center;
    color: #888;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

.or-divider::before,
.or-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #eee;
}

.or-divider:not(:empty)::before {
    margin-right: 1.5rem;
}

.or-divider:not(:empty)::after {
    margin-left: 1.5rem;
}

/* Sidebar & Layout */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

#sidebar {
    min-width: 260px;
    max-width: 260px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    transition: all 0.3s cubic-bezier(0.945, 0.020, 0.270, 0.665);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
    margin-left: 0;
    /* Ensures it starts visible on desktop */
}

#sidebar.active {
    margin-left: -260px;
    /* Hides it when toggled */
}

#sidebar .sidebar-header {
    padding: 25px 20px;
    background: #00361f;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#sidebar .sidebar-header h3 {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0;
}

/* Header & Bulk layout alignments */
.filter-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bulk-action-bar {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 5px;
    display: flex;
    gap: 10px;
    align-items: center;
}

#sidebar ul.components {
    padding: 15px 0;
}

#sidebar ul li a {
    padding: 12px 20px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: 0.3s;
    border-left: 4px solid transparent;
}

#sidebar ul li a i {
    width: 25px;
    font-size: 1.1rem;
}

#sidebar ul li a:hover,
#sidebar ul li.active>a {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--accent-green);
}

/* Sub-menus */
#sidebar ul li ul.submenu {
    display: none;
    background: rgba(0, 0, 0, 0.2);
    padding: 5px 0;
}

#sidebar ul li ul.submenu.show {
    display: block;
}

#sidebar ul li ul.submenu li a {
    padding-left: 45px;
    font-size: 0.9rem;
    border-left: none;
}

#sidebar ul li ul.submenu li a:hover,
#sidebar ul li ul.submenu li.active a {
    background: transparent;
    color: var(--accent-green);
}

.dropdown-toggle::after {
    display: inline-block;
    margin-left: auto;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f105";
    transition: transform 0.3s;
}

.menu-item.active .dropdown-toggle::after {
    transform: rotate(90deg);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    top: 0;
    left: 0;
}

@media (max-width: 768px) {
    .sidebar-overlay.active {
        display: block;
    }
}

@media (min-width: 769px) {
    .sidebar-overlay {
        display: none !important;
    }
}

#content {
    width: 100%;
    padding: 20px;
    min-height: 100vh;
    margin-left: 260px;
    transition: all 0.3s;
}

#content.active {
    margin-left: 0;
}

.top-bar {
    background: var(--header-bg);
    padding: 15px 25px;
    margin-bottom: 25px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Dashboard Enhancements - Official Govt Style */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: #fff;
    padding: 0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
    overflow: hidden;
    transition: none;
    display: flex;
    flex-direction: column;
}

.stat-card-header {
    background: #f8f9fa;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    font-weight: bold;
    font-size: 0.95rem;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-card-body {
    padding: 20px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-card-info h3 {
    font-size: 2rem;
    margin: 0;
    font-weight: bold;
    color: var(--primary-green);
}

.stat-card-info p {
    margin: 3px 0 0;
    font-size: 1rem;
    color: #666;
}

.stat-card-icon {
    font-size: 2rem;
    color: #555;
}

/* Formal Solid Accents */
.stat-card.govt-primary {
    border-top: 4px solid #004D2E;
}

.stat-card.govt-info {
    border-top: 4px solid #00a8ff;
}

.stat-card.govt-warning {
    border-top: 4px solid #f1c40f;
}

.stat-card.govt-danger {
    border-top: 4px solid #e74c3c;
}

/* Quick Actions - Formal Rectangular Buttons */
.quick-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.btn-action {
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: var(--primary-green);
    border: 1px solid var(--primary-green);
    font-size: 0.95rem;
    transition: 0.2s;
}

.btn-action:hover {
    background: var(--primary-green);
    color: #fff;
}

/* Recent Activity Table - Formal Registry Style */
.activity-table {
    width: 100%;
    border-collapse: collapse;
}

.activity-table th,
.activity-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #dee2e6;
    font-size: 0.95rem;
}

.activity-table th {
    background: #004D2E;
    color: #fff;
    font-weight: normal;
}

.activity-table tr:nth-child(even) {
    background: #f9f9f9;
}

.activity-table tr:hover {
    background: #f1f1f1;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    border: 1px solid transparent;
}

/* Forms, Tables & Cards - Shared Sarkari Styling */
.main-card {
    background: #fff;
    padding: 25px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
    border-top: 5px solid #004D2E;
    margin-bottom: 30px;
}

.main-card h3,
.main-card h5 {
    color: #004D2E;
    font-weight: bold;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* Global Table Styles (Sarkari Registry Style) */
table:not(.no-style) {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

table:not(.no-style) th {
    padding: 12px;
    border: 1px solid #dee2e6;
    text-align: center !important;
    font-size: 0.95rem;
}

table:not(.no-style) td {
    padding: 12px;
    border: 1px solid #dee2e6;
    text-align: left;
    font-size: 0.95rem;
}

table:not(.no-style) th {
    background: #004D2E;
    color: #fff;
    font-weight: normal;
}

table:not(.no-style) tr:nth-child(even) {
    background: #f9f9f9;
}

table:not(.no-style) tr:hover {
    background: #f1f1f1;
}

/* Bootstrap 5 Style ONLY for Specific Tables (e.g. e-report) */
table.bootstrap-style {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    vertical-align: top;
    border-color: #dee2e6;
    border-collapse: collapse;
}

table.bootstrap-style thead {
    vertical-align: bottom;
}

table.bootstrap-style th {
    border: 1px solid #dee2e6 !important;
    padding: 0.75rem 1rem !important;
    text-align: center !important;
    font-size: 0.95rem;
    vertical-align: middle !important;
}

table.bootstrap-style td {
    border: 1px solid #dee2e6 !important;
    padding: 0.75rem 1rem !important;
    text-align: left;
    font-size: 0.95rem;
    vertical-align: middle !important;
}

table.bootstrap-style thead tr {
    background-color: transparent !important;
}

table.bootstrap-style th {
    background-color: #f8f9fa !important;
    color: #004D2E !important;
    font-weight: 600 !important;
    border-bottom: 2px solid #dee2e6 !important;
    white-space: nowrap;
}

table.bootstrap-style tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02) !important;
}

table.bootstrap-style tbody tr:nth-of-type(even) {
    background-color: #fff !important;
}

table.bootstrap-style tbody tr {
    transition: background-color 0.2s ease-in-out;
}

table.bootstrap-style tbody tr:hover td {
    background-color: rgba(0, 77, 46, 0.05) !important;
}

/* Mobile Sidebar behavior & Responsiveness */
@media (max-width: 768px) {
    #sidebar {
        margin-left: -260px;
    }

    #sidebar.active {
        margin-left: 0;
    }

    #content {
        margin-left: 0;
        padding: 15px 10px;
    }

    #content.active {
        margin-left: 0;
    }

    .top-bar {
        padding: 10px 15px;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 10px;
    }
    
    .top-bar .user-info {
        width: auto !important;
        margin-left: 0 !important;
    }
    
    .profile-dropdown-toggle {
        padding: 4px 8px !important;
    }
    
    .profile-dropdown-toggle span {
        display: none !important; /* Hide 'Welcome Name' text on mobile */
    }
    
    .dropdown-menu {
        right: 0 !important;
        left: auto !important;
    }

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

    .quick-actions .btn-action {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }

    .card-container {
        grid-template-columns: 1fr;
    }

    .stat-card-info h3 {
        font-size: 1.6rem;
    }

    /* Table Responsive fixes */
    .datatable {
        min-width: 900px !important;
    }

    /* Header layout fixes */
    .filter-header-container {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px;
    }

    .filter-header-container form {
        width: 100%;
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .filter-header-container form select {
        width: 100% !important;
    }

    /* Bulk action bar fixes */
    .bulk-action-bar {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .bulk-action-bar select {
        width: 100% !important;
    }

    .bulk-action-bar button {
        width: 100% !important;
        justify-content: center;
    }

    span#bulkCountSpan {
        display: block;
        margin-top: 5px;
        margin-left: 0 !important;
    }
}

/* Page Loader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader {
    width: 50px;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 8px solid lightblue;
    border-right-color: orange;
    animation: l2 1s infinite linear;
}

@keyframes l2 {
    to {
        transform: rotate(1turn)
    }
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    overflow-y: auto;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: #000;
}

.modal-header {
    border-bottom: 2px solid var(--primary-green);
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.modal-body {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.view-item {
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}

.view-label {
    font-weight: bold;
    color: #555;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 3px;
}

.view-value {
    color: #000;
    font-size: 1rem;
}

.modal-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-modal {
    padding: 10px 25px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-modal-close {
    background-color: #f1f1f1;
    color: #333;
}

.btn-modal-close:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
}

.btn-modal-edit {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #fff;
}

.btn-modal-edit:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(230, 126, 34, 0.3);
}

/* Action Icon Styling */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    margin: 0 2px;
    cursor: pointer;
    transition: 0.2s;
    border: none;
    color: #fff;
}

.btn-view {
    background-color: #3498db;
}

.btn-view:hover {
    background-color: #2980b9;
}

.btn-edit {
    background-color: #f39c12;
}

.btn-edit:hover {
    background-color: #e67e22;
}

.btn-delete {
    background-color: #e74c3c;
}

.btn-delete:hover {
    background-color: #c0392b;
}

.btn-print {
    background-color: var(--primary-green);
}

.btn-print:hover {
    background-color: #00361f;
}

/* DataTables Top and Bottom Styling */
.dt-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.dataTables_filter {
    text-align: right;
}

.dataTables_filter label {
    font-weight: bold;
    position: relative;
}

.dataTables_filter input {
    border: 2px solid var(--primary-green);
    border-radius: 5px;
    padding: 6px 12px;
    margin-left: 10px;
    outline: none;
}

.dt-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.dataTables_paginate .paginate_button {
    padding: 5px 12px !important;
    margin: 0 2px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
}

.dataTables_paginate .paginate_button.current {
    background: var(--primary-green) !important;
    color: white !important;
    border-color: var(--primary-green);
}

/* Dashboard Quick Action Buttons */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 15px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    text-align: center;
}

.quick-action-btn i {
    font-size: 2rem;
    color: var(--primary-green);
    transition: all 0.3s ease;
}

.quick-action-btn:hover {
    background: linear-gradient(135deg, var(--primary-green), #003620);
    color: #ffffff;
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
    border-color: transparent;
}

.quick-action-btn:hover i {
    color: #ffffff;
    transform: scale(1.1);
}

/* Big Beautiful Custom Search Bar for DataTables */
.dataTables_filter {
    width: 100% !important;
    text-align: left !important;
    margin-bottom: 25px !important;
    background: #f7fbfa;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2eee8;
    box-shadow: 0 4px 6px rgba(0, 77, 46, 0.05);
}

.dataTables_filter label {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    font-size: 1.1rem !important;
    color: #004D2E !important;
    font-weight: bold;
}

.dataTables_filter input {
    flex-grow: 1 !important;
    margin-left: 15px !important;
    padding: 12px 20px !important;
    font-size: 1.1rem !important;
    border: 2px solid var(--primary-green) !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) inset;
    transition: all 0.3s ease;
}

.dataTables_filter input:focus {
    box-shadow: 0 0 0 3px rgba(0, 77, 46, 0.2) !important;
    border-color: #003620 !important;
    outline: none;
}

.dataTables_length {
    margin-bottom: 25px !important;
    margin-top: 25px !important;
}

.dt-buttons {
    margin-bottom: 25px !important;
    margin-top: 25px !important;
}

/* Compact Elegant Search Bar Override */
.dataTables_filter {
    width: auto !important;
    float: right !important;
    text-align: right !important;
    margin-bottom: 20px !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.dataTables_filter label {
    display: inline-flex !important;
    flex-wrap: nowrap;
    align-items: center;
    width: auto !important;
    font-size: 0.95rem !important;
    color: #333 !important;
    font-weight: 500 !important;
    margin: 0 !important;
}

.dataTables_filter input {
    width: 280px !important;
    flex-grow: 0 !important;
    margin-left: 10px !important;
    padding: 8px 15px !important;
    font-size: 0.95rem !important;
    border: 1px solid #ccc !important;
    border-radius: 20px !important;
    box-shadow: none !important;
    transition: all 0.3s ease;
}

.dataTables_filter input:focus {
    border-color: var(--primary-green) !important;
    box-shadow: 0 0 0 3px rgba(0, 77, 46, 0.1) !important;
    outline: none;
}

.dataTables_length {
    margin-bottom: 20px !important;
    margin-top: 0 !important;
    float: left !important;
}

.dt-buttons {
    margin-bottom: 20px !important;
    margin-top: 0 !important;
    clear: both;
    float: left;
}

/* ===========================
   Entry Form Section Styles
   =========================== */
.form-section {
    background: #fff;
    border: 1px solid #e0e8e4;
    border-left: 5px solid var(--primary-green);
    border-radius: 10px;
    padding: 25px 20px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 77, 46, 0.06);
}

.section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #c3ddd0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    background: linear-gradient(135deg, var(--primary-green), var(--accent-green));
    color: #fff;
    padding: 7px 9px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.88rem;
    color: #334;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d0ddd8;
    border-radius: 8px;
    font-size: 0.97rem;
    background: #f9fbfa;
    transition: border-color 0.25s, box-shadow 0.25s;
    font-family: inherit;
    color: #222;
}

.form-control:focus {
    border-color: var(--primary-green);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 77, 46, 0.12);
    outline: none;
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
}

/* Alert boxes */
.alert {
    padding: 13px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #edfaf2;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background: #fff5f5;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-left: 4px solid #e74c3c;
}

/* Form action bar */
.form-action-bar {
    background: linear-gradient(135deg, #f8faf9, #edf4f0);
    padding: 18px 22px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #d0e8dc;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 5px;
}

.family-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-green);
    font-size: 0.95rem;
}

.family-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-green);
    cursor: pointer;
}

.btn-draft {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: 11px 28px;
    border-radius: 8px;
    font-size: 0.97rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
}
.btn-draft:hover { background: #545b62; }

.btn-submit-final {
    background: linear-gradient(135deg, var(--primary-green), var(--accent-green));
    color: #fff;
    border: none;
    padding: 11px 28px;
    border-radius: 8px;
    font-size: 0.97rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(0,77,46,0.25);
}
.btn-submit-final:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,77,46,0.35); }

/* ============================================================
   RESPONSIVE DESIGN A TO Z (MOBILE, TABLET, DESKTOP)
   ============================================================ */

/* Utility for horizontal table scrolling */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

/* Tablet & Mobile Improvements (Under 992px) */
@media (max-width: 991.98px) {
    #sidebar {
        min-width: 240px;
        max-width: 240px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px auto;
        padding: 15px;
    }
    
    .modal-body {
        grid-template-columns: 1fr; /* Stack items vertically */
    }
}

/* Mobile Specific (Under 768px) */
@media (max-width: 767.98px) {
    /* Top Bar Optimization */
    .top-bar {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 10px 15px;
    }
    
    .top-bar .user-info {
        margin-left: 0 !important;
        gap: 10px !important;
    }
    
    .profile-dropdown-toggle span {
        display: none !important;
    }
    
    /* Dashboard Cards */
    .card-container {
        grid-template-columns: 1fr !important;
    }
    
    .stat-card-body {
        padding: 15px;
    }
    
    /* Forms Optimization */
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-row .form-group {
        width: 100% !important;
        flex: none !important;
    }
    
    .form-action-bar {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .form-action-bar .btn-draft,
    .form-action-bar .btn-submit-final {
        width: 100%;
    }
    
    /* Login Page Mobile */
    .login-box {
        padding: 2rem 1.5rem;
        margin: 10px;
    }
    
    .login-box h2 {
        font-size: 1.4rem;
    }
    
    /* DataTables Mobile Layout */
    .dt-top, .dt-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .dataTables_filter input {
        width: 100% !important;
        margin-left: 0 !important;
        margin-top: 10px;
    }
    
    .dataTables_length, .dt-buttons {
        float: none !important;
        text-align: center !important;
        width: 100%;
    }
    
    .dt-buttons button {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* Printing Responsiveness */
@media print {
    #sidebar, .top-bar, .dt-buttons, .dataTables_filter, .dataTables_length, .dataTables_paginate, .btn-action, .preloader {
        display: none !important;
    }
    
    #content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    
    .main-card {
        box-shadow: none !important;
        border: none !important;
    }
}