/* INSPiER CRM — protected content manager */
.admin-header-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.admin-header-tools .header-login { color: var(--ink-soft); }

.content-manager {
    width: min(calc(100% - 40px), 1120px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 120px 0 76px;
}

.content-manager-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 28px; }
.content-manager-head h1 { margin-bottom: 8px; letter-spacing: -.045em; font-size: clamp(34px, 5vw, 52px); line-height: 1.15; }
.content-manager-head > div > p:last-child { margin: 0; color: var(--ink-soft); }
.content-manager-badge { flex: 0 0 auto; padding: 10px 14px; color: #176f5f; background: var(--mint-soft); border-radius: 999px; font-size: 11px; font-weight: 800; }

.content-manager-tabs { display: flex; gap: 8px; margin-bottom: 18px; padding: 6px; background: #e9edf5; border-radius: 14px; }
.content-manager-tabs button { flex: 1; padding: 12px; color: var(--ink-soft); background: transparent; border-radius: 10px; font-weight: 750; cursor: pointer; }
.content-manager-tabs button.active { color: var(--ink); background: #fff; box-shadow: 0 6px 18px rgba(20,36,76,.08); }

.content-editor-panel { padding: 30px; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-sm); }
.content-editor-panel[hidden] { display: none; }
.content-editor-panel-head { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.content-editor-panel-head h2 { margin-bottom: 6px; font-size: 22px; }
.content-editor-panel-head p { margin: 0; color: var(--muted); font-size: 12px; }
.content-editor-link { color: var(--blue); font-size: 12px; font-weight: 750; }

.content-form { display: grid; gap: 18px; }
.content-form > label,
.content-field { display: grid; gap: 7px; }
.content-form label > span,
.content-field > span { color: var(--ink-soft); font-size: 11px; font-weight: 750; }
.content-form input[type="text"],
.content-form select,
.content-form textarea,
.guide-step-editor input,
.guide-step-editor textarea {
    width: 100%;
    padding: 12px 13px;
    color: var(--ink);
    background: #fbfcfe;
    border: 1px solid #dfe4ed;
    border-radius: 10px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.content-form input:focus,
.content-form select:focus,
.content-form textarea:focus,
.guide-step-editor input:focus,
.guide-step-editor textarea:focus { border-color: rgba(65,111,255,.65); box-shadow: 0 0 0 3px rgba(65,111,255,.09); }
.content-form textarea,
.guide-step-editor textarea { resize: vertical; line-height: 1.7; }

.guide-editor-title-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; }
.guide-step-editor-list { display: grid; gap: 12px; }
.guide-step-editor {
    display: grid;
    grid-template-columns: 38px 150px minmax(180px, .8fr) minmax(250px, 1.4fr) 150px 34px;
    align-items: start;
    gap: 9px;
    padding: 13px;
    background: #f7f9fc;
    border: 1px solid #edf0f5;
    border-radius: 13px;
}
.guide-step-editor > b { display: grid; place-items: center; height: 40px; color: var(--blue); background: var(--surface-blue); border-radius: 9px; font-size: 10px; }
.guide-step-editor textarea { min-height: 70px; }
.guide-step-remove { display: grid; place-items: center; width: 34px; height: 40px; color: #b04d4d; background: #fff1f1; border-radius: 9px; cursor: pointer; }
.guide-step-add { justify-self: start; padding: 10px 14px; color: var(--blue); background: var(--surface-blue); border-radius: 9px; font-size: 11px; font-weight: 750; cursor: pointer; }

.content-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 4px; }
.content-form-status { min-height: 20px; margin: 0; color: var(--ink-soft); font-size: 11px; }
.content-form-status.error { color: #bd4545; }
.content-form-status.complete { color: #177c68; }

.notice-editor-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 20px; }
.notice-form-card { padding: 22px; background: #f7f9fc; border-radius: 16px; }
.notice-form-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.notice-pin { display: flex !important; align-items: center; align-self: end; gap: 8px !important; height: 44px; padding: 0 12px; background: #fff; border: 1px solid #dfe4ed; border-radius: 10px; white-space: nowrap; }
.notice-pin input { accent-color: var(--blue); }
.notice-manage-list { display: grid; align-content: start; gap: 9px; max-height: 620px; overflow: auto; }
.notice-manage-item { padding: 15px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.notice-manage-item-head { display: flex; align-items: center; gap: 8px; }
.notice-manage-item-head b { padding: 4px 7px; color: var(--blue); background: var(--surface-blue); border-radius: 6px; font-size: 8px; }
.notice-manage-item-head strong { flex: 1; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.notice-manage-item time { display: block; margin: 7px 0 10px; color: var(--muted); font-size: 9px; }
.notice-manage-actions { display: flex; gap: 6px; }
.notice-manage-actions button { padding: 6px 9px; color: var(--ink-soft); background: #f1f3f7; border-radius: 7px; font-size: 9px; font-weight: 750; cursor: pointer; }
.notice-manage-actions button:last-child { color: #ad4444; background: #fff0f0; }

.member-content-permission { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; margin: -1px -4px 3px; padding: 12px 14px; background: #eef3ff; border-radius: 11px; }
.member-content-permission > div { flex: 1; }
.member-content-permission strong { display: block; font-size: 10px; }
.member-content-permission small { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; }
.member-content-permission select { width: 130px; height: 34px; padding: 0 9px; background: #fff; border: 1px solid #d9e0ef; border-radius: 8px; font-size: 9px; }
.member-content-permission button { height: 34px; padding: 0 12px; color: #fff; background: var(--navy-900); border-radius: 8px; font-size: 9px; font-weight: 750; cursor: pointer; }

.content-edit-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    color: #fff;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}
.content-edit-link svg { width: 15px; height: 15px; }

@media (max-width: 900px) {
    .guide-editor-title-grid,
    .notice-editor-grid { grid-template-columns: 1fr; }
    .guide-step-editor { grid-template-columns: 38px 1fr 1fr 34px; }
    .guide-step-editor textarea { grid-column: 2 / 4; }
    .guide-step-editor [data-step-note] { grid-column: 2 / 4; }
    .guide-step-remove { grid-column: 4; grid-row: 1; }
}

@media (max-width: 680px) {
    .content-manager { width: min(calc(100% - 28px), 1120px); padding-top: 102px; }
    .content-manager-head { display: block; }
    .content-manager-badge { display: inline-flex; margin-top: 16px; }
    .content-editor-panel { padding: 20px 16px; }
    .content-editor-panel-head { display: block; }
    .content-editor-link { display: inline-flex; margin-top: 9px; }
    .guide-step-editor { grid-template-columns: 34px 1fr 34px; }
    .guide-step-editor [data-step-kicker],
    .guide-step-editor [data-step-title],
    .guide-step-editor textarea,
    .guide-step-editor [data-step-note] { grid-column: 2 / 4; }
    .guide-step-remove { grid-column: 3; grid-row: 1; }
    .content-form-actions { align-items: stretch; flex-direction: column; }
    .content-form-actions .button { width: 100%; }
    .member-content-permission { align-items: stretch; flex-direction: column; }
    .member-content-permission select,
    .member-content-permission button { width: 100%; }
}
