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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    background: #f5f5f5;
}

#app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
}

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

.logo h2 {
    font-size: 24px;
    margin-bottom: 5px;
}

.logo p {
    font-size: 14px;
    opacity: 0.8;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.menu-item.active {
    background: rgba(255, 255, 255, 0.2);
}

.menu-item span {
    font-size: 20px;
}

.main-content {
    flex: 1;
    padding: 30px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 28px;
    color: #1a1a1a;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info button {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.user-info button:hover {
    background: #5568d3;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
}

.btn {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.btn:hover {
    background: #5568d3;
}

.btn-danger {
    background: #f56565;
}

.btn-danger:hover {
    background: #e53e3e;
}

.btn-success {
    background: #48bb78;
}

.btn-success:hover {
    background: #38a169;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

table th {
    background: #f9f9f9;
    font-weight: 600;
}

table tr:hover {
    background: #f9f9f9;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 24px;
}

.close-btn {
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.close-btn:hover {
    color: #333;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-enabled {
    background: #c6f6d5;
    color: #22543d;
}

.status-disabled {
    background: #fed7d7;
    color: #742a2a;
}

.actions {
    display: flex;
    gap: 10px;
}

.actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-edit {
    background: #4299e1;
    color: white;
}

.btn-delete {
    background: #f56565;
    color: white;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    background: #e2e8f0;
    color: #2d3748;
    font-weight: 500;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.btn-primary {
    padding: 10px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    padding: 10px 24px;
    background: #e2e8f0;
    color: #2d3748;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #718096;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
}

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

.toast.success {
    border-left: 4px solid #48bb78;
}

.toast.error {
    border-left: 4px solid #f56565;
}

.toast.warning {
    border-left: 4px solid #ed8936;
}

.toast-icon {
    font-size: 20px;
}

.toast-message {
    color: #2d3748;
    font-size: 14px;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.help-text {
    font-size: 13px;
    color: #718096;
    margin-top: 4px;
}

.modal-content h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #1a202c;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h3 {
    color: #4a5568;
    margin-bottom: 8px;
    font-size: 18px;
}

.empty-state p {
    margin-bottom: 24px;
    font-size: 14px;
}

.info-box {
    padding: 14px;
    background: #ebf8ff;
    border-radius: 6px;
    border-left: 3px solid #4299e1;
    margin: 16px 0;
}

.info-box p {
    font-size: 13px;
    color: #2c5282;
    margin: 0;
    line-height: 1.6;
}

.info-box strong {
    color: #1a365d;
}

.warning-box {
    padding: 14px;
    background: #fffaf0;
    border-radius: 6px;
    border-left: 3px solid #ed8936;
    margin: 16px 0;
}

.warning-box p {
    font-size: 13px;
    color: #7c2d12;
    margin: 0;
    line-height: 1.6;
}

.success-box {
    padding: 14px;
    background: #f0fff4;
    border-radius: 6px;
    border-left: 3px solid #48bb78;
    margin: 16px 0;
}

.success-box p {
    font-size: 13px;
    color: #22543d;
    margin: 0;
    line-height: 1.6;
}

.form-help {
    font-size: 12px;
    color: #718096;
    margin-top: 4px;
    line-height: 1.4;
}

textarea {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    background: #f7fafc;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
}
