:root {
    --bg: #eef0f3;
    --surface: #ffffff;
    --text: #111111;
    --muted: #666666;
    --primary: #111111;
    --primary-dark: #333333;
    --danger-bg: #fff0f0;
    --danger-text: #b42318;
    --border: #d8dce2;
    --soft: #f7f8fa;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

.login-page,
.admin-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-page {
    grid-template-columns: minmax(320px, 460px) minmax(360px, 440px);
    gap: 0;
    justify-content: center;
}

.login-page.single {
    grid-template-columns: minmax(320px, 440px);
}

.login-visual {
    position: relative;
    width: 100%;
    min-height: 560px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    border-radius: 8px 0 0 8px;
    padding: 34px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.12), transparent 42%),
        #111111;
    color: #ffffff;
}

.login-visual-heading,
.login-visual-top,
.login-visual-image {
    position: relative;
    z-index: 1;
}

.login-visual-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.login-visual-top img {
    max-width: 210px;
    max-height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.22));
}

.login-visual-top strong {
    font-size: 18px;
}

.login-visual-copy {
    position: relative;
    z-index: 1;
}

.login-visual::after {
    content: "";
    position: absolute;
    right: -88px;
    bottom: -88px;
    width: 260px;
    height: 260px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
}

.brand-mark {
    position: relative;
    z-index: 1;
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 24px;
    font-weight: 800;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.visual-kicker {
    position: relative;
    z-index: 1;
    margin: 0 0 12px;
    color: #b8bec8;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.login-visual h2 {
    position: relative;
    z-index: 1;
    max-width: 300px;
    margin: 0;
    font-size: 27px;
    line-height: 1.12;
}

.login-visual-image {
    width: 100%;
    max-width: 390px;
    margin: 18px 0 24px;
    align-self: center;
}

.login-visual-image img {
    display: block;
    width: 100%;
    max-height: 350px;
    object-fit: contain;
    border-radius: 8px;
}

.visual-text {
    position: relative;
    z-index: 1;
    max-width: 330px;
    margin: 18px 0 0;
    color: #d2d6dc;
}

.login-card,
.panel {
    width: min(100%, 440px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 34px;
    box-shadow: 0 16px 40px rgba(23, 32, 51, 0.08);
}

.login-card {
    min-height: 560px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 0;
    border-radius: 0 8px 8px 0;
    box-shadow: 24px 24px 70px rgba(17, 17, 17, 0.12);
}

.login-card.standalone {
    border-left: 1px solid var(--border);
    border-radius: 8px;
}

.panel {
    width: min(100%, 620px);
}

.login-logo-slot {
    width: 170px;
    min-height: 76px;
    display: grid;
    place-items: center;
    margin-bottom: 24px;
    border: 1px dashed #aeb4bd;
    border-radius: 8px;
    background: var(--soft);
    color: #777777;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.login-logo-slot img {
    display: block;
    max-width: 100%;
    max-height: 74px;
    object-fit: contain;
}

.eyebrow {
    margin: 0 0 8px;
    color: #555555;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.12;
}

p {
    color: var(--muted);
    line-height: 1.5;
}

.login-subtitle {
    margin: 10px 0 24px;
}

label {
    display: block;
    margin: 14px 0 6px;
    font-weight: 700;
}

input {
    width: 100%;
    height: 50px;
    border: 1px solid #cfd4dc;
    border-radius: 6px;
    padding: 0 14px;
    background: #fbfbfc;
    color: var(--text);
    font-size: 16px;
}

input:focus {
    border-color: #111111;
    background: #ffffff;
    outline: 3px solid rgba(17, 17, 17, 0.08);
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    margin-top: 22px;
    border: 0;
    border-radius: 6px;
    padding: 0 24px;
    background: var(--primary);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

button:hover,
.button:hover {
    background: var(--primary-dark);
}

.button.secondary {
    background: #344054;
}

.alert {
    margin-bottom: 16px;
    border-radius: 6px;
    padding: 12px;
    background: var(--danger-bg);
    color: var(--danger-text);
    font-weight: 700;
}

.alert.success {
    background: #eef8f1;
    color: #166534;
}

.form-link {
    display: inline-flex;
    width: fit-content;
    margin-top: 18px;
    color: #222222;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid #222222;
}

.form-link:hover {
    color: #666666;
    border-color: #666666;
}

@media (max-width: 860px) {
    .login-page {
        grid-template-columns: minmax(0, 440px);
        align-content: center;
    }

    .login-visual {
        min-height: auto;
        border-radius: 8px 8px 0 0;
        padding: 24px;
    }

    .login-visual h2,
    .login-visual-image,
    .visual-text {
        display: none;
    }

    .brand-mark {
        width: 56px;
        height: 56px;
        font-size: 18px;
    }

    .login-card {
        min-height: auto;
        border-left: 1px solid var(--border);
        border-radius: 0 0 8px 8px;
        padding: 28px;
    }
}

@media (max-width: 480px) {
    .login-page,
    .admin-shell {
        padding: 14px;
    }

    h1 {
        font-size: 28px;
    }
}

.admin-body {
    background: #eef0f3;
}

.admin-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 20px 16px;
    background: #111111;
    color: #ffffff;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    text-decoration: none;
}

.admin-brand span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    font-weight: 800;
    overflow: hidden;
}

.admin-brand img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.admin-brand strong {
    font-size: 13px;
}

.admin-nav {
    display: grid;
    gap: 6px;
    margin-top: 32px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    border-radius: 6px;
    padding: 0 10px;
    color: #d8dbe0;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.admin-nav svg,
.user-menu svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: #ffffff;
    color: #111111;
}

.admin-main {
    min-width: 0;
}

.admin-header {
    position: sticky;
    top: 0;
    z-index: 5;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 28px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
}

.admin-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.header-logo {
    width: 132px;
    max-height: 42px;
    object-fit: contain;
}

.header-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.admin-header-label {
    display: block;
    color: #777777;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-header-title strong {
    display: block;
    font-size: 15px;
}

.admin-user {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #333333;
    font-weight: 700;
}

.user-trigger {
    min-height: 42px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    margin: 0;
    padding: 0 16px;
    background: #f4f5f7;
    color: #222222;
    text-align: right;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.user-trigger:hover,
.user-trigger:focus {
    background: #111111;
    color: #ffffff;
    outline: none;
    box-shadow: 0 10px 24px rgba(17, 17, 17, 0.18);
}

.user-trigger span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    line-height: 1.1;
}

.user-trigger b {
    font-size: 10px;
    font-weight: 800;
    transform: translateY(-1px);
}

.user-trigger small {
    margin-top: 3px;
    color: #777777;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.user-trigger:hover small,
.user-trigger:focus small {
    color: #d7d9de;
}

.user-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 12;
    width: 250px;
    display: none;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(17, 17, 17, 0.14);
}

.user-menu.open {
    display: block;
}

.user-menu-head {
    margin-bottom: 8px;
    border-radius: 6px;
    padding: 12px;
    background: #111111;
    color: #ffffff;
}

.user-menu-head strong,
.user-menu-head span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-head strong {
    font-size: 14px;
}

.user-menu-head span {
    margin-top: 4px;
    color: #cfd4dc;
    font-size: 12px;
    font-weight: 700;
}

.user-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    border-radius: 6px;
    padding: 12px 14px;
    background: #f5f6f8;
    color: #222222;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.user-menu a:last-child {
    margin-bottom: 0;
    background: #fff0f0;
    color: #b42318;
}

