:root {
    color-scheme: dark;
    --bg: #080e1c;
    --panel: #111c30;
    --border: #24334d;
    --blue: #2563eb;
    --text: #f1f5f9;
    --muted: #94a3b8;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, sans-serif;
    font-size: 14px;
}
header {
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.brand {
    color: #60a5fa;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: 1px;
}
.subtitle {
    color: var(--muted);
    font-size: 11px;
    margin-top: 5px;
}
main {
    max-width: 1400px;
    margin: auto;
    padding: 28px 20px;
}
h1, h2 { margin-top: 0; }
h2 { font-size: 19px; }
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 20px;
}
.stats .card { margin: 0; }
.number {
    font-size: 34px;
    font-weight: bold;
    margin-top: 12px;
}
.blue { color: #60a5fa; }
.green { color: #4ade80; }
.red { color: #f87171; }
.yellow { color: #fbbf24; }
.muted { color: var(--muted); }
.fields {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}
label {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
}
input, select {
    width: 100%;
    background: #0b1425;
    color: var(--text);
    border: 1px solid var(--border);
    padding: 12px;
    border-radius: 8px;
    outline: none;
}
input:focus, select:focus {
    border-color: #3b82f6;
}
button {
    background: var(--blue);
    color: white;
    border: 0;
    border-radius: 8px;
    padding: 11px 16px;
    cursor: pointer;
    font-weight: 600;
}
button:hover { filter: brightness(1.2); }
.secondary { background: #253550; }
.danger { background: #991b1b; }
.table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}
th, td {
    text-align: left;
    padding: 15px 10px;
    border-bottom: 1px solid var(--border);
}
th { color: var(--muted); }
.actions {
    display: flex;
    gap: 6px;
    align-items: center;
}
.actions input { width: 65px; }
.actions button {
    font-size: 12px;
    padding: 9px;
}
.search {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.login {
    max-width: 400px;
    margin: 12vh auto;
    padding: 20px;
}
.login input { margin-bottom: 18px; }
.login button { width: 100%; }
footer {
    text-align: center;
    color: var(--muted);
    padding: 20px;
}
@media(max-width: 760px) {
    .stats, .fields {
        grid-template-columns: repeat(2, 1fr);
    }
    .card { padding: 15px; }
    main { padding: 18px 12px; }
}

/* Custom Key Prefix */
.fields {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}
.key-preview {
    background: #0b1425;
    border: 1px solid #24334d;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 16px;
    color: #94a3b8;
}
.key-preview strong {
    color: #60a5fa;
    font-size: 16px;
    margin-left: 8px;
}
.search button {
    white-space: nowrap;
}
@media(max-width: 1000px) {
    .fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media(max-width: 480px) {
    .fields {
        grid-template-columns: 1fr;
    }
}
