.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.page-head h1,
.page-head h2 {
    margin: 0 0 6px;
}

.form-wide {
    max-width: 1080px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
}

.form-separator {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 28px 0;
}

.form-actions,
.action-row,
.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.form-actions {
    margin-top: 24px;
}

.check-row label,
.toggle-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.field-help {
    color: #64748b;
    font-size: 14px;
    margin: -6px 0 16px;
}

.input[type="color"] {
    height: 48px;
    padding: 5px;
}

.filters {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(150px, 220px) auto;
    gap: 10px;
    margin-bottom: 16px;
    max-width: 780px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
}

.table-wrap .table {
    min-width: 760px;
}

.btn-small {
    min-height: 34px;
    padding: 7px 11px;
    border-radius: 8px;
    font-size: 13px;
}

.btn-danger {
    background: #b91c1c;
    color: #fff;
}

.btn-warning {
    background: #f59e0b;
    color: #1f2937;
}

.btn-success {
    background: #15803d;
    color: #fff;
}

.badge-red {
    background: #fee2e2;
    color: #991b1b;
}

.badge-gray {
    background: #e5e7eb;
    color: #374151;
}

.alert-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.alert-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.alert ul {
    margin: 8px 0 0;
}

.panel-section {
    margin-top: 18px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.detail-list {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 12px;
    margin: 0;
}

.detail-list dt {
    color: #64748b;
}

.detail-list dd {
    margin: 0;
    font-weight: 700;
}

.danger-zone {
    border-color: #fecaca;
}

.danger-zone h2 {
    color: #991b1b;
}

.danger-form {
    max-width: 620px;
}

.empty-state {
    padding: 28px !important;
    text-align: center !important;
    color: #64748b;
}

.pagination {
    display: flex;
    gap: 6px;
    margin-top: 18px;
}

.pagination a {
    display: grid;
    place-items: center;
    min-width: 36px;
    height: 36px;
    border: 1px solid #d8e4f2;
    border-radius: 8px;
    background: #fff;
    color: #0b2347;
    text-decoration: none;
}

.pagination a.active {
    background: #0b2347;
    color: #fff;
}

.metric-text {
    font-size: 24px;
}

dialog {
    width: min(460px, 92vw);
    border: 0;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .25);
}

dialog::backdrop {
    background: rgba(15, 23, 42, .55);
}

@media (max-width: 900px) {
    .main {
        padding: 18px;
    }

    .page-head,
    .detail-grid {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .page-head {
        flex-direction: column;
    }

    .page-head > .btn,
    .page-head > .action-row {
        width: 100%;
    }

    .form-grid,
    .filters {
        grid-template-columns: 1fr;
    }
}

.sidebar-languages {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.sidebar-languages a {
    min-height: 32px;
    padding: 7px 4px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 6px;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
}

.sidebar-languages a.active {
    border-color: #d9a514;
    background: #d9a514;
    color: #071d38;
}
.smart-preview-head{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.smart-preview-head>div:first-child{display:grid;gap:3px}.smart-preview-head small{color:#64748b}.live-card-preview [data-preview-language].active{background:#0b2347;color:#fff}.translation-status{font-size:13px;color:#64748b;align-self:center}.translation-status[data-state="loading"]{color:#1456a0}.translation-status[data-state="success"]{color:#047857}.translation-status[data-state="error"]{color:#b42318}.smart-translation-actions{align-items:center;flex-wrap:wrap}.live-card-preview[dir="ltr"] article{text-align:left}.live-card-preview[dir="rtl"] article{text-align:right}@media(max-width:700px){.smart-preview-head .action-row{width:100%;overflow-x:auto;flex-wrap:nowrap}.smart-preview-head .btn{white-space:nowrap}}
.live-card-preview{margin:24px 0}.live-card-preview article{max-width:360px;min-height:220px;margin:16px auto;padding:28px;border-radius:24px;background:linear-gradient(145deg,#fff,#eaf2ff);box-shadow:0 18px 50px #0b234722;display:flex;flex-direction:column;gap:10px;overflow-wrap:anywhere}.live-card-preview[data-device="desktop"] article{max-width:720px}.live-card-preview strong{font-size:30px}.live-card-preview span{font-size:16px}.live-card-preview p{white-space:pre-wrap;line-height:1.5}
