@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --sidebar-width: 232px;
  color-scheme: light;
  --page: #f7f8f5;
  --surface: #fff;
  --surface-soft: #f2f5ef;
  --text: #202923;
  --muted: #7a837c;
  --line: #e8ece6;
  --green: #2f6b55;
  --green-dark: #24553f;
  --green-light: #e8f1e9;
  --yellow: #f4d878;
  --shadow: 0 12px 35px rgba(36, 56, 42, .045);
  font-family: 'DM Sans', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--text); font-size: 14px; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.app-shell { min-height: 100vh; }

.sidebar {
  background: var(--surface); border-right: 1px solid var(--line); bottom: 0; display: flex; flex-direction: column;
  left: 0; padding: 33px 21px 24px; position: fixed; top: 0; transition: width .22s ease, padding .22s ease; width: var(--sidebar-width); z-index: 4;
}
.sidebar-header { align-items: center; display: flex; justify-content: space-between; min-height: 35px; }
.brand { align-items: center; display: flex; font-family: Manrope, sans-serif; font-size: 23px; font-weight: 800; gap: 10px; letter-spacing: -1.1px; }
.brand-mark { align-items: center; background: var(--green); border-radius: 12px 12px 12px 4px; color: white; display: flex; font-size: 19px; height: 35px; justify-content: center; letter-spacing: -2px; width: 35px; }
.brand-mark span, .brand-period { color: var(--yellow); }
.sidebar-toggle { align-items: center; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 7px; color: var(--muted); cursor: pointer; display: flex; font-size: 21px; height: 30px; justify-content: center; line-height: 1; padding: 0; transition: background .18s, color .18s; width: 30px; }
.sidebar-toggle:hover { background: var(--green-light); color: var(--green); }
.sidebar-label, .eyebrow { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: 1.15px; }
.sidebar-label { margin: 52px 0 13px 9px; }
.main-nav { display: grid; gap: 5px; }
.nav-link { align-items: center; border-radius: 9px; color: #68736b; display: flex; font-size: 13px; font-weight: 500; gap: 12px; padding: 11px 12px; transition: background .18s, color .18s; }
.nav-link:hover, .nav-link.is-active { background: var(--green-light); color: var(--green-dark); }
.nav-link.is-active { font-weight: 700; }
.nav-icon { font-size: 19px; line-height: 16px; text-align: center; width: 17px; }
.sidebar-bottom { margin-top: auto; }
.privacy-note { background: var(--surface-soft); border-radius: 10px; color: var(--muted); display: flex; gap: 9px; margin-bottom: 20px; padding: 12px 11px; }
.privacy-icon { color: var(--green); font-size: 18px; }
.privacy-note p { font-size: 10px; line-height: 1.55; margin: 0; }
.sidebar-help { color: var(--muted); display: flex; font-size: 10px; justify-content: space-between; padding: 0 3px; }
.sidebar-help:hover, .external-link:hover { color: var(--green); }
.main-content { margin-left: var(--sidebar-width); max-width: 1430px; padding: 0 55px 24px; transition: margin-left .22s ease; }
.topbar { align-items: center; border-bottom: 1px solid var(--line); display: flex; height: 70px; justify-content: space-between; }
.breadcrumb { color: var(--muted); font-size: 11px; }
.breadcrumb span { color: #b9c0b8; margin: 0 9px; }
.breadcrumb strong { color: var(--text); font-weight: 600; }
.topbar-actions { align-items: center; display: flex; gap: 9px; }
.theme-toggle { background: var(--surface); border: 1px solid var(--line); border-radius: 50%; color: #67716a; cursor: pointer; font-size: 16px; height: 34px; transition: transform .2s; width: 34px; }
.theme-toggle:hover { transform: rotate(-18deg); }
.install-button { background: var(--green); border: 0; border-radius: 8px; color: #fff; cursor: pointer; font-size: 10px; font-weight: 600; padding: 9px 12px; }
.install-button:hover { background: var(--green-dark); }
.install-button:disabled { cursor: wait; opacity: .7; }
.install-button[hidden] { display: none; }
.notification-button, .cloud-sync-button { background: var(--green-light); border: 1px solid var(--line); border-radius: 8px; color: var(--green); cursor: pointer; font-size: 10px; font-weight: 700; padding: 9px 12px; }
.notification-button:hover, .cloud-sync-button:hover { background: var(--green); color: #fff; }
.notification-button:disabled, .cloud-sync-button:disabled { cursor: not-allowed; opacity: .65; }
.notification-button[hidden], .cloud-sync-button[hidden] { display: none; }

.welcome { align-items: center; display: flex; justify-content: space-between; min-height: 205px; overflow: hidden; position: relative; }
.eyebrow { margin: 0 0 11px; }
.welcome .eyebrow { align-items: center; display: flex; gap: 7px; }
.eyebrow-dot { background: #7fae77; border-radius: 50%; height: 7px; width: 7px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: Manrope, sans-serif; }
h1 { font-size: clamp(30px, 3.1vw, 42px); letter-spacing: -1.8px; line-height: 1.12; margin-bottom: 11px; }
.heading-period { color: var(--green); }
.welcome-copy { color: var(--muted); font-size: 13px; margin: 0; }
.mobile-break { display: none; }
.welcome-art { height: 190px; margin-right: 52px; position: relative; width: 230px; }
.art-sun { background: var(--yellow); border-radius: 50%; height: 72px; position: absolute; right: 31px; top: 27px; width: 72px; }
.art-cloud { background: #e7efe2; border-radius: 24px; height: 20px; position: absolute; width: 75px; }
.art-cloud::before, .art-cloud::after { background: inherit; border-radius: 50%; content: ""; position: absolute; }
.art-cloud::before { height: 26px; left: 14px; top: -11px; width: 26px; }
.art-cloud::after { height: 19px; right: 12px; top: -7px; width: 19px; }
.cloud-one { right: 85px; top: 58px; }
.cloud-two { right: 1px; top: 87px; transform: scale(.72); }
.art-box { background: var(--green); border-radius: 5px 5px 9px 9px; bottom: 27px; box-shadow: 0 13px 18px rgba(44, 88, 60, .16); height: 61px; position: absolute; right: 49px; transform: rotate(-5deg); width: 72px; }
.art-box::before { background: #497d64; border-radius: 4px; content: ""; height: 12px; left: -4px; position: absolute; right: -4px; top: -5px; }
.art-box span { background: #f3d57b; height: 100%; left: 32px; position: absolute; width: 10px; }
.art-box span::before { border: 3px solid #f3d57b; border-radius: 50% 50% 0 50%; content: ""; height: 9px; left: -10px; position: absolute; top: -14px; transform: rotate(25deg); width: 12px; }
.art-spark { color: #94ae7e; position: absolute; }
.spark-one { font-size: 20px; left: 26px; top: 68px; }
.spark-two { color: #dfb94f; font-size: 13px; right: 10px; top: 42px; }

.add-card { align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); display: grid; gap: 13px; grid-template-columns: 40px minmax(170px, .9fr) minmax(270px, 1.4fr); padding: 17px 19px; position: relative; }
.add-icon { align-items: center; background: var(--green-light); border-radius: 11px; color: var(--green); display: flex; font-size: 23px; height: 40px; justify-content: center; width: 40px; }
.add-copy h2 { font-size: 13px; letter-spacing: -.2px; margin-bottom: 4px; }
.add-copy p { color: var(--muted); font-size: 10px; margin: 0; }
.add-form { display: flex; gap: 8px; }
.add-form input { background: var(--page); border: 1px solid var(--line); border-radius: 8px; color: var(--text); min-width: 0; outline: none; padding: 0 12px; transition: border .15s, box-shadow .15s; width: 100%; }
.add-form input:focus { border-color: #8fb19d; box-shadow: 0 0 0 3px rgba(47, 107, 85, .09); }
.add-form input::placeholder { color: #a3aaa4; font-size: 11px; }
.add-form button, .weather-button { background: var(--green); border: 0; border-radius: 8px; color: #fff; cursor: pointer; font-size: 11px; font-weight: 600; padding: 0 14px; white-space: nowrap; transition: background .18s, transform .18s; }
.add-form button:hover, .weather-button:hover { background: var(--green-dark); transform: translateY(-1px); }
.add-form button span { font-size: 14px; margin-left: 5px; }
.form-message { color: var(--green-dark); font-size: 10px; grid-column: 1 / -1; margin: 0; }
.form-message.is-error { color: #b14b3c; }
.cloud-sync-controls { align-items: center; display: flex; flex-wrap: wrap; gap: 8px 12px; grid-column: 1 / -1; }
.integration-message { color: var(--muted); flex: 1 1 260px; font-size: 10px; line-height: 1.5; margin: 0; }
.integration-message.is-error { color: #b14b3c; }
.turnstile-container:not([hidden]) { min-height: 65px; }

.content-grid { display: grid; gap: 18px; grid-template-columns: minmax(300px, 1.15fr) minmax(400px, 1fr); margin-top: 24px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; min-width: 0; padding: 20px; }
.panel-heading { align-items: flex-start; display: flex; justify-content: space-between; }
.panel-heading .eyebrow { font-size: 8px; margin-bottom: 6px; }
.panel-heading h2 { align-items: center; display: flex; font-size: 18px; gap: 9px; letter-spacing: -.6px; margin: 0; }
.count-badge { align-items: center; background: var(--green-light); border-radius: 20px; color: var(--green); display: inline-flex; font-family: 'DM Sans', sans-serif; font-size: 10px; font-weight: 700; height: 20px; justify-content: center; min-width: 20px; padding: 0 6px; }
.heading-decoration { color: #c5d4be; font-size: 20px; }
.shipment-list { display: grid; gap: 8px; margin-top: 17px; }
.shipment-item { align-items: center; border: 1px solid var(--line); border-radius: 9px; display: grid; gap: 9px; grid-template-columns: 34px minmax(0, 1fr) auto; padding: 10px 9px; }
.shipment-icon { align-items: center; background: #f3f5f0; border-radius: 8px; color: var(--green); display: flex; font-size: 15px; height: 34px; justify-content: center; }
.shipment-info { min-width: 0; }
.shipment-name { display: block; font-size: 10px; font-weight: 700; overflow-wrap: anywhere; }
.shipment-number { display: block; font-size: 10px; font-weight: 700; overflow-wrap: anywhere; }
.shipment-name + .shipment-number { color: var(--muted); font-size: 9px; font-weight: 500; margin-top: 3px; }
.shipment-date { color: var(--muted); display: block; font-size: 9px; margin-top: 4px; }
.shipment-status { color: var(--green); display: block; font-size: 9px; font-weight: 600; margin-top: 4px; }
.shipment-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 3px; justify-content: flex-end; }
.shipment-select, .shipment-remove, .shipment-rename { background: transparent; border: 0; border-radius: 6px; color: var(--muted); cursor: pointer; font-size: 10px; padding: 6px; }
.shipment-select:hover { background: var(--green-light); color: var(--green); }
.shipment-rename:hover { background: var(--green-light); color: var(--green); }
.shipment-remove:hover { background: #fbefed; color: #b14b3c; }
.shipment-rename-form { display: flex; flex-wrap: wrap; gap: 5px; }
.shipment-rename-input { background: var(--page); border: 1px solid var(--line); border-radius: 6px; color: var(--text); min-width: 120px; outline: none; padding: 6px; width: 100%; }
.shipment-rename-input:focus { border-color: #8fb19d; box-shadow: 0 0 0 3px rgba(47, 107, 85, .09); }
.shipment-save-name, .shipment-cancel-rename { background: transparent; border: 0; border-radius: 6px; color: var(--green); cursor: pointer; font-size: 9px; padding: 5px; }
.shipment-cancel-rename { color: var(--muted); }
.shipment-item.is-selected { border-color: #a8c5b0; background: #fbfdfb; }
.empty-state { align-items: center; display: flex; flex-direction: column; padding: 29px 12px 30px; text-align: center; }
.empty-state[hidden] { display: none; }
.empty-illustration { align-items: center; background: var(--surface-soft); border-radius: 50%; color: #799881; display: flex; font-size: 23px; height: 53px; justify-content: center; margin-bottom: 13px; transform: rotate(-9deg); width: 53px; }
.empty-state h3 { font-size: 12px; margin-bottom: 6px; }
.empty-state p { color: var(--muted); font-size: 10px; line-height: 1.6; margin: 0; max-width: 250px; }
.panel-footnote { border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; margin: 0; padding-top: 12px; }
.panel-footnote span { color: var(--green); margin-right: 4px; }
.tracking-heading { align-items: center; }
.live-badge { align-items: center; background: #edf6ee; border-radius: 20px; color: #4b8155; display: flex; font-size: 8px; font-weight: 700; gap: 5px; letter-spacing: .4px; padding: 6px 8px; }
.live-badge span { background: #70b479; border-radius: 50%; height: 6px; width: 6px; }
.tracking-panel .panel-heading h2 { font-size: 21px; font-weight: 800; letter-spacing: -.8px; }
.widget-frame { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-top: 17px; min-height: 252px; overflow: auto; }
.widget-frame iframe { border: 0; display: block; height: 270px; min-width: 300px; width: 100%; }
.widget-caption { color: var(--muted); font-family: 'DM Sans', sans-serif; font-size: 11px; line-height: 1.7; margin: 12px 0 10px; }
.external-link { color: var(--green); font-family: Manrope, sans-serif; font-size: 11px; font-weight: 800; }
.external-link span { margin-left: 3px; }

.weather-card { align-items: center; background: #edf3e9; border: 1px solid #e2eade; border-radius: 13px; display: grid; gap: 15px; grid-template-columns: 66px minmax(200px, 1fr) auto auto; margin: 18px 0; min-height: 106px; padding: 16px 20px; }
.weather-visual { height: 58px; position: relative; width: 66px; }
.weather-sun { background: #f2cf6d; border-radius: 50%; height: 38px; left: 11px; position: absolute; top: 5px; width: 38px; }
.weather-cloud { background: #fff; border-radius: 20px; bottom: 8px; height: 19px; left: 7px; position: absolute; width: 54px; }
.weather-cloud::before, .weather-cloud::after { background: #fff; border-radius: 50%; content: ""; position: absolute; }
.weather-cloud::before { height: 24px; left: 11px; top: -11px; width: 24px; }
.weather-cloud::after { height: 17px; right: 8px; top: -6px; width: 17px; }
.weather-copy .eyebrow { font-size: 8px; margin-bottom: 5px; }
.weather-copy h2 { font-size: 13px; letter-spacing: -.3px; margin: 0 0 4px; }
.weather-copy > p:last-child { color: var(--muted); font-size: 10px; line-height: 1.5; margin: 0; }
.weather-result { color: var(--green-dark); font-size: 11px; font-weight: 600; line-height: 1.45; text-align: right; }
.weather-button { min-height: 36px; padding: 0 12px; }
.weather-button span { margin-left: 6px; }
.footer { align-items: center; color: #929991; display: flex; font-size: 9px; justify-content: space-between; padding: 20px 2px 0; }
.footer a { color: var(--green); font-weight: 600; }
.footer-heart { color: #d7886a; }
.visually-hidden { clip: rect(0, 0, 0, 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }

body.dark-theme {
  color-scheme: dark; --page: #24362a; --surface: #304637; --surface-soft: #3b5440; --text: #f0f5eb;
  --muted: #c0cfbd; --line: #4a624c; --green: #a5ca8b; --green-dark: #c1dfa7; --green-light: #415c43; --shadow: 0 12px 35px rgba(0, 0, 0, .16);
}
body.dark-theme .art-cloud, body.dark-theme .weather-cloud, body.dark-theme .weather-cloud::before, body.dark-theme .weather-cloud::after { background: #dce9da; }
body.dark-theme .widget-frame, body.dark-theme .widget-frame iframe { background: #fff; }
body.dark-theme .weather-card { background: #3a503b; border-color: #526b50; }
body.dark-theme .shipment-item.is-selected { background: #3b5340; }

@media (min-width: 1500px) {
  .main-content { margin-left: auto; margin-right: auto; padding-left: 65px; padding-right: 65px; transform: translateX(calc(var(--sidebar-width) / 2)); }
}
@media (max-width: 1100px) {
  :root { --sidebar-width: 205px; }
  .main-content { padding-left: 32px; padding-right: 32px; }
  .content-grid { grid-template-columns: minmax(280px, 1.05fr) minmax(360px, 1fr); gap: 12px; }
  .panel { padding: 16px; }
  .welcome-art { margin-right: 12px; }
  .add-card { grid-template-columns: 40px minmax(140px, .8fr) minmax(250px, 1.35fr); }
  .weather-card { grid-template-columns: 55px minmax(180px, 1fr) auto; }
  .weather-visual { transform: scale(.86); transform-origin: left center; width: 55px; }
  .weather-result { grid-column: 2; text-align: left; }
  .weather-button { grid-column: 3; grid-row: 1 / span 2; }
}
@media (max-width: 760px) {
  .sidebar { border-bottom: 1px solid var(--line); border-right: 0; bottom: auto; flex-direction: row; height: 60px; justify-content: space-between; padding: 0 17px; top: 0; transition: height .22s ease; width: 100%; }
  .sidebar-header { flex: 0 0 auto; gap: 12px; }
  .brand { font-size: 20px; gap: 8px; }
  .brand-mark { border-radius: 10px 10px 10px 3px; font-size: 17px; height: 30px; width: 30px; }
  .sidebar-toggle { height: 28px; width: 28px; }
  .sidebar-label, .sidebar-bottom { display: none; }
  .main-nav { align-items: center; display: flex; gap: 1px; }
  .nav-link { font-size: 0; gap: 0; height: 38px; justify-content: center; padding: 0; width: 38px; }
  .nav-icon { font-size: 17px; }
  .main-content { margin: 60px 0 0; padding: 0 18px 20px; }
  .topbar { height: 51px; }
  .welcome { min-height: 187px; }
  .welcome-art { margin-right: -68px; opacity: .7; transform: scale(.78); transform-origin: right center; }
  .welcome > div:first-child { max-width: 280px; position: relative; z-index: 1; }
  .welcome .eyebrow { font-size: 8px; }
  h1 { font-size: 34px; }
  .welcome-copy { font-size: 11px; max-width: 245px; }
  .mobile-break { display: initial; }
  .add-card { gap: 11px; grid-template-columns: 40px minmax(0, 1fr); padding: 15px; }
  .add-form { grid-column: 1 / -1; }
  .add-form input { height: 40px; }
  .add-form button { height: 40px; padding: 0 11px; }
  .form-message { grid-column: 1 / -1; }
  .content-grid { grid-template-columns: 1fr; margin-top: 23px; }
  .panel { padding: 17px; }
  .shipments-panel { order: 1; }
  .tracking-panel { order: 2; }
  .widget-frame { min-height: 252px; }
  .widget-frame iframe { height: 270px; }
  .weather-card { gap: 9px 12px; grid-template-columns: 48px minmax(0, 1fr) auto; padding: 14px; }
  .weather-visual { transform: scale(.74); transform-origin: left center; width: 48px; }
  .weather-copy h2 { font-size: 12px; }
  .weather-copy > p:last-child { font-size: 9px; }
  .weather-result { font-size: 10px; }
  .weather-button { font-size: 10px; grid-column: 2 / 4; grid-row: 2; justify-self: start; min-height: 32px; }
  .footer { align-items: flex-start; flex-direction: column; gap: 7px; padding-top: 16px; }
}
@media (min-width: 761px) {
  body.sidebar-collapsed { --sidebar-width: 76px; }
  body.sidebar-collapsed .sidebar { padding-left: 13px; padding-right: 13px; width: 76px; }
  body.sidebar-collapsed .main-content { margin-left: 76px; }
  body.sidebar-collapsed .sidebar-header { flex-direction: column; gap: 17px; }
  body.sidebar-collapsed .brand-name, body.sidebar-collapsed .sidebar-label,
  body.sidebar-collapsed .privacy-note, body.sidebar-collapsed .sidebar-help { display: none; }
  body.sidebar-collapsed .brand { justify-content: center; }
  body.sidebar-collapsed .sidebar-toggle { transform: rotate(180deg); }
  body.sidebar-collapsed .main-nav { margin-top: 25px; }
  body.sidebar-collapsed .nav-link { font-size: 0; gap: 0; justify-content: center; padding-left: 0; padding-right: 0; }
}
@media (min-width: 1500px) {
  body.sidebar-collapsed .main-content { margin-left: auto; }
}
@media (min-width: 761px) and (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 390px) {
  .main-content { padding-left: 13px; padding-right: 13px; }
  .welcome-art { margin-right: -90px; }
  h1 { font-size: 31px; }
  .add-form { flex-direction: column; }
  .add-form button { align-self: stretch; }
  .weather-card { grid-template-columns: 38px minmax(0, 1fr); }
  .weather-visual { transform: scale(.65); width: 38px; }
  .weather-result { grid-column: 2; }
  .weather-button { grid-column: 2; grid-row: auto; }
}
@media (max-width: 760px) {
  .sidebar { align-content: flex-start; flex-wrap: wrap; height: 60px; overflow: hidden; }
  .sidebar-header { justify-content: space-between; width: 100%; }
  .sidebar-toggle { font-size: 0; position: relative; }
  .sidebar-toggle span { font-size: 0; }
  .sidebar-toggle span::before { content: "☰"; font-size: 16px; }
  .main-nav { display: none; }
  body.mobile-menu-open .sidebar { box-shadow: 0 12px 24px rgba(24, 42, 29, .14); height: auto; }
  body.mobile-menu-open .sidebar-toggle span::before { content: "×"; font-size: 22px; }
  body.mobile-menu-open .main-nav { align-items: stretch; display: grid; gap: 4px; padding: 10px 0 12px; width: 100%; }
  body.mobile-menu-open .nav-link { font-size: 13px; gap: 12px; justify-content: flex-start; padding: 11px 12px; width: 100%; }
  body.mobile-menu-open .nav-icon { font-size: 19px; }
  body.mobile-menu-open .main-content { margin-top: 202px; }
  body.sidebar-collapsed .brand-name { display: inline; }
  body.sidebar-collapsed .sidebar-header { flex-direction: row; gap: 12px; }
  body.sidebar-collapsed .sidebar-toggle { transform: none; }
  body.sidebar-collapsed .main-nav { margin-top: 0; }
  body.sidebar-collapsed .nav-link { font-size: 0; gap: 0; justify-content: center; padding: 0; }
}
