@font-face {
    font-family: Vazirmatn;
    src: url("/fonts/vazirmatn-400.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: Vazirmatn;
    src: url("/fonts/vazirmatn-700.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}


@font-face { font-family: "Vazir"; src: url("/fonts/Vazir-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lalezar"; src: url("/fonts/Lalezar-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "BNazaninOpen"; src: url("/fonts/BNazaninOpen-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "BKoodakOpen"; src: url("/fonts/BKoodakOpen-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Sahel"; src: url("/fonts/Sahel-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Shabnam"; src: url("/fonts/Shabnam-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Samim"; src: url("/fonts/Samim-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Gandom"; src: url("/fonts/Gandom-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Tanha"; src: url("/fonts/Tanha-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "InterLocal"; src: url("/fonts/Inter-Variable.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "RobotoLocal"; src: url("/fonts/Roboto-Variable.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "LoraLocal"; src: url("/fonts/Lora-Variable.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "SourceCodeProLocal"; src: url("/fonts/SourceCodePro-Variable.ttf") format("truetype"); font-weight: 200 900; font-display: swap; }

:root {
    --ink: #1e293b;
    --muted: #64748b;
    --subtle: #94a3b8;
    --line: #e2e8f0;
    --line-soft: #eef2f7;
    --canvas: #f1f5f9;
    --surface: #ffffff;
    --indigo: #4f46e5;
    --indigo-dark: #4338ca;
    --indigo-soft: #eef2ff;
    --blue: #2563eb;
    --emerald: #059669;
    --amber: #d97706;
    --violet: #7c3aed;
    --danger: #dc2626;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, .06);
    --shadow-md: 0 12px 30px rgba(15, 23, 42, .08);
}

* {
    box-sizing: border-box;
}

html {
    font-family: Vazirmatn, Tahoma, Arial, sans-serif;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Quick access + Word-style ribbon */
.quick-toolbar {
    display: flex;
    min-height: 34px;
    align-items: center;
    justify-content: space-between;
    padding: 2px 16px;
    color: #e2e8f0;
    background: #1e293b;
    font-size: 11px;
}

.quick-actions,
.quick-account {
    display: flex;
    align-items: center;
    gap: 4px;
}

.quick-account {
    gap: 18px;
}

.icon-button {
    display: grid;
    width: 29px;
    height: 29px;
    place-items: center;
    padding: 0;
    color: #cbd5e1;
    background: transparent;
    border: 0;
    border-radius: 5px;
    transition: .15s ease;
}

.icon-button:hover {
    color: #ffffff;
    background: #334155;
}

.online-state {
    display: flex;
    align-items: center;
    gap: 6px;
}

.online-state > span {
    width: 7px;
    height: 7px;
    background: #34d399;
    border-radius: 999px;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, .12);
}

.quick-user {
    display: flex;
    align-items: center;
    gap: 6px;
}

.current-persian-date {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #cbd5e1;
}

.current-persian-date i {
    color: #a5b4fc;
}

.ribbon-tabs-bar {
    display: flex;
    height: 43px;
    align-items: stretch;
    padding: 0 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--line);
}

.ribbon-brand-mini {
    display: none;
}

.ribbon-tabs {
    display: flex;
    align-items: stretch;
}

.ribbon-tab {
    min-width: 66px;
    padding: 0 17px;
    color: #475569;
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 6px 6px 0 0;
    font-size: 12px;
    transition: .15s ease;
}

.ribbon-tab:hover {
    color: #1e40af;
    background: #f1f5f9;
}

.ribbon-tab.active {
    color: #1e40af;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    border-bottom-color: #2563eb;
    font-weight: 700;
}

.ribbon-search {
    display: flex;
    width: 265px;
    align-items: center;
    gap: 8px;
    margin: 7px auto 7px 0;
    padding: 0 12px;
    color: var(--subtle);
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
}

.ribbon-search input {
    min-width: 0;
    flex: 1;
    padding: 0;
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 11px;
}

.ribbon {
    min-height: 101px;
    padding: 7px 16px;
    overflow-x: auto;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 2px 5px rgba(15, 23, 42, .03);
}

.ribbon-panel {
    display: none;
    min-width: max-content;
    min-height: 86px;
    align-items: stretch;
}

.ribbon-panel.active {
    display: flex;
}

.ribbon-group {
    display: flex;
    min-width: 120px;
    flex-direction: column;
    justify-content: space-between;
    padding: 0 14px;
    border-left: 1px solid var(--line);
}

.ribbon-group:first-child {
    padding-right: 0;
}

.ribbon-group:last-child {
    border-left: 0;
}

.ribbon-group > small {
    display: block;
    margin-top: 3px;
    color: var(--subtle);
    text-align: center;
    font-size: 9px;
}

.ribbon-tools {
    display: flex;
    align-items: center;
    gap: 3px;
}

.ribbon-stack {
    display: grid;
    gap: 2px;
}

.ribbon-tool,
.ribbon-color {
    display: flex;
    min-width: 58px;
    height: 59px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    padding: 6px 9px;
    color: #334155;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: 9px;
    transition: .15s ease;
}

.ribbon-tool i,
.ribbon-color i {
    color: #475569;
    font-size: 19px;
}

.ribbon-tool:hover,
.ribbon-color:hover {
    color: #1e40af;
    background: #dbeafe;
    border-color: #bfdbfe;
}

.ribbon-tool:hover i,
.ribbon-color:hover i {
    color: #1d4ed8;
}

.ribbon-tool.large {
    min-width: 72px;
}

.ribbon-tool.large i {
    font-size: 27px;
}

.ribbon-tool.compact {
    min-width: 64px;
    height: 28px;
    flex-direction: row;
    gap: 7px;
    padding: 3px 7px;
}

.ribbon-tool.compact i {
    font-size: 12px;
}

.ribbon-tool.primary-tool {
    color: #ffffff;
    background: var(--indigo);
}

.ribbon-tool.primary-tool i {
    color: #ffffff;
}

.ribbon-tool.primary-tool:hover {
    color: #ffffff;
    background: var(--indigo-dark);
    border-color: var(--indigo-dark);
}

.ribbon-color {
    position: relative;
    cursor: pointer;
}

.ribbon-color input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.ribbon-metric {
    display: grid;
    min-width: 82px;
    place-items: center;
    align-content: center;
    gap: 2px;
    color: #475569;
}

.ribbon-metric strong {
    color: var(--indigo);
    font-size: 18px;
}

.ribbon-metric span {
    font-size: 9px;
}

/* App shell and navigation */
.admin-shell {
    display: grid;
    min-height: calc(100vh - 178px);
    grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    height: calc(100vh - 178px);
    min-height: 620px;
    flex-direction: column;
    padding: 17px 15px;
    background: #ffffff;
    border-left: 1px solid var(--line);
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 4px 15px;
}

.brand-mark,
.login-logo {
    display: grid;
    width: 43px;
    height: 43px;
    flex: none;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 12px;
    box-shadow: 0 9px 22px rgba(79, 70, 229, .22);
    font-size: 21px;
    font-weight: 900;
}

.admin-brand > span:last-child {
    display: grid;
}

.admin-brand strong {
    color: #1e293b;
    font-size: 17px;
}

.admin-brand small {
    color: var(--muted);
    font-size: 9px;
}

.sidebar-user-card {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin: 3px 0 18px;
    padding: 11px;
    color: #ffffff;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(79, 70, 229, .2);
}

.user-avatar {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    background: rgba(255, 255, 255, .17);
    border-radius: 999px;
    font-weight: 700;
}

.sidebar-user-card div {
    display: grid;
    min-width: 0;
}

.sidebar-user-card strong,
.sidebar-user-card small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-card strong {
    font-size: 12px;
}

.sidebar-user-card small {
    color: rgba(255, 255, 255, .74);
    font-size: 9px;
    direction: ltr;
    text-align: right;
}

.side-nav {
    display: grid;
    gap: 4px;
}

.nav-label {
    padding: 0 10px 6px;
    color: var(--subtle);
    font-size: 9px;
    font-weight: 700;
}

.nav-label.secondary-label {
    padding-top: 15px;
}

.side-nav a,
.sidebar-logout button {
    display: flex;
    min-height: 43px;
    align-items: center;
    gap: 11px;
    padding: 0 12px;
    color: #475569;
    background: transparent;
    border: 0;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    transition: .15s ease;
}

.side-nav a i,
.sidebar-logout button i {
    width: 22px;
    color: #64748b;
    text-align: center;
    font-size: 16px;
}

.side-nav a:hover {
    color: #3730a3;
    background: #eef2ff;
}

.side-nav a:hover i {
    color: #4f46e5;
}

.side-nav a.active {
    color: #ffffff;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    box-shadow: 0 7px 17px rgba(79, 70, 229, .23);
}

.side-nav a.active i {
    color: #ffffff;
}

.sidebar-logout {
    margin-top: auto;
    padding-top: 13px;
    border-top: 1px solid var(--line);
}

.sidebar-logout button {
    width: 100%;
    color: #b91c1c;
}

.sidebar-logout button i {
    color: #dc2626;
}

.sidebar-logout button:hover {
    background: #fef2f2;
}

.sidebar-backdrop {
    display: none;
}

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

.page-header {
    display: flex;
    min-height: 103px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 19px 27px;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 5px;
    color: var(--subtle);
    font-size: 9px;
}

.breadcrumb a {
    color: var(--indigo);
}

.breadcrumb i {
    font-size: 7px;
}

.page-header h1 {
    margin: 0;
    color: #1e293b;
    font-size: 22px;
    line-height: 1.4;
}

.page-description {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 10px;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-content {
    padding: 25px 27px 48px;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 18px;
    padding: 13px 15px;
    border: 1px solid;
    border-radius: 11px;
    font-size: 11px;
}

.alert > i {
    margin-top: 2px;
    font-size: 16px;
}

.alert ul {
    margin: 6px 17px 0 0;
}

.alert.success {
    color: #047857;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.alert.danger {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}

/* Shared buttons and surfaces */
.primary,
.secondary {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 15px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    transition: .15s ease;
}

.primary {
    color: #ffffff;
    background: var(--indigo);
    box-shadow: 0 6px 13px rgba(79, 70, 229, .15);
}

.primary:hover {
    background: var(--indigo-dark);
    transform: translateY(-1px);
}

.violet-button {
    background: var(--violet);
}

.violet-button:hover {
    background: #6d28d9;
}

.secondary {
    color: #475569;
    background: #ffffff;
    border-color: var(--line);
}

.secondary:hover {
    color: var(--indigo);
    background: #f8fafc;
    border-color: #cbd5e1;
}

.full {
    width: 100%;
}

.panel {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 13px;
    box-shadow: var(--shadow-sm);
}

.panel-heading {
    display: flex;
    min-height: 75px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--line-soft);
}

.panel-heading h2,
.data-toolbar h2 {
    margin: 2px 0 0;
    font-size: 14px;
}

.panel-heading p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 9px;
}

.panel-heading > a {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--indigo);
    font-size: 9px;
    font-weight: 700;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--subtle);
    font-size: 8px;
    font-weight: 700;
}

/* Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card {
    padding: 17px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    transition: .2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 11px;
}

.stat-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 11px;
    font-size: 18px;
}

.blue-card .stat-icon {
    color: #2563eb;
    background: #dbeafe;
}

.emerald-card .stat-icon {
    color: #059669;
    background: #d1fae5;
}

.violet-card .stat-icon {
    color: #7c3aed;
    background: #ede9fe;
}

.amber-card .stat-icon {
    color: #d97706;
    background: #fef3c7;
}

.teal-card .stat-icon {
    color: #0f766e;
    background: #ccfbf1;
}

.stat-chip {
    padding: 4px 7px;
    color: #64748b;
    background: #f8fafc;
    border-radius: 6px;
    font-size: 8px;
    font-weight: 700;
}

.stat-card > strong {
    display: block;
    font-size: 26px;
    line-height: 1.2;
}

.stat-card > p {
    margin: 3px 0 11px;
    color: var(--muted);
    font-size: 10px;
}

.stat-progress {
    height: 4px;
    overflow: hidden;
    background: #f1f5f9;
    border-radius: 999px;
}

.stat-progress > span {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.blue-card .stat-progress > span {
    background: #3b82f6;
}

.emerald-card .stat-progress > span {
    background: #10b981;
}

.violet-card .stat-progress > span {
    background: #8b5cf6;
}

.amber-card .stat-progress > span {
    background: #f59e0b;
}

.teal-card .stat-progress > span {
    background: #14b8a6;
}

.analytics-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(290px, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.chart-panel {
    min-width: 0;
}

.chart-area {
    position: relative;
    height: 235px;
    padding: 16px 18px 19px;
}

.doughnut-chart {
    height: 196px;
    padding: 15px 45px 5px;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 11px;
    padding: 0 15px 17px;
    color: var(--muted);
    font-size: 8px;
}

.legend-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 999px;
}

.legend-dot.amber {
    background: #f59e0b;
}

.legend-dot.blue {
    background: #3b82f6;
}

.legend-dot.slate {
    background: #94a3b8;
}

.legend-dot.emerald {
    background: #10b981;
}

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

.compact-list {
    min-height: 160px;
}

.compact-row {
    display: flex;
    min-height: 63px;
    align-items: center;
    gap: 10px;
    padding: 10px 17px;
    border-bottom: 1px solid var(--line-soft);
    transition: .15s ease;
}

.compact-row:last-child {
    border-bottom: 0;
}

a.compact-row:hover {
    background: #f8fafc;
}

.row-thumb {
    display: grid;
    width: 36px;
    height: 36px;
    flex: none;
    place-items: center;
    color: #4f46e5;
    background: linear-gradient(135deg, #e0e7ff, #f3e8ff);
    border-radius: 9px;
    font-size: 14px;
    font-weight: 700;
}

.row-thumb.warm {
    color: #b45309;
    background: linear-gradient(135deg, #fef3c7, #ffedd5);
    border-radius: 999px;
}

.compact-main {
    display: grid;
    min-width: 0;
}

.compact-main strong {
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-main small {
    margin-top: 2px;
    overflow: hidden;
    color: var(--muted);
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-row > .badge {
    margin-right: auto;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 700;
    white-space: nowrap;
}

.badge i {
    font-size: 5px;
}

.badge.published {
    color: #047857;
    background: #d1fae5;
}

.badge.draft {
    color: #92400e;
    background: #fef3c7;
}

.badge.scheduled {
    color: #6d28d9;
    background: #ede9fe;
}

.badge.new {
    color: #92400e;
    background: #fef3c7;
}

.badge.contacted {
    color: #1d4ed8;
    background: #dbeafe;
}

.badge.closed {
    color: #475569;
    background: #e2e8f0;
}

/* Summary cards, filters and tables */
.summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 16px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 13px;
    box-shadow: var(--shadow-sm);
}

.summary-strip.three-items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary-strip > div {
    display: flex;
    min-height: 86px;
    align-items: center;
    gap: 11px;
    padding: 14px 18px;
    border-left: 1px solid var(--line-soft);
}

.summary-strip > div:last-child {
    border-left: 0;
}

.summary-icon {
    display: grid;
    width: 40px;
    height: 40px;
    flex: none;
    place-items: center;
    border-radius: 10px;
}

.summary-icon.blue {
    color: #2563eb;
    background: #dbeafe;
}

.summary-icon.emerald {
    color: #059669;
    background: #d1fae5;
}

.summary-icon.amber {
    color: #d97706;
    background: #fef3c7;
}

.summary-icon.violet {
    color: #7c3aed;
    background: #ede9fe;
}

.summary-icon.slate {
    color: #64748b;
    background: #e2e8f0;
}

.summary-strip p {
    display: grid;
    gap: 2px;
    margin: 0;
}

.summary-strip small {
    color: var(--muted);
    font-size: 8px;
}

.summary-strip strong {
    font-size: 19px;
}

.data-panel {
    overflow: hidden;
}

.data-toolbar {
    display: flex;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
}

.filters {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 8px;
}

.filters input,
.filters select,
.status-select {
    height: 40px;
    padding: 0 11px;
    color: #334155;
    background: #ffffff;
    border: 1px solid #dbe3eb;
    border-radius: 8px;
    outline: 0;
    font-size: 10px;
}

.filters input:focus,
.filters select:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .09);
}

.filters select {
    min-width: 135px;
}

.search-field {
    position: relative;
    flex: 1;
    max-width: 390px;
}

.search-field i {
    position: absolute;
    top: 50%;
    right: 12px;
    color: #94a3b8;
    transform: translateY(-50%);
    font-size: 11px;
}

.search-field input {
    width: 100%;
    padding-right: 33px;
}

.clear-filter {
    color: #dc2626;
    font-size: 9px;
    font-weight: 700;
}

.result-count {
    padding: 5px 9px;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 999px;
    font-size: 8px;
    white-space: nowrap;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

.data-table {
    font-size: 10px;
}

.data-table thead {
    color: #64748b;
    background: #f8fafc;
}

.data-table th {
    padding: 12px 15px;
    text-align: right;
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
}

.data-table td {
    padding: 12px 15px;
    border-top: 1px solid var(--line-soft);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: .15s ease;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.actions-heading {
    text-align: center !important;
}

.content-cell {
    display: flex;
    min-width: 270px;
    align-items: center;
    gap: 10px;
}

.content-cell img {
    width: 50px;
    height: 40px;
    flex: none;
    object-fit: cover;
    border-radius: 8px;
}

.content-cell > div,
.title-cell,
.date-cell {
    display: grid;
    min-width: 0;
}

.content-cell strong,
.title-cell strong {
    overflow: hidden;
    color: #1e293b;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-cell small {
    max-width: 280px;
    overflow: hidden;
    color: #94a3b8;
    direction: ltr;
    font-size: 8px;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.author-cell {
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.author-cell > span {
    display: grid;
    width: 27px;
    height: 27px;
    place-items: center;
    color: #4338ca;
    background: #e0e7ff;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 700;
}

.date-cell {
    color: #475569;
    white-space: nowrap;
}

.date-cell small {
    color: #94a3b8;
    font-size: 8px;
}

.icon-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.icon-actions form {
    display: inline-flex;
}

.table-icon {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 7px;
    font-size: 11px;
    transition: .15s ease;
}

.table-icon.edit,
.table-icon.contact {
    color: #2563eb;
}

.table-icon.edit:hover,
.table-icon.contact:hover {
    background: #dbeafe;
}

.table-icon.delete {
    color: #dc2626;
}

.table-icon.delete:hover {
    background: #fee2e2;
}

.poster-table-image {
    width: 74px;
    height: 46px;
    object-fit: cover;
    border-radius: 8px;
}

.title-cell {
    max-width: 300px;
    gap: 2px;
}

.title-cell small {
    overflow: hidden;
    color: #94a3b8;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.priority-pill,
.course-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    color: #5b21b6;
    background: #ede9fe;
    border-radius: 7px;
    font-size: 8px;
    font-weight: 700;
    white-space: nowrap;
}

.range-cell {
    display: flex;
    min-width: 245px;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 8px;
}

.range-cell i {
    color: #cbd5e1;
    font-size: 7px;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 19px;
    min-height: 54px;
    padding: 10px 16px;
    border-top: 1px solid var(--line);
    font-size: 9px;
}

.pager a,
.pager span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pager a {
    color: var(--indigo);
    font-weight: 700;
}

.pager span {
    color: #94a3b8;
}

.pager strong {
    color: #475569;
}

.empty-state {
    display: grid;
    min-height: 160px;
    place-items: center;
    align-content: center;
    gap: 7px;
    padding: 30px;
    color: var(--muted);
    text-align: center;
}

.empty-state > i {
    color: #cbd5e1;
    font-size: 30px;
}

.empty-state strong {
    color: #475569;
    font-size: 11px;
}

.empty-state p {
    margin: 0;
    font-size: 9px;
}

.empty-state a {
    color: var(--indigo);
    font-size: 9px;
    font-weight: 700;
}

/* Consultations */
.consultation-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
    margin-bottom: 16px;
}

.consult-stat {
    display: grid;
    min-height: 88px;
    grid-template-columns: 40px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 11px;
    padding: 14px;
    border: 1px solid;
    border-radius: 13px;
    transition: .15s ease;
}

.consult-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.consult-stat > span {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 10px;
}

.consult-stat p {
    display: grid;
    gap: 2px;
    margin: 0;
}

.consult-stat small {
    font-size: 9px;
}

.consult-stat strong {
    font-size: 20px;
}

.consult-stat > i {
    opacity: .55;
    font-size: 9px;
}

.consult-stat.amber {
    color: #92400e;
    background: #fffbeb;
    border-color: #fde68a;
}

.consult-stat.amber > span {
    color: #d97706;
    background: #fef3c7;
}

.consult-stat.blue {
    color: #1e40af;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.consult-stat.blue > span {
    color: #2563eb;
    background: #dbeafe;
}

.consult-stat.slate {
    color: #475569;
    background: #f8fafc;
    border-color: #e2e8f0;
}

.consult-stat.slate > span {
    color: #64748b;
    background: #e2e8f0;
}

.applicant-cell {
    display: flex;
    min-width: 140px;
    align-items: center;
    gap: 8px;
}

.applicant-cell > span {
    display: grid;
    width: 31px;
    height: 31px;
    flex: none;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
}

.applicant-cell strong {
    font-size: 10px;
}

.phone-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #475569;
    font-size: 9px;
    white-space: nowrap;
}

.phone-link i {
    color: #94a3b8;
    font-size: 8px;
}

.course-pill {
    color: #4338ca;
    background: #eef2ff;
}

.status-control {
    display: inline-flex;
    min-width: 105px;
    align-items: center;
    gap: 4px;
    padding: 0 7px;
    border-radius: 999px;
}

.status-control i {
    font-size: 5px;
}

.status-control select {
    width: 100%;
    height: 30px;
    color: inherit;
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 8px;
    font-weight: 700;
}

.status-control.new {
    color: #92400e;
    background: #fef3c7;
}

.status-control.contacted {
    color: #1d4ed8;
    background: #dbeafe;
}

.status-control.closed {
    color: #475569;
    background: #e2e8f0;
}

/* Article Word editor + forms */
.word-editor-layout,
.editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 286px;
    align-items: start;
    gap: 18px;
}

.document-workspace {
    min-width: 0;
}

.editor-context {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 9px;
    padding: 8px 11px;
    color: #64748b;
    background: #e8eef7;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    font-size: 8px;
}

.editor-context > span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.editor-context > span:first-child i {
    color: #7c3aed;
}

.save-state {
    color: #047857;
    white-space: nowrap;
}

.save-state.dirty {
    color: #b45309;
}

.document-sheet {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #d7dee8;
    border-radius: 6px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .08);
}

.document-title {
    display: block;
    padding: 25px 40px 12px;
}

.document-title input {
    width: 100%;
    padding: 0;
    color: #0f172a;
    background: transparent;
    border: 0;
    outline: 0;
    font-size: clamp(22px, 3vw, 34px);
    font-weight: 700;
    line-height: 1.5;
}

.document-title input::placeholder {
    color: #cbd5e1;
}

.document-divider {
    height: 1px;
    margin: 0 40px;
    background: #edf1f5;
}

.rich-editor {
    min-height: 570px;
    padding: 25px 40px 50px;
    color: #1e293b;
    background: #ffffff;
    outline: 0;
    font-size: 14px;
    line-height: 2.15;
}

.rich-editor:empty::before {
    color: #cbd5e1;
    content: attr(data-placeholder);
    pointer-events: none;
}

.rich-editor h2 {
    margin: 1.5em 0 .5em;
    color: #0f172a;
    font-size: 24px;
    line-height: 1.6;
}

.rich-editor h3 {
    margin: 1.4em 0 .4em;
    color: #1e293b;
    font-size: 19px;
    line-height: 1.7;
}

.rich-editor p {
    margin: 0 0 1em;
}

.rich-editor ul,
.rich-editor ol {
    padding-right: 24px;
}

.rich-editor a {
    color: #2563eb;
    text-decoration: underline;
}

.rich-editor img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 24px auto;
    border-radius: 10px;
}

.rich-editor figure {
    margin: 28px 0;
}

.rich-editor figure img {
    margin-bottom: 10px;
}

.rich-editor figcaption {
    color: #64748b;
    font-size: 11px;
    line-height: 1.8;
    text-align: center;
}

.rich-editor pre {
    position: relative;
    margin: 24px 0;
    padding: 22px 20px;
    overflow-x: auto;
    color: #dbeafe;
    direction: ltr;
    background: #111827;
    border: 1px solid #243247;
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    line-height: 1.85;
    tab-size: 4;
    text-align: left;
    white-space: pre;
}

.rich-editor pre code {
    padding: 0;
    color: inherit;
    direction: inherit;
    background: transparent;
    border: 0;
    border-radius: 0;
    font: inherit;
}

.rich-editor code {
    padding: 2px 6px;
    color: #5b21b6;
    direction: ltr;
    background: #f3e8ff;
    border: 1px solid #e9d5ff;
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .9em;
    unicode-bidi: embed;
}

.code-block-shell {
    margin: 26px 0;
    overflow: hidden;
    background: #111827;
    border: 1px solid #243247;
    border-radius: 14px;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .14);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.code-block-shell:focus-within {
    border-color: #818cf8;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .12), 0 14px 30px rgba(15, 23, 42, .16);
}

.code-block-toolbar {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 7px 10px 7px 12px;
    color: #cbd5e1;
    direction: rtl;
    background: #1e293b;
    border-bottom: 1px solid #334155;
}

.code-language-field {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    font-weight: 700;
}

.code-language-field i {
    color: #a5b4fc;
}

.code-language-field select {
    min-width: 132px;
    height: 32px;
    padding: 0 9px;
    color: #e2e8f0;
    direction: ltr;
    background: #0f172a;
    border: 1px solid #475569;
    border-radius: 8px;
    outline: 0;
    font-size: 10px;
}

.code-language-field select:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, .16);
}

.code-block-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.code-block-actions button {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    padding: 0;
    color: #cbd5e1;
    background: #334155;
    border: 1px solid #475569;
    border-radius: 8px;
    cursor: pointer;
    transition: .15s ease;
}

.code-block-actions button:hover {
    color: #ffffff;
    background: #475569;
}

.code-block-actions button.delete {
    color: #fca5a5;
}

.code-block-actions button.delete:hover {
    color: #ffffff;
    background: #b91c1c;
    border-color: #dc2626;
}

.code-block-actions button:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.rich-editor .code-block-shell pre {
    min-height: 86px;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.rich-editor blockquote {
    margin: 24px 0;
    padding: 15px 19px;
    color: #334155;
    background: #f8fafc;
    border-right: 4px solid var(--indigo);
    border-radius: 7px 0 0 7px;
}

.rich-editor hr {
    margin: 30px 0;
    border: 0;
    border-top: 1px solid #cbd5e1;
}

.editor-statusbar {
    display: flex;
    min-height: 35px;
    align-items: center;
    gap: 13px;
    padding: 0 13px;
    color: #64748b;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    font-size: 8px;
}

.editor-statusbar > span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-spacer {
    flex: 1;
}

.article-details {
    margin-top: 16px;
    padding: 19px;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 17px;
}

.section-heading.compact {
    margin-bottom: 4px;
}

.section-heading h2,
.section-heading h3 {
    margin: 0;
    font-size: 13px;
}

.section-heading p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 8px;
}

.section-icon {
    display: grid;
    width: 35px;
    height: 35px;
    flex: none;
    place-items: center;
    color: #2563eb;
    background: #dbeafe;
    border-radius: 9px;
}

.section-icon.emerald {
    color: #059669;
    background: #d1fae5;
}

.section-icon.violet {
    color: #7c3aed;
    background: #ede9fe;
}

.form-sidebar {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 14px;
}

.form-panel {
    display: grid;
    gap: 15px;
    padding: 18px;
}

.form-panel > h3 {
    margin: 0;
    font-size: 13px;
}

.field {
    display: grid;
    gap: 6px;
}

.field > span {
    color: #334155;
    font-size: 10px;
    font-weight: 700;
}

.field b {
    color: var(--danger);
}

.field > small,
.file-drop small {
    color: var(--muted);
    font-size: 8px;
    line-height: 1.7;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 10px 11px;
    color: #1e293b;
    background: #ffffff;
    border: 1px solid #dbe3eb;
    border-radius: 8px;
    outline: 0;
    font-size: 10px;
    transition: .15s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .09);
}

.field textarea {
    resize: vertical;
    line-height: 1.8;
}

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

.check-field {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #475569;
    font-size: 9px;
}

.check-field input {
    accent-color: var(--indigo);
}

.danger-text {
    color: #b91c1c;
}

.switch {
    padding: 11px;
    background: #f8fafc;
    border-radius: 8px;
    font-weight: 700;
}

.publish-actions {
    display: grid;
    gap: 7px;
    padding-top: 5px;
    border-top: 1px solid var(--line-soft);
}

.file-drop {
    display: grid;
    min-height: 112px;
    place-items: center;
    align-content: center;
    gap: 5px;
    padding: 12px;
    color: var(--muted);
    background: #fafbff;
    border: 1px dashed #b8c2d4;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: .15s ease;
}

.file-drop:hover {
    background: #eef2ff;
    border-color: #818cf8;
}

.file-drop > i {
    color: #818cf8;
    font-size: 24px;
}

.file-drop input {
    max-width: 100%;
    color: #64748b;
    font-size: 8px;
}

.file-drop span {
    color: var(--indigo);
    font-size: 9px;
    font-weight: 700;
}

.image-preview {
    width: 100%;
    max-height: 210px;
    object-fit: cover;
    border-radius: 9px;
}

.poster-preview {
    aspect-ratio: 16 / 9;
}

.editor-help {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px;
    color: #5b21b6;
    background: #f5f3ff;
    border-color: #ddd6fe;
}

.editor-help > i {
    margin-top: 2px;
    font-size: 16px;
}

.editor-help strong {
    font-size: 9px;
}

.editor-help p {
    margin: 3px 0 0;
    color: #6d28d9;
    font-size: 8px;
    line-height: 1.8;
}

/* Solar Hijri date picker */
.shamsi-picker {
    position: relative;
    width: 100%;
}

.shamsi-field-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 35px;
    gap: 6px;
}

.shamsi-display,
.shamsi-clear {
    display: flex;
    min-height: 42px;
    align-items: center;
    color: #1e293b;
    background: #ffffff;
    border: 1px solid #dbe3eb;
    border-radius: 8px;
    transition: .15s ease;
}

.shamsi-display {
    min-width: 0;
    gap: 8px;
    padding: 7px 11px;
    text-align: right;
}

.shamsi-display > i {
    flex: none;
    color: #6366f1;
    font-size: 14px;
}

.shamsi-display > span {
    overflow: hidden;
    line-height: 1.7;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shamsi-display.placeholder {
    color: #94a3b8;
}

.shamsi-display:hover,
.shamsi-picker.open .shamsi-display {
    background: #fafaff;
    border-color: #818cf8;
}

.shamsi-picker.open .shamsi-display {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .1);
}

.shamsi-clear {
    justify-content: center;
    padding: 0;
    color: #94a3b8;
}

.shamsi-clear:hover {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fecaca;
}

.shamsi-popover {
    position: absolute;
    z-index: 65;
    top: calc(100% + 8px);
    right: 0;
    display: none;
    width: min(328px, calc(100vw - 42px));
    overflow: hidden;
    color: #1e293b;
    background: #ffffff;
    border: 1px solid #dbe3eb;
    border-radius: 14px;
    box-shadow: 0 22px 55px rgba(15, 23, 42, .2);
    animation: shamsi-pop .16s ease-out;
}

.shamsi-picker.open .shamsi-popover {
    display: block;
}

@keyframes shamsi-pop {
    from {
        opacity: 0;
        transform: translateY(-5px) scale(.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.shamsi-header {
    display: grid;
    min-height: 53px;
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    align-items: center;
    gap: 6px;
    padding: 8px 11px;
    color: #ffffff;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
}

.shamsi-header strong {
    text-align: center;
    font-size: 12px;
}

.shamsi-header button {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    padding: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
}

.shamsi-header button:hover {
    background: rgba(255, 255, 255, .24);
}

.shamsi-weekdays,
.shamsi-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.shamsi-weekdays {
    padding: 10px 11px 5px;
    color: #94a3b8;
    font-size: 8px;
    font-weight: 700;
    text-align: center;
}

.shamsi-weekdays span:last-child {
    color: #ef4444;
}

.shamsi-days {
    gap: 2px;
    padding: 3px 11px 11px;
}

.shamsi-day {
    position: relative;
    display: grid;
    aspect-ratio: 1;
    place-items: center;
    padding: 0;
    color: #334155;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 9px;
    transition: .12s ease;
}

.shamsi-day:hover {
    color: #4338ca;
    background: #eef2ff;
}

.shamsi-day:nth-child(7n) {
    color: #dc2626;
}

.shamsi-day.outside {
    color: #cbd5e1;
}

.shamsi-day.today {
    color: #4f46e5;
    border-color: #a5b4fc;
    font-weight: 700;
}

.shamsi-day.today::after {
    position: absolute;
    bottom: 3px;
    width: 3px;
    height: 3px;
    background: #6366f1;
    border-radius: 999px;
    content: "";
}

.shamsi-day.selected,
.shamsi-day.selected:nth-child(7n) {
    color: #ffffff;
    background: #4f46e5;
    border-color: #4f46e5;
    box-shadow: 0 5px 12px rgba(79, 70, 229, .24);
    font-weight: 700;
}

.shamsi-day.selected::after {
    background: #ffffff;
}

.shamsi-time {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 13px;
    background: #f8fafc;
    border-top: 1px solid #eef2f7;
    border-bottom: 1px solid #eef2f7;
}

.shamsi-time > span {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 9px;
    font-weight: 700;
}

.shamsi-time > span i {
    color: #6366f1;
}

.shamsi-time input {
    width: 108px;
    height: 34px;
    padding: 0 8px;
    color: #334155;
    background: #ffffff;
    border: 1px solid #dbe3eb;
    border-radius: 7px;
    outline: 0;
    direction: ltr;
    text-align: center;
    font-size: 10px;
}

.shamsi-time input:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .09);
}

.shamsi-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 11px;
}

.shamsi-footer > div {
    display: flex;
    gap: 6px;
}

.shamsi-footer button {
    min-height: 32px;
    padding: 0 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: 8px;
    font-weight: 700;
}

.shamsi-today {
    color: #4f46e5;
}

.shamsi-today:hover {
    background: #eef2ff;
}

.shamsi-cancel {
    color: #64748b;
    border-color: #e2e8f0 !important;
}

.shamsi-cancel:hover {
    background: #f8fafc;
}

.shamsi-apply {
    color: #ffffff;
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
}

.shamsi-apply:hover {
    background: #4338ca !important;
}

.editor-focus-mode .quick-toolbar,
.editor-focus-mode .ribbon-tabs-bar,
.editor-focus-mode .sidebar,
.editor-focus-mode .sidebar-backdrop,
.editor-focus-mode .page-header {
    display: none !important;
}

.editor-focus-mode .ribbon {
    position: sticky;
    z-index: 20;
    top: 0;
}

.editor-focus-mode .admin-shell {
    display: block;
}

.editor-focus-mode .admin-content {
    max-width: 1180px;
    margin: auto;
}

/* Legacy poster forms */
.page-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

/* Login */
.login-body {
    min-height: 100vh;
    background: #f7f9fc;
}

.login-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 1fr 1fr;
}

