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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    color: #333;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

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

.login-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-container h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #667eea;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

button {
    width: 100%;
    padding: 0.75rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #5568d3;
}

.error-message {
    color: #e74c3c;
    margin-top: 1rem;
    text-align: center;
    display: none;
}

.error-message.show {
    display: block;
}

.result-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 5px;
    display: none;
}

.result-message.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.result-message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#dashboard-page {
    min-height: 100vh;
}

header {
    background: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: #667eea;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.role-badge {
    padding: 0.25rem 0.75rem;
    background: #667eea;
    color: white;
    border-radius: 20px;
    font-size: 0.875rem;
    text-transform: capitalize;
}

#logout-btn {
    width: auto;
    padding: 0.5rem 1rem;
    background: #e74c3c;
}

#logout-btn:hover {
    background: #c0392b;
}

nav {
    background: white;
    padding: 0 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    gap: 1rem;
}

.nav-btn {
    width: auto;
    padding: 1rem 1.5rem;
    background: transparent;
    color: #666;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-btn:hover {
    color: #667eea;
    background: #f8f9fa;
}

.nav-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #f8f9fa;
}

main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.content {
    display: none;
}

.content.active {
    display: block;
}

.content h2 {
    margin-bottom: 2rem;
    color: #333;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-card h3 {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.stat-card p {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
}

table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

table thead {
    background: #667eea;
    color: white;
}

table th,
table td {
    padding: 1rem;
    text-align: left;
}

table tbody tr {
    border-bottom: 1px solid #eee;
}

table tbody tr:hover {
    background: #f8f9fa;
}

.btn-primary {
    width: auto;
    margin-bottom: 1rem;
}

.status-active {
    color: #27ae60;
    font-weight: 500;
}

.status-inactive {
    color: #e74c3c;
    font-weight: 500;
}

#logs-list {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.log-item {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.log-item:last-child {
    border-bottom: none;
}

.log-item .log-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.log-item .log-message {
    color: #666;
}

