/* Timber Management System - Main CSS File */
:root {
    --primary-color: #A29680;
    --secondary-color: #a3d24a;
    --dark-color: #333;
    --light-color: #f8f9fa;
    --danger-color: #dc3545;
    --success-color: #28a745;
    --text-color: #212529;
    --border-color: #ddd;
    --sidebar-width: 250px;
    --header-height: 60px;
    --font-family: 'Poppins', sans-serif;
    --primary-brown: #6C5333;
    --primary-brown-hover: #574429;
    --primary-green: #7F8328;
    --secondary-green: #a3d24a;
    --light-brown: #A29680;
    --tan: #C9A875;
    --amber: #D9B36C;
    --bg-light: #ffffff;
    --bg-light-gray: #f8f8f8;
    --bg-hover: rgba(108, 83, 51, 0.05);
}

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

body {
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-color);
    background-color: #f5f5f5;
    min-height: 100vh;
    overflow-x: hidden;
}

body.sidebar-open {
    overflow: hidden;
}

a {
    text-decoration: none !important;
    color: inherit;
    transition: all 0.3s;
}

ul {
    list-style: none;
}

/* Wrapper for admin layout */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    position: relative;
}

/* Overlay for mobile view */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 998;
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.overlay.active {
    display: block;
    opacity: 1;
}

/* Sidebar */
#sidebar {
    min-width: 250px;
    max-width: 250px;
    background: #A29680;
    color: #fff;
    transition: all 0.3s ease-in-out;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 999;
    box-shadow: 3px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

#sidebar::-webkit-scrollbar {
    width: 5px;
}

#sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

#sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

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

#sidebar .sidebar-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}

#sidebar .sidebar-header h3 {
    color: #fff;
    font-weight: 700;
    margin: 0;
}

#sidebar .sidebar-header h3 span {
    color: #a3d24a;
}

#sidebar .close-menu {
    cursor: pointer;
    font-size: 1.5rem;
}

#sidebar .close-menu:hover {
    opacity: 1;
}

#sidebar ul.components {
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#sidebar ul li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#sidebar ul li a {
    padding: 10px 20px;
    font-size: 1rem;
    display: block;
    color: rgba(255, 255, 255, 0.75);
}

#sidebar ul li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

#sidebar ul li.active > a {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border-left: 4px solid #a3d24a;
}

#sidebar ul li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

#sidebar ul li a i.dropdown-icon {
    margin-right: 0;
    transition: transform 0.3s;
    font-size: 12px;
}

.rotate-icon {
    transform: rotate(180deg);
}

#sidebar ul li a span {
    flex: 1;
}

#sidebar ul ul {
    background: rgba(0, 0, 0, 0.15);
}

#sidebar ul ul a {
    padding: 10px 10px 10px 45px;
    font-size: 14px;
    color: #ffffff;
}

#sidebar ul ul a i {
    font-size: 8px;
}

#sidebar ul ul a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

#sidebar ul ul li.active > a {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* User profile section */
.user-profile {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
}

.user-profile .avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.user-profile h5 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 5px;
    font-weight: 600;
}

.user-profile .user-role {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin: 0;
}

/* Content */
#content {
    width: calc(100% - 250px);
    padding: 0;
    min-height: 100vh;
    transition: all 0.3s;
    position: relative;
    margin-left: 250px;
}

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

/* Navbar styles */
.navbar {
    padding: 15px 20px;
    background: #fff;
    border: none;
    border-radius: 0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

/* Button to toggle sidebar */
#sidebarCollapse {
    background: transparent;
    border: none;
    padding: 10px;
    line-height: 1;
    color: var(--primary-color);
    border-radius: 5px;
    transition: all 0.3s;
}

#sidebarCollapse:hover {
    background: rgba(133, 108, 77, 0.1);
}

#sidebarCollapse i {
    font-size: 20px;
}

/* User dropdown in navbar */
.avatar-sm {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.dropdown-toggle {
    background: transparent !important;
    padding: 5px 10px;
    border-radius: 5px;
    display: flex;
    align-items: center;
}

.dropdown-toggle::after {
    display: none;
}

.dropdown-menu {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 8px;
    margin-top: 10px;
}

.dropdown-item {
    padding: 8px 15px;
    font-size: 14px;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: rgba(133, 108, 77, 0.1);
    color: var(--primary-color);
}

.dropdown-divider {
    margin: 5px 0;
}

/* Dashboard cards and stats */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Stat cards styling */
.card.bg-primary,
.card.bg-success,
.card.bg-warning,
.card.bg-danger {
    color: white;
}

.card.bg-primary {
    background: linear-gradient(45deg, #A29680, #b9ac96) !important;
}

.card.bg-success {
    background: linear-gradient(45deg, #a3d24a, #8cbb34) !important;
}

.card.bg-warning {
    background: linear-gradient(45deg, #f6c23e, #dba520) !important;
}

.card.bg-danger {
    background: linear-gradient(45deg, #e74a3b, #c0392b) !important;
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 15px 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.card-header i {
    margin-right: 10px;
    color: #A29680;
}

.card-title {
    margin-bottom: 0;
    color: var(--primary-color);
    font-weight: 600;
}

.card-body {
    padding: 25px;
}

.card-footer {
    background-color: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 15px 20px;
    border-radius: 0 0 10px 10px !important;
}

/* Chart styles */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    margin-top: 15px;
}

canvas {
    max-width: 100%;
    height: auto !important;
}

/* Fix for chart labels */
.chart-container canvas {
    max-height: 300px;
}

/* Ensure chart is visible immediately */
#barChart {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Force visible elements within charts */
.chartjs-render-monitor {
    animation: chartjs-render-animation 1ms !important;
    visibility: visible !important;
    opacity: 1 !important;
}

@keyframes chartjs-render-animation {
    0% {
        opacity: 0.99;
    }
    100% {
        opacity: 1;
    }
}

/* Stat cards styling for better visibility */
.card h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card p.card-text small {
    opacity: 0.8;
}

/* Auth styles */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f8f9fa;
}

.auth-container {
    max-width: 400px;
    width: 100%;
    padding: 20px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo h1 {
    font-size: 36px;
    color: var(--primary-color);
}

.auth-logo h1 span {
    color: var(--secondary-color);
}

.auth-card {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.auth-form {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.logo h1 {
    font-weight: 700;
    color: #333;
    margin: 0;
}

.logo span {
    color: var(--primary-color);
}

.auth-card h2 {
    color: #333;
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-align: center;
}

.form-group {
    margin-bottom: 1.25rem;
}

label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
}

.form-control {
    border: 1px solid #ced4da;
    border-radius: 4px;
    width: 100%;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(133, 108, 77, 0.25);
}

.btn {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary, .btn-success, .add-form {
    background-color: #6C5333;
    border-color: #6C5333;
    color: white;
}

.btn-primary:hover, .btn-success:hover, .add-form:hover {
    background-color: #574429;
    border-color: #574429;
    color: white;
}

.btn-danger {
    color: #dc3545;
    background: transparent;
    border: none;
    padding: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    color: #c82333;
    transform: scale(1.2);
}

.btn-block {
    display: block;
    width: 100%;
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    color: #6c757d;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.custom-checkbox {
    display: flex;
    align-items: center;
}

.custom-checkbox input {
    margin-right: 0.5rem;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    margin-bottom: 20px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Table styling */
.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    background: #fff;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: var(--primary-color);
    border-top: none;
    padding: 15px;
}

.table td {
    padding: 15px;
    vertical-align: middle;
}

.table tr {
    transition: all 0.2s;
}

.table-hover tbody tr:hover {
    background-color: rgba(133, 108, 77, 0.05);
}

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

/* Media Queries */
@media (max-width: 991.98px) {
    #sidebar {
        margin-left: -var(--sidebar-width);
        box-shadow: 3px 0 30px rgba(0, 0, 0, 0.2);
    }
    
    #sidebar.active {
        margin-left: 0;
    }
    
    #content {
        width: 100%;
    }
    
    #content.active {
        width: 100%;
    }
    
    .navbar-expand-lg .navbar-toggler {
        display: block;
    }
    
    .dropdown-toggle {
        padding: 5px;
    }
}

@media (max-width: 767.98px) {
    .card {
        margin-bottom: 15px;
    }
    
    .navbar {
        padding: 10px 15px;
    }
    
    #sidebarCollapse span {
        display: none;
    }
    
    .auth-container {
        padding: 10px;
    }
    
    .auth-form {
        padding: 1.5rem;
    }
    
    .table-responsive {
        border-radius: 10px;
        overflow: hidden;
    }
}

@media (max-width: 575.98px) {
    .auth-form {
        padding: 1.5rem;
        margin: 0.5rem;
    }
    
    .navbar .navbar-brand {
        font-size: 18px;
    }
    
    .dropdown-toggle span {
        display: none;
    }
    
    .card-body {
        padding: 15px;
    }
}

/* Error pages */
.error-page .error-container {
    padding: 30px 15px;
}

.error-code {
    font-size: 6rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0;
    letter-spacing: 3px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

.error-message {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--dark-color);
}

.error-description {
    font-size: 1rem;
    color: #6c757d;
    max-width: 500px;
    margin: 0 auto 20px;
}

.error-actions {
    margin-top: 30px;
}

/* 
* Custom CSS for Timbr App
* All custom styles should be added to this file
*/

/* Auth Pages Styles */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.auth-header {
    background-color: #28a745;
    color: white;
    padding: 20px;
    text-align: center;
}

.auth-body {
    padding: 30px;
}

.auth-logo {
    max-width: 120px;
    margin-bottom: 15px;
}

.auth-title {
    margin-bottom: 5px;
    font-weight: 600;
}

.auth-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

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

.auth-form .form-control {
    height: 48px;
    border-radius: 6px;
}

.auth-form .btn-primary {
    height: 48px;
    border-radius: 6px;
    background-color: #28a745;
    border-color: #28a745;
    font-weight: 600;
}

.auth-form .btn-primary:hover, 
.auth-form .btn-primary:focus {
    background-color: #218838;
    border-color: #1e7e34;
}

.auth-footer {
    margin-top: 25px;
    text-align: center;
    font-size: 0.9rem;
}

.auth-links {
    margin-top: 15px;
}

/* Dashboard and Main Layout Styles */
.app-header {
    background-color: #28a745;
    border-bottom: none;
}

.app-header .navbar-brand {
    color: white;
    font-weight: 600;
}

.sidebar {
    background-color: #343a40;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 20px;
    margin: 2px 0;
    border-radius: 0 30px 30px 0;
}

.sidebar .nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    color: white;
    background-color: #28a745;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
    margin-right: 10px;
}

.content-wrapper {
    background-color: #f8f9fa;
    padding: 20px;
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid #eeeeee;
    padding: 15px 20px;
}

.card-title {
    margin-bottom: 0;
    font-weight: 600;
    color: #343a40;
}

.card-body {
    padding: 20px;
}

/* Tables */
.table thead th {
    font-weight: 600;
    color: #495057;
    border-top: none;
    background-color: #f8f9fa;
}

.table-hover tbody tr:hover {
    background-color: rgba(40, 167, 69, 0.03);
}

/* Buttons */
.btn-primary {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-primary:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 998;
    opacity: 0;
    transition: all 0.5s ease-in-out;
}

.overlay.active {
    display: block;
    opacity: 1;
}

/* Stats cards */
.stats-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 20px;
}

