:root {
    --blue: #0b5ed7;
    --dark: #172033;
    --light: #f5f7fb;
    --border: #d8deea;
    --success: #16803c;
    --muted: #6b7280;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--light);
    color: var(--dark);
}

.header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 18px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    font-size: 20px;
    font-weight: bold;
}

.header-user {
    font-size: 14px;
    color: var(--muted);
}

.container {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 18px;
}

.card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 18px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
}

.login-card {
    max-width: 420px;
    margin: 70px auto;
}

h1, h2, h3 {
    margin-top: 0;
}

label {
    display: block;
    font-weight: bold;
    margin-top: 14px;
    margin-bottom: 6px;
}

input, select {
    width: 100%;
    padding: 11px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
}

button, .button {
    display: inline-block;
    background: var(--blue);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 11px 16px;
    margin-top: 18px;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
}

.button-secondary {
    background: #374151;
}

.button-disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.alert-error {
    background: #ffe4e6;
    border: 1px solid #fb7185;
    color: #9f1239;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.alert-success {
    background: #dcfce7;
    border: 1px solid #22c55e;
    color: #166534;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.category-card {
    min-height: 180px;
}

.status-pill {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-coming {
    background: #fef3c7;
    color: #92400e;
}

.small {
    font-size: 13px;
    color: var(--muted);
}

@media (max-width: 700px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .header {
        display: block;
    }

    .header-user {
        margin-top: 8px;
    }
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
    background: #ffffff;
}

th, td {
    border-bottom: 1px solid var(--border);
    padding: 10px;
    text-align: left;
    font-size: 14px;
}

th {
    background: #f1f5f9;
    font-weight: bold;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}

.badge-admin {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-client {
    background: #e5e7eb;
    color: #374151;
}

.badge-active {
    background: #dcfce7;
    color: #166534;
}

.badge-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.nav-links a {
    margin-right: 12px;
}

@media (max-width: 700px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.code-box {
    background: #0f172a;
    color: #e5e7eb;
    padding: 14px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.notice {
    background: #eff6ff;
    border: 1px solid #60a5fa;
    color: #1e3a8a;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}