/* Единый стиль форм для всего сайта.
   Использует CSS-переменные --bg-mid, --line, --line-soft, --ink, --ink-dim, --accent, --accent-glow. */

form.card, .card {
    background: var(--bg-mid);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 24px;
}

label {
    display: block;
    font-weight: 600;
    margin: 16px 0 8px;
}
label:first-child { margin-top: 0; }

input[type=text],
input[type=password],
input[type=tel],
input[type=email],
input[type=url],
input[type=search],
input[type=number],
input[type=date],
input[type=datetime-local],
input[type=time],
input[type=file],
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 19px;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-family: inherit;
    background: #fff;
    color: var(--ink);
    min-height: 48px;
}
textarea {
    min-height: 0;
    resize: vertical;
}

/* Никаких бордовых обводок при фокусе — только нативное browser outline. */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--line);
}

button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    height: 36px;
    line-height: 1;
    font-size: 15px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    box-sizing: border-box;
    white-space: nowrap;
}
button:hover, .btn:hover { background: var(--accent-glow); color: #fff; }
.btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}
.btn-secondary:hover { background: var(--accent); color: #fff; }
.btn-danger { background: #8b2a2a; }
.btn-danger:hover { background: #a83232; }

.actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.error {
    background: #f8d7da;
    border: 1px solid #c97a7a;
    color: #6b1e1e;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
}
.ok {
    background: #d4edda;
    border: 1px solid #8ab18f;
    color: #1e4b25;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.password-show {
    background: #fff8e1;
    border: 2px dashed var(--accent);
    padding: 16px;
    border-radius: 4px;
    margin: 16px 0;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 22px;
    word-break: break-all;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-mid);
}
th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--line-soft);
}
th {
    background: var(--bg-deep);
    font-weight: 600;
}
tr:last-child td { border-bottom: none; }
td.num { font-family: 'JetBrains Mono', monospace; }

@media (max-width: 600px) {
    .card, form.card { padding: 16px; }
    th, td { padding: 8px 10px; }
}
