/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #2c3e50 0%, #1a252f 100%);
    color: #fff;
    transition: all 0.3s;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    box-shadow: 3px 0 10px rgba(0,0,0,0.1);
}

.sidebar.collapsed {
    margin-left: -250px;
}

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

.sidebar-header h3 {
    margin-bottom: 5px;
    font-size: 1.4rem;
}

.sidebar-header p {
    font-size: 0.8rem;
    opacity: 0.8;
}

.nav {
    padding: 20px 0;
}

.nav-item {
    margin: 5px 0;
}

.nav-link {
    color: #bdc3c7;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
    border-left: 3px solid #3498db;
}

.nav-link.active {
    color: #fff;
    background: rgba(52, 152, 219, 0.2);
    border-left: 3px solid #3498db;
}

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

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 15px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
}

.badge {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-primary {
    background-color: #3498db;
    color: white;
}

.badge-danger {
    background-color: #e74c3c;
    color: white;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    margin-left: 250px;
    transition: all 0.3s;
}

.main-content.expanded {
    margin-left: 0;
}

/* Navbar Top */
.navbar-top {
    background: white;
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #2c3e50;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s;
}

.sidebar-toggle:hover {
    background: #f8f9fa;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.navbar-top .container-fluid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.welcome-msg {
    font-weight: 500;
    color: #2c3e50;
}

.btn-profile {
    color: #2c3e50;
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-profile:hover {
    color: #3498db;
}

/* Content Area */
.content {
    padding: 30px;
    min-height: calc(100vh - 140px);
}

.container-fluid {
    max-width: 1200px;
    margin: 0 auto;
}

/* Footer */
.footer {
    background: white;
    padding: 15px 30px;
    border-top: 1px solid #eaeaea;
    font-size: 0.9rem;
    color: #666;
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    border: none;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    background: white;
    border-bottom: 1px solid #eaeaea;
    padding: 20px;
    border-radius: 10px 10px 0 0 !important;
}

.card-header h5 {
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
}

.card-body {
    padding: 25px;
}

/* Stats Cards */
.stats-card {
    text-align: center;
    padding: 25px;
}

.stats-card i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #3498db;
}

.stats-card h3 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.stats-card p {
    color: #666;
    margin: 0;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    background-color: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    padding: 15px;
    border-bottom: 2px solid #eaeaea;
}

.table td {
    padding: 15px;
    border-bottom: 1px solid #eaeaea;
    vertical-align: middle;
    text-align: center;
}

.table tr:hover {
    background-color: #f8f9fa;
}

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

/* Buttons */
.btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

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

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

.btn-success {
    background-color: #2ecc71;
    color: white;
}

.btn-success:hover {
    background-color: #27ae60;
    color: white;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

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

.btn-warning {
    background-color: #f39c12;
    color: white;
}

.btn-warning:hover {
    background-color: #d68910;
    color: white;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
    color: white;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.85rem;
}

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

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

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-control[type="date"] {
    padding: 9px 15px;
}

select.form-control {
    height: 42px;
}

/* Checkboxes and Radios */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.form-check-input {
    margin-right: 10px;
}

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

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.alert-dismissible .close {
    padding: 0;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: inherit;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.alert-dismissible .close:hover {
    opacity: 1;
}

/* Status Badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

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

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #3498db 0%, #2c3e50 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.login-header h2 {
    margin: 0;
    font-size: 1.8rem;
}

.login-header p {
    margin: 10px 0 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.login-body {
    padding: 30px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        margin-left: -250px;
    }
    
    .sidebar.collapsed {
        margin-left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .main-content.expanded {
        margin-left: 250px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .content {
        padding: 20px;
    }
    
    .table th, .table td {
        padding: 10px;
    }
}

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

.card, .alert {
    animation: fadeIn 0.5s ease-out;
}