.user-menu a:hover {
    background: #111111;
    color: #ffffff;
    transform: translateX(2px);
}

.menu-toggle {
    display: none;
    min-height: 40px;
    margin: 0;
    padding: 0 14px;
}

.admin-content {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 22px;
}

.dashboard-hero,
.page-title,
.admin-card,
.stat-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
}

.dashboard-hero,
.page-title {
    padding: 28px;
}

.dashboard-hero h1,
.page-title h1 {
    margin-bottom: 10px;
}

.dashboard-hero p:last-child,
.page-title p:last-child {
    margin-bottom: 0;
}

.page-title.with-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

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

.stat-card {
    padding: 22px;
}

.stat-card span {
    display: block;
    color: #777777;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 28px;
}

.dashboard-panel {
    display: grid;
    gap: 18px;
}

.dashboard-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
    padding: 22px;
}

.dashboard-welcome span {
    color: #777777;
    display: block;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.dashboard-welcome h1 {
    font-size: 24px;
    margin: 0 0 7px;
}

.dashboard-welcome p {
    color: #667085;
    font-size: 14px;
    margin: 0;
}

.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.dashboard-alert {
    display: grid;
    gap: 6px;
    border: 1px solid #ffe1a6;
    border-radius: 8px;
    background: #fff8e8;
    color: #8a5a00;
    font-size: 13px;
    font-weight: 700;
    padding: 12px 14px;
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.metric-card {
    display: grid;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
    padding: 18px;
    overflow: hidden;
    position: relative;
}

.metric-card::after {
    content: "";
    position: absolute;
    inset: auto -35px -45px auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.08;
}

.metric-card.blue {
    color: #1f6feb;
}

.metric-card.green {
    color: #15803d;
}

.metric-card.orange {
    color: #c05600;
}

.metric-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.metric-icon {
    display: inline-grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 8px;
    background: color-mix(in srgb, currentColor, transparent 88%);
}

.metric-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.metric-label {
    color: #667085;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.metric-card strong {
    color: #111111;
    font-size: 34px;
    line-height: 1;
}

.metric-card p {
    color: #667085;
    font-size: 13px;
    line-height: 1.45;
    margin: 0;
}

.metric-periods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 4px;
}

.metric-periods span {
    border-radius: 7px;
    background: #f6f7f9;
    color: #667085;
    font-size: 11px;
    font-weight: 800;
    padding: 9px;
}

.metric-periods b {
    color: #111111;
    display: block;
    font-size: 15px;
    margin-bottom: 2px;
}

.dashboard-columns {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 16px;
}

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

.status-grid div {
    border: 1px solid #eceff3;
    border-radius: 8px;
    background: #fbfbfc;
    padding: 14px;
}

.status-grid strong {
    display: block;
    font-size: 25px;
    margin-top: 10px;
}

.recent-admin-list {
    display: grid;
    gap: 10px;
}

.recent-admin-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #eceff3;
    border-radius: 8px;
    background: #ffffff;
    color: #111111;
    padding: 12px;
}

