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

:root {
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #49382d;
  background: #fbf6ee;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  font-weight: 400;
  --cream: #fbf6ee;
  --paper: #fffdf9;
  --brown: #49382d;
  --muted: #8c7c70;
  --line: #eee4d8;
  --orange: #dc8747;
  --green: #71866a;
  --shadow: 0 16px 40px #684b3010;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--cream); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
#app { min-height: 100vh; display: grid; place-items: center; padding: 24px; }

.login-card, .status-card {
  width: min(100%, 420px); background: var(--paper); border: 1px solid var(--line);
  border-radius: 22px; padding: 36px; box-shadow: var(--shadow);
}
.brand-mark {
  width: 44px; height: 44px; border-radius: 15px; background: #f8e8d6; color: #ae6937;
  display: grid; place-items: center; font-size: 24px; font-weight: 700;
}
.eyebrow { margin: 20px 0 6px; color: #b18768; font-size: 10px; letter-spacing: .16em; font-weight: 700; }
.login-card h1, .status-card h1 { margin: 0; font-size: 24px; letter-spacing: .01em; }
.intro, .status-card p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.login-card form { display: grid; gap: 18px; margin-top: 26px; }
.login-card label { display: grid; gap: 8px; font-size: 13px; font-weight: 600; }
.login-card input { width: 100%; height: 48px; border: 1px solid #e6dacc; border-radius: 11px; padding: 0 13px; outline: none; background: white; }
.login-card input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px #dc87471f; }
.primary-button, .secondary-button { min-height: 48px; border-radius: 11px; font-weight: 700; }
.primary-button { background: var(--orange); border: 0; color: white; }
.primary-button:hover { background: #c97539; }
.secondary-button { background: white; border: 1px solid var(--line); padding: 0 18px; color: var(--brown); }
.message { margin: 0; font-size: 13px; }
.error { color: #a9433d; }
.status-card { text-align: center; }
.spinner { width: 30px; height: 30px; border: 3px solid #f0e3d5; border-top-color: var(--orange); border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; }
.denied-icon { margin: 0 auto 16px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: #fff1ee; color: #b44c44; font-weight: 700; font-size: 22px; }
@keyframes spin { to { transform: rotate(360deg); } }

.dashboard { width: 100%; min-height: calc(100vh - 48px); max-width: 1440px; background: #fffcf7; border: 1px solid var(--line); border-radius: 23px; overflow: hidden; box-shadow: var(--shadow); }
.topbar { height: 72px; background: #fffdf9; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 36px; }
.wordmark { display: flex; gap: 11px; align-items: center; color: var(--brown); text-decoration: none; font-weight: 600; }
.wordmark strong { color: #b97440; font-weight: 700; }
.brand-mark.small { width: 36px; height: 36px; border-radius: 12px; font-size: 19px; }
.logout-button { min-height: 44px; border: 1px solid #e8ddcf; background: white; border-radius: 11px; padding: 0 15px; color: #77675b; font-size: 12px; font-weight: 600; }
.logout-button:hover { background: #fbf4eb; }
.dashboard-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: calc(100vh - 122px); }
.sidebar { background: #fffdf9; border-right: 1px solid var(--line); padding: 28px 15px; }
.nav-caption { margin: 0 12px 13px; color: #b19b88; font-size: 10px; font-weight: 700; letter-spacing: .1em; }
.sidebar nav { display: grid; gap: 6px; }
.nav-link { width: 100%; min-height: 48px; border: 0; border-radius: 12px; background: transparent; text-decoration: none; color: #7e6d60; display: flex; align-items: center; gap: 12px; padding: 0 12px; font-size: 13px; font-weight: 500; text-align: left; }
.nav-link > span:first-child { width: 21px; text-align: center; color: #a2836c; font-size: 18px; }
.nav-link.active { background: #f8e9d9; color: #9d5d31; font-weight: 700; }
.nav-link.active > span:first-child { color: #bd7138; }
.nav-link:disabled { opacity: .66; }
.nav-status { margin-left: auto; color: #a28e7c; font-size: 9px; white-space: nowrap; }
.content-area { padding: 35px clamp(22px, 4vw, 58px) 30px; min-width: 0; max-width: 1240px; width: 100%; margin: 0 auto; }
.content-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.content-heading .eyebrow { margin: 0 0 5px; }
.content-heading h1 { font-size: 26px; margin: 0; font-weight: 700; letter-spacing: .01em; }
.secure-badge { display: inline-flex; align-items: center; gap: 7px; background: #f5f7ef; border: 1px solid #e2e8d8; border-radius: 99px; padding: 8px 12px; color: #677957; font-size: 10px; white-space: nowrap; }
.secure-badge > span, .status-dot { width: 7px; height: 7px; border-radius: 50%; background: #8aa174; }

.welcome-panel { position: relative; min-height: 168px; margin-top: 27px; padding: 27px 30px; border: 1px solid #f0dfcb; border-radius: 18px; background: linear-gradient(105deg, #fff0dd 0%, #fff4e8 58%, #f9e9d6 100%); overflow: hidden; display: flex; align-items: center; }
.welcome-copy { position: relative; z-index: 1; }
.welcome-kicker { margin: 0 0 7px; color: #b67542; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.welcome-panel h2 { margin: 0; color: #593d2c; font-size: 23px; letter-spacing: .02em; }
.welcome-panel p:last-child { margin: 7px 0 0; color: #8f7562; font-size: 12px; }
.welcome-illustration { position: absolute; top: 0; right: 27px; width: 178px; height: 100%; }
.sun { position: absolute; width: 75px; height: 75px; border-radius: 50%; right: 38px; top: 25px; background: #f8d7a8; opacity: .72; }
.bowl { position: absolute; z-index: 1; right: 22px; bottom: 18px; width: 115px; height: 62px; display: grid; place-items: center; border-radius: 12px 12px 55px 55px; background: #fffaf2; color: #d28a4c; font-size: 28px; box-shadow: 0 7px 0 #e7c49e; }
.steam { position: absolute; z-index: 2; top: 32px; width: 10px; height: 32px; border-left: 2px solid #d89b68; border-radius: 50%; transform: rotate(16deg); }
.steam-one { right: 92px; }.steam-two { right: 69px; top: 23px; height: 37px; transform: rotate(-13deg); }

.section-heading { margin: 30px 0 14px; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.section-heading .eyebrow { margin: 0 0 3px; }
.section-heading h2 { margin: 0; font-size: 17px; }
.updated-label { display: inline-flex; align-items: center; gap: 7px; color: #8e7e70; font-size: 10px; white-space: nowrap; }
.status-dot { width: 6px; height: 6px; background: #d9a16f; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.metric-card { min-width: 0; min-height: 154px; padding: 17px 18px 15px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 5px 18px #67472808; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.metric-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 11px; background: #fbefdf; color: #bd7843; font-size: 16px; }
.metric-state { color: #a28e7c; font-size: 9px; }
.metric-label { margin: 13px 0 0; color: #7e6e61; font-size: 11px; font-weight: 600; }
.metric-value { margin: 1px 0 0; color: #503d30; font-size: 32px; line-height: 1.25; font-weight: 700; letter-spacing: .01em; }
.metric-value span { margin-left: 4px; color: #998779; font-size: 11px; font-weight: 500; }
.metric-foot { margin: 3px 0 0; color: #ad9e90; font-size: 9px; }
.metric-total { border-top: 3px solid #d99358; }.metric-free { border-top: 3px solid #a5b293; }.metric-free .metric-icon { background: #eff2e9; color: #788765; }
.metric-premium { border-top: 3px solid #e4b35b; }.metric-premium .metric-icon { background: #fbf2d9; color: #ae8127; }
.metric-sales .metric-icon { background: #f8ede3; }.metric-ai .metric-icon { background: #f2eafa; color: #8d70a3; }.metric-inquiries .metric-icon { background: #edf2f7; color: #7087a0; }
.next-panel { margin-top: 18px; display: flex; align-items: center; gap: 14px; padding: 17px 19px; border: 1px solid #efe4d8; border-radius: 15px; background: #fffaf3; }
.next-icon { flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; background: #f8eadb; color: #bd7843; font-size: 19px; }
.next-panel h2 { margin: 0; font-size: 12px; }
.next-panel p { margin: 4px 0 0; color: #928174; font-size: 10px; line-height: 1.6; }
.coming-soon { margin-left: auto; padding: 5px 8px; border-radius: 99px; background: #f5eadc; color: #a07755; font-size: 9px; white-space: nowrap; }
footer { margin-top: 22px; color: #ae9f91; font-size: 9px; }
footer span { margin: 0 5px; color: #d3bfa9; }

@media (min-width: 1200px) {
  .content-area { padding-top: 42px; }
  .welcome-panel { min-height: 182px; }
  .metric-card { min-height: 168px; padding: 19px 21px; }
  .metric-value { font-size: 36px; }
}

@media (max-width: 760px) {
  #app { display: block; padding: 0; }
  .login-card, .status-card { margin: max(7vh, 28px) auto 0; width: calc(100% - 32px); padding: 27px 23px; border-radius: 19px; }
  .dashboard { min-height: 100vh; border: 0; border-radius: 0; }
  .topbar { height: 60px; padding: 0 15px; }
  .dashboard-layout { display: block; min-height: calc(100vh - 60px); padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  .sidebar { position: fixed; z-index: 5; left: 0; right: 0; bottom: 0; padding: 5px 7px calc(5px + env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--line); background: #fffdf9f5; box-shadow: 0 -6px 20px #53391f0c; backdrop-filter: blur(12px); }
  .nav-caption { display: none; }
  .sidebar nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; }
  .nav-link { min-width: 0; min-height: 56px; height: 56px; flex-direction: column; justify-content: center; gap: 1px; padding: 3px 1px; font-size: 9px; text-align: center; }
  .nav-link > span:first-child { width: auto; height: 19px; font-size: 17px; }
  .nav-label { line-height: 13px; white-space: nowrap; }
  .nav-status { margin: 0; font-size: 7px; line-height: 9px; }
  .content-area { padding: 23px 16px 25px; }
  .content-heading h1 { font-size: 21px; }
  .secure-badge { gap: 5px; padding: 7px 8px; font-size: 9px; }
  .secure-badge > span { width: 6px; height: 6px; }
  .welcome-panel { min-height: 144px; margin-top: 20px; padding: 21px 18px; border-radius: 16px; }
  .welcome-kicker { max-width: 220px; font-size: 9px; }
  .welcome-panel h2 { font-size: 20px; }
  .welcome-panel p:last-child { max-width: 210px; font-size: 10px; }
  .welcome-illustration { right: -25px; transform: scale(.78); transform-origin: right center; }
  .section-heading { margin: 24px 0 11px; }
  .section-heading h2 { font-size: 15px; }
  .updated-label { font-size: 9px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric-card { min-height: 143px; padding: 13px 13px 12px; border-radius: 14px; }
  .metric-icon { width: 29px; height: 29px; border-radius: 10px; }
  .metric-label { margin-top: 11px; font-size: 10px; }
  .metric-value { font-size: clamp(27px, 8vw, 32px); }
  .metric-value span { font-size: 10px; }
  .metric-foot { font-size: 8px; }
  .next-panel { align-items: flex-start; gap: 10px; padding: 14px 12px; }
  .next-icon { flex-basis: 33px; width: 33px; height: 33px; }
  .next-panel h2 { padding-top: 2px; font-size: 10px; }
  .next-panel p { font-size: 9px; }
  .coming-soon { padding: 4px 6px; font-size: 8px; }
  footer { margin-bottom: 5px; font-size: 8px; }
}

@media (max-width: 370px) {
  .content-area { padding-right: 12px; padding-left: 12px; }
  .metric-grid { gap: 8px; }
  .metric-card { padding-right: 10px; padding-left: 10px; }
  .metric-state { font-size: 8px; }
  .welcome-illustration { right: -43px; opacity: .8; }
  .welcome-panel p:last-child { max-width: 185px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