.login-intro {
    position: relative;
    display: flex;
    overflow: hidden;
    flex-direction: column;
    justify-content: center;
    padding: 9vw;
    color: #ffffff;
    background: linear-gradient(145deg, #111827, #312e81);
}

.login-intro > span {
    margin-top: 20px;
    color: #c4b5fd;
    font-size: 12px;
    font-weight: 700;
}

.login-intro h1 {
    max-width: 580px;
    margin: 13px 0;
    font-size: clamp(34px, 4vw, 56px);
    line-height: 1.45;
}

.login-intro p {
    max-width: 500px;
    color: #cbd5e1;
    font-size: 12px;
    line-height: 2;
}

.login-pattern {
    position: absolute;
    bottom: -160px;
    left: -90px;
    width: 420px;
    height: 420px;
    border: 80px solid rgba(139, 92, 246, .12);
    border-radius: 50%;
}

.login-panel {
    display: grid;
    place-items: center;
    padding: 40px;
}

.login-card {
    width: min(420px, 100%);
    padding: 40px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .12);
}

.login-heading {
    margin-bottom: 25px;
}

.login-heading small {
    color: var(--indigo);
    font-weight: 800;
}

.login-heading h2 {
    margin: 6px 0;
    font-size: 28px;
}

.login-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.login-card .field {
    margin-bottom: 15px;
}