.stats-card .value {
    font-size: 1.8rem;
    font-weight: 700;
}

.stats-card .title {
    color: #6c757d;
    font-size: 0.9rem;
}

.stats-card .icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.5rem;
}

.stats-icon-green {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.stats-icon-blue {
    background-color: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

.stats-icon-yellow {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.stats-icon-purple {
    background-color: rgba(111, 66, 193, 0.1);
    color: #6f42c1;
}

/* Custom chart styles */
.chart-container {
    position: relative;
    height: 300px;
}

/* Auth Pages Styles */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.auth-header {
    background-color: #28a745;
    color: white;
    padding: 20px;
    text-align: center;
}

.auth-body {
    padding: 30px;
}

.auth-logo {
    max-width: 120px;
    margin-bottom: 15px;
}

.auth-title {
    margin-bottom: 5px;
    font-weight: 600;
}

.auth-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

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

.auth-form .form-control {
    height: 48px;
    border-radius: 6px;
}

.auth-form .btn-primary {
    height: 48px;
    border-radius: 6px;
    background-color: #28a745;
    border-color: #28a745;
    font-weight: 600;
}

.auth-form .btn-primary:hover, 
.auth-form .btn-primary:focus {
    background-color: #218838;
    border-color: #1e7e34;
}

.auth-footer {
    margin-top: 25px;
    text-align: center;
    font-size: 0.9rem;
}

.auth-links {
    margin-top: 15px;
}

/* Responsive styles */
@media (max-width: 768px) {
    #sidebar {
        margin-left: -250px;
    }
    #sidebar.active {
        margin-left: 0;
    }
    #content {
        width: 100%;
        margin-left: 0;
    }
    #content.active {
        margin-left: 0;
        width: calc(100% - 250px);
    }
    .overlay.active {
        display: block;
    }
}

/* Form styling */
.form-control:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Upload zone styles */
.upload-zone {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-zone:hover {
    border-color: #28a745;
}

.upload-zone i {
    font-size: 3rem;
    color: #adb5bd;
    margin-bottom: 15px;
}

/* Badges */
.badge-success {
    background-color: #28a745;
    color: #fff;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-info {
    background-color: #17a2b8;
    color: #fff;
}

.badge-danger {
    background-color: #dc3545;
    color: #fff;
}

/* Action Buttons and Table Styling */
.action-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    line-height: 30px;
    text-align: center;
    border-radius: 4px;
    font-size: 0.8rem;
}

.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    vertical-align: bottom;
    padding: 0.75rem;
    border-bottom: 2px solid #e3e6f0;
    font-weight: 700;
    text-align: left;
    color: #5a5c69;
}

.table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-top: 1px solid #e3e6f0;
}

.table-hover tbody tr:hover {
    background-color: rgba(162, 150, 128, 0.05);
}

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

/* Badge Styling */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.85em;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 6px;
}

.badge.bg-primary {
    background-color: #A29680 !important;
}

.badge.bg-success {
    background-color: #a3d24a !important;
}

.badge.bg-info {
    background-color: #36b9cc !important;
}

.badge.bg-warning {
    background-color: #f6c23e !important;
}

.badge.bg-danger {
    background-color: #e74a3b !important;
}

.badge.bg-secondary {
    background-color: #858796 !important;
}

/* Pagination Styling */
.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
    border-radius: 0.35rem;
    margin-bottom: 0;
}

.page-item:first-child .page-link {
    margin-left: 0;
    border-top-left-radius: 0.3rem;
    border-bottom-left-radius: 0.3rem;
}

.page-item:last-child .page-link {
    border-top-right-radius: 0.3rem;
    border-bottom-right-radius: 0.3rem;
}

.page-link {
    position: relative;
    display: block;
    padding: 0.75rem 1rem;
    margin-left: -1px;
    line-height: 1.25;
    color: #6C5333;
    background-color: #fff;
    border: 1px solid rgba(108, 83, 51, 0.3);
    transition: all 0.3s ease;
}

