* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --royal-indigo: #4B0082;
    --aqua-teal: #20B2AA;
    --soft-gray: #F5F5F5;
    --warm-coral: #FF6B6B;
    --white: #FFFFFF;
    --dark: #333333;
    --border: #DDDDDD;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--soft-gray);
    color: var(--dark);
}

.container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--royal-indigo);
    color: var(--white);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: all 0.3s;
    z-index: 1000;
}

.sidebar.collapsed {
    width: 0;
    overflow: hidden;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 10px;
}

.sidebar-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    padding-left: 30px;
}

.nav-item .icon {
    margin-right: 10px;
    font-size: 20px;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    transition: margin-left 0.3s;
}

.main-content.expanded {
    margin-left: 0;
}

.topbar {
    background: var(--white);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 999;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.topbar-left h2 {
    font-size: 24px;
    color: var(--royal-indigo);
}

.btn-icon {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    color: var(--dark);
    font-weight: 500;
}

.btn-logout {
    background: var(--warm-coral);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: #ff5252;
}

.content {
    padding: 30px;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: var(--white);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-title {
    font-size: 16px;
    color: var(--dark);
    font-weight: 600;
}

.card-icon {
    font-size: 30px;
}

.card-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--royal-indigo);
}

.card-label {
    font-size: 14px;
    color: #888;
    margin-top: 5px;
}

.table-container {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background: var(--royal-indigo);
    color: var(--white);
}

table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

table tbody tr:hover {
    background: var(--soft-gray);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--royal-indigo);
    color: var(--white);
}

.btn-primary:hover {
    background: #3a0066;
}

.btn-success {
    background: var(--aqua-teal);
    color: var(--white);
}

.btn-success:hover {
    background: #189e98;
}

.btn-danger {
    background: var(--warm-coral);
    color: var(--white);
}

.btn-danger:hover {
    background: #ff5252;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: var(--royal-indigo);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--royal-indigo);
}

.close-modal {
    font-size: 28px;
    cursor: pointer;
    background: none;
    border: none;
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #28a745;
    color: var(--white);
}

.badge-warning {
    background: #ffc107;
    color: var(--dark);
}

.badge-danger {
    background: #dc3545;
    color: var(--white);
}

.badge-info {
    background: #17a2b8;
    color: var(--white);
}

.action-buttons {
    display: flex;
    gap: 5px;
}

@media print {
    .sidebar, .topbar, .btn, .action-buttons {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 0;
    }
    .main-content {
        margin-left: 0;
    }
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--royal-indigo), var(--aqua-teal));
}

.login-box {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header img {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
}

.login-header h2 {
    color: var(--royal-indigo);
    margin-bottom: 5px;
}

.login-header p {
    color: #888;
    font-size: 14px;
}
