/* General Styling */
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    background-color: #f4f7f6;
    color: #333;
}

.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #ffffff;
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100%;
    transition: all 0.3s ease;
    z-index: 1000;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.sidebar-header .sidebar-logo {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #176b4d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar.collapsed .sidebar-header h3 {
    display: none;
}

.sidebar-nav {
    flex-grow: 1;
    padding: 15px 0;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav .nav-group-title {
    font-size: 0.75rem;
    color: #888;
    padding: 10px 20px;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar.collapsed .nav-group-title {
    text-align: center;
    padding: 10px 0;
}

.sidebar.collapsed .nav-group-title span {
    display: none;
}

.sidebar-nav .nav-item {
    margin: 5px 10px;
}

.sidebar-nav .nav-item a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sidebar-nav .nav-item a i {
    margin-right: 10px;
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.sidebar.collapsed .nav-item a span {
    display: none;
}

.sidebar.collapsed .nav-item a {
    justify-content: center;
    padding: 10px 0;
}

.sidebar-nav .nav-item a:hover,
.sidebar-nav .nav-item.active a {
    background-color: #e6f4ea;
    color: #176b4d;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.sidebar-footer .user-info {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    color: #555;
}

.sidebar.collapsed .sidebar-footer .user-info {
    display: none;
}

.sidebar-footer .user-info i {
    margin-right: 8px;
    font-size: 1.2rem;
}

.sidebar-footer .logout-btn {
    display: inline-block;
    background-color: #dc3545;
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.sidebar-footer .logout-btn:hover {
    background-color: #c82333;
}

.sidebar.collapsed .sidebar-footer .logout-btn span {
    display: none;
}

.sidebar.collapsed .sidebar-footer .logout-btn i {
    margin-right: 0;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    flex-grow: 1;
    transition: margin-left 0.3s ease;
}

.main-content.shifted {
    margin-left: 60px;
}

.main-header {
    background-color: #ffffff;
    padding: 15px 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
}

.header-left {
    display: flex;
    align-items: center;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    margin-right: 15px;
    color: #555;
}

.main-header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: #176b4d;
}

.header-right .user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-right .user-menu span {
    color: #555;
    font-weight: 500;
}

.content-area {
    padding: 30px;
}

/* Cards */
.card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 25px;
    border: 1px solid #eee;
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #176b4d;
    font-size: 1.2rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

table thead {
    background-color: #176b4d;
    color: white;
}

table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

table tbody tr:hover {
    background-color: #f8f9fa;
}

table tbody tr:last-child td {
    border-bottom: none;
}

/* Forms */
.form-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    border-color: #176b4d;
    box-shadow: 0 0 0 3px rgba(23, 107, 77, 0.1);
    outline: none;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: #176b4d;
    color: white;
}

.btn-primary:hover {
    background-color: #0f4a35;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn i {
    margin-right: 5px;
}

/* Action Bar */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-filter input,
.search-filter select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

.badge-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* Messages */
.messages-container {
    margin-bottom: 20px;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.close-btn:hover {
    opacity: 1;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #176b4d;
}

.pagination .current {
    background-color: #176b4d;
    color: white;
    border-color: #176b4d;
}

.pagination a:hover {
    background-color: #f0f0f0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        overflow: hidden;
    }
    .sidebar.open {
        width: 250px;
    }
    .main-content {
        margin-left: 0;
    }
    .main-content.shifted {
        margin-left: 0;
    }
    .sidebar-toggle {
        display: block;
    }
    .header-right .user-menu span {
        display: none;
    }
    .action-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .search-filter {
        flex-direction: column;
    }
    .table-container {
        overflow-x: scroll;
    }
}