.login-card input {
    height: 47px;
}

.security-note {
    margin: 15px 0 0;
    color: #9199a5;
    text-align: center;
    font-size: 8px;
}

.toast {
    position: fixed;
    z-index: 100;
    bottom: 22px;
    left: 22px;
    max-width: 330px;
    padding: 11px 14px;
    color: #ffffff;
    background: #1e293b;
    border-radius: 9px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: .2s ease;
    font-size: 10px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Modern top navigation and roomier admin layout */
.admin-topbar {
    position: sticky;
    z-index: 100;
    top: 0;
    color: #334155;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid rgba(148, 163, 184, .24);
    box-shadow: 0 8px 30px rgba(15, 23, 42, .06);
    backdrop-filter: blur(18px);
}

.admin-topbar-row {
    display: grid;
    width: min(1536px, 100%);
    min-height: 76px;
    grid-template-columns: auto minmax(420px, 1fr) auto;
    align-items: center;
    gap: 26px;
    margin-inline: auto;
    padding: 0 28px;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    white-space: nowrap;
}

.topbar-brand .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 20px;
}

.topbar-brand > span:last-child,
.topbar-user > span:last-child {
    display: grid;
}

.topbar-brand strong {
    color: #172033;
    font-size: 16px;
    line-height: 1.35;
}

