/* ═══════════════════════════
   NOTICE — Google Workspace
═══════════════════════════ */
.notice-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 16px;
  width: 100%;
  height: 100%;
  min-height: 0;
  align-items: start;
  flex: 1;
}

/* LIST PANEL */
.notice-list-panel {
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(60,64,67,.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: sticky;
  top: 0;
  height: 100%;
}

.notice-list-header {
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.notice-list-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.notice-list-title {
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.1px;
}

.notice-write-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 2px rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
  letter-spacing: 0.2px;
}

.notice-write-btn:hover {
  background: var(--primary-hover);
  box-shadow: 0 1px 3px rgba(60,64,67,.3), 0 4px 8px rgba(60,64,67,.15);
}

.notice-write-btn svg { width: 14px; height: 14px; }

/* Search */
.notice-search-wrap { position: relative; }

.notice-search-wrap svg {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  color: var(--muted);
  pointer-events: none;
}

.notice-search {
  width: 100%;
  padding: 8px 10px 8px 30px;
  border: 1px solid var(--border);
  border-radius: 24px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: all 0.2s var(--ease);
}

.notice-search:focus {
  border-color: var(--primary);
  border-width: 2px;
  background: var(--bg-secondary);
  box-shadow: none;
}

/* Notice list scroll */
.notice-list-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  max-height: calc(100vh - 200px);
}

.notice-list-scroll::-webkit-scrollbar { width: 4px; }
.notice-list-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* Notice item */
.notice-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 10px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.12s;
  margin-bottom: 2px;
}

.notice-item:hover { background: var(--bg); }
.notice-item.active { background: var(--primary-light); border-color: transparent; }

.notice-item-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.notice-pin-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 99px;
  background: #fce8e6;
  color: #c5221f;
  flex-shrink: 0;
}

.notice-pin-badge svg { width: 9px; height: 9px; }

.notice-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.notice-item.active .notice-item-title { color: var(--primary); }

.notice-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.notice-item-date, .notice-item-author, .notice-item-attach {
  display: flex; align-items: center; gap: 3px;
}

.notice-item-date svg, .notice-item-author svg, .notice-item-attach svg { width: 10px; height: 10px; }
.notice-item-attach { color: var(--primary); font-weight: 500; }

.notice-list-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; padding: 48px 16px; color: var(--muted);
}
.notice-list-empty svg { opacity: 0.35; }
.notice-list-empty p { font-size: 12px; }

/* DETAIL PANEL */
.notice-detail-panel {
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(60,64,67,.15);
  min-height: 480px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.notice-detail-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px; padding: 60px 24px; color: var(--muted);
}
.notice-detail-empty svg { opacity: 0.3; }
.notice-detail-empty p { font-size: 13px; text-align: center; }

.notice-detail-content {
  display: flex; flex-direction: column; flex: 1;
  animation: noticeSlideIn 0.15s var(--ease);
}

@keyframes noticeSlideIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.notice-detail-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.notice-detail-badges {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px; flex-wrap: wrap;
}

.badge-pinned {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 99px;
  background: #fce8e6; color: #c5221f;
}
.badge-pinned svg { width: 11px; height: 11px; }

.notice-detail-title {
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 12px;
}

.notice-detail-meta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}

.notice-meta-item {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--muted);
}
.notice-meta-item svg { width: 13px; height: 13px; }

.notice-detail-body {
  padding: 24px; flex: 1;
  font-size: 14px; line-height: 1.8;
  color: var(--text); white-space: pre-wrap; word-break: break-word;
}

.notice-detail-actions {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
}

.notice-action-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 13px; font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.notice-action-btn:hover { background: var(--bg); border-color: var(--text-secondary); color: var(--text); }
.notice-action-btn.pin-btn.active { background: #fce8e6; border-color: rgba(197,34,31,.3); color: #c5221f; }
.notice-action-btn.edit-btn:hover { background: var(--primary-light); border-color: var(--primary-border); color: var(--primary); }
.notice-action-btn.delete-btn:hover { background: #fce8e6; border-color: rgba(197,34,31,.25); color: #c5221f; }
.notice-action-btn svg { width: 14px; height: 14px; }

/* MODAL */
.notice-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(32,33,36,0.4);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: overlayFade 0.2s var(--ease);
}
@keyframes overlayFade { from { opacity: 0; } to { opacity: 1; } }

.notice-modal {
  background: var(--bg-secondary);
  border-radius: 8px;
  width: 100%; max-width: 580px; max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 38px 3px rgba(0,0,0,.14), 0 9px 46px 8px rgba(0,0,0,.12), 0 11px 15px -7px rgba(0,0,0,.2);
  animation: modalSlide 0.2s var(--ease);
  overflow: hidden;
}
@keyframes modalSlide {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.notice-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.notice-modal-title { font-size: 16px; font-weight: 400; color: var(--text); }

.notice-modal-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: transparent; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); transition: background 0.15s;
}
.notice-modal-close:hover { background: var(--bg); color: var(--text); }

.notice-modal-body {
  padding: 20px 22px;
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 16px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); }

.form-input, .form-textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit; font-size: 14px;
  color: var(--text); background: var(--bg-secondary);
  outline: none; resize: none;
  transition: border-color 0.2s;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--primary); border-width: 2px;
}
.form-textarea { min-height: 200px; line-height: 1.7; }

.form-pin-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--border);
  cursor: pointer; user-select: none; transition: all 0.15s;
}
.form-pin-row:hover { border-color: var(--primary-border); background: var(--primary-light); }
.form-pin-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.form-pin-label { font-size: 13px; font-weight: 500; color: var(--text); cursor: pointer; }
.form-pin-desc  { font-size: 12px; color: var(--muted); margin-left: auto; }

