/* taxcount Lens — layout + mockup-v4-derived components */

body {
  margin: 0;
  padding: 0;
  padding-top: 54px;
  background: #f5f5f2;
  font-family: Outfit, system-ui, sans-serif;
  color: #1a1a1a;
}

.page {
  max-width: 680px;
  margin: 0 auto;
  padding: 20px 20px 48px;
  box-sizing: border-box;
}

/* Navbar fixed */
nav#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: #b92025;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-sizing: border-box;
}

.nav-brand {
  font-weight: 700;
  font-size: 17px;
  color: #fff;
  letter-spacing: -0.02em;
  text-transform: lowercase;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-btn {
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.nav-btn.line-btn {
  background: #00b900;
  color: #fff;
}

.nav-btn.code-btn {
  background: #fff;
  color: #b92025;
  font-weight: 600;
}

.nav-member-badge {
  font-size: 12px;
  font-weight: 600;
  color: #1a1a1a;
  background: #ffbc00;
  padding: 6px 12px;
  border-radius: 999px;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border-radius: 10px;
  border: 1px solid #e5e5e0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  overflow: hidden;
  z-index: 200;
}

.dropdown-menu.open {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 11px 16px;
  font-size: 14px;
  color: #333;
  text-decoration: none;
  transition: background 0.15s;
}

.dropdown-menu a:hover {
  background: #f5f5f2;
}

/* Mobile slide panel under navbar */
.mobile-menu-panel {
  position: fixed;
  top: 54px;
  left: 0;
  right: 0;
  z-index: 95;
  background: white;
  border-bottom: 1px solid #e5e5e0;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* Announcement banner */
#announcementBanner {
  width: 100%;
}

#announcementBanner.type-banner {
  background: #ffbc00;
  color: #1a1a1a;
  padding: 10px 20px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
}

/* Maintenance mode — full-width notice under announcements */
.maintenance-banner {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 20px;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  border-left: 4px solid #ffbc00;
  color: #713f12;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.maintenance-banner .maintenance-banner-title {
  font-weight: 600;
  color: #451a03;
  margin-bottom: 4px;
}

.maintenance-banner .maintenance-banner-msg {
  font-weight: 400;
  font-size: 13px;
}

/* Mobile menu items */
.mobile-menu-item {
  display: block;
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  color: #333;
  text-decoration: none;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  border-bottom: 1px solid #f5f5f2;
}

.mobile-menu-item:last-child {
  border-bottom: none;
}

.mobile-menu-item.line {
  color: #00b900;
  font-weight: 500;
}

.mobile-menu-item.code {
  color: #b92025;
  font-weight: 500;
}

/* Quota */
.quota-section {
  background: #fff;
  border: 1px solid #e5e5e0;
  border-radius: 16px;
  padding: 20px 22px;
  margin-bottom: 16px;
}

.quota-kicker {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.quota-numbers {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.1;
}

.quota-slash {
  font-weight: 500;
  color: #999;
  margin: 0 4px;
}

.quota-bar-wrap {
  margin-top: 14px;
}

.quota-bar-track {
  height: 8px;
  background: #ecece8;
  border-radius: 99px;
  overflow: hidden;
}

.quota-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.quota-bar-fill.g {
  background: linear-gradient(90deg, #007426, #00a832);
}

.quota-bar-fill.y {
  background: linear-gradient(90deg, #d97706, #f59e0b);
}

.quota-bar-fill.r {
  background: linear-gradient(90deg, #b92025, #e11d48);
}

.quota-timer-row {
  margin: 12px 0 0;
  font-size: 13px;
  color: #555;
}

.quota-remain {
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.quota-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #b92025;
  text-decoration: none;
}

.quota-link:hover {
  text-decoration: underline;
}

/* Upload */
.upload-card {
  background: #fff;
  border: 1px solid #e5e5e0;
  border-radius: 16px;
  padding: 22px;
}

.upload-heading {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
}

.upload-hint {
  margin: 0 0 16px;
  font-size: 13px;
  color: #666;
}

.drop-zone {
  border: 2px dashed #d4d4cf;
  border-radius: 14px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  background: #fafaf8;
}

.drop-zone.dragover {
  border-color: #b92025;
  background: #fff8f8;
  transform: scale(1.01);
}

.dz-icon {
  font-size: 40px;
  line-height: 1;
}

.dz-title {
  margin: 10px 0 4px;
  font-weight: 600;
  font-size: 15px;
}

.dz-sub {
  margin: 0;
  font-size: 13px;
  color: #777;
}

.mobile-btns {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.mob-file-btn,
.mob-cam-btn {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  cursor: pointer;
}

.mob-file-btn {
  background: #b92025;
  color: #fff;
}

.mob-cam-btn {
  background: #f0f0ec;
  color: #1a1a1a;
  border: 1px solid #e5e5e0;
}

.error-container {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 13px;
}

/* Result section */
.result-section-wrap {
  margin-top: 20px;
}

.analyzing-bar {
  background: #fff;
  border: 1px solid #e5e5e0;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
}

.analyzing-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.analyzing-track {
  height: 6px;
  background: #ecece8;
  border-radius: 99px;
  overflow: hidden;
}

.analyzing-fill {
  height: 100%;
  width: 0%;
  background: #b92025;
  border-radius: 99px;
  transition: width 0.35s ease;
}

.summary-panel {
  background: #fff;
  border: 1px solid #e5e5e0;
  border-radius: 16px;
  overflow: hidden;
}

.sp-head {
  padding: 16px 18px;
  border-bottom: 1px solid #f0f0ec;
  font-weight: 700;
  font-size: 15px;
}

.sp-meta {
  padding: 0 18px 8px;
  font-size: 12px;
  color: #777;
}

.sp-row {
  border-top: 1px solid #f5f5f2;
  cursor: pointer;
}

.sp-row.sp-row-pending {
  cursor: default;
}

.sp-row.no-result {
  cursor: default;
}

.sp-row-main {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
}

.sp-num {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.sp-num.pass {
  background: #dcfce7;
  color: #166534;
}

.sp-num.fail {
  background: #fee2e2;
  color: #991b1b;
}

.sp-mid {
  flex: 1;
  min-width: 0;
}

.sp-line1 {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sp-line2 {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}

.sp-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.sp-badge.pass {
  background: #dcfce7;
  color: #166534;
}

.sp-badge.fail {
  background: #fee2e2;
  color: #991b1b;
}

.sp-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sp-toggle:hover:not(:disabled) {
  background: #f3f4f0;
  color: #b92025;
}

.sp-toggle:focus-visible {
  outline: 2px solid #b92025;
  outline-offset: 2px;
}

.sp-toggle:disabled,
.sp-toggle.sp-toggle--skeleton {
  cursor: default;
  opacity: 0.4;
  pointer-events: none;
}

.sp-toggle-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sp-toggle.open .sp-toggle-icon {
  transform: rotate(180deg);
}

.detail-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-panel.open {
  max-height: 900px;
}

.detail-inner {
  padding: 0 18px 18px;
  background: #fafaf8;
  border-top: 1px solid #f0f0ec;
}

.verdict-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
}

.verdict-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
}

.verdict-circle.pass {
  background: #dcfce7;
  color: #166534;
}

.verdict-circle.fail {
  background: #fee2e2;
  color: #991b1b;
}

.score-bar-row {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.score-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: #e5e5e0;
}

.score-bar.on {
  background: #007426;
}

.score-bar.off {
  background: #fecaca;
}

.score-lbl {
  font-size: 12px;
  color: #555;
  margin-top: 8px;
}

.vat-strip {
  margin-top: 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e5e5e0;
  border-radius: 10px;
  font-size: 13px;
}

.comp-mini {
  margin-top: 12px;
}

.comp-mini-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0ec;
  font-size: 13px;
}

.comp-mini-row:last-child {
  border-bottom: none;
}

.comp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.comp-dot.ok {
  background: #007426;
}

.comp-dot.bad {
  background: #b92025;
}

.vat-mini {
  margin-top: 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e5e5e0;
  border-radius: 10px;
  font-size: 13px;
}

.sum-mini {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #333;
}

.action-wrap {
  padding: 16px 18px;
  border-top: 1px solid #f5f5f2;
}

.start-over-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: #1a1a1a;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  background: #fff;
  border-radius: 16px;
  max-width: 400px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.modal-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}

.modal-desc {
  margin: 0 0 16px;
  font-size: 13px;
  color: #666;
}

.modal-input-wrap {
  position: relative;
}

.modal-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 72px 12px 14px;
  border: 1px solid #e5e5e0;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
}

.modal-eye {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  font-size: 12px;
  color: #b92025;
  cursor: pointer;
  font-family: inherit;
}

.modal-error {
  margin: 10px 0 0;
  font-size: 13px;
  color: #b92025;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.modal-btn {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  border: none;
}

.modal-btn-secondary {
  background: #f0f0ec;
  color: #333;
}

.modal-btn-primary {
  background: #b92025;
  color: #fff;
}

/* Fade in animation for result rows */
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-animate {
  animation: fadeSlideIn 0.3s ease-out;
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #f0f0ec;
  border-top-color: #b92025;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Shake */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-8px);
  }
  75% {
    transform: translateX(8px);
  }
}

.shake {
  animation: shake 0.3s ease;
}

/* Toast */
.tcl-toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 400;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  color: #fff;
  background: #1a1a1a;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media (max-width: 640px) {
  .nav-right {
    display: none;
  }

  .hamburger {
    display: flex !important;
  }

  .page {
    max-width: 100%;
  }

  .quota-section,
  .upload-card {
    padding-left: 16px;
    padding-right: 16px;
  }

  .summary-panel {
    margin-left: 0;
    margin-right: 0;
  }

  .action-wrap {
    padding-left: 12px;
    padding-right: 12px;
  }
}
