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

:root {
    --primary-color: #2fb35d;
    --primary-hover: #26914b;
    --secondary-color: #2fb35d;
    --secondary-hover: #26914b;
    --background-light: #e6f3ef;
    --sidebar-bg: #ffffff;
    --text-main: #000000;
    --text-muted: #555555;
    --border-color: #c3e6cb;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --hover-bg: #e6f3ef;
    --title-color: #0d6efd;
    --label-color: #0d6efd;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-light);
    color: var(--text-main);
}

/* Auth Pages */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background-light);
}

.auth-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    border: none;
}

.auth-logo {
    display: block;
    margin: 0 auto 1.5rem;
    max-height: 60px;
}

.auth-title {
    font-size: 1.25rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-main);
}

.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-main);
}

.form-control {
    border-radius: 6px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.1);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.75rem 1rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Dashboard Layout */
.wrapper {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
#sidebar {
    flex: 0 0 250px;
    min-width: 250px;
    max-width: 250px;
    width: 250px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

#sidebar.active {
    margin-left: -250px !important;
}

.sidebar-header {
    padding: 1rem 1.5rem;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    min-height: 70px;
}

.sidebar-logo {
    max-height: 40px;
}

ul.components {
    padding: 1rem 0;
    flex-grow: 1;
    overflow-y: auto;
    list-style: none;
    margin: 0;
}

ul.components li {
    padding: 0.25rem 1rem;
}

ul.components li a {
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

ul.components li a i {
    margin-right: 12px;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    color: var(--text-muted);
}

ul.components li a:hover, ul.components li.active > a {
    background: var(--hover-bg);
    color: var(--primary-color);
}

ul.components li.active > a i {
    color: var(--primary-color);
}

ul.components li a[data-bs-toggle="collapse"]::after {
    display: block;
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-left: auto;
    transition: transform 0.2s;
}

ul.components li a[data-bs-toggle="collapse"][aria-expanded="true"]::after {
    transform: rotate(180deg);
}

ul.collapse {
    list-style: none;
    padding-left: 2.2rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

ul.collapse li a {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 400;
}

/* Page Content */
#content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Top Navbar */
.top-navbar {
    background: #ffffff;
    padding: 0 1.5rem;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-main);
    cursor: pointer;
}

.user-profile {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.user-profile img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 10px;
}

.user-name {
    font-weight: 500;
    font-size: 0.9rem;
}

/* Main Main Content */
.main-content {
    padding: 2rem;
    overflow-y: auto;
    flex-grow: 1;
    background-color: var(--background-light);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.content-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
    border: none;
    margin-bottom: 2rem;
}

/* Table Style */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-top: none;
    padding: 1rem;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    font-size: 0.9rem;
    color: var(--text-main);
}

.table-hover tbody tr:hover {
    background-color: var(--background-light);
}

.pagination {
    margin-bottom: 0;
}

.page-link {
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

/* Footer */
footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    #sidebar {
        margin-left: -250px;
        position: absolute;
        height: 100vh;
        z-index: 999;
    }
    
    #sidebar.active {
        margin-left: 0;
    }
    
    .overlay {
        display: none;
        position: fixed;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        top: 0;
        left: 0;
    }
    
    .overlay.active {
        display: block;
    }
}

/* --- CUSTOM THEME OVERRIDES --- */

/* Page content text colors to black */
body, p, span, td, th, div, .auth-title, .user-name {
    color: #000000;
}

/* Ensure body background color */
body {
    background-color: var(--background-light) !important;
}

/* Main title color */
.page-title, h1, h2, h3, h4, h5, h6, .modal-title, .auth-title {
    color: var(--title-color) !important;
}

/* Labels to #0d6efd */
label, .form-label, strong {
    color: var(--label-color) !important;
}

/* Enforce regular/normal button sizing and theme green color globally */
.btn, button, input[type="submit"] {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
    padding: 0.375rem 0.75rem !important; /* Regular Bootstrap padding */
    font-size: 1rem !important; /* Regular font size */
    font-weight: 500 !important;
    border-radius: 6px !important;
    line-height: 1.5 !important;
    transition: all 0.2s ease-in-out !important;
}

/* Enforce hover effects for buttons */
.btn:hover, button:hover, input[type="submit"]:hover {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Special button styles for secondary actions */
.btn-secondary {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
}
.btn-secondary:hover {
    background-color: #5a6268 !important;
    border-color: #545b62 !important;
}

.btn-close {
    background-color: transparent !important;
    border-color: transparent !important;
    color: inherit !important;
}
.btn-close:hover {
    background-color: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Sidebar Styling: left sidebar menu text & icons color */
ul.components li a {
    color: var(--primary-color) !important;
    transition: all 0.2s ease !important;
}
ul.components li a i {
    color: var(--primary-color) !important;
    transition: all 0.2s ease !important;
}

/* Left sidebar menu active & hover color */
ul.components li a:hover, ul.components li.active > a {
    background-color: var(--hover-bg) !important;
    color: var(--primary-hover) !important;
}
ul.components li a:hover i, ul.components li.active > a i {
    color: var(--primary-hover) !important;
}

/* Ensure clean white background for sidebar wrapper */
#sidebar {
    background-color: var(--sidebar-bg) !important;
}
.sidebar-header {
    background-color: var(--sidebar-bg) !important;
}

/* Badges should maintain white text */
.badge {
    color: #ffffff !important;
}