.page-link:hover {
    z-index: 2;
    color: #574429;
    text-decoration: none;
    background-color: rgba(108, 83, 51, 0.05);
    border-color: rgba(108, 83, 51, 0.3);
}

.page-link:focus {
    z-index: 3;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(108, 83, 51, 0.25);
}

.page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: #6C5333;
    border-color: #6C5333;
}

.page-item.disabled .page-link {
    color: #A29680;
    pointer-events: none;
    cursor: auto;
    background-color: #fff;
    border-color: rgba(108, 83, 51, 0.3);
    opacity: 0.6;
}

/* Custom Modal Styling */
.modal-dialog {
  max-width: 600px;
  margin: 1.75rem auto;
}

.modal-content {
  border: none;
  border-radius: $border-radius-lg;
  box-shadow: $box-shadow-md;
}

.modal-header {
  background-color: $primary-brown;
  color: white;
  border-bottom: none;
  border-top-left-radius: $border-radius-lg;
  border-top-right-radius: $border-radius-lg;
  padding: 15px 20px;
}

.modal-title {
  color: white;
  font-weight: $font-weight-bold;
  font-family: $font-family;
}

.modal-body {
  padding: 25px;
}

.modal-footer {
  border-top: 1px solid rgba(108, 83, 51, 0.1);
  background-color: $bg-light-gray;
  border-bottom-left-radius: $border-radius-lg;
  border-bottom-right-radius: $border-radius-lg;
  padding: 15px 20px;
}

.close {
  color: white;
  text-shadow: none;
  opacity: 0.8;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  transition: $transition-ease;
}

.close:hover {
  color: white;
  opacity: 1;
  text-decoration: none;
}

/* Ensure modal is above other elements */
.modal {
  z-index: 1050;
}

.modal-backdrop {
  z-index: 1040;
}

/* Modal animation effects */
.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
  transform: translate(0, -25%);
}

.modal.show .modal-dialog {
  transform: translate(0, 0);
}

/* Responsive modal on small screens */
@media (max-width: 767.98px) {
  .modal-dialog {
    max-width: 95%;
    margin: 1rem auto;
  }
  
  .modal-body {
    padding: 15px;
  }
}

/* Improved Chart Styling */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    margin-top: 15px;
}

canvas {
    max-width: 100%;
    height: auto !important;
}

/* Fix for chart labels */
.chart-container canvas {
    max-height: 300px;
}

/* Ensure chart is visible immediately */
canvas.chartjs-render-monitor {
    animation: chartjs-render-animation 0.001s;
    visibility: visible !important;
    opacity: 1 !important;
}

@keyframes chartjs-render-animation {
    0% {
        opacity: 0.99;
    }
    100% {
        opacity: 1;
    }
}

/* Tree Form Styles */
.tree-section .section-header {
    background-color: #7F8328;
    padding: 15px 20px;
    border-radius: 0 30px 30px 0;
    margin-bottom: 30px;
    margin-left: -20px;
    margin-top: 20px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    width: auto;
}

.tree-section .section-header h4 {
    color: white;
    font-weight: 700;
    margin: 0;
    font-size: 1.4rem;
    font-family: var(--font-family);
}

.tree-section .tree-icon {
    background-color: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    margin-left: 15px;
}

.forms-section .section-header {
    background-color: #6C5333;
    padding: 15px 20px;
    border-radius: 0 30px 30px 0;
    margin-bottom: 20px;
    margin-left: -20px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    width: auto;
}

.forms-section .section-header h4 {
    color: white;
    font-weight: 700;
    margin: 0;
    font-size: 1.4rem;
    font-family: var(--font-family);
}

.forms-section .form-icon {
    background-color: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    margin-left: 15px;
}

.form-type-tabs {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.form-type-tabs .nav-tabs {
    border-bottom: none;
    display: inline-flex;
    gap: 20px;
}

.form-type-tabs .nav-link {
    color: #6C5333;
    border: 2px solid #6C5333;
    border-radius: 4px;
    padding: 5px;
    width: 120px;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background-color: white;
    position: relative;
}

.form-type-tabs .nav-link .tab-icon {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.form-type-tabs .nav-link.active {
    background-color: white;
    color: #6C5333;
    border: 3px solid #6C5333;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.form-type-tabs .nav-link .tab-counter {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #6C5333;
    color: white;
    font-weight: bold;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.form-type-tabs .nav-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(108, 83, 51, 0.2);
}

/* Responsive styling for form tabs */
@media (max-width: 767.98px) {
    .form-type-tabs .nav-tabs {
        gap: 10px;
    }
    
    .form-type-tabs .nav-link {
        width: 90px;
        height: 90px;
        padding: 3px;
    }
    
    .form-type-tabs .nav-link .tab-icon {
        width: 75px;
        height: 75px;
    }
}

.form-type-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.form-item-icon-title {
    display: flex;
    align-items: center;
}

.form-item-icon-title .form-icon {
    margin-right: 10px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-title {
    font-size: 16px;
    font-weight: 600;
}

.form-count-indicator {
    background-color: rgba(108, 83, 51, 0.05);
    padding: 10px 15px;
    border-radius: 5px;
}

/* Button styling to match the sidebar theme */
.add-form, 
.btn-primary, 
.btn-success {
    background-color: #6C5333;
    border-color: #6C5333;
    color: white;
    transition: all 0.3s ease;
}

.add-form:hover, 
.btn-primary:hover, 
.btn-success:hover {
    background-color: #574429;
    border-color: #574429;
    color: white;
}

.form-item .card {
    border: 1px solid rgba(108, 83, 51, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.form-item .card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.form-item .card-header {
    background-color: rgba(108, 83, 51, 0.05);
    border-bottom: 1px solid rgba(108, 83, 51, 0.2);
}

.form-actions {
    display: flex;
    align-items: center;
}

.form-actions .btn-danger {
    color: #dc3545;
    background: transparent;
    border: none;
    padding: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.form-actions .btn-danger:hover {
    color: #c82333;
    transform: scale(1.2);
}

.form-actions .btn-danger:focus {
    box-shadow: none;
}

.log-images-section h6 {
    color: #6C5333;
    border-bottom: 1px solid rgba(108, 83, 51, 0.2);
    padding-bottom: 8px;
}

/* Main content without navbar */
#content {
    padding-top: 3%;
    padding-left: 20px;
    padding-right: 20px;
    background: white !important;
    padding-bottom: 2%;
}

/* Main form container (without card) */
.main-form-container {
    padding: 25px 0;
}

/* Override form tab styles */
.form-type-tabs .nav-link.active {
    background-color: #6C5333;
    color: white;
    border-color: #6C5333;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.form-type-tabs .nav-tabs {
    border-bottom: none;
    display: inline-flex;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .tree-section .section-header,
    .forms-section .section-header {
        margin-left: -15px;
        padding: 12px 15px;
    }
    
    .tree-section .section-header h4,
    .forms-section .section-header h4 {
        font-size: 1.2rem;
    }
    
    .tree-section .tree-icon,
    .forms-section .form-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .form-type-tabs .nav-link {
        padding: 6px 12px;
        font-size: 14px;
        min-width: 80px;
    }
    
    .form-item .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-item .form-actions {
        margin-top: 10px;
        align-self: flex-end;
    }
    
    .form-title {
        font-size: 14px;
    }
}

/* Mobile sidebar toggle button */
.mobile-sidebar-toggle {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 997;
    width: 40px;
    height: 40px;
    background-color: #6C5333;
    color: white;
    border: none;
    border-radius: 50%;
    display: none; /* Will be set to flex via JS on mobile */
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-sidebar-toggle:hover {
    background-color: #574429;
    transform: scale(1.05);
}

.mobile-sidebar-toggle:focus {
    outline: none;
}

.mobile-sidebar-toggle i {
    font-size: 18px;
}

/* Overlay for mobile view */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.overlay.active {
    display: block;
    opacity: 1;
}

/* Responsive styles */
@media (max-width: 767.98px) {
    .mobile-sidebar-toggle {
        display: flex; /* Always show on mobile by default */
    }
    
    #sidebar {
        margin-left: -250px; /* Start hidden on mobile */
        box-shadow: 3px 0 30px rgba(0, 0, 0, 0.2);
    }
    
    #sidebar.active {
        margin-left: -250px; /* Hidden state */
    }
    
    #sidebar:not(.active) {
        margin-left: 0; /* Visible state */
        box-shadow: 5px 0 30px rgba(0, 0, 0, 0.4);
    }
    
    #content {
        width: 100%;
        margin-left: 0;
        padding-top: 15px; /* Add padding to avoid content being hidden behind the toggle button */
    }
    
    .main-form-container {
        padding-top: 45px;
    }
    
    .tree-section .section-header,
    .forms-section .section-header {
        margin-left: -15px;
        padding: 12px 15px;
        margin-top: 10px;
    }
    
    .tree-section .section-header h4,
    .forms-section .section-header h4 {
        font-size: 1.2rem;
    }
    
    .tree-section .tree-icon,
    .forms-section .form-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .form-type-tabs .nav-link {
        padding: 6px 12px;
        font-size: 14px;
        min-width: 80px;
    }
    
    .form-item .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-item .form-actions {
        margin-top: 10px;
        align-self: flex-end;
    }
    
    .form-title {
        font-size: 14px;
    }
    
    /* Improve sidebar animation smoothness */
    body.sidebar-open {
        overflow: hidden;
    }
    
    /* Style the close button in the sidebar for better UX */
    #sidebar .close-menu {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background-color: rgba(0, 0, 0, 0.2);
        cursor: pointer;
        transition: all 0.2s ease;
        position: absolute;
        right: 15px;
        top: 15px;
    }
    
    #sidebar .close-menu:hover {
        background-color: rgba(0, 0, 0, 0.3);
    }
    
    #sidebar .close-menu i {
        font-size: 16px;
    }
}

