html, body {
  height: 100%;
  margin: 0;
}
body {
  overflow: hidden;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: #ffffff;
  color: #111827;
}

.app {
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  background-color: white;
  border-bottom: 15px solid rgb(0, 57, 131);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  position: relative;
}

.topbar .title {
  font-size: 24px;
  font-weight: 700;
  margin-right: auto;
}

.topbar .subtitle {
  font-size: 14px;
  color: #6b7280;
}

.topSearch {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.topSearchBox {
  display: flex;
  align-items: center;

  background: #ffffff;
  border: 3px solid rgb(0, 57, 131);
  /* border-radius: 999px; */
  overflow: hidden;
}

.topSearchSelect {
  border: none;
  background: #f3f4f6;
  padding: 10px 12px;
  font-size: 14px;
  color: #111827;
  cursor: pointer;
}

.topSearchSelect:focus {
  outline: none;
}

.topSearchInput {
  border: none;
  background: #ffffff;
  padding: 10px 14px;
  width: 360px;
  font-size: 14px;
  outline: none;
}

.topSearchInput:focus {
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.45);
}

.topSearchBtn {
  border: none;
  background: rgb(0, 57, 131);
  color: #ffffff;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  align-self: stretch;
  white-space: nowrap;
}

.topSearchBtn:hover {
  filter: brightness(1.05);
}

@media (max-width: 768px) {
  .topSearch {
    position: static;
    transform: none;
    margin-left: auto;
  }
  .topSearchInput {
    width: 180px;
  }
}

.mainRoot {
  min-height: 0;
}

.hidden {
  display: none !important;
}

button {
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #4b5563;
}
button:disabled {
  cursor: default;
  opacity: 0.6;
}

.btn-primary {
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  background: #2563eb;
  color: white;
}
.btn-primary:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.btn-ghost {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  color: #4b5563;
  background: transparent;
}
.btn-ghost:hover {
  background: #f3f4f6;
}

.btn-tag {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #4b5563;
}
.btn-tag.active {
  background: #111827;
  color: #f9fafb;
  border-color: #111827;
}
.btn-tag:not(.active):hover {
  background: #e5e7eb;
}

#homeView {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  text-align: center;
}

#resultsView {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  /* padding: 8px 4px 0; */
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background-color: rgb(170, 196, 230);
  padding-left: 24px;
  padding-right: 24px;
  padding-top: 12px;
  padding-bottom: 12px;
  height: 60px;
}

.results-title {
  font-size: 16px;
  font-weight: 600;
}

.results-meta {
  font-size: 13px;
  color: #6b7280;
  margin-top: 2px;
}

.results-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
}

.mainGrid {
  min-height: 0;
  height: 100%;
  display: flex;
}

.leftPane {
  resize: none;
  min-height: 0;
  overflow-x: hidden;
  border-right: none;
  width: 300px;
  min-width: 150px;
  max-width: 450vw;
}

.rightPane {
  min-height: 0;
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.viewerHead {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e5e5;
  font-size: 13px;
  color: #444;
}

#viewerFrame {
  flex: 1;
  width: 100%;
  border: 0;
}

.table-wrapper {
  min-height: 0;
  border: none;
  border-radius: 0;
  overflow: visible;
  background: transparent;
}

.resultTable {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
}

th,
td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  font-weight: 600;
  color: #4b5563;
  font-size: 13px;
}

tbody tr:nth-child(even) {
  background: #f9fafb;
}

tbody tr:hover {
  background: #eff6ff;
  cursor: pointer;
}

tbody tr.active {
  background: #dbeafe;
}

.td-title {
  white-space: nowrap;
  overflow: hidden;
}

.previewTitle {
  font-size: 14px;
  color: #111827;
  line-height: 1;
  overflow: hidden;
  white-space: nowrap;
}

.previewSubtitle {
  margin-top: 4px;
  font-size: 12px;
  color: #2086d5;
  line-height: 1;
  overflow: hidden;
  white-space: nowrap;
}

.empty-row td {
  text-align: center;
  font-size: 13px;
}

.resize-handle {
  width: 10px;
  cursor: col-resize;
  flex: 0 0 10px;
  position: relative;
  z-index: 9999;
  background: transparent;
}

.resize-handle::before {
  content: "";
  position: absolute;
  top: 0;
  left: 4px;
  width: 2px;
  height: 100%;
  background: rgba(37, 99, 235, 0.35);
}

.resize-handle:hover::before {
  background: rgba(37, 99, 235, 0.7);
}

body.resizing {
  cursor: col-resize;
  user-select: none;
}

.noticeBoard {
  margin: 0 auto;
  padding: 56px 24px 70px;
}

.noticeHeader {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.noticeTitle {
  padding-left: 20px;
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.2px;
}

.noticeDesc {
  margin: 8px 0 0;
  color: #667085;
  font-size: 13px;
}

.noticeCard {
  background: #fff;
  border: 1px solid #e5e9f0;
  border-radius: 12px;
  overflow: hidden;
  width: 60vw;
  height: 100%;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.noticeToolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #eef1f6;
  background: #fafbfd;
}

.noticeCount {
  font-size: 12px;
  color: #667085;
}

.noticeSearch {
  width: min(340px, 60%);
}

.noticeSearchInput {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #d7deea;
  border-radius: 10px;
  font-size: 13px;
  outline: none;
}

.noticeSearchInput:focus {
  border-color: #2b5fd8;
}

.noticeTable {
  width: 100%;
  border-collapse: collapse;
}

.noticeTable thead th {
  text-align: left;
  font-size: 12px;
  color: #667085;
  font-weight: 600;
  padding: 12px 16px;
  background: #ffffff;
  border-bottom: 1px solid #eef1f6;
}

.noticeTable tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f3f8;
  vertical-align: top;
}

.noticeRow {
  cursor: pointer;
}

.noticeRow:hover {
  background: #f7f9fc;
}

.noticeId {
  color: #667085;
  font-size: 12px;
  white-space: nowrap;
}

.noticeDate {
  color: #667085;
  font-size: 12px;
  white-space: nowrap;
}

.noticeSubject {
  color: #111827;
  font-size: 14px;
  line-height: 1.35;
}

.noticeEmpty {
  padding: 22px 16px;
  color: #667085;
  font-size: 13px;
  text-align: center;
}

.hidden {
  display: none !important;
}

.noticeModal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.noticeModalBackdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
}

.noticeModalBox {
  position: relative;
  margin: 8vh auto 0;
  width: min(760px, calc(100% - 32px));
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.noticeModalHead {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px 16px 12px;
  border-bottom: 1px solid #eef1f6;
}

.noticeModalTitle {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.noticeModalClose {
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 6px 8px;
}

.noticeModalMeta {
  padding: 10px 16px 0;
  font-size: 12px;
  color: #667085;
}

.noticeModalBody {
  padding: 14px 16px 18px 24px;
  font-size: 14px;
  color: #1f2937;
  line-height: 2.0;
  white-space: pre-wrap;
  text-align: left;
}