:root {
  --brand: #1769ff;
  --brand-dark: #0d5ce5;
  --ink: #10213d;
  --muted: #64748b;
  --line: #e3eaf3;
  --canvas: #f7f9fc;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
[data-icon] { display: inline-flex; }
[data-icon] svg { width: 1.1rem; height: 1.1rem; stroke-width: 2; }

.login-screen { position: relative; overflow: hidden; background: #f7f9fc; }
.login-screen > .relative::before {
  content: "";
  position: absolute;
  left: -11rem;
  bottom: -13rem;
  width: 35rem;
  height: 35rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 0 0 5rem rgba(255,255,255,.025), 0 0 0 10rem rgba(255,255,255,.02);
  pointer-events: none;
}
.login-decoration { position: fixed; border-radius: 999px; filter: blur(2px); pointer-events: none; }
.login-decoration-one { width: 22rem; height: 22rem; right: -10rem; top: -10rem; background: rgba(68,159,255,.12); }
.login-decoration-two { width: 15rem; height: 15rem; right: 32%; bottom: -10rem; background: rgba(23,105,255,.07); }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem;
  border-radius: .7rem; background: linear-gradient(135deg, #449fff, #1769ff); color: white;
  font-size: 1.3rem; font-style: italic; font-weight: 700; box-shadow: 0 8px 18px rgba(23,105,255,.25);
}
.eyebrow { color: var(--brand); font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.field-label { display: block; margin-bottom: .5rem; color: #243753; font-size: .78rem; font-weight: 600; }
.field-label span { color: #ef4444; }
.input-wrap { position: relative; }
.input-icon { position: absolute; z-index: 1; left: 1rem; top: 50%; display: inline-flex; width: 1.1rem; height: 1.1rem; align-items: center; justify-content: center; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.password-toggle { position: absolute; right: 0; top: 0; display: inline-flex; width: 2.85rem; height: 100%; align-items: center; justify-content: center; border-radius: 0 .75rem .75rem 0; color: #94a3b8; transition: color .18s, background .18s; }
.password-toggle:hover { background: #f5f8fd; color: var(--brand); }
.trailing-static { position: absolute; right: .95rem; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
input:not([type="checkbox"]):not([type="file"]), textarea, select {
  width: 100%; border: 1px solid #dce5f0; border-radius: .75rem; background: #fff; color: var(--ink);
  font-size: .82rem; transition: border-color .2s, box-shadow .2s, background .2s;
}
input:not([type="checkbox"]):not([type="file"]), select { height: 2.85rem; padding: 0 1rem; }
.input-wrap > input:not([type="checkbox"]):not([type="file"]) { padding-left: 2.9rem; }
.input-wrap:has(.password-toggle) > input:not([type="checkbox"]):not([type="file"]) { padding-right: 2.85rem; }
.input-wrap.no-leading-icon > input:not([type="checkbox"]):not([type="file"]) { padding-left: 1rem; padding-right: 2.8rem; }
textarea { min-height: 6rem; resize: vertical; padding: .8rem 1rem; line-height: 1.65; }
input::placeholder, textarea::placeholder { color: #a2aec0; }
input:not([type="checkbox"]):not([type="file"]):focus, textarea:focus, select:focus {
  outline: none; border-color: #75aaff; box-shadow: 0 0 0 3px rgba(23,105,255,.1);
}
.is-invalid { border-color: #f87171 !important; box-shadow: 0 0 0 3px rgba(239,68,68,.08) !important; }
.field-error { min-height: 0; margin-top: .35rem; color: #dc2626; font-size: .68rem; }
.char-count { color: #94a3b8; font-size: .67rem; }

.rich-editor-shell { overflow: hidden; border: 1px solid #dce5f0; border-radius: .75rem; background: #fff; transition: border-color .2s, box-shadow .2s; }
.rich-editor-shell:focus-within { border-color: #75aaff; box-shadow: 0 0 0 3px rgba(23,105,255,.1); }
.rich-editor-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem; border-bottom: 1px solid #e7edf5; background: #f8fafc; padding: .45rem; }
.rich-editor-select { width: auto; min-width: 7.2rem; height: 2.15rem; border-color: #dce5f0; border-radius: .5rem; padding: 0 .55rem; font-size: .7rem; }
.rich-editor-button { display: inline-flex; align-items: center; justify-content: center; width: 2.15rem; height: 2.15rem; border: 1px solid transparent; border-radius: .5rem; color: #64748b; transition: .18s; }
.rich-editor-button:hover { border-color: #cbdcf5; background: #edf4ff; color: var(--brand); }
.rich-editor-button.is-active { border-color: #c4d9fb; background: #e5efff; color: var(--brand); }
.rich-editor-button:disabled { cursor: not-allowed; opacity: .4; }
.rich-editor-button svg { width: 1rem; height: 1rem; }
.rich-editor-divider { width: 1px; height: 1.35rem; margin: 0 .25rem; background: #dbe4ef; }
.rich-editor-content { min-height: 15rem; max-height: 32rem; overflow-y: auto; padding: 1rem 1.1rem; color: #243753; font-size: .82rem; line-height: 1.75; }
.rich-editor-content:empty::before, .rich-editor-content[data-empty="true"]::before { content: attr(data-placeholder); float: left; height: 0; color: #a2aec0; pointer-events: none; }
.rich-editor-content:focus { outline: none; }
.rich-editor-content .tiptap-content, .tiptap-content { min-height: 13rem; outline: none; }
.rich-editor-content p, .tiptap-content p { margin: 0 0 .75rem; }
.rich-editor-content h2, .tiptap-content h2 { margin: 1.25rem 0 .55rem; color: var(--ink); font-size: 1.25rem; font-weight: 700; line-height: 1.3; }
.rich-editor-content h3, .tiptap-content h3 { margin: 1.1rem 0 .45rem; color: var(--ink); font-size: 1rem; font-weight: 700; line-height: 1.35; }
.rich-editor-content ul, .rich-editor-content ol, .tiptap-content ul, .tiptap-content ol { margin: .4rem 0 .85rem; padding-left: 1.35rem; }
.rich-editor-content blockquote, .tiptap-content blockquote { margin: .9rem 0; border-left: 3px solid #75aaff; background: #f5f8ff; padding: .65rem .9rem; color: #52637a; }
.rich-editor-content pre, .tiptap-content pre { overflow-x: auto; margin: .9rem 0; border-radius: .55rem; background: #10213d; padding: .75rem .9rem; color: #e2e8f0; font-size: .75rem; }
.rich-editor-content code, .tiptap-content code { border-radius: .25rem; background: #eef3f9; padding: .12rem .3rem; font-size: .9em; }
.rich-editor-content pre code, .tiptap-content pre code { background: transparent; padding: 0; }
.rich-editor-content a, .tiptap-content a { color: var(--brand); text-decoration: underline; }
.rich-editor-content hr, .tiptap-content hr { margin: 1.25rem 0; border: 0; border-top: 1px solid #dce5f0; }
.rich-editor-shell.is-fallback .rich-editor-content { min-height: 15rem; }
.rich-editor-help { margin-top: .4rem; color: #94a3b8; font-size: .62rem; line-height: 1.45; }
.field-error.is-visible { min-height: 1rem; }

.primary-btn, .secondary-btn, .danger-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 2.65rem; border-radius: .7rem;
  padding: .65rem 1.1rem; font-size: .78rem; font-weight: 600; transition: transform .18s, background .18s, box-shadow .18s;
}
.primary-btn { background: var(--brand); color: white; box-shadow: 0 8px 18px rgba(23,105,255,.2); }
.primary-btn:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 10px 22px rgba(23,105,255,.27); }
.primary-btn:disabled { cursor: not-allowed; opacity: .72; transform: none; box-shadow: 0 5px 14px rgba(23,105,255,.14); }
.primary-btn.is-loading { cursor: wait; }
.primary-btn.is-loading > [data-icon], .primary-btn.is-loading > [data-lucide] { display: none; }
.button-spinner { display: none; width: 1rem; height: 1rem; flex: 0 0 auto; border: 2px solid rgba(255,255,255,.38); border-top-color: #fff; border-radius: 999px; animation: button-spin .7s linear infinite; }
.primary-btn.is-loading .button-spinner { display: inline-block; }
@keyframes button-spin { to { transform: rotate(360deg); } }
.secondary-btn { border: 1px solid #dce5f0; background: white; color: #43546d; }
.secondary-btn:hover { background: #f7f9fc; border-color: #cbd7e7; }
.danger-btn { background: #ef4444; color: white; box-shadow: 0 8px 18px rgba(239,68,68,.18); }
.danger-btn:hover { background: #dc2626; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 2.45rem; height: 2.45rem; border: 1px solid #e1e8f1; border-radius: .72rem; background: white; color: #64748b; transition: .18s; }
.icon-btn:hover { border-color: #cbd7e7; background: #f3f7fc; color: var(--brand); }
.icon-btn-primary { background: var(--brand); border-color: var(--brand); color: white; }
.nav-section-label { padding: 0 .75rem; color: #9aa8ba; font-size: .62rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.nav-item { display: flex; width: 100%; align-items: center; gap: .8rem; min-height: 2.8rem; border-radius: .72rem; padding: .7rem .8rem; color: #64748b; font-size: .78rem; font-weight: 500; transition: .18s; }
.nav-item:hover { background: #f5f8fd; color: #234163; }
.nav-item.active { background: #edf4ff; color: var(--brand); font-weight: 600; }
.nav-item.active::before { content: ""; width: .22rem; height: 1.25rem; margin-left: -.8rem; border-radius: 0 1rem 1rem 0; background: var(--brand); }
.nav-item.active [data-icon]:first-of-type { margin-left: -.22rem; }
.nav-count { margin-left: auto; border-radius: 999px; background: #f0f4f9; padding: .15rem .45rem; color: #7b8ba1; font-size: .61rem; }
.nav-item.active .nav-count { background: white; color: var(--brand); }
.sidebar-profile { display: flex; align-items: center; gap: .7rem; border-radius: .9rem; background: #f7f9fc; padding: .65rem; }
.avatar { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 2.35rem; height: 2.35rem; border-radius: .72rem; background: linear-gradient(135deg, #d9e9ff, #eef5ff); color: var(--brand); font-size: .7rem; font-weight: 700; }
.avatar-button { border: 1px solid #ccddf5; cursor: pointer; }
.profile-menu { position: absolute; right: 1rem; top: 4.2rem; width: 14rem; overflow: hidden; border: 1px solid #e3eaf3; border-radius: .85rem; background: white; box-shadow: 0 18px 45px rgba(16,33,61,.14); }

.welcome-banner { position: relative; min-height: 12.5rem; overflow: hidden; border-radius: 1.25rem; background: linear-gradient(125deg, #0d5ce5 0%, #1769ff 50%, #449fff 100%); padding: 2rem; box-shadow: 0 18px 38px rgba(23,105,255,.18); }
.welcome-banner::after { content: ""; position: absolute; right: -4rem; top: -8rem; width: 27rem; height: 27rem; border-radius: 999px; background: radial-gradient(circle, rgba(255,255,255,.2), rgba(255,255,255,0) 68%); }
.banner-pill { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(255,255,255,.12); padding: .38rem .72rem; color: white; font-size: .66rem; font-weight: 600; }
.banner-art { position: absolute; right: 1%; top: 50%; width: 20rem; height: 20rem; transform: translateY(-50%); }
.banner-orbit { position: absolute; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; }
.orbit-one { inset: 2rem; }
.orbit-two { inset: 4.6rem; }
.banner-cup { position: absolute; left: 50%; top: 50%; align-items: center; justify-content: center; width: 5rem; height: 5rem; transform: translate(-50%,-50%) rotate(-8deg); border: 1px solid rgba(255,255,255,.25); border-radius: 1.5rem; background: rgba(255,255,255,.16); color: white; backdrop-filter: blur(4px); }
.banner-cup svg { width: 2.5rem; height: 2.5rem; }
.stat-card { position: relative; display: flex; min-height: 9.2rem; align-items: flex-start; gap: .9rem; border: 1px solid var(--line); border-radius: 1rem; background: white; padding: 1.15rem; box-shadow: 0 7px 20px rgba(16,33,61,.035); transition: transform .18s, box-shadow .18s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 12px 25px rgba(16,33,61,.075); }
.stat-icon, .quick-icon { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: .75rem; }
.stat-icon { width: 2.7rem; height: 2.7rem; }
.stat-icon.blue, .quick-icon.blue { background: #eaf2ff; color: #1769ff; }
.stat-icon.violet, .quick-icon.violet { background: #f1eafe; color: #7c3aed; }
.stat-icon.emerald, .quick-icon.emerald { background: #e1f8ef; color: #059669; }
.stat-icon.amber { background: #fff3db; color: #d97706; }
.stat-label { color: #75859b; font-size: .7rem; font-weight: 500; }
.stat-value { margin-top: .3rem; color: var(--ink); font-size: 1.7rem; font-weight: 700; line-height: 1; }
.stat-caption { position: absolute; left: 1.15rem; bottom: 1rem; color: #94a3b8; font-size: .64rem; }
.stat-caption.positive { color: #059669; }
.content-card { overflow: hidden; border: 1px solid var(--line); border-radius: 1rem; background: white; box-shadow: 0 7px 20px rgba(16,33,61,.035); }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #edf1f6; padding: 1.15rem 1.25rem; }
.card-heading h3 { font-size: .93rem; font-weight: 600; }
.card-heading p { margin-top: .2rem; color: #8492a6; font-size: .67rem; }
.text-button { display: inline-flex; align-items: center; gap: .35rem; color: var(--brand); font-size: .7rem; font-weight: 600; }
.recent-item { display: flex; align-items: center; gap: .85rem; padding: .9rem 1.25rem; transition: background .18s; }
.recent-item:hover { background: #fafcff; }
.recent-thumb { width: 3rem; height: 3rem; flex: 0 0 auto; overflow: hidden; border-radius: .65rem; background: #eef4fb; }
.recent-thumb img { width: 100%; height: 100%; object-fit: cover; }
.recent-thumb.fallback { display: flex; align-items: center; justify-content: center; color: var(--brand); }
.recent-type { display: inline-flex; border-radius: 999px; background: #f0f5fc; padding: .16rem .45rem; color: #64748b; font-size: .58rem; font-weight: 600; }
.quick-action { display: flex; align-items: center; gap: .85rem; border: 1px solid #e7edf5; border-radius: .85rem; padding: .85rem; text-align: left; color: #64748b; transition: .18s; }
.quick-action:hover { border-color: #cbdcf5; background: #f8fbff; color: var(--brand); transform: translateX(2px); }
.quick-icon { width: 2.55rem; height: 2.55rem; }
.quick-action b { display: block; color: #243753; font-size: .75rem; font-weight: 600; }
.quick-action small { display: block; margin-top: .15rem; color: #94a3b8; font-size: .62rem; }

.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.page-intro h2 { margin-top: .35rem; font-size: 1.8rem; font-weight: 600; letter-spacing: -.025em; }
.page-intro p { margin-top: .35rem; color: var(--muted); font-size: .78rem; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; border: 1px solid var(--line); border-radius: .95rem; background: white; padding: .75rem; }
.search-box { position: relative; min-width: 15rem; flex: 1; }
.search-box [data-icon] { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: #94a3b8; }
.search-box input { height: 2.55rem !important; border-color: transparent !important; background: #f7f9fc !important; padding-left: 2.55rem !important; }
.filter-select { width: auto; min-width: 10.5rem; height: 2.55rem; background-color: white; }
.result-count { margin-left: auto; padding: 0 .5rem; color: #8492a6; font-size: .68rem; }
.portfolio-card { overflow: hidden; border: 1px solid var(--line); border-radius: 1rem; background: white; box-shadow: 0 7px 20px rgba(16,33,61,.035); transition: transform .2s, box-shadow .2s; }
.portfolio-card:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(16,33,61,.09); }
.portfolio-cover { position: relative; height: 11.5rem; overflow: hidden; background: linear-gradient(135deg,#eaf2ff,#f7f9fc); }
.portfolio-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.portfolio-card:hover .portfolio-cover img { transform: scale(1.035); }
.portfolio-badge { position: absolute; left: .8rem; top: .8rem; border: 1px solid rgba(255,255,255,.7); border-radius: 999px; background: rgba(255,255,255,.9); padding: .3rem .6rem; color: var(--brand); font-size: .6rem; font-weight: 700; backdrop-filter: blur(8px); }
.image-count { position: absolute; right: .8rem; bottom: .8rem; display: inline-flex; align-items: center; gap: .3rem; border-radius: .55rem; background: rgba(16,33,61,.78); padding: .35rem .5rem; color: white; font-size: .6rem; backdrop-filter: blur(6px); }
.portfolio-body { padding: 1.05rem; }
.portfolio-body h3 { font-size: .96rem; font-weight: 600; }
.portfolio-body p { display: -webkit-box; overflow: hidden; margin-top: .4rem; color: var(--muted); font-size: .69rem; line-height: 1.55; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.portfolio-footer { display: flex; align-items: center; justify-content: space-between; margin-top: .95rem; border-top: 1px solid #edf1f6; padding-top: .8rem; }
.external-link { display: inline-flex; min-width: 0; align-items: center; gap: .35rem; color: var(--brand); font-size: .65rem; font-weight: 600; }
.external-link span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.action-group { display: flex; gap: .35rem; }
.mini-action { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border: 1px solid #e4eaf2; border-radius: .55rem; color: #718198; transition: .18s; }
.mini-action:hover { border-color: #bdd3f5; background: #edf4ff; color: var(--brand); }
.mini-action.delete:hover { border-color: #fecaca; background: #fff1f2; color: #e11d48; }
.table-card { overflow: hidden; border: 1px solid var(--line); border-radius: 1rem; background: white; box-shadow: 0 7px 20px rgba(16,33,61,.035); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { background: #f8fafc; padding: .85rem 1rem; color: #8492a6; font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
td { border-top: 1px solid #edf1f6; padding: .85rem 1rem; color: #52637a; font-size: .7rem; vertical-align: middle; }
.article-cell { display: flex; min-width: 20rem; align-items: center; gap: .75rem; }
.article-thumb { width: 4.2rem; height: 3rem; flex: 0 0 auto; overflow: hidden; border-radius: .55rem; background: #eef4fb; }
.article-thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-cell h3 { max-width: 25rem; overflow: hidden; color: #21334e; font-size: .74rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.article-cell p { max-width: 24rem; overflow: hidden; margin-top: .25rem; color: #94a3b8; font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.category-pill { display: inline-flex; border-radius: 999px; background: #edf4ff; padding: .28rem .55rem; color: var(--brand); font-size: .6rem; font-weight: 600; white-space: nowrap; }
.empty-state { padding: 4.5rem 1rem; text-align: center; }
.empty-icon { align-items: center; justify-content: center; width: 3.5rem; height: 3.5rem; border-radius: 1rem; background: #edf4ff; color: var(--brand); }
.empty-icon svg { width: 1.6rem; height: 1.6rem; }
.empty-state h3 { margin-top: 1rem; font-size: .95rem; font-weight: 600; }
.empty-state p { margin: .35rem auto 0; max-width: 22rem; color: #8492a6; font-size: .7rem; line-height: 1.6; }

.modal-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(11,24,44,.52); backdrop-filter: blur(5px); animation: fadeIn .18s ease-out; }
.modal-shell { position: fixed; inset: 0; z-index: 70; overflow-y: auto; padding: 1rem; animation: fadeIn .18s ease-out; }
.modal-panel { width: 100%; margin: 2rem auto; overflow: hidden; border: 1px solid rgba(255,255,255,.7); border-radius: 1.1rem; background: white; box-shadow: 0 30px 80px rgba(16,33,61,.25); animation: modalIn .24s ease-out; }
.modal-header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e9eef5; padding: 1.15rem 1.35rem; }
.modal-header h2 { margin-top: .2rem; font-size: 1.15rem; font-weight: 600; }
.modal-body { padding: 1.35rem; }
.modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: .7rem; margin: 1.5rem -1.35rem -1.35rem; border-top: 1px solid #e9eef5; background: #fafcff; padding: 1rem 1.35rem; }
.modal-actions p { display: flex; align-items: center; gap: .3rem; }
.upload-zone { display: flex; min-height: 8rem; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; border: 1.5px dashed #cbd8e8; border-radius: .85rem; background: #fafcff; color: #72839a; text-align: center; transition: .18s; }
.upload-zone:hover, .upload-zone.is-dragging { border-color: #74a7f5; background: #f2f7ff; }
.upload-zone .upload-icon, .thumbnail-upload .upload-icon { margin-bottom: .45rem; color: var(--brand); }
.upload-zone b, .thumbnail-upload b { color: var(--brand); font-size: .72rem; }
.upload-zone span:not(.upload-icon) { font-size: .7rem; }
.upload-zone small, .thumbnail-upload small { margin-top: .25rem; color: #9aa8ba; font-size: .6rem; }
.preview-image { position: relative; aspect-ratio: 1.35; overflow: hidden; border: 1px solid #dfe7f0; border-radius: .65rem; background: #f5f8fb; }
.preview-image img { width: 100%; height: 100%; object-fit: cover; }
.remove-preview { position: absolute; right: .25rem; top: .25rem; display: inline-flex; align-items: center; justify-content: center; width: 1.35rem; height: 1.35rem; border-radius: 999px; background: rgba(15,23,42,.72); color: white; }
.remove-preview svg { width: .75rem; height: .75rem; }
.thumbnail-upload { position: relative; display: flex; aspect-ratio: 16/10; cursor: pointer; align-items: center; justify-content: center; overflow: hidden; border: 1.5px dashed #cbd8e8; border-radius: .85rem; background: #fafcff; text-align: center; }
.thumbnail-upload:hover { border-color: #74a7f5; background: #f2f7ff; }
.thumbnail-upload > img { width: 100%; height: 100%; object-fit: cover; }
.thumbnail-upload > span { display: flex; flex-direction: column; align-items: center; }
.danger-icon { display: inline-flex; align-items: center; justify-content: center; width: 4rem; height: 4rem; border-radius: 1rem; background: #fff0f1; color: #e11d48; }
.danger-icon svg { width: 1.75rem; height: 1.75rem; }
.toast-container { position: fixed; right: 1rem; bottom: 1rem; z-index: 100; display: flex; width: min(22rem, calc(100vw - 2rem)); flex-direction: column; gap: .6rem; }
.toast { display: flex; align-items: flex-start; gap: .7rem; border: 1px solid #e3eaf3; border-radius: .85rem; background: white; padding: .9rem; box-shadow: 0 16px 38px rgba(16,33,61,.17); animation: toastIn .25s ease-out; }
.toast-icon { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; flex: 0 0 auto; border-radius: .6rem; background: #e6f8ef; color: #059669; }
.toast.error .toast-icon { background: #fff0f1; color: #e11d48; }
.toast h4 { font-size: .73rem; font-weight: 600; }
.toast p { margin-top: .15rem; color: #7b8ba1; font-size: .63rem; line-height: 1.45; }
.page-enter { animation: pageIn .3s ease-out; }
body.modal-open { overflow: hidden; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }

@media (max-width: 1023px) {
  .sidebar.is-open { transform: translateX(0); box-shadow: 20px 0 50px rgba(16,33,61,.18); }
}
@media (max-width: 767px) {
  .banner-art { right: -6rem; opacity: .55; }
  .welcome-banner { padding: 1.5rem; }
  .page-intro { align-items: flex-start; flex-direction: column; }
  .page-intro > .primary-btn { width: 100%; }
  .result-count { width: 100%; margin-left: 0; padding: 0 .2rem; }
  .filter-select { flex: 1; }
  .modal-panel { margin: 0 auto; }
}
@media (max-width: 480px) {
  .article-cell { min-width: 16rem; }
  .search-box { min-width: 100%; }
  .modal-shell { padding: .5rem; }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions .secondary-btn, .modal-actions .primary-btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