/* Form tab styling with icons */
.form-type-tabs {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.form-type-tabs .nav-tabs {
    border-bottom: none;
    display: inline-flex;
}

/* Remove duplicate styles and keep the updated version with icon support */
.form-type-tabs .nav-link {
    color: #6C5333;
    border: 1px solid #6C5333;
    border-radius: 20px;
    padding: 8px 20px;
    margin: 0 8px;
    font-weight: 600;
    min-width: 100px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.form-type-tabs .nav-link .tab-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.form-type-tabs .nav-link.active {
    background-color: #6C5333;
    color: white;
    border-color: #6C5333;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

/* Responsive styling for form tabs */
@media (max-width: 767.98px) {
    .form-type-tabs .nav-link {
        padding: 6px 12px;
        font-size: 14px;
        min-width: 80px;
        flex-direction: column;
        gap: 4px;
    }
    
    .form-type-tabs .nav-link .tab-icon {
        width: 100%;
        height: 100%;
    }
    
    .form-type-tabs .nav-link .tab-text {
        font-size: 12px;
    }
}

/* Dashboard Stat Circles */
.stat-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.stat-circle:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.stat-title {
    color: #333;
    font-weight: 600;
    margin-top: 15px;
    font-size: 1.1rem;
}

@media (max-width: 991.98px) {
    .stat-circle {
        width: 130px;
        height: 130px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 767.98px) {
    .stat-circle {
        width: 110px;
        height: 110px;
    }
    
    .stat-number {
        font-size: 2.2rem;
    }
    
    .stat-title {
        font-size: 1rem;
    }
}

@media (max-width: 575.98px) {
    .stat-circle {
        width: 90px;
        height: 90px;
        margin-bottom: 10px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-title {
        font-size: 0.9rem;
        margin-top: 10px;
    }
}

/* Section Headers - Generic */
.section-header {
    background-color: var(--primary-brown);
    padding: 15px 20px;
    border-radius: 0 30px 30px 0;
    margin-bottom: 20px;
    margin-left: -20px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    width: 160px;
}

.section-header.green {
    background-color: var(--primary-green);
}

.section-header h4 {
    color: white;
    font-weight: 700;
    margin: 0;
    font-size: 1.4rem;
    font-family: var(--font-family);
}

.section-icon {
    background-color: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    margin-left: 15px;
}

/* Responsive adjustments for section headers */
@media (max-width: 767.98px) {
    .d-flex.align-items-center.mb-4 {
        margin-bottom: 15px !important;
    }
    
    .section-header {
        width: auto;
        padding: 12px 15px;
        margin-left: -15px;
    }
    
    .section-header h4 {
        font-size: 1.2rem;
    }
    
    .section-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
        margin-left: 10px;
    }
}

@media (max-width: 576px) {
    .d-flex.align-items-center.mb-4 {
        margin-bottom: 10px !important;
    }
    
    .section-header {
        width: auto;
        padding: 10px 12px;
    }
    
    .section-header h4 {
        font-size: 1rem;
    }
    
    .section-icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
        margin-left: 8px;
    }
}

/* Grid View Styles */
.grid-card {
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    overflow: hidden;
}

.grid-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    border-color: #ddd;
}

.grid-card .card-header {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background-color: #f9f9f9;
}

.grid-card .card-img-container {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.grid-card .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.grid-card .timbr-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    background-color: rgba(108, 83, 51, 0.85);
    color: white;
    padding: 4px 8px;
    font-size: 0.8rem;
    font-weight: 600;
    border-top-right-radius: 6px;
}

.grid-card .card-body {
    padding: 1rem;
}

.grid-card .card-subtitle {
    font-size: 0.75rem;
    margin-bottom: 3px;
    color: #888;
}

.grid-card .font-weight-medium {
    font-weight: 500;
}

.grid-card .card-footer {
    padding: 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.grid-card .action-icon {
    font-size: 1rem;
}

.grid-card i.fas {
    font-size: 0.8rem;
    width: 15px;
    text-align: center;
    margin-right: 3px;
}

/* Table and Grid View Display */
.table-view, .grid-view {
    transition: all 0.3s ease;
}

/* Responsive adjustments for grid */
@media (max-width: 767.98px) {
    .grid-card .card-img-container {
        height: 150px;
    }
}

@media (max-width: 575.98px) {
    .col-sm-6 {
        padding-left: 8px;
        padding-right: 8px;
    }
    
    .grid-card .card-img-container {
        height: 130px;
    }
    
    .grid-card .card-body {
        padding: 0.75rem;
    }
}

/* Action Icons */
.action-icons {
    display: flex;
    justify-content: space-around;
    width: 100%;
}

.action-icon {
    font-size: 16px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    cursor: pointer;
}

.action-icon:hover {
    transform: translateY(-3px);
}

.view-icon {
    color: #7F8328;
}

.view-icon:hover {
    background-color: rgba(127, 131, 40, 0.1);
}

.edit-icon {
    color: #6C5333;
}

.edit-icon:hover {
    background-color: rgba(108, 83, 51, 0.1);
}

.archive-icon {
    color: #C9A875;
}

.archive-icon:hover {
    background-color: rgba(201, 168, 117, 0.1);
}

.delete-icon {
    color: #dc3545;
}

.delete-icon:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

.restore-icon {
    color: #6C5333;
}

.restore-icon:hover {
    background-color: rgba(108, 83, 51, 0.1);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state img {
    max-width: 200px;
    margin-bottom: 20px;
}

.empty-state h4, .empty-state h5 {
    color: #6C5333;
    margin-bottom: 10px;
}

.empty-state p {
    color: #777;
    max-width: 500px;
    margin: 0 auto 20px;
}

/* Tree Inventory Specific Styles */

/* Tree table styles */
.tree-image img {
    object-fit: cover;
    border: 2px solid #eee;
}

.tree-details .tree-name {
    color: #6C5333;
    font-weight: 600;
    font-size: 15px;
}

.tree-details .tree-age {
    color: #666;
    font-size: 12px;
}

.tree-location .origin {
    font-weight: 500;
    color: #333;
}

.tree-location .felling-date {
    font-size: 12px;
    color: #666;
}

.wood-info .wood-type {
    font-weight: 500;
    color: #7F8328;
}

.wood-info .wood-species {
    font-style: italic;
    color: #666;
    font-size: 12px;
}

.created-info .created-by {
    font-weight: 600;
    color: #6C5333;
}

.created-info .created-at {
    font-size: 12px;
    color: #666;
}

/* Grid card styles for tree inventory */
.grid-card .timbr-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    background-color: rgba(108, 83, 51, 0.85);
    color: white;
    padding: 4px 8px;
    font-size: 0.8rem;
    font-weight: 600;
    border-top-right-radius: 6px;
}

/* Milling Category Styles */
.milling-category {
    padding: 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.milling-category:hover {
    background-color: #f9f9f9;
    transform: translateY(-5px);
}

.milling-title {
    font-size: 1rem;
    font-weight: 600;
    color: #555;
}

/* Responsive Styles for Tree View */
@media (max-width: 768px) {
    .tree-view-section .detail-value {
        font-size: 1rem;
    }
    
    .category-icon {
        height: 60px;
    }
    
    .milling-icon i {
        font-size: 2rem !important;
    }
}

@media (max-width: 575px) {
    .tree-view-section .detail-item {
        margin-bottom: 1rem;
    }
    
    .milling-title {
        font-size: 0.9rem;
    }
}

/* Milling Subtabs */
.milling-subtabs {
    border: 1px solid #e3e6f0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.milling-subtabs .nav-tabs {
    border-bottom: 1px solid rgba(108, 83, 51, 0.2);
    margin-bottom: 15px;
}

.milling-subtabs .nav-pills .nav-link {
    color: #6C5333;
    border-radius: 4px;
    padding: 8px 15px;
    margin-right: 5px;
    margin-bottom: 10px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.milling-subtabs .nav-pills .nav-link.active {
    background-color: #6C5333;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.milling-subtabs .nav-pills .nav-link:hover {
    background-color: rgba(108, 83, 51, 0.1);
    color: #6C5333;
}

.milling-form-container {
    background-color: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
}

.milling-images-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.milling-image-card {
    flex: 1 1 calc(25% - 15px);
    min-width: 200px;
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.milling-image-card .image-preview {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    background-color: #f8f8f8;
    border-radius: 4px;
}

.milling-image-card .custom-file-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 767.98px) {
    .milling-image-card {
        flex: 1 1 100%;
    }
}

/* File Upload Styles */
.custom-file {
    position: relative;
    display: inline-block;
    width: 100%;
    height: calc(1.5em + 0.75rem + 2px);
    margin-bottom: 0;
}

.custom-file-input {
    position: relative;
    z-index: 2;
    width: 100%;
    height: calc(1.5em + 0.75rem + 2px);
    margin: 0;
    opacity: 0;
}

.custom-file-label {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1;
    height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.75rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-file-label::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: block;
    height: calc(1.5em + 0.75rem);
    padding: 0.375rem 0.75rem;
    line-height: 1.5;
    color: #495057;
    content: "Browse";
    background-color: #e9ecef;
    border-left: inherit;
    border-radius: 0 0.25rem 0.25rem 0;
}

/* Form Validation Styles */
.form-control.is-invalid, 
.custom-file-input.is-invalid ~ .custom-file-label {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 80%;
    color: #dc3545;
}

.form-control.is-invalid ~ .invalid-feedback,
.custom-file-input.is-invalid ~ .invalid-feedback {
    display: block;
}

/* Image thumbnail styles */
.current-image {
    margin-top: 10px;
}

.current-image p {
    font-size: 12px;
    color: #6c757d;
}

.current-image img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 3px;
    transition: all 0.3s ease;
}

.current-image img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Button styles for form actions */
.btn-primary {
    background-color: #6C5333;
    border-color: #6C5333;
}

.btn-primary:hover {
    background-color: #574429;
    border-color: #574429;
}

/* Card styling for form sections */
.card {
    margin-bottom: 20px;
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.card-body {
    padding: 20px;
}

/* Milling edit page specific styles */
.form-group {
    margin-bottom: 1rem;
}

label {
    font-weight: 500;
    color: #495057;
}

.text-danger {
    color: #dc3545;
}

/* AJAX loading animation */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
    border: 0.2em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    -webkit-animation: spinner-border .75s linear infinite;
    animation: spinner-border .75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

/* Added pie chart styling for consistent rendering */
.pie-chart-container {
    position: relative;
    height: 320px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Stat circle color variations */
.stat-circle-green {
    background-color: #a3d24a; /* secondary-green */
}

.stat-circle-brown {
    background-color: #6C5333; /* primary-brown */
}

.stat-circle-tan {
    background-color: #C9A875; /* tan */
}

.stat-circle-amber {
    background-color: #D9B36C; /* amber */
}

/* Dashboard Quick Actions */
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.quick-actions .btn {
  min-width: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  border-radius: 6px;
  background-color: #6C5333;
  border-color: #6C5333;
  color: white;
  transition: all 0.3s ease;
}

.quick-actions .btn:hover {
  background-color: #574429;
  border-color: #574429;
  transform: translateY(-2px);
}

.quick-actions .btn i {
  margin-right: 8px;
  font-size: 16px;
}

@media (max-width: 767.98px) {
  .quick-actions .btn {
    min-width: 140px;
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .quick-actions .btn i {
    font-size: 14px;
  }
}

/* Grid View Styles - Added for User Panels */
.grid-view {
    margin-top: 20px;
}

.grid-card {
    transition: all 0.3s ease;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.grid-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.card-img-container {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.card-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timbr-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(108, 83, 51, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 1;
}

/* Action Icons */
.action-icons {
    display: flex;
    gap: 10px;
}

.action-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: #6c5333;
    background-color: rgba(108, 83, 51, 0.1);
    transition: all 0.2s ease;
}

.action-icon:hover {
    background-color: rgba(108, 83, 51, 0.2);
    color: #6c5333;
    transform: scale(1.1);
}

.view-icon:hover {
    background-color: rgba(163, 210, 74, 0.2);
    color: #7F8328;
}

.edit-icon:hover {
    background-color: rgba(201, 168, 117, 0.2);
    color: #C9A875;
}

.milling-icon:hover {
    background-color: rgba(217, 179, 108, 0.2);
    color: #D9B36C;
}

.archive-icon:hover {
    background-color: rgba(162, 150, 128, 0.2);
    color: #A29680;
}

.delete-icon:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Section Headers */
.section-header {
    background-color: #6C5333;
    padding: 15px 20px;
    border-radius: 0 30px 30px 0;
    margin-bottom: 20px;
    margin-left: -20px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    width: auto;
}

.section-header h4 {
    color: white;
    font-weight: 700;
    margin: 0;
    font-size: 1.4rem;
    font-family: 'Poppins', sans-serif;
}

.section-icon {
    background-color: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    margin-left: 15px;
}

/* Empty State Styling */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state img {
    max-width: 150px;
    margin-bottom: 20px;
    opacity: 0.7;
}

.empty-state h5 {
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 10px;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 20px;
}

/* Grid Pagination */
.grid-pagination {
    margin-top: 30px;
}

/* Form Type Tabs */
.form-type-tabs {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.form-type-tabs .nav-tabs {
    border-bottom: none;
    display: inline-flex;
    gap: 20px;
}

.form-type-tabs .nav-link {
    color: #6C5333;
    border: 2px solid #6C5333;
    border-radius: 8px;
    padding: 5px;
    width: 120px;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background-color: white;
    position: relative;
}

.form-type-tabs .nav-link .tab-icon {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.form-type-tabs .nav-link.active {
    background-color: #6C5333;
    color: white;
    border-color: #6C5333;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.form-type-tabs .nav-link .tab-counter {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #6C5333;
    color: white;
    font-weight: bold;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* Tree Listing Styles */
.view-toggle {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.view-toggle .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    color: #6c757d;
    transition: all 0.3s ease;
}

.view-toggle .btn.active {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.tree-card {
    border-radius: 10px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
    margin-bottom: 25px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    background-color: white;
}

.tree-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.tree-card .card-img-top {
    height: 180px;
    object-fit: cover;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.tree-card .card-body {
    padding: 15px;
}

.tree-card .card-title {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.tree-card .tree-id {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.tree-card .forms-count {
    background-color: rgba(127, 131, 40, 0.1);
    color: #7F8328;
    padding: 2px 8px;
    border-radius: 30px;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 10px;
}

.tree-card .wood-info p {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.tree-card .tree-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 10px;
}

.tree-card .tree-actions .btn {
    padding: 5px 10px;
    font-size: 0.8rem;
}

.tree-table .tree-image {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 5px;
}

.tree-table .tree-id-column {
    display: flex;
    flex-direction: column;
}

.tree-table .tree-id-column .tree-id {
    font-weight: 600;
    margin-bottom: 5px;
}

.tree-table .tree-id-column .forms-count {
    background-color: rgba(127, 131, 40, 0.1);
    color: #7F8328;
    padding: 2px 8px;
    border-radius: 30px;
    font-size: 0.8rem;
    display: inline-block;
}

.tree-table .wood-info {
    display: flex;
    flex-direction: column;
}

.table-tree-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.archived-link {
    font-size: 0.8rem;
    color: #6c757d;
    text-decoration: underline;
    margin-top: 5px;
    display: inline-block;
}

.archived-link:hover {
    color: #574429;
}

/* Multi-action buttons */
.multi-action-buttons {
    display: flex;
    gap: 10px;
}

.multi-action-buttons .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.multi-action-buttons .btn i {
    font-size: 0.9rem;
}

/* Badge styling for form counts in grid view */
.timbr-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: rgba(108, 83, 51, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: bold;
  z-index: 1;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

.timbr-badge:hover {
  transform: scale(1.1);
  background-color: rgba(108, 83, 51, 1);
  box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

/* Add these styles for the milling show and edit pages */

/* Detail Items styling */
.detail-item {
    margin-bottom: 15px;
}

.detail-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6c757d;
    margin-bottom: 3px;
    font-weight: 500;
}

.detail-value {
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

/* Image thumbnails in carousel */
.carousel-thumb {
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.carousel-thumb:hover {
    opacity: 1;
    transform: scale(1.05);
}

.carousel-thumb.active {
    opacity: 1;
    border-color: #6C5333;
}

/* Image click to zoom */
.milling-image {
    transition: transform 0.3s ease;
}

.milling-image:hover {
    transform: scale(1.02);
}

/* Status badges styling */
.badge-pending {
    background-color: #ffc107;
    color: #212529;
}

.badge-in_progress {
    background-color: #17a2b8;
    color: white;
}

.badge-completed {
    background-color: #28a745;
    color: white;
}

.badge-cancelled {
    background-color: #dc3545;
    color: white;
}

/* Improved card styling */
.card {
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(108, 83, 51, 0.2);
}

.card:hover {
    box-shadow: 0 5px 15px rgba(108, 83, 51, 0.1);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(108, 83, 51, 0.1);
    font-weight: 600;
    padding: 15px 20px;
}

/* Form controls styling */
.custom-file-label {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.custom-file-input:focus ~ .custom-file-label {
    border-color: #6C5333;
    box-shadow: 0 0 0 0.2rem rgba(108, 83, 51, 0.25);
}

.current-image-container {
    transition: all 0.3s ease;
}

.current-image-container:hover {
    background-color: rgba(108, 83, 51, 0.03);
}

/* SweetAlert customization */
.swal2-popup.swal2-toast {
    background-color: #6C5333;
    color: white;
}

.swal2-popup.swal2-toast .swal2-title {
    color: white;
}

.swal2-container.swal2-top-end .swal2-popup {
    border-radius: 10px;
}

/* Image preview styles */
.new-image-preview {
    background-color: var(--bg-light-gray);
    border-radius: 5px;
    padding: 10px;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.new-image-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.new-image-preview .small {
    color: var(--primary-brown);
    font-weight: 500;
}

/* Wood Type and Wood Species Filter Styles */
.wood-type-details {
    font-size: 14px;
    line-height: 1.4;
}

.wood-type-name {
    font-weight: 600;
    color: #333;
}

.wood-type-local {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.wood-species-name {
    font-weight: 500;
    color: #444;
    margin-top: 5px;
    position: relative;
    padding-left: 10px;
}

.wood-species-name::before {
    content: "⤷";
    position: absolute;
    left: 0;
    color: #6C5333;
}

.wood-species-scientific {
    font-size: 12px;
    color: #666;
    font-style: italic;
    padding-left: 10px;
}

/* Apply Filters Button */
#apply-filters {
    background-color: var(--primary-brown);
    border-color: var(--primary-brown);
    color: white;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

#apply-filters:hover {
    background-color: var(--primary-brown-hover);
    border-color: var(--primary-brown-hover);
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Disabled wood species dropdown */
#wood_species:disabled {
  background-color: #f8f9fa;
  cursor: not-allowed;
}

/* Responsive styles for filter section */
@media (max-width: 767.98px) {
  #apply-filters {
    margin-top: 10px;
    width: 100%;
    padding: 0.5rem;
  }
}

/* Filter Dropdown Styles */
.select2-container--bootstrap4 .select2-results__option {
    padding: 8px 12px;
}

.select2-container--bootstrap4 .select2-results__option--highlighted {
    background-color: var(--primary-brown);
    color: white;
}

.select2-container--bootstrap4 .select2-selection--single {
    border-color: #ced4da;
    height: calc(2.25rem + 2px);
}

.select2-container--bootstrap4 .select2-selection--single:focus {
    border-color: var(--primary-brown);
    box-shadow: 0 0 0 0.2rem rgba(108, 83, 51, 0.25);
}

.select2-container--bootstrap4.select2-container--focus .select2-selection {
    border-color: var(--primary-brown);
    box-shadow: 0 0 0 0.2rem rgba(108, 83, 51, 0.25);
}

/* Apply Filters Button */
#apply-filters {
  background-color: var(--primary-brown);
  border-color: var(--primary-brown);
  color: white;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

#apply-filters:hover {
  background-color: var(--primary-brown-hover);
  border-color: var(--primary-brown-hover);
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Disabled wood species dropdown */
#wood_species:disabled {
  background-color: #f8f9fa;
  cursor: not-allowed;
}

/* Responsive styles for filter section */
@media (max-width: 767.98px) {
  #apply-filters {
    margin-top: 10px;
    width: 100%;
    padding: 0.5rem;
  }
}

/* Archived Trees Section Styles */
.archived-trees-section .section-header {
  background-color: #7F8328; /* Primary green from style guide */
  padding: 15px 20px;
  border-radius: 0 30px 30px 0;
  margin-bottom: 20px;
  margin-left: -20px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  width: auto;
}

.archived-trees-section .section-header h4 {
  color: white;
  font-weight: 700;
  margin: 0;
  font-size: 1.4rem;
  font-family: 'Poppins', sans-serif;
}

.archived-trees-section .section-icon {
  background-color: rgba(255, 255, 255, 0.2);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  margin-left: 15px;
}

/* Archived Items Actions */
.restore-selected {
  background-color: #7F8328;
  color: white;
  transition: all 0.3s ease;
}

.restore-selected:hover {
  background-color: #656a20;
  color: white;
}

.delete-selected {
  background-color: #dc3545;
  color: white;
  transition: all 0.3s ease;
}

.delete-selected:hover {
  background-color: #c82333;
  color: white;
}

.clear-filters {
  background-color: #C9A875;
  color: white;
  transition: all 0.3s ease;
}

.clear-filters:hover {
  background-color: #b99665;
  color: white;
}

/* Archived grid view styles */
.archived-grid-card {
  border: none;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  transition: all 0.3s ease;
  height: 100%;
}

.archived-grid-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.archived-grid-card .card-header {
  background-color: #f8f8f8;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 10px 15px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.archived-grid-card .card-img-container {
  position: relative;
  height: 160px;
  overflow: hidden;
}

.archived-grid-card .card-img-top {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.archived-grid-card .timbr-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: rgba(108, 83, 51, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  z-index: 1;
}

.archived-grid-card .card-body {
  padding: 15px;
}

.archived-grid-card .card-subtitle {
  font-size: 12px;
  color: #6c757d;
  margin-bottom: 2px;
}

.archived-grid-card .card-footer {
  background-color: #f8f8f8;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 10px;
}

/* Archived item restore/delete action styles */
.restore-icon {
  color: #7F8328;
  transition: all 0.3s ease;
}

.restore-icon:hover {
  color: #656a20;
  transform: scale(1.2);
}

/* Empty state for archived items */
.archived-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.archived-empty-state img {
  max-width: 120px;
  margin-bottom: 20px;
}

.archived-empty-state h5 {
  color: #6c757d;
  margin-bottom: 10px;
  font-weight: 600;
}

.archived-empty-state p {
  color: #6c757d;
  margin-bottom: 20px;
  text-align: center;
}

/* Responsive styles for archived items */
@media (max-width: 767.98px) {
  .archived-trees-section .section-header {
    width: 140px;
    padding: 12px 15px;
    margin-left: -15px;
  }
  
  .archived-trees-section .section-header h4 {
    font-size: 1.2rem;
  }
  
  .archived-trees-section .section-icon {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }
  
  .archived-grid-card .card-img-container {
    height: 140px;
  }
}

@media (max-width: 575.98px) {
  .archived-trees-section .section-header {
    width: 130px;
    padding: 10px 12px;
  }
  
  .archived-trees-section .section-header h4 {
    font-size: 1.1rem;
  }
  
  .archived-trees-section .section-icon {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }
  
  .archived-grid-card .card-img-container {
    height: 120px;
  }
}

/* Archived Forms Styling */
.archived-label {
    background-color: var(--amber);
    color: white;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.action-icons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.action-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-brown);
    transition: var(--transition-ease);
    border: 1px solid rgba(108, 83, 51, 0.2);
}

.action-icon:hover {
    background-color: var(--primary-brown);
    color: white;
    transform: translateY(-3px);
}

.view-icon:hover {
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.restore-icon:hover {
    background-color: var(--secondary-green);
    border-color: var(--secondary-green);
}

.delete-icon:hover {
    background-color: #dc3545;
    border-color: #dc3545;
}

/* Empty State Styling */
.empty-state {
    padding: 2rem;
    text-align: center;
}

.empty-state img {
    max-width: 120px;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.empty-state h5 {
    color: var(--light-brown);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.empty-state p {
    color: var(--light-brown);
    max-width: 300px;
    margin: 0 auto 1.5rem;
}

/* Bulk Action Buttons */
.bulk-action-btn {
    border-radius: var(--border-radius-sm);
    padding: 8px 15px;
    font-weight: 600;
    font-size: 13px;
    transition: var(--transition-ease);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#restore-selected {
    background-color: var(--secondary-green);
    border-color: var(--secondary-green);
    color: white;
}

#restore-selected:hover {
    background-color: #8fb935;
    border-color: #8fb935;
    transform: translateY(-2px);
}

#delete-selected {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
    width: auto;
    padding-right: 10px;
    padding-left: 10px;
}

#delete-selected:hover {
    background-color: #c82333;
    border-color: #c82333;
    transform: translateY(-2px);
}

/* Checkbox Styling */
.form-checkbox, #select-all {
    width: 18px;
    height: 18px;
    cursor: pointer;
    border: 2px solid var(--primary-brown);
    border-radius: 3px;
}

.form-checkbox:checked, #select-all:checked {
    background-color: var(--primary-brown);
    border-color: var(--primary-brown);
}

/* Filter Section */
.filter-section {
    background-color: var(--bg-light-gray);
    border-radius: var(--border-radius-md);
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: var(--box-shadow-sm);
}

.filter-section .form-control {
    border: 1px solid var(--border-color);
}

.filter-section .form-control:focus {
    border-color: var(--primary-brown);
    box-shadow: 0 0 0 0.2rem rgba(108, 83, 51, 0.25);
}

#clear-filters {
    color: var(--primary-brown);
    background-color: transparent;
    border: 1px solid var(--primary-brown);
}

#clear-filters:hover {
    background-color: var(--bg-hover);
}

/* View Toggle Buttons */
.view-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-circle);
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-brown);
    transition: var(--transition-ease);
}

.view-toggle-btn.active {
    background-color: var(--primary-brown);
    color: white;
    border-color: var(--primary-brown);
}

.view-toggle-btn:hover:not(.active) {
    background-color: var(--bg-hover);
}

/* Grid View Styling */
.grid-view .card {
    height: 100%;
    transition: var(--transition-ease);
    border: 1px solid var(--border-color);
}

.grid-view .card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-md);
}

.grid-view .card-img-wrapper {
    height: 180px;
    overflow: hidden;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    position: relative;
}

.grid-view .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.grid-view .card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

/* Media Queries for Responsive Design */
@media (max-width: 768px) {
    .action-icon {
        width: 32px;
        height: 32px;
    }
    
    .grid-view .card-img-wrapper {
        height: 150px;
    }
    
    .bulk-action-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}
.sidebar-logo {
    width: 130px;
    align-self: center;
}

/* User Profile Styles */
.user-profile-section .profile-header {
    background-color: #6C5333;
    padding: 15px 20px;
    border-radius: 0 30px 30px 0;
    margin-bottom: 30px;
    margin-left: -20px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    width: 200px;
}

.user-profile-section .profile-header h4 {
    color: white;
    font-weight: 700;
    margin: 0;
    font-size: 1.4rem;
}

.user-profile-section .profile-header-icon {
    background-color: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    margin-left: 15px;
}

.user-profile-section .profile-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.user-profile-section .profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.user-profile-section .profile-card .card-header {
    background-color: #f8f8f8;
    border-bottom: 1px solid rgba(108, 83, 51, 0.1);
    font-weight: 600;
    padding: 15px 20px;
    display: flex;
    align-items: center;
}

.user-profile-section .profile-card .card-header i {
    margin-right: 10px;
    color: #6C5333;
}

.user-profile-section .profile-image-container {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 20px;
    position: relative;
    border: 3px solid #6C5333;
    overflow: hidden;
}

.user-profile-section .profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-profile-section .profile-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.user-profile-section .profile-image-container:hover .profile-image-overlay {
    opacity: 1;
}

.user-profile-section .profile-image-overlay i {
    color: white;
    font-size: 24px;
}

.user-profile-section .required-field::after {
    content: ' *';
    color: #e74a3b;
}

/* Media Queries for User Profile */
@media (max-width: 767.98px) {
    .user-profile-section .profile-header {
        margin-left: -15px;
        padding: 12px 15px;
        width: 180px;
    }
    
    .user-profile-section .profile-header h4 {
        font-size: 1.2rem;
    }
    
    .user-profile-section .profile-header-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .user-profile-section .profile-image-container {
        width: 120px;
        height: 120px;
    }
}

/* User Profile Styles - Company Logo */
.user-profile-section .company-section h6,
.user-profile-section .profile-section h6 {
    font-weight: 600;
    color: #5a5c69;
}

.user-profile-section .company-logo-container {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 20px;
    position: relative;
    border: 3px solid #7F8328;
    overflow: hidden;
}

.user-profile-section .company-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-profile-section .company-logo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.user-profile-section .company-logo-container:hover .company-logo-overlay {
    opacity: 1;
}

.user-profile-section .company-logo-overlay i {
    color: white;
    font-size: 24px;
}

/* Form Section Headings */
.user-profile-section .form-section-heading {
    color: #6C5333;
    font-weight: 600;
    font-size: 1.1rem;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(108, 83, 51, 0.2);
    margin-bottom: 20px;
}

@media (max-width: 767.98px) {
    .user-profile-section .company-logo-container {
        width: 120px;
        height: 120px;
    }
}

/* User Sidebar Avatar */
.user-profile .avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 15px auto;
    border: 3px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.user-profile h5 {
    color: white;
    font-size: 16px;
    margin-bottom: 5px;
    font-weight: 600;
}

.user-profile .user-role {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 20px;
}

/* Import CSV Modal Styles */
.copy-text {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  padding: 2px 5px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.copy-text:hover {
  background-color: rgba(108, 83, 51, 0.05);
  text-decoration: none;
}

.copy-text i {
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.copy-text:hover i {
  opacity: 1;
}

#woodReferenceSection .list-group-item {
  transition: background-color 0.2s ease;
}

#woodReferenceSection .list-group-item:hover {
  background-color: rgba(108, 83, 51, 0.05);
}

#importErrorRows td code {
  background-color: #f8f9fa;
  padding: 2px 5px;
  border-radius: 3px;
  color: #e74c3c;
  font-size: 12px;
  white-space: nowrap;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
}

#importErrorDetails .table th {
  font-size: 12px;
  white-space: nowrap;
}

#importErrorDetails .table td {
  font-size: 13px;
  vertical-align: middle;
}

#woodTypeAccordion .card-header {
  background-color: rgba(127, 131, 40, 0.05);
}

#woodTypeAccordion .card-header button {
  color: #6C5333;
  font-weight: 600;
  text-decoration: none;
}

#woodTypeAccordion .card-header button:hover {
  color: #574429;
}

.modal-body .alert-info ul {
  padding-left: 20px;
}

#importInstructions {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  border-left: 4px solid #17a2b8;
  padding-left: 15px;
}

#importInstructions code {
  background-color: rgba(23, 162, 184, 0.1);
  color: #17a2b8;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
}