.notice-modal-footer {
  padding: 12px 22px 18px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
  flex-shrink: 0;
}

.modal-btn {
  padding: 8px 20px;
  border-radius: 4px;
  font-size: 14px; font-weight: 500;
  font-family: inherit; cursor: pointer;
  transition: all 0.15s; border: 1px solid var(--border);
}

.modal-btn.cancel { background: var(--bg-secondary); color: var(--primary); border-color: transparent; }
.modal-btn.cancel:hover { background: var(--primary-light); }
.modal-btn.submit {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: 0 1px 2px rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
}
.modal-btn.submit:hover { background: var(--primary-hover); }

/* Attachment */
.form-attach-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; display: block; }
.form-dropzone {
  border: 2px dashed var(--border);
  border-radius: 8px; padding: 18px 16px;
  text-align: center; cursor: pointer;
  transition: all 0.15s; background: var(--bg); position: relative;
}
.form-dropzone:hover, .form-dropzone.drag-over { border-color: var(--primary); background: var(--primary-light); }
.form-dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.form-dropzone-text { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.form-dropzone-sub  { font-size: 11px; color: var(--muted); margin-top: 3px; }

.form-attach-list { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.form-attach-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--border); font-size: 13px; color: var(--text);
}
.form-attach-item-icon { flex-shrink: 0; color: var(--primary); display: flex; align-items: center; }
.form-attach-item-icon svg { width: 15px; height: 15px; }
.form-attach-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.form-attach-item-size { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.form-attach-item-del {
  width: 22px; height: 22px; border-radius: 50%; border: none;
  background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); transition: all 0.15s; padding: 0;
}
.form-attach-item-del:hover { background: #fce8e6; color: #c5221f; }
.form-attach-item-del svg { width: 12px; height: 12px; }

/* Attachment viewer */
.notice-detail-attach { padding: 0 24px 20px; border-top: 1px solid var(--border); }
.notice-detail-attach-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; color: var(--text-secondary);
  padding: 12px 0 8px;
}
.notice-detail-attach-title svg { width: 14px; height: 14px; color: var(--primary); }

.notice-attach-list { display: flex; flex-direction: column; gap: 5px; }
.notice-attach-file {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg);
  cursor: pointer; transition: all 0.15s; text-decoration: none;
}
.notice-attach-file:hover { border-color: var(--primary-border); background: var(--primary-light); }
.notice-attach-file-icon { flex-shrink: 0; color: var(--primary); display: flex; align-items: center; }
.notice-attach-file-icon svg { width: 16px; height: 16px; }
.notice-attach-file-info { flex: 1; min-width: 0; }
.notice-attach-file-name { font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notice-attach-file-size { font-size: 11px; color: var(--muted); margin-top: 1px; }
.notice-attach-download-icon { flex-shrink: 0; color: var(--muted); display: flex; align-items: center; transition: color 0.15s; }
.notice-attach-file:hover .notice-attach-download-icon { color: var(--primary); }
.notice-attach-download-icon svg { width: 15px; height: 15px; }

/* Confirm dialog */
.notice-confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(32,33,36,0.4);
  z-index: 600;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: overlayFade 0.15s var(--ease);
}
.notice-confirm-dialog {
  background: var(--bg-secondary);
  border-radius: 8px; padding: 28px 28px 22px;
  max-width: 360px; width: 100%;
  box-shadow: 0 24px 38px 3px rgba(0,0,0,.14), 0 9px 46px 8px rgba(0,0,0,.12);
  animation: modalSlide 0.18s var(--ease); text-align: center;
}
.confirm-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: #fce8e6;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px; color: #c5221f;
}
.confirm-icon svg { width: 24px; height: 24px; }
.confirm-title { font-size: 16px; font-weight: 400; color: var(--text); margin-bottom: 8px; }
.confirm-desc  { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 20px; }
.confirm-btns  { display: flex; gap: 8px; justify-content: center; }
.confirm-btn {
  padding: 9px 24px; border-radius: 4px;
  font-size: 14px; font-weight: 500;
  font-family: inherit; cursor: pointer;
  border: 1px solid transparent; transition: all 0.15s;
}
.confirm-btn.cancel { background: var(--bg-secondary); color: var(--primary); }
.confirm-btn.cancel:hover { background: var(--primary-light); }
.confirm-btn.danger { background: #c5221f; color: #fff; }
.confirm-btn.danger:hover { background: #a50e0e; box-shadow: 0 2px 6px rgba(197,34,31,.3); }

/* Toast */
.notice-toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%);
  background: #202124; color: #fff;
  padding: 10px 20px; border-radius: 4px;
  font-size: 13px; font-weight: 500; z-index: 9999;
  box-shadow: 0 3px 5px -1px rgba(0,0,0,.2), 0 6px 10px rgba(0,0,0,.14), 0 1px 18px rgba(0,0,0,.12);
  animation: toastIn .25s var(--ease), toastOut .3s var(--ease) 2s forwards;
  white-space: nowrap;
}
@keyframes toastIn  { from { opacity: 0; transform: translateX(-50%) translateY(12px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }

/* Responsive */
@media (max-width: 900px) { .notice-container { grid-template-columns: 1fr; } .notice-list-panel { position: static; } .notice-list-scroll { max-height: 320px; } }
@media (max-width: 480px) { .notice-detail-header { padding: 14px 14px 12px; } .notice-detail-body { padding: 14px; } }
