:root {
    --primary: #2c3e50;
    --secondary: #34495e;
    --accent: #3498db;
    --accent-hover: #2980b9;
    --success: #2ecc71;
    --success-hover: #27ae60;
    --danger: #e74c3c;
    --danger-hover: #c0392b;
    --warning: #f39c12;
    --purple: #9b59b6;
    --gray-light: #f8f9fa;
    --gray-border: #e0e0e0;
    --text-main: #2c3e50;
    --text-muted: #7f8c8d;
    --bg-body: #f5f7fa;
    
    --sidebar-width: 260px;
    --header-height: 80px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-body);
    display: flex;
    min-height: 100vh;
    color: #555;
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 30px;
    min-width: 0;
}

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

.sidebar-header h2 { font-size: 24px; margin-bottom: 5px; color: white; }

.menu { list-style: none; padding: 20px 0; }
.menu-item {
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s;
    color: #ecf0f1;
    display: flex;
    align-items: center;
    gap: 12px;
}
.menu-item a { text-decoration: none; color: inherit; display: flex; width: 100%; gap: 12px; }
.menu-item:hover { background: rgba(255, 255, 255, 0.1); padding-left: 25px; }
.menu-item.active {
    background: rgba(52, 152, 219, 0.3);
    border-left: 4px solid var(--accent);
    padding-left: 16px;
}

.header {
    background: white;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 { color: var(--text-main);  }

.header-fixed{
    width: calc(100% - var(--sidebar-width) - 60px);
    position: fixed;
}

.card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    margin-top: 80px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary, .btn-save, .btn-add { background: var(--success); color: white; padding: 12px 24px; font-size: 16px; font-weight: 600; }
.btn-primary:hover, .btn-save:hover, .btn-add:hover { background: var(--success-hover); box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3); }

.btn-edit { background: var(--accent); color: white; }
.btn-edit:hover { background: var(--accent-hover); }

.btn-delete, .btn-confirm { background: var(--danger); color: white; }
.btn-delete:hover, .btn-confirm:hover { background: var(--danger-hover); }

.btn-secondary, .btn-cancel { background: #95a5a6; color: white; }
.btn-secondary:hover, .btn-cancel:hover { background: #7f8c8d; }

.btn-view, .btn-manage { background: var(--purple); color: white; }
.btn-view:hover, .btn-manage:hover { background: #8e44ad; }

.search-bar { margin-bottom: 20px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; color: #555; }

.form-input, .search-input, .form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--gray-border);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    background: white;
}
.form-input:focus, .search-input:focus, .form-group input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
}
textarea { resize: vertical; min-height: 100px; font-family: inherit; }

table { width: 100%; border-collapse: collapse; }
thead { background: var(--gray-light); }
th { padding: 15px; text-align: left; font-weight: 600; color: var(--text-main); border-bottom: 2px solid var(--gray-border); }
td { padding: 15px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
tr:hover { background: var(--gray-light); }
.actions { display: flex; gap: 8px; }

.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal.show { display: flex; }
.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    overflow-y: auto;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.close, .btn-close { background: none; border: none; font-size: 28px; cursor: pointer; color: var(--text-muted); }
.modal-actions, .modal-buttons { display: flex; gap: 10px; justify-content: flex-end; margin-top: 25px; }

.loading, .empty-state { text-align: center; padding: 40px; color: var(--text-muted); }
.empty-state-icon { font-size: 64px; margin-bottom: 20px; display: block; }

.hidden { display: none !important; }
.badge { padding: 4px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; color: white; }

#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 250px;
    padding: 16px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateX(100%);
    animation: slideIn 0.3s forwards;
    cursor: pointer;
}

.toast.hide {
    animation: fadeOut 0.3s forwards;
}

.toast.success { background-color: var(--success); border-left: 5px solid #27ae60; }
.toast.error   { background-color: var(--danger); border-left: 5px solid #c0392b; }
.toast.info    { background-color: var(--accent); border-left: 5px solid #2980b9; }

@keyframes slideIn {
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOut {
    to { opacity: 0; transform: translateX(100%); }
}