:root { --primary: #1a73e8; --danger: #d93025; --border: #e0e0e0; --radius: 6px; --bg: #f8f9fa; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: #333; }

.layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
#sidebar { background: #1a1a2e; color: #fff; padding: 1.5rem 1rem; }
#sidebar h2 { font-size: 1.1rem; margin-bottom: 1.5rem; }
#sidebar nav { display: flex; flex-direction: column; gap: 0.25rem; }
.nav-link { color: #aaa; text-decoration: none; padding: 0.5rem 0.75rem; border-radius: var(--radius); }
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,0.1); }

main { padding: 2rem; overflow-y: auto; }
h2 { margin-bottom: 1rem; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; }
.stat-card { background: #fff; padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--border); text-align: center; }
.stat-card span { font-size: 2rem; font-weight: 700; color: var(--primary); display: block; }
.stat-card label { font-size: 0.85rem; color: #666; }

.toolbar { display: flex; gap: 0.5rem; margin-bottom: 1rem; align-items: center; flex-wrap: wrap; }
.toolbar input, .toolbar select { padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.9rem; }
.toolbar input { flex: 1; min-width: 200px; }

button { padding: 0.5rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; font-size: 0.9rem; background: #fff; }
button:hover { background: #f0f0f0; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: #1557b0; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #b71c1c; }
.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.8rem; }

.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; }
.data-table th, .data-table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); text-align: left; font-size: 0.85rem; }
.data-table th { background: #f5f5f5; font-weight: 600; }
.data-table tr:hover { background: #fafafa; }

.badge { padding: 0.2rem 0.5rem; border-radius: 3px; font-size: 0.75rem; font-weight: 600; }
.badge-revoked { background: #fce4ec; color: var(--danger); }
.badge-expired { background: #fff3e0; color: #e65100; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal[hidden] { display: none; }
.modal-content { background: #fff; padding: 2rem; border-radius: var(--radius); width: 100%; max-width: 420px; }
.modal-content h3 { margin-bottom: 1rem; }
.modal-content label { display: block; margin-bottom: 0.75rem; font-size: 0.9rem; }
.modal-content input { width: 100%; padding: 0.5rem; border: 1px solid var(--border); border-radius: var(--radius); margin-top: 0.25rem; }
.form-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }

.card { padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 0.5rem; background: #fff; }
.error { color: var(--danger); margin-top: 0.5rem; font-size: 0.85rem; }

.wizard-step { margin-bottom: 1.5rem; }
.wizard-step h3 { margin-bottom: 0.5rem; font-size: 1rem; }
.wizard-step label { display: block; margin-bottom: 0.4rem; }
