:root {
    --primary-color: #4a69bd;
    --secondary-color: #6a89cc;
    --background-color: #f4f7f6;
    --card-background: #ffffff;
    --text-color: #333;
    --header-color: #1e272e;
    --green: #2ecc71;
    --red: #e74c3c;
    --orange: #f39c12;
    --gray: #95a5a6;
    --border-radius: 8px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
}

.dashboard-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.header h1 {
    color: var(--header-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.version-badge {
    background-color: var(--primary-color);
    color: white;
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.header .user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logout-btn {
    background-color: var(--red);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
}

.logout-btn:hover { background-color: #c0392b; }

.notification-bar {
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    color: white;
    font-weight: 500;
}
.notification-bar.success { background-color: var(--green); }
.notification-bar.error { background-color: var(--red); }

.main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.top-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.card {
    background: var(--card-background);
    padding: 1.5rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.card h3 {
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

.stats-cards .stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}
.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--header-color);
}

.generate-form { display: flex; flex-direction: column; gap: 1rem; }
.generate-form input { padding: 0.75rem; border: 1px solid #ccc; border-radius: var(--border-radius); font-size: 1rem; }
.generate-form button, .action-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    text-align: center;
}
.generate-form button:hover, .action-btn:hover { background-color: #3b5998; }

#searchInput {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    box-sizing: border-box;
}

.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
table th, table td { padding: 1rem; text-align: left; border-bottom: 1px solid #e0e0e0; }
table th { background-color: #f9f9f9; font-weight: 600; }
.usage-count { font-weight: bold; text-align: center; }

.status-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    text-transform: capitalize;
    display: inline-block;
    min-width: 60px;
    text-align: center;
}
.status-active { background-color: var(--green); }
.status-revoked { background-color: var(--gray); }

.action-buttons { display: flex; gap: 0.5rem; }
.action-buttons form { margin: 0; }
.toggle-btn { background-color: var(--orange); }
.toggle-btn:hover { background-color: #d35400; }
.delete-btn { background-color: var(--red); }
.delete-btn:hover { background-color: #c0392b; }

/* Responsive Adjustments */
@media (max-width: 768px) {
    .top-section { grid-template-columns: 1fr; }
    .header { flex-direction: column; gap: 1rem; }
    .action-buttons { flex-direction: column; }
}