:root {
    --bg-dark: #141414;
    --bg-panel: #1e1e1e;
    --border: #2a2a2a;
    --accent: #7c5cd6;
    --text: #e0e0e0;
    --text-muted: #b0b0b0;
}

* { box-sizing: border-box; }
body {
    background: var(--bg-dark);
    color: var(--text);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
}

.center-layout {
    display: flex;
    height: 100vh;
    align-items: center;
    justify-content: center;
}

h1, h2 { color: #fff; margin-top: 0; }
a { color: var(--accent); text-decoration: none; }

button {
    padding: 8px 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: filter 0.2s;
}
button:hover { filter: brightness(1.1); }
button.ghost {
    background: transparent;
    border: 1px solid #383838;
    color: var(--text-muted);
}
button.ghost:hover { background: #2a2a2a; color: #fff; }
button.danger { background: #6a2a2a; border: 1px solid #8a3a3a; }
button.danger:hover { background: #8a3a3a; }

input[type="text"], input[type="password"], input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    background: #262626;
    color: var(--text);
    border: 1px solid #383838;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 10px;
}
input:focus { outline: none; border-color: var(--accent); }

/* Логин */
.login-box {
    background: var(--bg-panel);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--border);
    width: 100%;
    max-width: 400px;
    text-align: center;
}
.login-box h1 { color: var(--accent); margin-bottom: 5px; }
.subtitle { color: var(--text-muted); margin-bottom: 20px; font-size: 14px; }
.login-box button { width: 100%; margin-top: 10px; padding: 12px; }
.err { color: #e0a3a3; font-size: 13px; margin-top: 10px; }

/* Main Layout */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-panel);
}
header h1 { margin: 0; font-size: 20px; }

main {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
}
.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
}

/* Генератор */
.gen-output { display: flex; gap: 10px; margin-bottom: 15px; }
.gen-output input {
    font-family: ui-monospace, monospace;
    font-size: 16px;
    margin-bottom: 0;
    letter-spacing: 1px;
}
.gen-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #181818;
    border-radius: 6px;
    border: 1px solid #222;
}
.gen-controls label { font-size: 14px; color: var(--text-muted); }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.checkboxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.checkboxes label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    cursor: pointer;
}
.checkboxes input { accent-color: var(--accent); width: 16px; height: 16px; }
.btn-save { margin-left: 10px; }

/* Таблица */
table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td {
    padding: 12px;
    text-align: left;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}
th { color: var(--text-muted); font-weight: 600; background: #181818; }
.mono { font-family: ui-monospace, monospace; font-size: 13px; color: #a0a0a0; }
td .ghost { padding: 4px 8px; font-size: 14px; margin-right: 4px; }
.empty { text-align: center; color: var(--text-muted); padding: 30px !important; }

/* Модалка */
.modal-bg {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-bg.open { display: flex; }
.modal {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px;
    width: 100%;
    max-width: 400px;
}
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* Toast */
#toast-wrap {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    background: #1e1e1e;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.3s ease;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast.err { border-color: #6a2a2a; background: #2a1a1a; color: #e0a3a3; }
.toast.ok { border-color: #2a5a2a; background: #1a2a1a; color: #a3e0a3; }