.topbar-brand small {
    color: #8b5cf6;
    font-size: 10px;
    font-weight: 700;
}

.top-nav {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.top-nav a {
    position: relative;
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    color: #64748b;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    transition: .18s ease;
}

.top-nav a i {
    font-size: 14px;
}

.top-nav a:hover {
    color: #4338ca;
    background: #f5f3ff;
}

.top-nav a.active {
    color: #4338ca;
    background: linear-gradient(135deg, #eef2ff, #f5f3ff);
    border-color: #ddd6fe;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
}

.top-nav a.active::after {
    position: absolute;
    right: 16px;
    bottom: -17px;
    left: 16px;
    height: 3px;
    background: linear-gradient(90deg, #4f46e5, #8b5cf6);
    border-radius: 999px 999px 0 0;
    content: "";
}

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

.topbar-date {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: 4px;
    color: #64748b;
    font-size: 10px;
    white-space: nowrap;
}

.topbar-date i {
    color: #6366f1;
}

.topbar-icon,
.topbar-logout button {
    display: grid;
    width: 39px;
    height: 39px;
    place-items: center;
    padding: 0;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    transition: .18s ease;
}

.topbar-icon:hover {
    color: #4338ca;
    background: #eef2ff;
    border-color: #c7d2fe;
}

.topbar-create {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    gap: 7px;
    padding: 0 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #4f46e5, #6d5ce7);
    border-radius: 11px;
    box-shadow: 0 8px 18px rgba(79, 70, 229, .2);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    transition: .18s ease;
}

.topbar-create:hover {
    transform: translateY(-1px);
    box-shadow: 0 11px 23px rgba(79, 70, 229, .26);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 3px;
    padding-right: 10px;
    border-right: 1px solid #e2e8f0;
}

.topbar-user .user-avatar {
    width: 36px;
    height: 36px;
    color: #4338ca;
    background: #eef2ff;
    border: 1px solid #ddd6fe;
    font-size: 12px;
}

.topbar-user strong {
    max-width: 100px;
    overflow: hidden;
    color: #334155;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-user small {
    color: #94a3b8;
    font-size: 8px;
}

.topbar-logout {
    display: inline-flex;
}

.topbar-logout button {
    color: #dc2626;
    cursor: pointer;
}

.topbar-logout button:hover {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}

.top-nav a:focus-visible,
.topbar-icon:focus-visible,
.topbar-create:focus-visible,
.topbar-logout button:focus-visible,
.ribbon-tab:focus-visible,
.ribbon-tool:focus-visible {
    outline: 3px solid rgba(99, 102, 241, .25);
    outline-offset: 2px;
}

.editor-commandbar {
    position: relative;
    z-index: 30;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
}

.editor-commandbar .quick-toolbar {
    min-height: 38px;
    padding-inline: max(28px, calc((100% - 1480px) / 2));
    background: #172033;
}

.editor-command-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: 8px;
    color: #f8fafc;
    font-size: 11px;
    font-weight: 700;
}

.editor-command-title i {
    color: #a5b4fc;
}

.editor-commandbar .ribbon-tabs-bar,
.editor-commandbar .ribbon {
    padding-inline: max(28px, calc((100% - 1480px) / 2));
}

.editor-commandbar .ribbon-tabs-bar {
    height: 46px;
    background: #ffffff;
}

.editor-tabs-hint {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-inline-start: auto;
    color: #94a3b8;
    font-size: 10px;
}

.editor-commandbar .ribbon {
    min-height: 96px;
    background: #f8fafc;
    box-shadow: none;
}

body.admin-body {
    background:
        radial-gradient(circle at 15% 0, rgba(99, 102, 241, .06), transparent 25rem),
        #f5f7fb;
}

.admin-shell {
    display: block;
    min-height: calc(100vh - 76px);
}

.article-editor-page .admin-shell {
    min-height: calc(100vh - 256px);
}

.admin-main {
    width: min(1536px, 100%);
    margin-inline: auto;
}

.page-header {
    min-height: 116px;
    margin: 24px 28px 0;
    padding: 23px 26px;
    background:
        linear-gradient(125deg, rgba(238, 242, 255, .88), rgba(255, 255, 255, .96) 48%, rgba(245, 243, 255, .82));
    border: 1px solid #e3e7f1;
    border-radius: 20px;
    box-shadow: 0 12px 35px rgba(15, 23, 42, .05);
}

.page-header h1 {
    color: #172033;
    font-size: 26px;
}

.page-description {
    margin-top: 5px;
    font-size: 12px;
}

.breadcrumb {
    margin-bottom: 7px;
    font-size: 10px;
}

.admin-content {
    padding: 22px 28px 52px;
}

.panel,
.stat-card {
    border-color: #e3e7ef;
    border-radius: 18px;
    box-shadow: 0 8px 26px rgba(15, 23, 42, .045);
}

.stats-grid {
    gap: 18px;
    margin-bottom: 20px;
}

.stat-card {
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.stat-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: #3b82f6;
    content: "";
    opacity: .9;
}

.emerald-card::before {
    background: #10b981;
}

.violet-card::before {
    background: #8b5cf6;
}

.amber-card::before {
    background: #f59e0b;
}

.stat-card:hover {
    border-color: #d7ddeb;
    transform: translateY(-4px);
    box-shadow: 0 16px 38px rgba(15, 23, 42, .09);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 19px;
}

.stat-chip {
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
}

.stat-card > strong {
    font-size: 31px;
}

.stat-card > p {
    margin: 4px 0 14px;
    font-size: 12px;
}

.analytics-grid,
.dashboard-grid {
    gap: 18px;
    margin-bottom: 20px;
}

.panel-heading {
    min-height: 86px;
    padding: 18px 21px;
}

.panel-heading h2,
.data-toolbar h2 {
    font-size: 15px;
}

.panel-heading p {
    font-size: 11px;
}

.panel-heading > a {
    font-size: 11px;
}

.eyebrow {
    font-size: 9px;
}

.chart-area {
    height: 260px;
}

.doughnut-chart {
    height: 215px;
}

.compact-row {
    min-height: 72px;
    padding: 12px 20px;
}

.row-thumb {
    width: 40px;
    height: 40px;
    border-radius: 11px;
}

.compact-main strong {
    font-size: 12px;
}

.compact-main small {
    font-size: 10px;
}

.badge {
    padding: 5px 9px;
    font-size: 9px;
}

.summary-strip,
.data-panel,
.consult-stat {
    border-radius: 16px;
}

.summary-strip small,
.result-count,
.data-table th {
    font-size: 10px;
}

.data-table {
    font-size: 11px;
}

.data-table th,
.data-table td {
    padding: 14px 17px;
}

.content-cell strong,
.title-cell strong {
    font-size: 11px;
}

.filters input,
.filters select,
.status-select {
    font-size: 11px;
}

@media (max-width: 1240px) {
    .admin-topbar-row {
        grid-template-columns: auto 1fr auto;
        gap: 15px;
    }

    .topbar-date,
    .topbar-user > span:last-child {
        display: none;
    }

    .top-nav a {
        padding-inline: 12px;
    }
}

@media (max-width: 980px) {
    .admin-topbar-row {
        grid-template-columns: auto 1fr;
        padding: 10px 20px 0;
    }

    .topbar-actions {
        justify-self: end;
    }

    .top-nav {
        width: 100%;
        grid-column: 1 / -1;
        justify-content: flex-start;
        order: 3;
        overflow-x: auto;
        padding: 8px 0 10px;
        border-top: 1px solid #eef2f7;
        scrollbar-width: none;
    }

    .top-nav::-webkit-scrollbar {
        display: none;
    }

    .top-nav a.active::after {
        bottom: -10px;
    }
}

@media (max-width: 1180px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .summary-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .summary-strip > div:nth-child(2) {
        border-left: 0;
    }

    .summary-strip > div:nth-child(-n+2) {
        border-bottom: 1px solid var(--line-soft);
    }
}

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

    .sidebar {
        position: fixed;
        z-index: 80;
        top: 0;
        right: -285px;
        width: 270px;
        height: 100vh;
        min-height: 0;
        box-shadow: -20px 0 50px rgba(15, 23, 42, .2);
        transition: right .2s ease;
    }

    .sidebar.open {
        right: 0;
    }

    .sidebar-backdrop {
        position: fixed;
        z-index: 70;
        inset: 0;
        width: 100%;
        height: 100%;
        padding: 0;
        background: rgba(15, 23, 42, .45);
        border: 0;
    }

    .sidebar-backdrop.show {
        display: block;
    }

    .quick-toolbar [data-sidebar-toggle] {
        display: grid;
    }

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

    .word-editor-layout,
    .editor-layout {
        grid-template-columns: 1fr;
    }

    .form-sidebar {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-sidebar > :first-child {
        grid-column: 1 / -1;
    }
}

@media (min-width: 961px) {
    .quick-toolbar [data-sidebar-toggle] {
        display: none;
    }
}

@media (max-width: 760px) {
    .admin-topbar-row {
        padding-inline: 14px;
    }

    .topbar-brand > span:last-child,
    .topbar-user,
    .topbar-create span {
        display: none;
    }

    .topbar-actions {
        gap: 6px;
    }

    .topbar-create {
        width: 39px;
        min-height: 39px;
        justify-content: center;
        padding: 0;
    }

    .top-nav a {
        min-height: 40px;
        padding-inline: 11px;
        font-size: 11px;
    }

    .editor-commandbar .quick-toolbar,
    .editor-commandbar .ribbon-tabs-bar,
    .editor-commandbar .ribbon {
        padding-inline: 12px;
    }

    .editor-tabs-hint {
        display: none;
    }

    .quick-account .quick-user,
    .current-persian-date,
    .ribbon-search {
        display: none;
    }

    .ribbon-tabs-bar {
        padding: 0 8px;
        overflow-x: auto;
    }

    .ribbon-tab {
        min-width: 58px;
        padding: 0 12px;
    }

    .ribbon {
        padding-right: 10px;
        padding-left: 10px;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
        margin: 14px 14px 0;
        padding: 16px 18px;
    }

    .page-header-actions {
        width: 100%;
    }

    .page-header-actions .primary,
    .page-header-actions .secondary {
        flex: 1;
    }

    .admin-content {
        padding: 18px 14px 38px;
    }

    .summary-strip.three-items,
    .consultation-stats {
        grid-template-columns: 1fr;
    }

    .summary-strip.three-items > div {
        border-bottom: 1px solid var(--line-soft);
        border-left: 0;
    }

    .summary-strip.three-items > div:last-child {
        border-bottom: 0;
    }

    .data-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .filters {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .search-field {
        width: 100%;
        max-width: none;
        flex-basis: 100%;
    }

    .filters select {
        flex: 1;
    }

    .result-count {
        align-self: flex-start;
    }

    .document-title {
        padding: 20px 22px 10px;
    }

    .document-divider {
        margin: 0 22px;
    }

    .rich-editor {
        min-height: 460px;
        padding: 22px 22px 40px;
    }

    .two-fields,
    .form-sidebar {
        grid-template-columns: 1fr;
    }

    .form-sidebar > :first-child {
        grid-column: auto;
    }

    .editor-context > span:first-child {
        display: none;
    }

    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-intro {
        display: none;
    }
}

@media (max-width: 520px) {
    .code-block-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .code-language-field {
        justify-content: space-between;
    }

    .code-language-field select {
        min-width: 0;
        flex: 1;
    }

    .code-block-actions {
        justify-content: flex-end;
    }

    .topbar-brand .brand-mark {
        width: 38px;
        height: 38px;
        border-radius: 11px;
    }

    .topbar-icon,
    .topbar-logout button,
    .topbar-create {
        width: 36px;
        height: 36px;
        min-height: 36px;
    }

    .top-nav {
        gap: 3px;
    }

    .top-nav a {
        gap: 6px;
        padding-inline: 10px;
    }

    .stats-grid,
    .summary-strip {
        grid-template-columns: 1fr;
    }

    .summary-strip > div {
        border-bottom: 1px solid var(--line-soft);
        border-left: 0;
    }

    .summary-strip > div:last-child {
        border-bottom: 0;
    }

    .stats-grid {
        gap: 9px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-card > strong {
        font-size: 22px;
    }

    .quick-toolbar {
        padding: 2px 8px;
    }

    .page-header h1 {
        font-size: 19px;
    }

    .editor-statusbar > span:nth-child(2),
    .editor-statusbar > span:last-child {
        display: none;
    }

    .login-panel {
        padding: 18px;
    }

    .login-card {
        padding: 28px 22px;
    }
}

/* Tutorial content manager */
.tutorial-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    align-items: start;
    gap: 16px;
}

.tutorial-form-main,
.tutorial-form-sidebar {
    display: grid;
    gap: 16px;
}

.tutorial-form-sidebar {
    position: sticky;
    top: 18px;
}

.tutorial-repeater-panel {
    align-content: start;
}

.amber-icon {
    color: #b45309;
    background: #fef3c7;
}

.repeater-list,
.structured-repeater {
    display: grid;
    gap: 12px;
}

.simple-repeater {
    display: grid;
    gap: 10px;
}

.simple-repeater-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 8px;
}

.simple-repeater-row > i {
    color: #10b981;
    text-align: center;
    font-size: 11px;
}

.simple-repeater-row input {
    width: 100%;
    min-height: 40px;
    padding: 9px 10px;
    border: 1px solid #dbe3eb;
    border-radius: 8px;
    outline: 0;
    font-size: 10px;
}

.simple-repeater-row input:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .09);
}