#importInstructions strong {
  font-weight: 700;
}

.modal-body .alert-info ul {
  padding-left: 20px;
}

#woodReferenceSection .card-header {
  background-color: rgba(127, 131, 40, 0.05);
  transition: background-color 0.2s ease;
}

#woodReferenceSection .card-header:hover {
  background-color: rgba(127, 131, 40, 0.1);
}

#woodReferenceSection .card {
  margin-bottom: 0.5rem;
  border-color: rgba(108, 83, 51, 0.2);
}

#woodTypeSearch {
  border-color: rgba(108, 83, 51, 0.3);
}

#woodTypeSearch:focus {
  box-shadow: 0 0 0 0.2rem rgba(108, 83, 51, 0.25);
  border-color: rgba(108, 83, 51, 0.5);
}

#importInstructions {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  border-left: 4px solid #17a2b8;
  padding-left: 15px;
}

#importInstructions code {
  background-color: rgba(23, 162, 184, 0.1);
  color: #17a2b8;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
}

/* Export Button Styling */
.btn-export {
  background-color: #7F8328;
  border-color: #7F8328;
  color: white;
}

.btn-export:hover {
  background-color: #696e22;
  border-color: #696e22;
  color: white;
}

.btn-export i {
  margin-right: 5px;
}

/* CSV Upload Button */
.csv-upload-container {
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.csv-upload-container input[type=file] {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 100%;
  min-height: 100%;
  font-size: 100px;
  text-align: right;
  filter: alpha(opacity=0);
  opacity: 0;
  outline: none;
  background: white;
  cursor: pointer;
  display: block;
}

.btn-file {
  position: relative;
  overflow: hidden;
}

.btn-file input[type=file] {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 100%;
  min-height: 100%;
  font-size: 100px;
  text-align: right;
  filter: alpha(opacity=0);
  opacity: 0;
  outline: none;
  background: white;
  cursor: pointer;
  display: block;
}

/* Export functionality */
.export-selection-group {
    display: inline-flex;
}

#export-csv {
    min-width: 140px;
    transition: all 0.3s;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

#export-csv.has-selection {
    background-color: #574429;
}

