/* CSS Khusus Administrator & Autentikasi PT Visi Integra Solusi */

/* Halaman Login Admin */
.auth-page { min-height: 100vh; background: linear-gradient(135deg, #edf3fb, #e3f4cf); }
.login-shell { display: grid; min-height: 100vh; padding: 40px 20px; place-items: center; position: relative; }
.login-brand { position: absolute; top: 24px; left: 30px; display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; }
.login-brand img { width: 62px; height: 52px; object-fit: contain; }
.login-card { width: min(460px, 100%); padding: 38px; border-radius: 26px; background: #fff; box-shadow: 0 28px 60px rgba(31,54,128,.2); }
.login-card h1 { margin: 18px 0 4px; font-size: 32px; line-height: 1.25; }
.login-card > p { margin: 0 0 25px; color: var(--muted); font-size: 15px; }
.login-card form { display: grid; gap: 17px; }
.login-card label, .admin-editor label, .homepage-hero-form label { display: grid; gap: 7px; color: var(--ink); font-size: 14px; font-weight: 600; }
.login-card input, .admin-editor input, .admin-editor textarea, .admin-editor select, .homepage-hero-form input { width: 100%; padding: 13px 15px; border: 1px solid #aab5d0; border-radius: 12px; outline: none; color: var(--ink); background: #fff; }
.login-card input:focus, .admin-editor input:focus, .admin-editor textarea:focus, .admin-editor select:focus, .homepage-hero-form input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(134,203,53,.18); }
.admin-checkbox { display: flex !important; align-items: center; justify-content: flex-start; }
.admin-checkbox input { width: auto; }
.admin-field-group { display: grid; gap: 7px; }
.admin-field-group > label { color: var(--ink); font-size: 14px; font-weight: 600; }
.login-card .cf-turnstile { display: flex; justify-content: center; width: 100%; margin-top: 6px; }
.login-card .button { width: 100%; margin-top: 5px; }
.login-status { min-height: 21px; margin: 0; text-align: center; font-size: 14px; font-weight: 600; }
.login-status.error { color: #c73838; }
.login-status.success { color: #5d9f17; }
.login-status.rate-limited { background: #fff2f2; border: 1px solid #fecaca; border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.5; color: #b91c1c; }
.login-status.rate-limited span { font-weight: 700; color: #991b1b; }
.demo-credential { display: grid; gap: 4px; padding: 15px; margin-top: 18px; border-radius: 12px; color: #51608a; background: var(--soft); font-size: 13px; }
.demo-credential strong { color: var(--ink); }
.demo-credential code { padding: 2px 6px; border-radius: 4px; color: var(--blue-dark); background: #fff; }

/* Dashboard Admin */
.admin-page { min-height: 100vh; background: #f2f5fb; }
.admin-header { position: sticky; top: 0; z-index: 50; display: flex; min-height: 76px; padding: 10px max(24px, calc((100vw - 1320px) / 2)); align-items: center; justify-content: space-between; gap: 20px; background: #fff; box-shadow: 0 4px 18px rgba(35,55,122,.08); }
.admin-header > a { display: flex; align-items: center; gap: 12px; }
.admin-header img { width: 66px; height: 56px; object-fit: contain; }
.admin-header span { display: grid; line-height: 1.2; }
.admin-header small { color: var(--muted); font-size: 13px; }
.admin-header > div { display: flex; align-items: center; gap: 13px; }
.admin-site-link { font-size: 14px; font-weight: 600; }
.admin-main { width: min(1320px, calc(100% - 40px)); padding: 42px 0 70px; margin: auto; }
.admin-welcome { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 28px; margin-bottom: 30px; }
.admin-welcome h1 { margin: 14px 0 2px; font-size: clamp(30px, 4vw, 46px); line-height: 1.2; }
.admin-welcome p { margin: 0; color: var(--muted); font-size: 16px; }
.admin-stats { display: grid; grid-template-columns: repeat(5, 116px); gap: 10px; }
.admin-stat { display: grid; min-width: 0; min-height: 88px; padding: 12px 10px; place-content: center; border-radius: 14px; color: #fff; text-align: center; background: var(--blue); box-shadow: 0 10px 22px rgba(42,61,126,.16); }
.admin-stat--green { background: var(--green); }
.admin-stat--dark { background: var(--blue-dark); }
.admin-stat strong { font-size: 28px; line-height: 1; }
.admin-stat span { margin-top: 7px; font-size: 11px; line-height: 1.25; }

/* Tabs Navigation */
.admin-tabs { display: inline-flex; gap: 5px; padding: 5px; margin-bottom: 24px; border-radius: 14px; background: #e4e9f3; flex-wrap: wrap; }
.admin-tabs button { padding: 10px 20px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: .2s; }
.admin-tabs button.active { color: #fff; background: var(--blue); box-shadow: 0 7px 15px rgba(46,67,152,.2); }
.admin-tabs .badge { display: inline-block; padding: 2px 7px; margin-left: 6px; border-radius: 999px; background: #c73838; color: #fff; font-size: 12px; font-weight: 800; }

/* Layout Grid & Panels */
.admin-grid { display: grid; grid-template-columns: 420px minmax(0, 1fr); align-items: start; gap: 28px; }
.admin-editor, .admin-library { padding: 26px; border-radius: 22px; background: #fff; box-shadow: 0 15px 35px rgba(43,62,125,.12); }
.admin-editor { position: sticky; top: 100px; }
.admin-panel-heading h2 { margin: 0; font-size: 21px; }
.admin-panel-heading p { margin: 3px 0 22px; color: var(--muted); font-size: 13px; }
.admin-editor form { display: grid; gap: 15px; }

/* Upload area & preview */
.admin-image-preview { overflow: hidden; border: 1px solid #d8dfed; border-radius: 13px; background: var(--soft); margin-top: 5px; }
.admin-image-preview img { width: 100%; height: 160px; object-fit: cover; }
.admin-image-preview small { display: block; padding: 6px 10px; color: var(--muted); font-size: 12px; }
.admin-form-status { min-height: 22px; margin: 2px 0 0; font-size: 13px; font-weight: 700; line-height: 1.5; }
.admin-form-status:empty { display: none; }
.admin-form-status.error { padding: 11px 13px; border: 1px solid #fecaca; border-radius: 10px; color: #b91c1c; background: #fff2f2; }
.admin-form-status.success { color: #4f8318; }
.admin-editor .field-invalid, .rich-editor__canvas.field-invalid { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,.12); }
.admin-homepage-panel { display: grid; gap: 28px; }
.admin-homepage-hero { padding: 26px; }
.homepage-hero-form { display: grid; grid-template-columns: minmax(0, .85fr) minmax(320px, 1.15fr); align-items: start; gap: 28px; }
.homepage-hero-form > div:first-child { display: grid; gap: 14px; }
.admin-image-preview--hero { margin: 0; }
.admin-image-preview--hero img { height: 280px; }
.admin-homepage-partners { margin-top: 0; }
.admin-logo-preview img { object-fit: contain; padding: 12px; }
.admin-content-item.inactive { opacity: .58; }
.file-upload-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.file-upload-row input[type="file"] { display: none; }
.file-upload-btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 14px; border-radius: 8px; border: 1px dashed var(--blue); background: var(--soft); color: var(--blue); font-size: 13px; font-weight: 700; cursor: pointer; }
.file-upload-btn:hover { background: #dce7fa; }
.upload-status { font-size: 13px; color: var(--muted); }
.admin-gallery-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(125px, 1fr)); gap: 12px; }
.admin-gallery-preview:empty { display: none; }
.admin-gallery-preview__item { position: relative; overflow: hidden; margin: 0; border: 1px solid #d8dfed; border-radius: 12px; background: var(--soft); }
.admin-gallery-preview__item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.admin-gallery-preview__item button { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: rgba(180,35,24,.9); font-size: 18px; line-height: 1; cursor: pointer; }
.admin-gallery-preview__item figcaption { overflow: hidden; padding: 6px 8px; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.rich-editor { overflow: hidden; border: 1px solid #aab5d0; border-radius: 14px; background: #fff; }
.rich-editor:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(134,203,53,.18); }
.rich-editor__toolbar { position: sticky; top: 0; z-index: 2; display: flex; gap: 5px; padding: 9px; flex-wrap: wrap; border-bottom: 1px solid #d8dfed; background: #f5f7fb; }
.rich-editor__toolbar button { min-width: 38px; min-height: 36px; padding: 7px 10px; border: 1px solid #cad2e4; border-radius: 8px; color: var(--blue); background: #fff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.rich-editor__toolbar button:hover, .rich-editor__toolbar button:focus-visible { border-color: var(--green); color: #497f12; }
.rich-editor__canvas { min-height: 420px; padding: 24px; outline: 0; color: #35436b; font-size: 16px; font-weight: 400; line-height: 1.75; }
.rich-editor__canvas:empty::before { content: attr(data-placeholder); color: #8792ae; pointer-events: none; }
.rich-editor__canvas h2 { margin: 28px 0 10px; color: var(--ink); font-size: 28px; }
.rich-editor__canvas h3 { margin: 24px 0 8px; color: var(--ink); font-size: 22px; }
.rich-editor__canvas p { margin: 0 0 16px; }
.rich-editor__canvas blockquote { padding: 14px 18px; margin: 20px 0; border-left: 4px solid var(--green); background: #f1f8e9; }
.rich-editor__canvas figure { width: min(680px, 82%); margin: 24px auto; }
.rich-editor__canvas figure img { display: block; width: 100%; max-height: 480px; border-radius: 12px; object-fit: cover; }
.rich-editor__canvas figcaption { padding: 7px; color: var(--muted); font-size: 13px; text-align: center; }
.auto-summary-preview { padding: 14px 16px; border: 1px solid #d8dfed; border-radius: 12px; background: var(--soft); }
.auto-summary-preview strong { display: block; margin-bottom: 5px; color: var(--blue); font-size: 13px; }
.auto-summary-preview p { margin: 0; color: var(--muted); font-size: 13px; font-weight: 400; line-height: 1.55; }

/* Buttons & Actions */
.admin-form-actions { display: flex; align-items: center; gap: 10px; margin-top: 5px; }
.admin-form-actions .button { flex: 1; min-height: 44px; padding: 10px 16px; font-size: 14px; }
.admin-button { min-height: 36px; padding: 7px 14px; border: 0; border-radius: 9px; color: var(--ink); background: #edf1f8; font-size: 13px; font-weight: 700; cursor: pointer; transition: .2s; }
.admin-button:hover { filter: brightness(.96); }
.admin-button--edit { color: #fff; background: var(--blue); }
.admin-button--detail { color: #fff; background: var(--blue-dark); }
.admin-button--delete { color: #a72c2c; background: #ffe8e8; }
.admin-button--read { color: #2d8a1c; background: #e5f7e0; }
.admin-button--read:disabled { color: #667085; background: #edf1f5; cursor: default; filter: none; }

/* Items List */
.admin-content-item { display: grid; grid-template-columns: 145px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 14px 0; border-bottom: 1px solid #e4e9f2; }
.admin-content-item:first-child { padding-top: 0; }
.admin-content-item:last-child { padding-bottom: 0; border-bottom: 0; }
.admin-content-item > img { width: 145px; height: 100px; object-fit: cover; border-radius: 12px; }
.admin-content-item > img.admin-partner-logo { padding: 10px; border: 1px solid #e0e5ef; background: #fff; object-fit: contain; }
.admin-partner-placeholder { display: grid; width: 145px; height: 100px; place-items: center; border-radius: 12px; color: #fff; background: var(--blue); font-size: 34px; font-weight: 800; }
.admin-service-symbol { display: grid; width: 100px; height: 100px; place-items: center; border-radius: 18px; color: #fff; background: var(--blue); font-size: 34px; box-shadow: 0 10px 22px rgba(46,67,152,.2); }
.admin-service-symbol.green { background: var(--green); }
.service-admin-preview { display: flex; min-height: 84px; padding: 12px; align-items: center; gap: 15px; border: 1px solid #d8dfed; border-radius: 14px; background: var(--soft); }
.service-admin-preview .admin-service-symbol { flex: 0 0 58px; width: 58px; height: 58px; }
.service-admin-preview div { display: grid; }
.service-admin-preview small { color: var(--muted); font-size: 12px; }
.service-admin-preview strong { font-size: 15px; }
.admin-content-item__copy span { color: var(--green); font-size: 12px; font-weight: 600; }
.admin-content-item__copy h3 { margin: 4px 0; font-size: 17px; line-height: 1.4; }
.admin-content-item__copy p { display: -webkit-box; overflow: hidden; margin: 0; color: var(--muted); font-size: 13px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.admin-content-item__actions { display: grid; gap: 7px; }
.admin-empty { padding: 35px; border: 2px dashed #d6deed; border-radius: 14px; text-align: center; color: var(--muted); }

/* Messages styling */
.admin-inbox-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid #e4e9f2; flex-wrap: wrap; }
.admin-inbox-filters { display: inline-flex; gap: 6px; padding: 4px; border-radius: 12px; background: #edf1f8; flex-wrap: wrap; }
.admin-filter-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: .2s; }
.admin-filter-btn:hover { color: var(--ink); }
.admin-filter-btn.active { color: #fff; background: var(--blue); box-shadow: 0 4px 12px rgba(46,67,152,.2); }
.admin-filter-btn .filter-count { display: inline-block; padding: 1px 7px; border-radius: 999px; background: rgba(0,0,0,.08); font-size: 11px; font-weight: 800; }
.admin-filter-btn.active .filter-count { background: rgba(255,255,255,.25); color: #fff; }
.admin-filter-btn .filter-count--unread { background: #fde8e8; color: #b91c1c; }
.admin-filter-btn .filter-count--unread.zero { background: rgba(0,0,0,.08); color: inherit; }
.admin-filter-btn.active .filter-count--unread { background: #ef4444; color: #fff; }
.admin-inbox-sort { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.admin-inbox-sort label { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.admin-sort-select { padding: 8px 12px; border: 1px solid #c8d2e6; border-radius: 9px; background: #fff; color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; outline: none; transition: border-color .2s, box-shadow .2s; }
.admin-sort-select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(134,203,53,.18); }
.admin-message-item { padding: 18px; border: 1px solid #e4e9f2; border-radius: 14px; margin-bottom: 14px; background: #fff; transition: .2s; }
.admin-message-item.unread { border-left: 5px solid var(--green); background: #fbfdf9; }
.admin-message-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; flex-wrap: wrap; gap: 10px; }
.admin-message-header h3 { margin: 0; font-size: 17px; }
.admin-message-meta { font-size: 13px; color: var(--muted); display: flex; gap: 15px; flex-wrap: wrap; }
.admin-email-status { font-weight: 600; }
.admin-email-status--sent { color: #2d8a1c; }
.admin-email-status--failed { color: #b42318; }
.admin-email-status--not_configured { color: #9a6700; }
.admin-message-body { display: -webkit-box; overflow: hidden; padding: 12px 16px; margin: 10px 0; border-radius: 10px; color: #445; background: var(--soft); font-size: 14px; line-height: 1.6; cursor: pointer; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; transition: background .2s; }
.admin-message-body:hover { background: #e4ebf7; }
.admin-message-body:focus-visible { outline: 3px solid rgba(134,203,53,.45); outline-offset: 2px; }
.admin-message-actions { display: flex; gap: 10px; justify-content: flex-end; }

.admin-message-detail__panel { display: block; width: min(760px, 100%); }
.admin-message-detail__content { padding: 54px 48px 46px; }
.admin-message-detail__meta { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 24px; padding: 20px 0 24px; margin: 0 0 25px; border-bottom: 2px solid #dce7cc; font-size: 14px; }
.admin-message-detail__meta dt { color: var(--muted); font-weight: 700; }
.admin-message-detail__meta dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: var(--ink); }
.admin-message-detail__meta a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.admin-message-detail__content h3 { margin: 0 0 8px; font-size: 18px; }
.admin-message-detail__message { margin: 0; color: #445; font-size: 16px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Responsive */
@media (max-width: 1150px) {
  .admin-welcome { grid-template-columns: 1fr; align-items: start; }
  .admin-stats { grid-template-columns: repeat(5, minmax(100px, 1fr)); width: 100%; }
}

@media (max-width: 1050px) {
  .admin-grid { grid-template-columns: 360px minmax(0, 1fr); }
  .admin-content-item { grid-template-columns: 110px minmax(0, 1fr); }
  .admin-content-item > img { width: 110px; height: 85px; }
  .admin-partner-placeholder { width: 110px; height: 85px; }
  .admin-service-symbol { width: 85px; height: 85px; }
  .admin-content-item__actions { grid-column: 2; display: flex; }
}

@media (max-width: 820px) {
  .admin-grid { grid-template-columns: 1fr; }
  .admin-editor { position: static; }
  .homepage-hero-form { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .login-brand { position: static; margin-bottom: 20px; justify-self: start; }
  .login-shell { display: flex; padding-top: 24px; flex-direction: column; justify-content: center; }
  .login-card { padding: 26px 20px; }
  .admin-header { padding: 10px 14px; }
  .admin-header small, .admin-site-link { display: none; }
  .admin-main { width: calc(100% - 28px); padding-top: 28px; }
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-stat { width: auto; padding-inline: 12px; }
  .admin-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .admin-tabs { display: flex; }
  .admin-tabs button { flex: 1; text-align: center; }
  .admin-content-item { grid-template-columns: 82px minmax(0, 1fr); gap: 12px; }
  .admin-content-item > img { width: 82px; height: 75px; }
  .admin-content-item__actions { grid-column: 1 / -1; }
  .admin-message-actions { flex-wrap: wrap; }
  .admin-message-detail__content { padding: 48px 20px 30px; }
  .admin-message-detail__meta { grid-template-columns: 1fr; gap: 2px; }
  .admin-message-detail__meta dd { margin-bottom: 10px; }
  .admin-inbox-toolbar { flex-direction: column; align-items: stretch; gap: 12px; }
  .admin-inbox-filters { width: 100%; display: flex; }
  .admin-filter-btn { flex: 1; justify-content: center; padding: 7px 6px; font-size: 12px; }
  .admin-inbox-sort { margin-left: 0; justify-content: space-between; width: 100%; }
  .admin-sort-select { flex: 1; }
}

.editor-page {
  background: #f4f6fa;
  min-height: 100vh;
}

.editor-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 2px 12px rgba(15, 43, 70, 0.04);
}

.editor-topbar-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.editor-header-group {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.editor-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.editor-back-link {
  color: #475569;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  transition: color 0.2s, background-color 0.2s;
}

.editor-back-link:hover {
  color: #0f2b46;
  background: #f1f5f9;
}

.editor-header-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f2b46;
  margin: 0;
}

.editor-topbar .badge,
#editor-mode-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.4;
  text-decoration: none;
}

.admin-btn--primary {
  background: var(--blue, #2e4398);
  color: #fff;
  box-shadow: 0 4px 12px rgba(46, 67, 152, 0.2);
}

.admin-btn--primary:hover {
  background: var(--blue-dark, #053f78);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(46, 67, 152, 0.3);
}

.admin-btn--secondary {
  background: #fff;
  color: #475569;
  border-color: #cbd5e1;
}

.admin-btn--secondary:hover {
  background: #f8fafc;
  color: #1e293b;
  border-color: #94a3b8;
}

.editor-container {
  max-width: 1040px;
  margin: 32px auto;
  padding: 0 20px;
}

.editor-form {
  display: grid;
  gap: 0;
}

.editor-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(15, 43, 70, 0.04);
}

.editor-card-header {
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.editor-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f2b46;
  margin: 0 0 4px;
}

.editor-card-subtitle {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

.editor-field-group {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

.editor-field-group:last-child {
  margin-bottom: 0;
}

.editor-card label {
  display: grid;
  gap: 8px;
  color: #0f2b46;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 18px;
}

.editor-card label:last-child {
  margin-bottom: 0;
}

.editor-title-input {
  font-size: 26px;
  font-weight: 700;
  padding: 14px 18px;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  width: 100%;
  color: #0f2b46;
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.editor-title-input:focus {
  border-color: var(--blue, #2e4398);
  box-shadow: 0 0 0 4px rgba(46, 67, 152, 0.15);
}

.editor-metadata-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.editor-metadata-grid label {
  margin-bottom: 0;
}

.editor-card input:not(.editor-title-input),
.editor-card textarea,
.editor-card select {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  outline: none;
  color: #0f2b46;
  background: #fff;
  font: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.editor-card input:not(.editor-title-input):focus,
.editor-card textarea:focus,
.editor-card select:focus {
  border-color: var(--green, #86cb35);
  box-shadow: 0 0 0 3px rgba(134, 203, 53, 0.18);
}

.editor-card .rich-editor {
  margin-top: 6px;
}

.editor-card .rich-editor__canvas {
  min-height: 520px;
  padding: 28px;
  font-size: 16px;
  line-height: 1.8;
}

.editor-card .auto-summary-preview {
  margin-top: 16px;
}

.admin-status {
  min-height: 22px;
  margin: 16px 0 24px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.admin-status:empty {
  display: none;
}

.admin-status.error,
.admin-status.admin-form-status.error {
  padding: 14px 18px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  color: #b91c1c;
  background: #fff2f2;
}

.admin-status.success,
.admin-status.admin-form-status.success {
  padding: 14px 18px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  color: #166534;
  background: #f0fdf4;
}

@media (max-width: 900px) {
  .editor-metadata-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .editor-topbar {
    padding: 14px 20px;
  }

  .editor-card {
    padding: 24px;
  }
}

@media (max-width: 640px) {
  .editor-topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 12px 16px;
  }

  .editor-topbar-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .editor-topbar-right {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
  }

  .editor-topbar-right .admin-btn {
    flex: 1;
  }

  .editor-container {
    margin: 18px auto;
    padding: 0 12px;
  }

  .editor-card {
    padding: 20px 16px;
    border-radius: 16px;
    margin-bottom: 18px;
  }

  .editor-title-input {
    font-size: 20px;
    padding: 12px 14px;
  }

  .editor-card .rich-editor__canvas {
    min-height: 380px;
    padding: 16px;
  }
}

/* Pengaturan & Keamanan (Admin Settings Grid & Card Layout) */
.admin-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}

.admin-settings-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 4px 20px rgba(15, 43, 70, 0.04);
}

.admin-settings-card-header {
  margin-bottom: 4px;
}

.admin-settings-card-header h2,
.admin-settings-card-header h3,
.admin-settings-card-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f2b46;
  margin: 0 0 6px;
}

.admin-settings-card-header p,
.admin-settings-card-desc {
  color: #64748b;
  font-size: 13px;
  margin: 0 0 20px;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .admin-settings-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 640px) {
  .admin-settings-card {
    padding: 20px 16px;
    border-radius: 16px;
  }
}

.admin-settings-card .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.admin-settings-card label {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.admin-settings-card input[type="text"],
.admin-settings-card input[type="email"],
.admin-settings-card input[type="url"],
.admin-settings-card input[type="password"] {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
  color: #0f2b46;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-settings-card input[type="text"]:focus,
.admin-settings-card input[type="email"]:focus,
.admin-settings-card input[type="url"]:focus,
.admin-settings-card input[type="password"]:focus,
.admin-settings-card input:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
  outline: none;
}

.field-hint {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  margin-top: 4px;
}

.settings-fallback-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 14px;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.settings-fallback-box strong {
  display: block;
  font-size: 12px;
  color: #475569;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.settings-fallback-box p {
  margin: 0;
  font-size: 13px;
  color: #334155;
  line-height: 1.5;
}

.settings-fallback-box code {
  background: #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-family: monospace;
}

.settings-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .settings-actions {
    flex-direction: column;
  }
  .settings-actions .admin-btn {
    width: 100%;
  }
}

.admin-settings-card .login-status {
  min-height: 20px;
  margin: 16px 0 0;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.admin-settings-card .login-status.error {
  padding: 12px 16px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  color: #b91c1c;
  background: #fff2f2;
}

.admin-settings-card .login-status.success {
  padding: 12px 16px;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  color: #166534;
  background: #f0fdf4;
}