.simple-repeater-row button,
.repeater-move-actions button {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #64748b;
    background: #ffffff;
    border: 1px solid #dbe3eb;
    border-radius: 8px;
}

.simple-repeater-row button:hover,
.repeater-move-actions button:hover {
    color: var(--indigo);
    border-color: #a5b4fc;
}

.simple-repeater-row button:disabled,
.repeater-move-actions button:disabled {
    cursor: not-allowed;
    opacity: .35;
}

.repeater-add {
    display: inline-flex;
    width: fit-content;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding-inline: 13px;
    color: var(--indigo);
    background: var(--indigo-soft);
    border: 1px dashed #a5b4fc;
    border-radius: 9px;
    font-size: 9px;
    font-weight: 700;
}

.repeater-add:hover {
    color: #ffffff;
    background: var(--indigo);
    border-style: solid;
}

.structured-repeater-item {
    display: grid;
    gap: 12px;
    padding: 15px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
}

.structured-repeater-item > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.structured-repeater-item > header > span {
    color: #4338ca;
    font-size: 10px;
    font-weight: 700;
}

.repeater-move-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.repeater-move-actions .delete,
.simple-repeater-row button {
    color: #b91c1c;
}

.source-item {
    background: #fffdf7;
    border-color: #fde68a;
}