.btn-export-clear {
    width: 38px;
    background-color: #7F8328;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-export-clear:hover {
    background-color: #574429;
}

.btn-export-clear i {
    font-size: 14px;
}

.btn-export {
    background-color: #7F8328;
    color: white;
    transition: all 0.3s;
}

.btn-export:hover {
    background-color: #574429;
    color: white;
}

.btn-export i {
    margin-right: 5px;
}

#selected-count-badge {
    background-color: rgba(255, 255, 255, 0.85);
    color: #7F8328;
    font-weight: bold;
    border-radius: 50px;
    padding: 2px 6px;
    font-size: 11px;
    min-width: 20px;
    text-align: center;
    display: inline-block;
}

.selection-controls {
    display: flex;
    align-items: center;
}

.action-btn-group {
    display: flex;
    transition: all 0.3s;
    flex-wrap: wrap;
}

.action-btn-group .btn {
    border-radius: 4px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    transition: all 0.3s;
    margin-bottom: 5px;
}

.action-btn-group .btn:last-child {
    margin-right: 0;
}

.action-btn-group .btn i {
    margin-right: 5px;
}

/* Ensure smooth transitions when showing/hiding buttons */
.multi-action {
    opacity: 0;
    visibility: hidden;
    width: 0;
    overflow: hidden;
    margin: 0;
    transition: all 0.3s;
}

