:root {
    --bg: #f4f7f5;
    --panel: #ffffff;
    --ink: #153b38;
    --muted: #70807a;
    --line: #dde7e2;
    --soft: #eef4f1;
    --accent: #db9353;
    --accent-dark: #b96f31;
    --success-bg: #e9f6ef;
    --success: #2f7a56;
    --warn-bg: #fff2df;
    --warn: #9a6529;
    --shadow: 0 12px 30px rgba(18, 55, 52, .07);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 245px 1fr; }
.sidebar { background: #113b38; color: #fff; padding: 26px 18px; display: flex; flex-direction: column; min-height: 100vh; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 28px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 800; }
.brand strong, .brand span { display: block; }
.brand span { font-size: 12px; opacity: .7; margin-top: 2px; }
nav { display: grid; gap: 5px; }
.nav-link { padding: 11px 12px; border-radius: 9px; color: rgba(255,255,255,.78); }
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,.09); color: #fff; }
.sidebar-footer { margin-top: auto; padding: 18px 8px 0; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar-footer p { margin: 7px 0 0; color: rgba(255,255,255,.64); font-size: 13px; line-height: 1.5; }
.main { min-width: 0; }
.topbar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 28px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(10px); }
.global-search { display: flex; width: min(720px, 70%); }
.global-search input { flex: 1; border: 1px solid var(--line); border-right: 0; border-radius: 10px 0 0 10px; padding: 12px 14px; outline: none; background: #fff; }
.global-search input:focus { border-color: #b5c9c0; box-shadow: inset 0 0 0 1px #b5c9c0; }
.global-search button { border: 0; border-radius: 0 10px 10px 0; padding: 0 18px; background: var(--ink); color: #fff; font-weight: 700; }
.user-chip { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.user-chip strong, .user-chip span { display: block; }
.user-chip span { color: var(--muted); font-size: 12px; }
.content { padding: 30px; max-width: 1500px; margin: 0 auto; }
.page-heading, .profile-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
h1 { margin: 5px 0 8px; font-size: clamp(28px, 3vw, 40px); line-height: 1.08; }
h2 { margin: 4px 0 8px; font-size: 22px; }
h3 { margin: 0 0 8px; font-size: 17px; }
p { color: var(--muted); line-height: 1.6; }
.eyebrow { font-size: 11px; letter-spacing: .12em; font-weight: 800; color: var(--accent-dark); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 9px 14px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 700; }
.button.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.actions { margin-top: 18px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.stat-card { padding: 20px; }
.stat-card strong { display: block; font-size: 30px; margin-bottom: 5px; }
.stat-card span { color: var(--muted); font-size: 14px; }
.panel { padding: 22px; margin-bottom: 20px; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 14px; }
.attention-list, .customer-list, .partner-list, .task-list, .note-list, .timeline { display: grid; gap: 0; }
.attention-item, .partner-row, .task-item { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.attention-item:first-child, .partner-row:first-child, .task-item:first-child { padding-top: 4px; }
.attention-item:last-child, .partner-row:last-child, .task-item:last-child { border-bottom: 0; padding-bottom: 4px; }
.attention-item > div { flex: 1; }
.attention-item p, .partner-row span, .task-item span { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.two-column { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
.avatar { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: #dcebe4; font-weight: 800; color: var(--ink); flex: 0 0 auto; }
.avatar.large { width: 78px; height: 78px; font-size: 24px; }
.avatar.small { width: 36px; height: 36px; font-size: 12px; }
.customer-row { display: flex; align-items: center; gap: 14px; padding: 15px 4px; border-bottom: 1px solid var(--line); }
.customer-row:hover { background: #fafcfb; }
.customer-row:last-child { border-bottom: 0; }
.customer-row-main { flex: 1; min-width: 0; }
.customer-row-main strong, .customer-row-main span { display: block; }
.customer-row-main span { color: var(--muted); font-size: 13px; margin-top: 4px; }
.status, .tag { display: inline-flex; align-items: center; border-radius: 999px; font-size: 12px; font-weight: 800; padding: 5px 9px; }
.status-active, .status-confirmed, .status-completed { color: var(--success); background: var(--success-bg); }
.status-preparing, .status-open { color: var(--warn); background: var(--warn-bg); }
.tag { background: var(--soft); color: #4a625b; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.profile-hero { align-items: center; background: linear-gradient(135deg, #ffffff, #f7faf8); border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); }
.profile-title { flex: 1; }
.profile-title h1 { margin-bottom: 5px; }
.profile-title p { margin: 0; }
.profile-actions { display: flex; gap: 8px; }
.subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 22px; }
.subnav a { padding: 8px 11px; border: 1px solid var(--line); background: #fff; border-radius: 999px; font-size: 13px; color: #4e655f; }
.profile-grid { align-items: stretch; }
.details { margin: 16px 0 0; display: grid; gap: 12px; }
.details div { display: grid; grid-template-columns: 150px 1fr; gap: 15px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.details div:last-child { border-bottom: 0; }
dt { color: var(--muted); font-size: 13px; }
dd { margin: 0; font-weight: 650; }
.summary-panel .lead { font-size: 16px; color: #4d645e; }
.mini-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 22px; }
.mini-stats div { padding: 13px; background: var(--soft); border-radius: 10px; }
.mini-stats strong, .mini-stats span { display: block; }
.mini-stats strong { font-size: 22px; }
.mini-stats span { font-size: 12px; color: var(--muted); margin-top: 2px; }
.booking-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.booking-card { border: 1px solid var(--line); border-radius: 12px; padding: 17px; background: #fff; }
.booking-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.muted { color: var(--muted); font-size: 12px; }
.booking-card p { margin: 0 0 14px; }
.booking-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.booking-meta span { background: var(--soft); padding: 5px 8px; border-radius: 7px; font-size: 12px; color: #4f665f; }
.booking-note { border-top: 1px solid var(--line); padding-top: 12px; color: #536860; font-size: 13px; line-height: 1.5; }
.family-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-top: 16px; }
.person-card { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.person-card strong, .person-card span { display: block; }
.person-card span { color: var(--muted); font-size: 12px; margin-top: 3px; }
.preference-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 16px; }
.preference-grid article, .wishlist-grid article { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: #fbfcfb; }
.preference-grid ul { margin: 8px 0 0; padding-left: 18px; color: #526760; }
.preference-grid li { margin: 6px 0; line-height: 1.45; }
.wishlist-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.wishlist-grid p { margin: 5px 0 0; font-size: 13px; }
.note-list article { padding: 12px 0; border-bottom: 1px solid var(--line); }
.note-list article:last-child { border-bottom: 0; }
.note-list p { margin: 5px 0 0; }
.timeline-item { display: grid; grid-template-columns: 14px 1fr; gap: 12px; position: relative; padding: 2px 0 18px; }
.timeline-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-top: 5px; }
.timeline-item strong, .timeline-item span { display: block; }
.timeline-item span { color: var(--muted); font-size: 12px; margin-top: 3px; }
.timeline-item p { margin: 5px 0 0; }
.empty-state { padding: 30px 10px; text-align: center; }

@media (max-width: 1000px) {
    .app-shell { grid-template-columns: 88px 1fr; }
    .sidebar { padding: 24px 10px; }
    .brand > div:last-child, .sidebar-footer, .nav-link { font-size: 0; }
    .nav-link::first-letter { font-size: 14px; }
    .brand { justify-content: center; padding-left: 0; padding-right: 0; }
    .brand-mark { width: 44px; height: 44px; }
    .stats-grid, .family-grid { grid-template-columns: repeat(2,1fr); }
    .preference-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 760px) {
    .app-shell { display: block; }
    .sidebar { min-height: auto; height: auto; position: static; display: block; }
    .brand { justify-content: flex-start; padding-bottom: 14px; }
    .brand > div:last-child { display: block; }
    .sidebar nav { display: flex; overflow-x: auto; }
    .nav-link { font-size: 13px; white-space: nowrap; }
    .nav-link::first-letter { font-size: inherit; }
    .topbar { position: static; padding: 12px 14px; }
    .global-search { width: 100%; }
    .user-chip { display: none; }
    .content { padding: 18px 14px; }
    .page-heading, .profile-hero { display: block; }
    .profile-actions { margin-top: 16px; }
    .stats-grid, .two-column, .booking-grid, .family-grid, .preference-grid, .wishlist-grid { grid-template-columns: 1fr; }
    .details div { grid-template-columns: 1fr; gap: 4px; }
    .mini-stats { grid-template-columns: 1fr 1fr 1fr; }
}