.source-policy-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 12px;
    color: #5b21b6;
    background: #f5f3ff;
    border-radius: 9px;
}

.source-policy-note i {
    margin-top: 2px;
}

.source-policy-note p {
    margin: 0;
    font-size: 8px;
    line-height: 1.9;
}

.compact-repeater .simple-repeater-row {
    grid-template-columns: 20px minmax(0, 1fr) 32px;
}

.tutorial-table-meta {
    display: grid;
    min-width: 135px;
}

.tutorial-table-meta b {
    font-size: 9px;
}

.tutorial-table-meta small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 8px;
}

.badge.featured {
    margin-top: 4px;
    color: #6d28d9;
    background: #ede9fe;
}

.table-icon.view {
    color: #0369a1;
    background: #e0f2fe;
}

@media (max-width: 980px) {
    .tutorial-form-layout {
        grid-template-columns: 1fr;
    }

    .tutorial-form-sidebar {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tutorial-form-sidebar > :last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    .tutorial-form-sidebar,
    .structured-repeater-item .two-fields {
        grid-template-columns: 1fr;
    }

    .tutorial-form-sidebar > :last-child {
        grid-column: auto;
    }

    .structured-repeater-item {
        padding: 12px;
    }
}

@media print {
    .admin-topbar,
    .editor-commandbar,
    .quick-toolbar,
    .ribbon-tabs-bar,
    .ribbon,
    .sidebar,
    .sidebar-backdrop,
    .page-header-actions,
    .data-toolbar,
    .icon-actions,
    .form-sidebar {
        display: none !important;
    }

    .tutorial-form-sidebar,
    .repeater-add,
    .repeater-move-actions,
    .simple-repeater-row button {
        display: none !important;
    }

    .admin-shell,
    .word-editor-layout {
        display: block;
    }

    .page-header,
    .admin-content {
        padding: 12px;
    }

    .panel,
    .document-sheet {
        box-shadow: none;
    }
}

/* Editorial liquid-glass dashboard */
.admin-body {
    min-height: 100vh;
    direction: rtl;
    background:
        radial-gradient(circle at 10% 8%, rgba(37, 99, 235, .14), transparent 28rem),
        radial-gradient(circle at 88% 22%, rgba(5, 150, 105, .15), transparent 30rem),
        linear-gradient(145deg, #e9f1f5 0%, #f8fbfd 46%, #eaf4f2 100%);
    background-attachment: fixed;
}

.admin-body::before,
.admin-body::after {
    position: fixed;
    z-index: -1;
    width: 22rem;
    height: 22rem;
    border-radius: 50%;
    content: "";
    filter: blur(2px);
    pointer-events: none;
}

.admin-body::before {
    inset: 12rem auto auto -7rem;
    background: linear-gradient(145deg, rgba(55, 183, 170, .18), rgba(69, 118, 218, .06));
}

.admin-body::after {
    inset: auto -8rem 7rem auto;
    background: linear-gradient(145deg, rgba(90, 111, 224, .13), rgba(22, 181, 153, .14));
}

.admin-topbar,
.editor-commandbar {
    border-color: rgba(255, 255, 255, .72);
    background: rgba(247, 251, 253, .72);
    box-shadow: 0 18px 55px rgba(31, 65, 81, .1);
    backdrop-filter: blur(24px) saturate(155%);
}

.topbar-brand,
.top-nav,
.topbar-user,
.panel,
.stat-card,
.summary-strip,
.document-sheet,
.editorial-welcome,
.liquid-admin-panel {
    border: 1px solid rgba(255, 255, 255, .78);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .74), rgba(255, 255, 255, .48));
    box-shadow:
        0 22px 58px rgba(34, 68, 82, .09),
        inset 0 1px 0 rgba(255, 255, 255, .88);
    backdrop-filter: blur(22px) saturate(145%);
}

