/* Админ панел и вход */
.page-header { margin: 8px 0 24px; }
.page-header h1 { font-size: 28px; margin: 0 0 4px; }
.subtitle { color: var(--hc-ink3); margin: 0; }
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 24px 0 20px; }
.admin-tabs a { padding: 9px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--hc-ink2); text-decoration: none; background: var(--hc-chip); border: 1px solid transparent; transition: background .15s, color .15s; }
.admin-tabs a:hover { background: var(--hc-chip2); color: var(--hc-ink); }
.admin-tabs.js a.active { background: var(--hc-yellow); color: #0a1220; }
.section-card { margin-top: 0; scroll-margin-top: 90px; }
.section-card h3 { margin-bottom: 14px; }
.section-card h4 { margin: 22px 0 10px; font-family: var(--hc-font-display); text-transform: uppercase; font-size: 12px; letter-spacing: .05em; color: var(--hc-ink2); }
.flash { padding: 12px 16px; border-radius: 12px; margin: 0 0 16px; font-weight: 600; font-size: 14px; }
.flash.ok { background: var(--green-bg); color: var(--green); }
.flash.err { background: var(--red-bg); color: var(--red); }
.flash code { font-weight: 400; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { text-align: left; padding: 10px 12px; vertical-align: middle; border-bottom: 1px solid var(--hc-line); }
.data-table td.break { word-break: break-all; }
/* td остава table-cell (иначе линиите и фонът на реда се разминават) */
.row-actions { display: table-cell; text-align: right; white-space: nowrap; }
.row-actions > * { display: inline-block; vertical-align: top; margin: 0 0 0 8px; }
.row-actions form { margin: 0 0 0 8px; }
.row-actions .edit-row[open] { display: block; white-space: normal; text-align: left; margin: 8px 0 0; }
.edit-row summary { list-style: none; cursor: pointer; display: inline-block; }
.edit-row summary::-webkit-details-marker { display: none; }
.edit-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; align-items: end; margin-top: 12px; }
.edit-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--hc-ink3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.edit-form input { padding: 10px 14px; font-size: 14px; text-transform: none; letter-spacing: 0; font-weight: 400; width: 100%; box-sizing: border-box; }
.edit-form button { justify-self: start; }
.btn-small { border-radius: 999px; padding: 5px 14px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid var(--hc-line2); background: transparent; color: var(--hc-ink); }
.btn-small:hover { background: var(--hc-chip); }
.btn-small.danger { color: var(--hc-red-text); border-color: var(--hc-red-text); }
.btn-small.danger:hover { background: var(--red-bg); }

.login-card { max-width: 400px; margin: 48px auto; display: flex; flex-direction: column; gap: 14px; padding: 28px; }
.login-card h2 { margin: 0 0 4px; }
.login-card label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--hc-ink3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.login-card input[type="text"], .login-card input[type="password"] { padding: 11px 14px; font-size: 15px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.login-card .btn-primary { padding: 12px; cursor: pointer; font-size: 15px; }

@media (max-width: 720px) {
    .data-table thead { display: none; }
    .data-table tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--hc-line); }
    .data-table td.row-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
    .data-table td.row-actions > * { margin: 0; }
    .data-table td { display: flex; justify-content: space-between; gap: 12px; border: 0 !important; padding: 4px 12px; }
    .data-table td[data-label]::before { content: attr(data-label); color: var(--hc-ink3); font-size: 12px; }
}

/* Падащи менюта: еднакъв вид с полетата, четими опции в тъмна тема */
select { appearance: none; -webkit-appearance: none; cursor: pointer; font: inherit; font-size: 14px; color: var(--hc-ink);
    background-color: var(--hc-field); border: 1px solid var(--hc-line2); border-radius: 12px; padding: 10px 38px 10px 14px; width: 100%; box-sizing: border-box;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat; background-position: right 14px center; }
select option { background: var(--hc-card2); color: var(--hc-ink); }
.data-table select { width: auto; min-width: 120px; padding: 6px 34px 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.edit-form select { text-transform: none; letter-spacing: 0; font-weight: 400; }
