* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  background: #f5f7fb;
  color: #222;
}

a { text-decoration: none; color: inherit; }

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
}

.topbar {
  background: #1f4e79;
  color: #fff;
  padding: 14px 20px;
}

.topbar .inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar .menu a {
  color: #fff;
  margin-left: 14px;
  font-weight: bold;
}

.card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  margin-bottom: 20px;
}

h1, h2, h3 { margin-top: 0; }

.btn {
  display: inline-block;
  padding: 11px 16px;
  border-radius: 12px;
  background: #1f4e79;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
}

.btn:hover { opacity: 0.95; }

.btn.gray { background: #6c757d; }
.btn.green { background: #198754; }
.btn.red { background: #dc3545; }
.btn.orange { background: #fd7e14; }
.btn.small { padding: 7px 11px; font-size: 13px; }
.btn.big {
  padding: 14px 22px;
  font-size: 16px;
  border-radius: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th, td {
  border-bottom: 1px solid #e5e5e5;
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
}

th { background: #eef4fa; }

input[type=text],
input[type=date],
input[type=time],
input[type=password],
textarea,
select {
  width: 100%;
  padding: 11px;
  border: 1px solid #cfd8e3;
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
}

textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.6;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.row-box {
  border: 1px solid #dde5ee;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  background: #fafcff;
}

.notice {
  padding: 12px;
  background: #e8f4ff;
  border: 1px solid #b6d9ff;
  border-radius: 12px;
  margin-bottom: 16px;
}

.error {
  padding: 12px;
  background: #ffe8e8;
  border: 1px solid #ffb9b9;
  border-radius: 12px;
  margin-bottom: 16px;
}

.status {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: bold;
}

.status-준비중 { background: #fff3cd; color: #856404; }
.status-진행중 { background: #d1ecf1; color: #0c5460; }
.status-종료 { background: #d4edda; color: #155724; }
.status-대기 { background: #fff3cd; color: #856404; }
.status-완료 { background: #d4edda; color: #155724; }
.status-보류 { background: #f8d7da; color: #721c24; }

.badge {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 8px;
  background: #eef4fa;
  font-size: 12px;
}

.step-box {
  border: 2px dashed #b6c9de;
  padding: 14px;
  border-radius: 14px;
  margin-bottom: 15px;
  background: #fbfdff;
}

.meeting-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.flow-step {
  background: #f2f6fb;
  border: 1px solid #dbe5ef;
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  font-size: 14px;
  font-weight: bold;
}

.flow-step.active {
  background: #1f4e79;
  color: #fff;
  border-color: #1f4e79;
}

.flow-step.done {
  background: #d4edda;
  color: #155724;
  border-color: #b7e0c0;
}

.info-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.info-chip {
  background: #fff;
  border: 1px solid #dde5ee;
  border-radius: 14px;
  padding: 14px;
}

.info-chip .label {
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
}

.info-chip .value {
  font-size: 16px;
  font-weight: bold;
}

.agenda-hero {
  background: linear-gradient(135deg, #eef5fc 0%, #f9fcff 100%);
  border: 1px solid #d8e6f3;
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 20px;
}

.agenda-order {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: #1f4e79;
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 12px;
}

.agenda-hero h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.agenda-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.meta-item {
  background: #fff;
  border: 1px solid #dce7f2;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

.editor-box {
  border: 1px solid #dbe4ee;
  border-radius: 16px;
  padding: 16px;
  background: #fff;
}

.editor-box h2 {
  font-size: 20px;
  margin-bottom: 12px;
}

.editor-tip {
  margin-top: 10px;
  font-size: 12px;
  color: #666;
}

.big-textarea {
  min-height: 220px;
  font-size: 15px;
}

.task-card-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 10px;
}

.action-bar {
  position: sticky;
  bottom: 10px;
  z-index: 10;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(4px);
  border: 1px solid #dbe4ee;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.action-bar .buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.result-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.result-card {
  background: #f8fbff;
  border: 1px solid #dce7f2;
  border-radius: 16px;
  padding: 16px;
}

.result-card .label {
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
}

.result-card .value {
  font-size: 20px;
  font-weight: bold;
}

.result-section-title {
  font-size: 20px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #eef3f8;
}

.result-agenda-box {
  border: 1px solid #dbe4ee;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
  background: #fff;
}

.result-block {
  margin-bottom: 14px;
}

.result-block .title {
  font-size: 14px;
  font-weight: bold;
  color: #1f4e79;
  margin-bottom: 6px;
}

.no-print {}

@media (max-width: 1000px) {
  .meeting-flow,
  .info-strip,
  .result-summary {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .grid-2,
  .grid-3,
  .meeting-flow,
  .info-strip,
  .result-summary {
    grid-template-columns: 1fr;
  }

  .topbar .inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .agenda-hero h1 {
    font-size: 22px;
  }

  .action-bar {
    position: static;
  }
}

@media print {
  .topbar, .no-print, .action-bar { display: none !important; }
  .wrap { max-width: 100%; padding: 0; }
  .card, .result-agenda-box { box-shadow: none; border: 1px solid #ddd; }
}
/* MEET V3 additions */
input[type=number]{width:100%;padding:11px;border:1px solid #cfd8e3;border-radius:10px;font-size:14px;background:#fff}
.file-preview{margin-top:10px;padding:10px;border:1px solid #dde5ee;border-radius:12px;background:#fff;display:flex;gap:12px;align-items:center;flex-wrap:wrap}.file-preview img{max-width:240px;max-height:180px;border-radius:10px;border:1px solid #ddd}.file-preview input[type=checkbox]{width:auto}
.agenda-image-wrap{text-align:center;margin:14px 0}.agenda-image-wrap img{max-width:100%;max-height:480px;border-radius:14px;border:1px solid #dbe4ee}.agenda-description{font-size:16px;line-height:1.75;white-space:normal}.note-line{padding:10px 12px;border-left:4px solid #1f4e79;background:#f8fbff;border-radius:8px;margin-bottom:8px}.summary-agenda{padding:14px 0;border-bottom:1px solid #e6ebf0;line-height:1.7}.button-row{display:flex;gap:6px;flex-wrap:wrap;align-items:center}.table-scroll{overflow-x:auto}.table-scroll table{min-width:850px}details summary{cursor:pointer;padding:8px 0}

/* V3.1 다중 첨부파일 */
.attachment-list{margin-top:10px;padding:10px 12px;border:1px solid #dbe4ee;border-radius:12px;background:#f8fbff}
.attachment-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid #e6edf5}
.attachment-item:last-child{border-bottom:0}
.attachment-item label{display:flex;align-items:center;gap:5px;white-space:nowrap;font-size:13px}
.attachment-item input[type=checkbox]{width:auto}
.print-attachments ul{margin:6px 0 0 18px;padding:0}
@media(max-width:700px){.attachment-item{align-items:flex-start;flex-direction:column}}

/* MEET V3.2 즉시 업로드 */
.upload-panel{padding:14px;border:1px solid #dbe4ee;border-radius:14px;background:#fbfdff}
.upload-control-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:6px}
.upload-control-row input[type=file]{flex:1;min-width:250px}
.upload-control-row .btn{white-space:nowrap}
.upload-control-row .btn:disabled{opacity:.45;cursor:not-allowed}
.upload-help{margin-top:8px;padding:8px 10px;border-radius:9px;background:#fff3cd;color:#725c00;font-size:13px}
.upload-status{min-height:20px;margin-top:8px;font-size:13px;font-weight:700}
.upload-status-working{color:#1f4e79}
.upload-status-success{color:#198754}
.upload-status-error{color:#dc3545;white-space:pre-line}
@media(max-width:700px){.upload-control-row{align-items:stretch;flex-direction:column}.upload-control-row input[type=file],.upload-control-row .btn{width:100%;min-width:0}}