.multi-action:not(.d-none) {
    opacity: 1;
    visibility: visible;
    width: auto;
    margin-right: 8px;
}

@media (max-width: 768px) {
    .button-row {
        flex-direction: column;
    }
    
    .action-btn-group {
        margin-top: 10px;
        justify-content: flex-end;
        width: 100%;
    }
    
    .selection-controls {
        width: 100%;
    }
    
    .export-selection-group {
        width: 100%;
        display: flex;
    }
    
    #export-csv {
        flex: 1;
    }
}

/* PDF Export Button */
#export-pdf {
    min-width: 140px;
    transition: all 0.3s;
    background-color: #6C5333;
    color: white;
}

#export-pdf.has-selection {
    background-color: #574429;
}

#selected-count-badge-pdf {
    background-color: rgba(255, 255, 255, 0.85);
    color: #6C5333;
    font-weight: bold;
    border-radius: 50px;
    padding: 2px 6px;
    font-size: 11px;
    min-width: 20px;
    text-align: center;
    display: inline-block;
}

#selected-count-badge {
    background-color: rgba(255, 255, 255, 0.85);
    color: #7F8328;
    font-weight: bold;
    border-radius: 50px;
    padding: 2px 6px;
    font-size: 11px;
    min-width: 20px;
    text-align: center;
    display: inline-block;
}