* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: #f5f7fb;
  color: #111827;
  font-family: Arial, "Malgun Gothic", "맑은 고딕", sans-serif;
}

body {
  min-height: 100vh;
}

.app {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.topbar h1 {
  margin: 0;
  font-size: 28px;
}

.sub {
  margin: 8px 0 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.6;
}

.ghost-btn {
  border: none;
  border-radius: 10px;
  background: #e5e7eb;
  color: #111827;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.filter-panel,
.list-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.filter-panel {
  padding: 16px;
  margin-bottom: 14px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.filter-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-grid span {
  font-size: 12px;
  color: #6b7280;
}

input,
select {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
}

.summary-row {
  display: grid;
  grid-template-columns: repeat(2, 180px);
  gap: 10px;
}

.summary-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fafafa;
  padding: 12px;
}

.summary-card .label {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
}

.summary-card .value {
  font-size: 22px;
  font-weight: 800;
}

.list-panel {
  padding: 16px;
}

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.table-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: auto;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.report-table th,
.report-table td {
  border-bottom: 1px solid #eef2f7;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.report-table thead th {
  position: sticky;
  top: 0;
  background: #f9fafb;
  z-index: 1;
  cursor: pointer;
  white-space: nowrap;
}

.report-table tbody tr:hover {
  background: #f8fbff;
}

.summary-cell {
  min-width: 420px;
  max-width: 680px;
  white-space: normal;
  line-height: 1.7;
  color: #374151;
  word-break: keep-all;
}

.open-btn {
  border: none;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  cursor: pointer;
}

.empty-row {
  text-align: center;
  color: #6b7280;
}

.sort-indicator {
  margin-left: 4px;
  color: #94a3b8;
  font-size: 11px;
}

.more-wrap {
  display: flex;
  justify-content: center;
  padding-top: 14px;
}

.more-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  cursor: pointer;
}

.action-btns {
  display: flex;
  gap: 8px;
  align-items: center;
}

.material-btn {
  border: none;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}


.open-btn,
.material-btn {
  min-width: 72px;
}

.modal.hidden {
  display: none;
}

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

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.modal-card {
  position: relative;
  width: min(820px, calc(100vw - 32px));
  max-height: calc(100vh - 60px);
  overflow: auto;
  margin: 30px auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  padding: 18px 20px;
}

.material-modal-card {
  width: min(900px, calc(100vw - 32px));
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-close {
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  padding: 8px 12px;
}

.material-meta {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 10px;
}

.material-content {
  font-size: 13px;
  line-height: 1.7;
}

.material-empty {
  padding: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
}

.material-item {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  background: #fff;
}

.material-lines {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.material-line {
  line-height: 1.7;
  color: #374151;
}

.material-time {
  color: #6b7280;
  font-size: 12px;
}

.action-btns {
  display: flex;
  gap: 8px;
  align-items: center;
}

.material-btn {
  border: none;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}

.open-btn {
  border: none;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  cursor: pointer;
}

.open-btn,
.material-btn {
  min-width: 72px;
}

.symbol-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.mini-link {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
  font-size: 11px;
  text-decoration: none;
  line-height: 1;
}

.mini-link:hover {
  border-color: #cbd5e1;
  color: #111827;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .topbar {
    flex-direction: column;
  }

  .filter-grid {
    grid-template-columns: 1fr;
  }

  .summary-row {
    grid-template-columns: 1fr 1fr;
  }

  .summary-cell {
    min-width: 260px;
  }
}

.pwa-nav {
  display: none;
  position: sticky;
  top: 0;
  z-index: 1000;
  gap: 8px;
  padding: 8px 12px;
  background: #0b1220;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.pwa-nav button {
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  background: #1f2a44;
  color: #fff;
  cursor: pointer;
}

/* Adsense/content friendly additions - copied to match normal case3612 layout */
html, body { overflow-x: hidden !important; overflow-y: auto !important; height: auto !important; min-height: 100% !important; }
.adsense-content { background:#0f172a; color:#e5e7eb; padding:24px 16px; }
.adsense-inner { max-width:1180px; margin:0 auto; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); border-radius:18px; padding:24px; box-shadow:0 16px 36px rgba(15,23,42,.16); }
.adsense-inner h2 { margin:0 0 10px; color:#fff; font-size:26px; }
.adsense-inner p { color:#cbd5e1; line-height:1.75; }
.content-label { color:#93c5fd !important; font-weight:800; font-size:13px; letter-spacing:.08em; text-transform:uppercase; margin:0 0 8px; }
.guide-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-top:18px; }
.guide-grid article { background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.1); border-radius:14px; padding:16px; }
.guide-grid h3 { margin:0 0 8px; color:#fff; font-size:17px; }
.ad-slot-inline { min-height:90px; border:1px dashed rgba(255,255,255,.22); border-radius:14px; margin-top:18px; display:flex; align-items:center; justify-content:center; color:#64748b; }
.legal-footer { background:#0f172a; color:#94a3b8; text-align:center; padding:24px 16px 40px; }
.legal-footer a { color:#cbd5e1; margin:0 8px; text-decoration:none; }
@media(max-width:900px){ .guide-grid{grid-template-columns:1fr}.adsense-inner{padding:18px}.adsense-inner h2{font-size:22px} }