.recent-admin-list a:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.recent-admin-list strong {
    display: block;
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.recent-admin-list small {
    color: #667085;
    display: block;
    font-size: 11px;
    margin-top: 4px;
}

.recent-admin-list em {
    flex: 0 0 auto;
    border-radius: 999px;
    background: #f0f2f5;
    color: #344054;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
    padding: 7px 10px;
}

.admin-card {
    margin-top: 0;
    padding: 20px;
}

.card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.heading-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.hidden {
    display: none !important;
}

.admin-body button.danger {
    background: #b42318;
    color: #ffffff;
}

.admin-body button.danger:hover {
    background: #8f1b12;
}

.admin-body button.secondary {
    background: #eef0f3;
    color: #222222;
}

.admin-body button.secondary:hover {
    background: #d9dde5;
}

.admin-body button.blue {
    background: #1f6feb;
    color: #ffffff;
}

.admin-body button.blue:hover {
    background: #1757ba;
}

.card-heading h2 {
    margin: 0;
    font-size: 18px;
}

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.table-toolbar input {
    max-width: 360px;
}

.table-toolbar select {
    max-width: 190px;
}

.table-toolbar .select2-container {
    min-width: 190px;
    max-width: 240px;
}

.select2-container--default .select2-selection--single {
    height: 38px;
    border: 1px solid #cfd4dc;
    border-radius: 5px;
    background: #fbfbfc;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
    color: #222222;
    font-size: 14px;
    max-width: 168px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

.table-toolbar span {
    color: #666666;
    font-size: 13px;
    font-weight: 700;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.pagination span {
    color: #666666;
    font-size: 13px;
    font-weight: 700;
}

.pagination button {
    min-height: 34px;
    background: #eef0f3;
    color: #222222;
}

.pagination button:hover:not(:disabled) {
    background: #111111;
    color: #ffffff;
}

.pagination button.active {
    background: #111111;
    color: #ffffff;
}

.pagination button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.responsive-table {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
}

.admin-table .select-col {
    width: 42px;
}

.select-cell {
    width: 42px;
}

.select-cell input,
.select-col input {
    width: 16px;
    height: 16px;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid var(--border);
    padding: 11px 10px;
    text-align: left;
    vertical-align: middle;
}

.admin-table th {
    color: #555555;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-table td strong {
    display: block;
    font-size: 13px;
}

.admin-table td small {
    display: block;
    margin-top: 4px;
    color: #777777;
    font-size: 11px;
}

.truncate {
    max-width: 340px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-description {
    max-width: 300px;
}

.slug-cell {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333333;
    font-size: 12px;
}

.post-table-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.post-table-title span {
    min-width: 0;
}

.post-title-truncate {
    max-width: 330px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-table-title img {
    width: 54px;
    height: 42px;
    border-radius: 5px;
    object-fit: cover;
    background: #eef0f3;
}

.badge,
.status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    margin: 2px 4px 2px 0;
    border-radius: 999px;
    padding: 0 10px;
    background: #f0f2f5;
    color: #333333;
    font-size: 12px;
    font-weight: 800;
}

.badge.dark {
    background: #111111;
    color: #ffffff;
}

.badge.muted {
    color: #777777;
}

.status.on {
    background: #eef8f1;
    color: #166534;
}

.status.off {
    background: #fff0f0;
    color: #b42318;
}

.status.wait {
    background: #fff7e6;
    color: #9a5b00;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.table-actions button {
    min-height: 32px;
    margin: 0;
    padding: 0;
    font-size: 13px;
}

.icon-action {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    background: #f0f2f5;
    color: #222222;
}

.icon-action.view {
    background: #eaf2ff;
    color: #1f6feb;
}

.icon-action.edit {
    background: #eef0f3;
    color: #344054;
}

.icon-action.key {
    background: #e9f8ef;
    color: #15803d;
}

.icon-action.approve {
    background: #dcfce7;
    color: #15803d;
}

.icon-action:hover,
.icon-action.view:hover,
.icon-action.edit:hover,
.icon-action.key:hover,
.icon-action.approve:hover {
    background: currentColor;
}

.icon-action:hover svg {
    color: #ffffff;
}

.icon-action.view:hover {
    color: #1f6feb;
}

.icon-action.edit:hover {
    color: #344054;
}

.icon-action.key:hover {
    color: #15803d;
}

.icon-action.approve:hover {
    color: #15803d;
}

.icon-action.danger:hover {
    color: #ffffff;
}

.icon-action.danger:hover svg {
    color: #ffffff;
}

.icon-action svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.table-actions .danger,
.icon-action.danger {
    background: #b42318;
    color: #ffffff;
}

.table-actions .danger:hover,
.icon-action.danger:hover {
    background: #8f1b12;
}

.comment-summary {
    gap: 8px;
}

.comments-table td {
    vertical-align: top;
}

.comment-admin-text {
    display: grid;
    gap: 4px;
    max-width: 460px;
}

.comment-admin-text strong,
.table-link {
    color: #111111;
    font-size: 13px;
    font-weight: 800;
}

.comment-admin-text small {
    color: #667085;
    font-size: 11px;
}

.comment-admin-text p {
    color: #344054;
    display: -webkit-box;
    font-size: 12px;
    line-height: 1.45;
    margin: 4px 0 0;
    max-width: 100%;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.table-link {
    display: inline-block;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-detail {
    display: grid;
    gap: 8px;
    text-align: left;
}

.user-detail p {
    margin: 0;
}

.admin-form {
    width: 100%;
}

.form-section {
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.form-section:last-of-type {
    margin-bottom: 0;
}

.form-section h2 {
    margin: 0 0 14px;
    font-size: 17px;
}

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

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    margin-top: 0;
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #666666;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.admin-body label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 5px;
    font-size: 13px;
    max-width: 100%;
    line-height: 1.2;
}

.help-icon {
    width: 15px;
    height: 15px;
    display: inline-flex;
    flex: 0 0 15px;
    align-items: center;
    justify-content: center;
    color: #1f6feb;
    cursor: pointer;
    line-height: 1;
}

.help-icon svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
}

.help-icon:hover,
.help-icon:focus {
    color: #0f4db8;
    outline: none;
}

.admin-body input,
.admin-body select {
    height: 38px;
    border-radius: 5px;
    padding: 0 10px;
    font-size: 14px;
}

.admin-body textarea {
    min-height: 86px;
    border-radius: 5px;
    padding: 10px;
    font-size: 14px;
}

.admin-body button,
.admin-body .button {
    min-height: 38px;
    margin-top: 0;
    border-radius: 5px;
    padding: 0 14px;
    font-size: 14px;
}

textarea {
    width: 100%;
    min-height: 108px;
    resize: vertical;
    border: 1px solid #cfd4dc;
    border-radius: 6px;
    padding: 12px 14px;
    background: #fbfbfc;
    color: var(--text);
    font: inherit;
}

textarea:focus {
    border-color: #111111;
    background: #ffffff;
    outline: 3px solid rgba(17, 17, 17, 0.08);
}

select {
    width: 100%;
    height: 50px;
    border: 1px solid #cfd4dc;
    border-radius: 6px;
    padding: 0 14px;
    background: #fbfbfc;
    color: var(--text);
    font-size: 16px;
}

select:focus {
    border-color: #111111;
    background: #ffffff;
    outline: 3px solid rgba(17, 17, 17, 0.08);
}

input[type="file"] {
    height: auto;
    padding: 8px;
}

.image-preview {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    overflow: hidden;
    border: 1px dashed #b9c0cc;
    border-radius: 6px;
    padding: 8px;
    background: #f7f8fa;
}

.image-preview.dark-preview {
    background: #050505;
    border-color: #333333;
}

.image-preview.compact {
    min-height: 62px;
}

.image-preview.multi-preview {
    min-height: 96px;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

.image-preview img {
    display: block;
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
}

.image-preview.multi-preview img {
    width: 100px;
    height: 74px;
    border-radius: 5px;
    object-fit: cover;
}

.image-preview.compact img {
    max-height: 46px;
}

.image-preview span {
    color: #777777;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.image-remove-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    margin-top: 8px;
    padding: 0 10px;
    border-radius: 6px;
    background: #fff0f0;
    color: #b42318;
    font-size: 12px;
    font-weight: 800;
}

.image-remove-button:hover,
.image-remove-button.is-marked {
    background: #b42318;
    color: #ffffff;
}

.image-remove-button svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.swal-form {
    display: grid;
    gap: 12px;
    text-align: left;
}

.swal-form label {
    margin: 0;
    font-size: 14px;
}

.swal-form input,
.swal-form select {
    height: 44px;
}

.swal-form textarea {
    width: 100%;
    min-height: 94px;
    border: 1px solid #cfd4dc;
    border-radius: 6px;
    padding: 10px 12px;
    resize: vertical;
    font: inherit;
}

.check-row {
    display: flex !important;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    font-weight: 700;
}

.check-row input {
    width: 18px;
    height: 18px;
}

.permission-box {
    display: grid;
    gap: 8px;
    margin-top: 6px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    background: #f7f8fa;
}

.permission-box strong {
    font-size: 14px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
    padding-top: 16px;
}

.system-message {
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 14px;
    background: #f7f8fa;
}

.system-message strong {
    display: block;
    margin-bottom: 6px;
}

.system-message p {
    margin: 0;
    color: #555555;
}

.system-message.error {
    border-color: #fecaca;
    background: #fff5f5;
    color: #991b1b;
}

.team-editor-list {
    display: grid;
    gap: 12px;
    margin: 14px 0;
}

.team-editor-item {
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 14px;
    background: #fbfbfc;
}

.team-editor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.team-editor-head strong {
    font-size: 14px;
}

.ck-editor__editable {
    min-height: 240px;
    font-size: 14px;
}

.extra-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.extra-image-item {
    display: grid !important;
    gap: 8px !important;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 8px;
    background: #fbfbfc;
    font-size: 12px !important;
}

.extra-image-item.is-marked-remove {
    border-color: #fecaca;
    background: #fff5f5;
    opacity: 0.72;
}

.extra-image-item.is-marked-remove img {
    filter: grayscale(1);
}

.extra-image-item .icon-action {
    width: 32px;
    height: 32px;
    justify-self: end;
    margin: 0;
}

.extra-image-item img {
    width: 100%;
    height: 92px;
    border-radius: 5px;
    object-fit: cover;
}

.inline-delete-form {
    margin: 0;
}

.inline-delete-form button {
    margin: 0;
}

@media (max-width: 940px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 20;
        width: min(82vw, 300px);
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .menu-toggle {
        display: inline-flex;
    }

    .admin-content {
        padding: 20px;
    }

    .dashboard-metrics,
    .dashboard-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .admin-header {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 14px;
    }

    .header-logo {
        width: 104px;
        max-height: 34px;
    }

    .admin-user {
        width: 100%;
        justify-content: space-between;
    }

    .user-menu {
        left: 0;
        right: auto;
        width: 100%;
    }

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

    .dashboard-welcome {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-actions {
        justify-content: stretch;
    }

    .dashboard-actions .button {
        flex: 1 1 auto;
        justify-content: center;
    }

    .metric-periods,
    .status-grid {
        grid-template-columns: 1fr;
    }

    .recent-admin-list a {
        align-items: flex-start;
        flex-direction: column;
    }

    .recent-admin-list strong {
        max-width: 100%;
        white-space: normal;
    }

    .admin-card,
    .dashboard-hero,
    .page-title {
        padding: 16px;
    }

    .card-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .heading-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .page-title.with-actions,
    .table-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .table-toolbar input {
        max-width: none;
    }

    .table-toolbar select {
        max-width: none;
    }

    .table-toolbar .select2-container {
        width: 100% !important;
        max-width: none;
    }

    .pagination {
        align-items: stretch;
        flex-direction: column;
        text-align: center;
    }

    .form-actions {
        justify-content: stretch;
    }

    .form-actions button {
        width: 100%;
    }

    .responsive-table {
        overflow: visible;
    }

    .admin-table {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0 12px;
    }

    .admin-table thead {
        display: none;
    }

    .admin-table,
    .admin-table tbody,
    .admin-table tr,
    .admin-table td {
        display: block;
        width: 100%;
    }

    .admin-table tr {
        border: 1px solid var(--border);
        border-radius: 8px;
        padding: 8px;
        background: #ffffff;
    }

    .admin-table td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        border-bottom: 1px solid #eef0f3;
        padding: 7px 4px;
        font-size: 12px;
        text-align: right;
    }

    .admin-table td:last-child {
        border-bottom: 0;
    }

    .admin-table td::before {
        content: attr(data-label);
        flex: 0 0 78px;
        color: #666666;
        font-size: 9.5px;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-align: left;
        text-transform: uppercase;
    }

    .admin-table td:first-child {
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-align: right;
    }

    .admin-table td:first-child::before {
        margin-bottom: 0;
    }

    .truncate {
        max-width: 190px;
    }

    .post-title-truncate {
        max-width: 180px;
    }

    .table-actions {
        justify-content: flex-end;
    }
}

/* Anúncios */
.ads-help {
    margin: 0 0 18px;
    color: #5b6577;
    font-size: 14px;
    line-height: 1.6;
}

.ad-thumb {
    width: 64px;
    height: 44px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 4px;
}

.post-table-title .ad-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
}

.ad-logo-preview img {
    object-fit: contain;
    padding: 12px;
}

.ad-logo-preview span {
    color: rgba(255, 255, 255, 0.75);
}

.admin-form input[type="color"] {
    width: 100%;
    height: 44px;
    padding: 4px;
    cursor: pointer;
}

/* Tema azul (Blog Adriano Guerra) - sobrescreve o preto padrão do login e do painel */
:root {
    --primary: #021e52;
    --primary-dark: #0a3a86;
    --brand-blue: #0a7cf4;
}

.login-visual {
    justify-content: center;
    background:
        radial-gradient(circle at 85% 10%, rgba(10, 124, 244, 0.28), transparent 45%),
        linear-gradient(160deg, #0a2f72, #021e52 55%, #01143a);
}

.login-visual::before {
    content: "";
    position: absolute;
    top: 40px;
    left: -90px;
    width: 280px;
    height: 5px;
    border-radius: 5px;
    background: linear-gradient(90deg, transparent, var(--brand-blue));
    transform: rotate(-38deg);
    opacity: 0.8;
}

.login-visual::after {
    border-color: rgba(10, 124, 244, 0.35);
}

.login-visual-image img {
    border-radius: 12px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.visual-text {
    color: rgba(255, 255, 255, 0.82);
}

.login-logo-slot {
    width: auto;
    max-width: 240px;
    min-height: 0;
    justify-items: start;
    border: 0;
    background: transparent;
}

.login-logo-slot img {
    max-height: 64px;
}

.login-card {
    box-shadow: 24px 24px 70px rgba(2, 30, 82, 0.14);
}

input:focus,
.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    border-color: var(--brand-blue);
    outline: 3px solid rgba(10, 124, 244, 0.15);
}

.form-link {
    color: var(--primary);
}

.form-link:hover {
    color: var(--brand-blue);
}

.admin-sidebar {
    background: linear-gradient(180deg, #021e52, #01143a);
}

.admin-nav a:hover,
.admin-nav a.active {
    background: var(--brand-blue);
    color: #ffffff;
}
