:root {
  --navy: #101b33;
  --navy-2: #17294d;
  --blue: #2459e8;
  --ink: #10213d;
  --muted: #75829a;
  --line: #dce3ed;
  --bg: #f3f6fa;
  --white: #fff;
  --green: #08a67b;
  --orange: #f1882b;
  --purple: #7b61ed;
  --danger: #c94343;
  --shadow: 0 12px 34px rgba(23, 42, 78, .07);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg); font-family: Inter, "Noto Sans JP", "Yu Gothic", system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 264px; display: flex; flex-direction: column; padding: 22px 16px; color: #dfe7f5; background: var(--navy); }
.brand { display: flex; align-items: center; gap: 13px; padding: 0 8px 24px; border-bottom: 1px solid rgba(255,255,255,.09); }
.brand strong { display: block; color: #fff; font-size: 18px; letter-spacing: .04em; }
.brand small { display: block; margin-top: 4px; color: #7f8da8; font-size: 9px; letter-spacing: .17em; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 13px; color: #fff; background: linear-gradient(135deg, #2d76ef, #0cc3ae); font-size: 23px; font-weight: 800; box-shadow: 0 7px 18px rgba(19,149,226,.24); }
.sidebar nav { margin-top: 25px; }
.nav-link { display: flex; gap: 12px; align-items: center; margin: 4px 0; padding: 13px 14px; border-radius: 11px; color: #bac6d9; font-weight: 700; }
.nav-link:hover { color: #fff; background: var(--navy-2); }
.nav-link span { color: #5d8cf6; }
.nav-caption { margin: 22px 14px 8px; color: #72829e; font-size: 11px; letter-spacing: .15em; }
.sidebar-user { margin-top: auto; padding: 16px; border: 1px solid rgba(255,255,255,.09); border-radius: 14px; background: rgba(255,255,255,.04); }
.sidebar-user strong, .sidebar-user small { display: block; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user small { margin: 5px 0 12px; color: #8e9bb3; font-size: 11px; }
.sidebar-actions { display: flex; gap: 11px; flex-wrap: wrap; font-size: 11px; color: #b8c7e2; }
.link-button { padding: 0; color: inherit; border: 0; background: transparent; }

.main { min-height: 100vh; margin-left: 264px; padding: 34px 42px 70px; }
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 28px; }
.page-header h1 { margin: 3px 0; font-size: clamp(26px, 3vw, 36px); font-weight: 500; letter-spacing: .02em; }
.eyebrow { margin: 0 0 8px; color: #8493ad; font-size: 11px; font-weight: 800; letter-spacing: .2em; }
.muted { color: var(--muted); }
.back-link { display: inline-block; margin-bottom: 16px; color: var(--blue); font-size: 13px; font-weight: 700; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.stat-card { display: flex; align-items: center; gap: 18px; min-height: 126px; padding: 24px; border: 1px solid var(--line); border-radius: 17px; background: var(--white); box-shadow: var(--shadow); }
.stat-card small, .stat-card strong { display: block; }
.stat-card small { margin-bottom: 8px; color: var(--muted); }
.stat-card strong { font-size: 28px; }
.stat-icon { display: grid; place-items: center; width: 54px; height: 54px; flex: 0 0 54px; border-radius: 14px; font-size: 28px; }
.stat-icon.blue { color: #3168ef; background: #edf2ff; }.stat-icon.green { color: var(--green); background: #e6f8f3; }.stat-icon.orange { color: var(--orange); background: #fff1e4; }.stat-icon.purple { color: var(--purple); background: #f0ebff; }

.panel { padding: 25px; border: 1px solid var(--line); border-radius: 17px; background: var(--white); box-shadow: var(--shadow); }
.panel h2 { margin: 0 0 18px; font-size: 21px; font-weight: 600; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 17px; }
.panel-heading h2 { margin: 0; }.panel-heading a { color: var(--blue); font-size: 13px; font-weight: 700; }
.narrow-panel { max-width: 620px; }

.property-list { margin: 0 -25px -25px; }
.property-row { display: grid; grid-template-columns: auto minmax(260px, 2fr) minmax(120px, .65fr) minmax(130px, .7fr) auto 20px; gap: 20px; align-items: center; padding: 17px 24px; border-top: 1px solid #edf0f5; transition: background .15s; }
.property-row:hover { background: #f8faff; }
.thumb { width: 78px; height: 58px; border-radius: 9px; object-fit: cover; background: #e9edf3; }
.thumb-empty { display: grid; place-items: center; color: #9aa5b7; font-size: 8px; }
.property-row:has(.thumb) { grid-template-columns: 78px auto minmax(240px, 2fr) minmax(120px, .65fr) auto 20px; }
.rank { display: grid; place-items: center; width: 60px; height: 60px; flex: 0 0 60px; border: 1px solid; border-radius: 14px; }
.rank strong, .rank small { display: block; line-height: 1; }.rank strong { font-size: 24px; }.rank small { margin-top: 6px; font-size: 10px; }
.rank-a { color: #00966c; border-color: #9fe6d2; background: #e8faf4; }.rank-b { color: #2262dd; border-color: #b6ccff; background: #edf3ff; }.rank-c { color: #e27a19; border-color: #ffd1a6; background: #fff5eb; }.rank-d { color: #727c8d; border-color: #d6dce5; background: #f3f5f8; }
.property-summary { min-width: 0; }.property-summary > * { display: block; }.property-summary small { margin-bottom: 5px; color: #7a879b; font-size: 10px; }.property-summary strong { overflow: hidden; margin-bottom: 6px; text-overflow: ellipsis; white-space: nowrap; }.property-summary span { overflow: hidden; color: #6e7a8e; font-size: 11px; line-height: 1.6; text-overflow: ellipsis; white-space: nowrap; }
.property-price strong, .property-price small, .property-area strong, .property-area small { display: block; }.property-price strong { font-size: 16px; }.property-price small, .property-area small { margin-top: 7px; color: var(--muted); font-size: 11px; }.property-area strong { font-size: 12px; }
.status-chip, .flag-list span { display: inline-flex; align-items: center; justify-content: center; padding: 7px 10px; border-radius: 999px; background: #edf0f5; color: #667287; font-size: 11px; white-space: nowrap; }
.status-要確認 { color: #a75a13; background: #fff0df; }.status-検討中 { color: #11664e; background: #ddf6ee; }.status-見送り { color: #667085; background: #eceff3; }
.chevron { color: #7e8ba1; font-size: 25px; }
.empty { padding: 50px 24px; color: var(--muted); text-align: center; border-top: 1px solid #edf0f5; }

.filter-grid { display: grid; grid-template-columns: minmax(260px, 2fr) repeat(4, minmax(120px, .7fr)) auto; gap: 10px; margin-bottom: 24px; }
input, select, textarea { width: 100%; border: 1px solid #d5dce7; border-radius: 10px; color: var(--ink); background: #fff; outline: none; }
input, select { min-height: 44px; padding: 0 13px; } textarea { padding: 12px 13px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #5b82e9; box-shadow: 0 0 0 3px rgba(36,89,232,.1); }
label { display: grid; gap: 7px; color: #536077; font-size: 13px; font-weight: 700; }
.stack-form { display: grid; gap: 17px; }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 0 17px; border: 1px solid transparent; border-radius: 10px; font-weight: 700; white-space: nowrap; }
.button-primary { color: #fff; background: var(--blue); box-shadow: 0 8px 20px rgba(36,89,232,.2); }.button-primary:hover { background: #174bcf; }
.button-secondary { color: #334157; border-color: #d7dfeb; background: #f4f7fb; }.button-small { min-height: 32px; padding: 0 10px; font-size: 11px; }.button-full { width: 100%; }
.alert { margin: 0 0 20px; padding: 14px 16px; border-radius: 11px; font-size: 13px; line-height: 1.65; }.alert-error { color: #9c2d2d; background: #ffeded; }.alert-success { color: #086c50; background: #e3f8f0; }.alert-info { color: #214c99; background: #eaf1ff; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, .8fr); gap: 22px; align-items: start; }
.detail-image { width: 100%; max-height: 440px; margin-bottom: 20px; border-radius: 13px; object-fit: cover; }
.score-banner { display: flex; align-items: center; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }.score-banner small, .score-banner strong { display: block; }.score-banner small { color: var(--muted); font-size: 11px; }.score-banner strong { margin-top: 7px; line-height: 1.5; }
.score-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }.score-grid div { padding: 17px; border-radius: 11px; text-align: center; background: #f4f7fb; }.score-grid small, .score-grid strong { display: block; }.score-grid small { color: var(--muted); }.score-grid strong { margin-top: 5px; font-size: 25px; }
.flag-list { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }.flag-list span { color: #a75a13; background: #fff0df; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0; border-top: 1px solid var(--line); }.facts div { padding: 16px 12px; border-bottom: 1px solid var(--line); }.facts dt { margin-bottom: 7px; color: var(--muted); font-size: 11px; }.facts dd { margin: 0; line-height: 1.5; }
.decision-panel { position: sticky; top: 22px; }

.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }.panel-wide { grid-column: 1 / -1; }
.table-wrap { width: 100%; overflow-x: auto; } table { width: 100%; border-collapse: collapse; font-size: 13px; } th, td { padding: 13px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; } th { color: var(--muted); font-size: 10px; letter-spacing: .06em; }.url-cell { display: block; max-width: 460px; overflow: hidden; color: var(--blue); text-overflow: ellipsis; white-space: nowrap; }
.copy-row { display: flex; gap: 8px; margin: 9px 0; }.toggle { display: flex; grid-template-columns: none; gap: 10px; align-items: center; margin-bottom: 17px; }.toggle input { width: 18px; min-height: 18px; }
.pagination { display: flex; justify-content: center; gap: 25px; margin-top: 28px; }.pagination a { color: var(--blue); font-weight: 700; }

.auth-main { display: grid; min-height: 100vh; place-items: center; padding: 28px; background: radial-gradient(circle at top right, #1e3c6d, var(--navy) 45%, #0b1427); }
.auth-card { width: min(440px, 100%); padding: 38px; border-radius: 20px; background: #fff; box-shadow: 0 25px 70px rgba(0,0,0,.24); }.auth-card h1 { margin: 7px 0; font-size: 30px; }.auth-logo { margin-bottom: 20px; }
.mobile-nav { display: none; }

@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-grid { grid-template-columns: repeat(3, 1fr); }
  .property-area { display: none; }
  .property-row { grid-template-columns: auto minmax(220px, 2fr) minmax(110px,.6fr) auto 20px; }
}

@media (max-width: 760px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 22px 14px 92px; }
  .page-header { align-items: flex-start; margin-bottom: 20px; }.page-header h1 { font-size: 27px; }.page-header .button { min-height: 38px; padding: 0 12px; font-size: 12px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }.stat-card { min-height: 98px; gap: 10px; padding: 15px; }.stat-card strong { font-size: 23px; }.stat-icon { width: 42px; height: 42px; flex-basis: 42px; font-size: 20px; }
  .panel { padding: 17px; border-radius: 14px; }.property-list { margin: 0 -17px -17px; }
  .property-row, .property-row:has(.thumb) { grid-template-columns: auto minmax(0,1fr) auto; gap: 12px; padding: 14px 15px; }.property-row .thumb, .property-price, .status-chip, .property-area { display: none; }.property-summary strong { font-size: 14px; }.property-summary span { max-width: 100%; }.rank { width: 48px; height: 48px; }.rank strong { font-size: 20px; }.rank small { margin-top: 4px; }
  .filter-grid { grid-template-columns: repeat(2, 1fr); }.filter-grid > input:first-child { grid-column: 1 / -1; }
  .detail-grid, .admin-grid { grid-template-columns: 1fr; }.panel-wide { grid-column: auto; }.decision-panel { position: static; }.facts { grid-template-columns: 1fr; }.score-grid div { padding: 12px 5px; }.score-grid small { font-size: 10px; }.score-grid strong { font-size: 20px; }
  .mobile-nav { position: fixed; inset: auto 0 0; z-index: 30; display: flex; justify-content: space-around; padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid #dfe4ec; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }.mobile-nav a { display: grid; gap: 3px; place-items: center; color: #637086; font-size: 10px; font-weight: 700; }.mobile-nav span { color: var(--blue); font-size: 17px; }
}

