/* ARUN Shared Notice Board & Modal Stylesheet */

/* Shared dashboard widget-card container (reused by notice, message, and future hub widgets) */
.dashboard-card, .portal-notice-card, .notice-card { grid-column: 1/-1; overflow: hidden; border: 1px solid var(--line, #dfe3e8); border-radius: 11px; background: #fff; }
.dashboard-card .card-heading, .portal-notice-card > header, .notice-card .card-heading { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; }
.dashboard-card .card-heading h2, .portal-notice-card h2, .notice-card h2 { margin: 2px 0 0; font-size: 15px; font-weight: 700; }
.dashboard-card .card-heading h2 span, .portal-notice-card h2 span, .notice-card h2 span { color: var(--muted, #66717f); font-size: 11px; }
.dashboard-card .card-heading > div { display: flex; align-items: center; gap: 8px; }
.portal-notice-card header small, .notice-card header small { color: #f97316; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.portal-notice-card > header button, .notice-create-button, .dashboard-card-action { padding: 6px 10px; border: 1px solid #fed7aa; border-radius: 6px; color: #c2410c; background: #fff7ed; font-size: 11px; font-weight: 750; text-decoration: none; cursor: pointer; }
.portal-notice-card > header button:hover, .notice-create-button:hover, .dashboard-card-action:hover { border-color: #fb923c; background: #ffedd5; }
.dashboard-card-action.accent-blue { border-color: #bfdbfe; color: #1d4ed8; background: #eff6ff; }
.dashboard-card-action.accent-blue:hover { border-color: #93c5fd; background: #dbeafe; }

.portal-notice-head, .notice-board-head { display: grid; grid-template-columns: 55px 75px minmax(180px, 1fr) 120px 100px; align-items: center; text-align: center; min-height: 34px; border-block: 1px solid var(--line, #dfe3e8); background: #f8fafc; color: var(--muted, #66717f); font-size: 10px; font-weight: 750; }
.portal-notice-row, .notice-board-row { display: grid; grid-template-columns: 55px 75px minmax(180px, 1fr) 120px 100px; align-items: center; width: 100%; min-height: 36px; padding: 0; border: 0; border-bottom: 1px solid #eef2f7; background: #fff; color: inherit; font-size: 12px; text-align: center; cursor: pointer; }
.portal-notice-row:hover, .notice-board-row:hover { background: #fffaf5; }
.portal-notice-row strong, .notice-board-row strong { overflow: hidden; text-align: left; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.portal-notice-row span, .notice-board-row span { font-size: 11px; }
.portal-notice-row em, .notice-board-row em, .notice-kind { display: inline-flex; align-items: center; justify-content: center; padding: 2px 6px; border-radius: 99px; background: #fff1e6; color: #c2410c; font-size: 9px; font-style: normal; font-weight: 800; }
.notice-kind.chat { background: #f1f5f9; color: #475569; }
.notice-kind.approval { background: #fff1e6; color: #c2410c; }
.portal-notice-list > .muted, .notice-board-list > .no-db { padding: 14px 18px; color: #64748b; font-size: 11px; }

/* Notice Modals */
.notice-create-modal, .notice-view-modal, .portal-board-modal { color: #172033; border: 0; border-radius: 14px; box-shadow: 0 24px 70px rgb(15 23 42 / 28%); overflow: hidden; width: min(90vw, 1200px); }
.notice-create-modal::backdrop, .notice-view-modal::backdrop, .portal-board-modal::backdrop { background: rgb(15 23 42 / 52%); backdrop-filter: blur(2px); }
.notice-create-modal .board-editor, .notice-view-modal .board-viewer { background: #f6f8fb; }

.board-viewer-header, .board-editor-header { display: flex; height: 52px; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid #dbe2ea; background: #fff; }
.board-viewer-header > strong, .board-editor-header > strong { color: #172033; font-size: 14px; letter-spacing: -.2px; }
.board-viewer-header > div { display: flex; align-items: center; gap: 6px; }
.board-viewer-header button, .board-editor-header button { display: grid; width: 30px; height: 30px; place-items: center; color: #64748b; border: 0; border-radius: 50%; background: transparent; font-size: 18px; line-height: 1; cursor: pointer; }
.board-viewer-header button:hover, .board-editor-header button:hover { color: #0f172a; background: #eef2f7; }
.board-viewer-header .board-manage-button { height: 28px; width: auto; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 10px; font-weight: 700; cursor: pointer; }
.board-viewer-header .board-manage-button:hover { border-color: #94a3b8; background: #f8fafc; }
.board-viewer-header .board-manage-button.danger { color: #b91c1c; border-color: #fecaca; }
.board-viewer-header .board-manage-button.danger:hover { color: #b91c1c; border-color: #fca5a5; background: #fef2f2; }

.notice-view-modal .board-viewer-content { width: 100%; margin: 0 auto; padding: 20px; }
.notice-view-modal .board-view-title { display: flex; align-items: center; gap: 9px; padding: 10px 4px 11px; border-bottom: 1px solid #cbd5e1; }
.notice-view-modal .board-view-title h2 { margin: 0; color: #172033; font-size: 17px; letter-spacing: -.25px; }
.notice-view-modal .board-view-meta { padding: 8px 4px; color: #64748b; font-size: 11px; }
.notice-view-modal .board-view-body { min-height: 200px; padding: 16px 6px; border-top: 1px solid #eef2f7; border-bottom: 1px solid #dbe2ea; background: #fff; font-size: 12px; line-height: 1.75; white-space: pre-wrap; }
.board-view-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 4px 0; }
.board-icon-button { display: grid; width: 32px; height: 32px; place-items: center; color: #475569; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; cursor: pointer; }
.board-icon-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.board-icon-button:hover { border-color: #94a3b8; background: #f8fafc; }
.board-icon-button.danger { color: #b91c1c; border-color: #fecaca; }
.board-icon-button.danger:hover { border-color: #fca5a5; background: #fef2f2; }

/* Notice Comments */
.notice-comments { margin-top: 18px; border-top: 1px solid #cbd5e1; padding-top: 14px; }
.notice-comments > header { display: flex; gap: 6px; margin-bottom: 10px; font-size: 12px; font-weight: 700; }
.notice-comment { display: grid; grid-template-columns: 90px minmax(0, 1fr) 88px; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid #eef2f7; font-size: 11px; }
.notice-comment.reply { padding-left: 20px; }
.notice-comment strong { overflow: hidden; color: #334155; text-overflow: ellipsis; white-space: nowrap; }
.notice-comment span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-comment time { overflow: hidden; flex-shrink: 0; color: #94a3b8; font-size: 10px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.notice-comments form { display: flex; gap: 8px; margin-top: 12px; }
.notice-comments textarea { flex: 1; min-height: 54px; padding: 8px; border: 1px solid #b8c2cf; border-radius: 7px; background: #fff; font: inherit; font-size: 11px; resize: vertical; }
.notice-comments button { flex: 0 0 auto; width: auto; padding: 8px 14px; border: 1px solid var(--arun-primary, #2563eb); border-radius: 7px; color: #fff; background: var(--arun-primary, #2563eb); font-size: 11px; font-weight: 700; cursor: pointer; }
.notice-comments button:hover { opacity: .9; }

/* Notice Editor */
.notice-create-modal .board-editor-content { padding: 18px; }
.notice-create-modal .board-form-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); border: 1px solid #dbe2ea; border-bottom: 0; background: #fff; }
.notice-create-modal .board-form-row:first-child { border-radius: 9px 9px 0 0; }
.notice-create-modal .board-form-row:last-child { border-bottom: 1px solid #dbe2ea; border-radius: 0 0 9px 9px; }
.notice-create-modal .board-form-row > label, .notice-create-modal .board-field-label { display: flex; align-items: center; justify-content: center; min-height: 44px; color: #475569; border-right: 1px solid #e2e8f0; background: #f8fafc; font-size: 10px; font-weight: 700; }
.notice-create-modal .board-form-row > input { padding: 0 10px; border: 0; font: inherit; font-size: 12px; }
.notice-create-modal .board-body-row { min-height: 240px; }
.notice-create-modal .board-rich-editor { padding: 10px; min-height: 220px; }
.notice-create-modal .board-post-options { display: flex; align-items: center; gap: 14px; padding: 7px 10px; }
.notice-create-modal .board-post-options > label { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 0 10px; border: 1px solid #dbe2ea; border-radius: 15px; background: #f8fafc; font-size: 11px; cursor: pointer; }
.notice-create-modal .board-attach-content { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 7px 10px; }
.notice-create-modal .notice-attach-button { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border: 1px solid #dbe2ea; border-radius: 15px; background: #f8fafc; color: #334155; font-size: 11px; font-weight: 700; cursor: pointer; }
.notice-create-modal .notice-attach-button:hover { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }
.notice-create-modal .board-attach-help { color: #94a3b8; font-size: 10px; }
.notice-create-modal .board-attach-content ul { display: flex; flex-basis: 100%; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.notice-create-modal .board-editor-footer { display: flex; align-items: center; justify-content: flex-end; height: 52px; padding: 0 18px; border-top: 1px solid #dbe2ea; background: #fff; }
.notice-create-modal .board-editor-footer .primary { width: auto; min-width: 76px; height: 32px; border: 0; border-radius: 6px; color: #fff; background: var(--arun-primary, #2563eb); font-size: 11px; font-weight: 700; cursor: pointer; }
.notice-create-modal .board-editor-footer .primary:hover { opacity: .9; }

@media(max-width: 650px) {
  .portal-notice-head, .portal-notice-row, .notice-board-head, .notice-board-row { grid-template-columns: 38px 60px minmax(130px, 1fr) 75px; }
  .portal-notice-head span:last-child, .portal-notice-row time, .notice-board-head span:last-child, .notice-board-row time { display: none; }
  .notice-create-modal, .notice-view-modal { width: 96vw; }
  .notice-create-modal .board-editor-content, .notice-view-modal .board-viewer-content { padding: 10px; }
}