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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
    color: #333;
    min-height: 100vh;
}

/* Navigation */
nav {
    background: #1a73e8;
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 56px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

nav .brand {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin-right: 32px;
    text-decoration: none;
}

nav a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    padding: 0 12px;
    height: 56px;
    line-height: 56px;
    font-size: 14px;
    transition: background 0.2s;
}

nav a:hover, nav a.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

nav .user-info {
    margin-left: auto;
    color: rgba(255,255,255,0.9);
    font-size: 13px;
}

nav .user-info a {
    font-size: 13px;
}

/* Main container */
.container {
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 16px;
}

/* Cards */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 24px;
    margin-bottom: 20px;
}

.card h2 {
    font-size: 20px;
    margin-bottom: 16px;
    color: #1a1a1a;
}

.card h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #444;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dadce0;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26,115,232,0.2);
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-primary {
    background: #1a73e8;
    color: #fff;
}

.btn-primary:hover {
    background: #1557b0;
}

.btn-secondary {
    background: #e8eaed;
    color: #333;
}

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

.btn-danger {
    background: #d93025;
    color: #fff;
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background: #f8f9fa;
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e8eaed;
}

table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e8eaed;
    font-size: 14px;
}

table tr:hover {
    background: #f8f9fa;
}

table .actions {
    white-space: nowrap;
}

table .actions a,
table .actions button {
    margin-right: 6px;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success {
    background: #e6f4ea;
    color: #137333;
    border: 1px solid #ceead6;
}

.alert-error {
    background: #fce8e6;
    color: #c5221f;
    border: 1px solid #f5c6cb;
}

/* Login page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f0f2f5;
}

.login-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 40px;
    width: 400px;
    max-width: 90%;
}

.login-card h1 {
    font-size: 24px;
    color: #1a1a1a;
    margin-bottom: 8px;
    text-align: center;
}

.login-card p {
    color: #666;
    text-align: center;
    margin-bottom: 24px;
}

.login-card .btn {
    width: 100%;
    margin-top: 8px;
}

/* Search */
.search-form {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.search-form input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #dadce0;
    border-radius: 6px;
    font-size: 14px;
}

.search-form input:focus {
    outline: none;
    border-color: #1a73e8;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.badge-active {
    background: #e6f4ea;
    color: #137333;
}

.badge-inactive {
    background: #fce8e6;
    color: #c5221f;
}

.badge-admin {
    background: #e8f0fe;
    color: #1a73e8;
}

.badge-user {
    background: #f0f2f5;
    color: #555;
}

/* Header actions */
.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.header-actions h2 {
    margin-bottom: 0;
}

/* Grid helpers */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .grid-2 {
        grid-template-columns: 1fr;
    }
    nav {
        flex-wrap: wrap;
        height: auto;
        padding: 8px 16px;
    }
    nav a {
        height: 36px;
        line-height: 36px;
        padding: 0 8px;
    }
    nav .brand {
        margin-right: 16px;
    }
}