@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
  --bg: #ffffff;
  --fg: #1c1c1c;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
}

a {
  color: inherit;
}

.pill {
  display: inline-block;
  padding: 4px 14px;
  border: 1px solid var(--fg);
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.4;
}

.card {
  border: 1px solid var(--fg);
  border-radius: 12px;
  padding: 24px;
  background: var(--bg);
}

.divider {
  border: none;
  border-top: 1px solid var(--fg);
  margin: 24px 0;
}

.headline {
  font-weight: 700;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-align: left;
  margin: 0;
}

.btn {
  display: inline-block;
  padding: 12px 20px;
  border: 1px solid var(--fg);
  border-radius: 8px;
  background: var(--fg);
  color: var(--bg);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.btn:hover {
  opacity: 0.85;
}

.btn-outline {
  background: var(--bg);
  color: var(--fg);
}

.btn-logout {
  display: inline-block;
  padding: 4px 14px;
  border: 1px solid var(--fg);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-logout:hover {
  background: #000000;
  color: #ffffff;
}

.divider-thick {
  height: 6px;
  background: var(--fg);
  border: none;
  border-radius: 0;
  margin: 24px 0;
}

.input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--fg);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: var(--bg);
  color: var(--fg);
}

.input:focus {
  outline: none;
  box-shadow: 0 0 0 1.5px var(--fg);
}

.footer-fixed {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  border-top: 1px solid var(--fg);
  background: var(--bg);
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid var(--fg);
}

.app-header .logo {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.logo-img {
  height: 24px;
  width: auto;
  display: block;
}

.nav-link {
  font-size: 14px;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.nav-link:hover {
  border-bottom-color: var(--fg);
}

.error-text {
  color: var(--fg);
  font-size: 13px;
  border: 1px solid var(--fg);
  border-radius: 8px;
  padding: 10px 14px;
  display: none;
}

.error-text.visible {
  display: block;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  text-align: center;
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 4px solid var(--fg);
  white-space: nowrap;
}

.table td {
  padding: 12px;
  border-bottom: 1px solid var(--fg);
  vertical-align: middle;
  white-space: nowrap;
}

.table th:nth-child(2),
.table td:nth-child(2),
.table th:nth-child(3),
.table td:nth-child(3),
.table th:nth-child(4),
.table td:nth-child(4),
.table th:nth-child(5),
.table td:nth-child(5) {
  text-align: center;
}

.table th:nth-child(6),
.table td:nth-child(6) {
  text-align: right;
}

.table-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.btn-sm {
  display: inline-block;
  flex-shrink: 0;
  white-space: nowrap;
  padding: 4px 14px;
  border: 1px solid var(--fg);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.select-sm {
  display: inline-block;
  flex-shrink: 0;
  padding: 4px 10px;
  border: 1px solid var(--fg);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font-size: 13px;
  font-family: inherit;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
}

.select-sm:focus {
  outline: none;
  box-shadow: 0 0 0 1.5px var(--fg);
}

.btn-sm:hover {
  background: #000000;
  color: #ffffff;
}

.status-pill {
  display: inline-block;
  min-width: 60px;
  padding: 4px 10px;
  border: 1px solid var(--fg);
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}

.status-pill.pill-green {
  border-color: #16a34a;
  color: #16a34a;
}

.status-pill.pill-red {
  border-color: #dc2626;
  color: #dc2626;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.form-field label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

.empty-state {
  padding: 40px 0;
  text-align: center;
  font-size: 14px;
}

.page-container {
  padding: 40px 32px 80px;
}

.page-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .page-container {
    padding: 24px 16px 60px;
  }

  .headline {
    font-size: 26px;
  }

  .app-header {
    padding: 14px 16px;
    flex-wrap: wrap;
    gap: 10px;
  }

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

  .page-header-row {
    align-items: flex-start;
  }
}

.subheadline {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

.section-block {
  margin-bottom: 44px;
}

.textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--fg);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg);
  color: var(--fg);
  resize: vertical;
  white-space: pre-wrap;
  line-height: 1.6;
}

.textarea:focus {
  outline: none;
  box-shadow: 0 0 0 1.5px var(--fg);
}

.quotation-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.link-back {
  cursor: pointer;
  text-decoration: underline;
  font-size: 14px;
  background: none;
  border: none;
  color: var(--fg);
  padding: 0;
  font-family: inherit;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.cover-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.company-block {
  text-align: left;
  font-size: 13px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.company-info-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}

.stamp-img {
  height: 82px;
  width: auto;
  display: block;
}

.stamp-placeholder {
  font-size: 12px;
  border: 1px dashed var(--fg);
  border-radius: 8px;
  padding: 6px 10px;
}

.quotation-subtitle {
  font-size: 14px;
  letter-spacing: 0.05em;
  margin: 4px 0 20px;
}

.total-amount-display {
  font-size: 26px;
  font-weight: 700;
}

.field-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.field-row .form-field {
  flex: 1;
  min-width: 180px;
}

.table input.row-input,
.table select.row-input {
  padding: 6px 8px;
  font-size: 13px;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--fg);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.toast.visible {
  opacity: 1;
}

@media (max-width: 640px) {
  .cover-top-row {
    justify-content: flex-start;
  }

  .company-block {
    align-items: flex-start;
    text-align: left;
  }
}

.sub-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-sm.active {
  background: var(--fg);
  color: var(--bg);
}

tr.draft-row {
  background: #fff7f0;
}