.panel,
.stat-card,
.editorial-welcome,
.liquid-admin-panel {
    position: relative;
    overflow: hidden;
}

.panel::before,
.stat-card::before,
.editorial-welcome::before {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(115deg, rgba(255, 255, 255, .32), transparent 34%, rgba(29, 180, 162, .06));
    content: "";
    pointer-events: none;
}

.admin-content,
.page-header {
    position: relative;
    z-index: 1;
}

.editorial-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 22px;
    padding: 30px 34px;
    border-radius: 24px;
}

.editorial-welcome h2 {
    margin: 10px 0 8px;
    font-size: clamp(22px, 3vw, 32px);
}

.editorial-welcome p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    line-height: 1.9;
}

.editorial-dashboard-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(290px, .65fr);
}

.editorial-checklist ol {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.editorial-checklist li {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 13px;
    border: 1px solid rgba(207, 225, 231, .75);
    border-radius: 16px;
    background: rgba(255, 255, 255, .48);
}

.editorial-checklist li > span {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(145deg, #0b9286, #297ec4);
    font-weight: 900;
}

.editorial-checklist strong,
.editorial-checklist p {
    display: block;
}

.editorial-checklist p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.document-title input {
    font-family: var(--article-title-font, Vazirmatn), Tahoma, sans-serif;
}

.rich-editor {
    font-family: var(--article-body-font, Vazirmatn), Tahoma, sans-serif;
    direction: rtl;
    text-align: right;
    unicode-bidi: plaintext;
}

.rich-editor :is(pre, code) {
    font-family: SourceCodeProLocal, ui-monospace, monospace;
    direction: ltr;
    text-align: left;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border-radius: 999px;
    color: color-mix(in srgb, var(--category-color) 78%, #102a35);
    background: color-mix(in srgb, var(--category-color) 12%, white);
    font-size: 12px;
    font-weight: 800;
}

.category-pill::before {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--category-color);
    content: "";
}

.current-author-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border: 1px solid rgba(211, 226, 232, .8);
    border-radius: 16px;
    background: rgba(255, 255, 255, .5);
}

.current-author-card > span {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(145deg, #0d9a8d, #3478c7);
    font-weight: 900;
}

.current-author-card strong,
.current-author-card small {
    display: block;
}

.current-author-card small {
    margin-top: 3px;
    color: var(--muted);
}

.taxonomy-layout,
.profile-form-grid {
    display: grid;
    grid-template-columns: minmax(280px, .7fr) minmax(0, 1.3fr);
    gap: 22px;
    align-items: start;
}

.profile-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stacked-form,
.category-admin-list,
.category-admin-fields,
.role-picker {
    display: grid;
    gap: 14px;
}

.category-admin-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(211, 226, 232, .82);
    border-radius: 18px;
    background: rgba(255, 255, 255, .5);
}

.category-admin-row input,
.category-admin-row textarea {
    width: 100%;
    border: 1px solid rgba(203, 218, 225, .9);
    border-radius: 10px;
    background: rgba(255, 255, 255, .7);
}

.category-admin-row > input[type="color"] {
    width: 42px;
    height: 42px;
    padding: 3px;
}

.role-picker .check-field {
    align-items: flex-start;
    padding: 14px;
    border: 1px solid rgba(207, 222, 229, .8);
    border-radius: 16px;
    background: rgba(255, 255, 255, .5);
}

.role-picker .check-field strong,
.role-picker .check-field small {
    display: block;
}

.role-picker .check-field small {
    margin-top: 4px;
    color: var(--muted);
    line-height: 1.7;
}

.profile-avatar-preview {
    width: 104px;
    height: 104px;
    margin-bottom: 12px;
    border: 4px solid rgba(255, 255, 255, .82);
    border-radius: 28px;
    object-fit: cover;
    box-shadow: 0 14px 35px rgba(32, 67, 81, .14);
}

.form-footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 22px;
}

.author-cell img {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    object-fit: cover;
}

.author-cell > span:last-child strong,
.author-cell > span:last-child small {
    display: block;
}

.author-cell > span:last-child small {
    color: var(--muted);
    font-size: 11px;
}

@media (max-width: 980px) {
    .editorial-dashboard-grid,
    .taxonomy-layout,
    .profile-form-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 680px) {
    .editorial-welcome {
        align-items: stretch;
        flex-direction: column;
        padding: 22px;
    }

    .category-admin-row {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .category-admin-row > .badge,
    .category-admin-row > .icon-actions {
        grid-column: 2;
    }

    .form-footer-actions {
        flex-direction: column;
    }
}
