@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');

:root {
  --ink: #342b31;
  --muted: #91858c;
  --pink: #b94f73;
  --pink-dark: #9e3f61;
  --pink-pale: #faedf1;
  --cream: #fbf8f5;
  --line: #eee7e7;
  --green: #517b69;
  --green-pale: #eaf3ed;
  --gold: #b88947;
  --shadow: 0 12px 32px rgba(67, 45, 54, .06);
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--cream);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; background: var(--cream); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 5; display: flex; flex-direction: column; width: 252px; padding: 27px 17px 18px; background: #fff; border-right: 1px solid #f1ebeb; }
.brand { display: flex; align-items: center; gap: 11px; margin: 0 8px 45px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px 14px 14px 5px; background: var(--pink); color: #fff; font: 600 24px 'Playfair Display', serif; letter-spacing: -5px; padding-right: 4px; }
.brand-mark span { color: #f5d9e2; }
.brand strong { display: block; font: 600 21px 'Playfair Display', serif; letter-spacing: -.5px; }
.brand small { display: block; margin-top: 2px; color: #a1959b; font-size: 8px; font-weight: 700; letter-spacing: 1.8px; }
.workspace-label { margin: 0 11px 12px; color: #b0a5aa; font-size: 9px; font-weight: 700; letter-spacing: 1.5px; }
.main-nav { display: grid; gap: 5px; }
.nav-link { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 12px; border: 0; border-radius: 10px; background: transparent; color: #81757c; text-align: left; font-size: 13px; font-weight: 500; transition: background .18s, color .18s; }
.nav-link:hover { background: #faf6f7; color: var(--pink); }
.nav-link.active { background: var(--pink-pale); color: var(--pink-dark); font-weight: 700; }
.nav-icon { display: inline-grid; place-items: center; width: 19px; color: #a68e98; font-size: 18px; }
.nav-link.active .nav-icon { color: var(--pink); }
.nav-link:nth-child(4) .nav-icon { font-size: 11px; font-weight: 700; }
.nav-count { margin-left: auto; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 7px; background: #fff; color: var(--pink); font-size: 10px; }
.lock-mark { margin-left: auto; color: #aa9da3; font-size: 17px; }
.sidebar-bottom { margin-top: auto; }
.help-card { margin: 15px 3px 17px; padding: 16px 14px 13px; border-radius: 13px; background: linear-gradient(140deg, #fbf0f3, #fff8f1); }
.help-flower { display: block; margin-bottom: 7px; color: var(--pink); font-size: 19px; }
.help-card strong { font: 600 15px 'Playfair Display', serif; }
.help-card p { margin: 5px 0 0; color: #887a81; font-size: 11px; line-height: 1.55; }
.profile-button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 8px 3px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; }
.profile-button strong { display: block; font-size: 11px; }
.profile-button small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.profile-dots { margin-left: auto; color: #998e93; font-size: 22px; }
.avatar { display: inline-grid; flex: 0 0 auto; place-items: center; width: 35px; height: 35px; border-radius: 50%; background: #f3dbe3; color: #98445e; font-weight: 700; font-size: 12px; }
.avatar-owner { background: #f1d8e1; color: #90465f; }
.main-area { min-height: 100vh; margin-left: 252px; }
.topbar { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; height: 69px; padding: 0 38px; border-bottom: 1px solid #f0eaea; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); }
.breadcrumb { color: #a0959a; font-size: 11px; }
.breadcrumb span { margin: 0 9px; color: #d3c9ce; }
.breadcrumb strong { color: #574b52; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.today-label { color: #82767c; font-size: 11px; text-transform: capitalize; }
.icon-button { position: relative; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #85747d; font-size: 16px; }
.icon-button i { position: absolute; top: 6px; right: 7px; width: 5px; height: 5px; border: 1px solid white; border-radius: 50%; background: var(--pink); }
.top-avatar { width: 30px; height: 30px; }
.mobile-menu { display: none; }
.page-content { max-width: 1440px; margin: 0 auto; padding: 31px 38px 55px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin-bottom: 25px; }
.eyebrow { margin-bottom: 7px; color: var(--pink); font-size: 9px; font-weight: 700; letter-spacing: 1.7px; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 5px; font: 600 29px 'Playfair Display', serif; letter-spacing: -.45px; }
.subtitle { margin: 0; color: var(--muted); font-size: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 15px; border: 1px solid transparent; border-radius: 9px; background: var(--pink); color: #fff; font-size: 11px; font-weight: 700; transition: .18s; }
.button:hover { background: var(--pink-dark); transform: translateY(-1px); }
.button.secondary { border-color: var(--line); background: #fff; color: #6f6068; }
.button.secondary:hover { border-color: #e5c4d0; background: #fff9fb; color: var(--pink); }
.button.soft { background: var(--pink-pale); color: var(--pink-dark); }
.button.small { min-height: 30px; padding: 0 10px; font-size: 10px; }
.button.danger { background: #fff1f0; color: #b54d47; }
.button.green { background: #edf5ef; color: #4a745e; }
.button:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.install-button { min-height: 32px; padding: 0 10px; font-size: 10px; }
.install-instructions { color: #766a70; font-size: 11px; line-height: 1.65; }
.install-instructions ol { display: grid; gap: 8px; padding-left: 20px; }
.install-instructions p { margin: 14px 0 0; color: #9c9096; font-size: 10px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 17px; }
.stat-card, .panel { border: 1px solid #f0e9e9; border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
.stat-card { min-height: 125px; padding: 17px 17px 15px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.stat-label { color: #82767d; font-size: 10px; font-weight: 500; }
.stat-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; background: #f9edf1; color: var(--pink); font-size: 13px; }
.stat-icon.green-bg { background: #edf5ef; color: var(--green); }
.stat-icon.gold-bg { background: #faf3e9; color: var(--gold); }
.stat-icon.lilac-bg { background: #f2eff8; color: #8572a0; }
.stat-value { display: flex; align-items: baseline; gap: 8px; font-size: 23px; font-weight: 700; letter-spacing: -.7px; }
.stat-note { margin-top: 5px; color: #aaa0a4; font-size: 9px; }
.stat-note em { color: #58816c; font-style: normal; font-weight: 700; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(285px, .85fr); gap: 16px; }
.panel { padding: 19px 19px 17px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.panel-heading h2 { margin: 0 0 4px; font: 600 17px 'Playfair Display', serif; }
.panel-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.text-button { padding: 5px 0; border: 0; background: none; color: var(--pink); font-size: 10px; font-weight: 700; }
.appointment-list { display: grid; }
.appointment-row { display: grid; grid-template-columns: 48px 35px minmax(90px, 1fr) auto; align-items: center; gap: 10px; min-height: 66px; border-top: 1px solid #f4efef; }
.appointment-row:first-child { border-top: 0; }
.appointment-time { color: #695b63; font-size: 11px; font-weight: 700; }
.client-avatar { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 11px; background: #f7e8ed; color: #9e4e67; font-size: 11px; font-weight: 700; }
.client-avatar.color-1 { background: #edf1e9; color: #648067; }
.client-avatar.color-2 { background: #f4eedd; color: #9d7e43; }
.client-avatar.color-3 { background: #eee9f5; color: #7a6893; }
.appointment-info strong { display: block; overflow: hidden; color: #51454c; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.appointment-info small { display: block; margin-top: 4px; color: #a1979c; font-size: 9px; }
.status { display: inline-flex; align-items: center; gap: 5px; width: max-content; padding: 5px 8px; border-radius: 99px; background: #f4f0f1; color: #82767d; font-size: 8px; font-weight: 700; white-space: nowrap; }
.status::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ''; }
.status.confirmado { background: #edf5ef; color: #507b61; }
.status.pendente { background: #fbf3e7; color: #ad7b31; }
.status.cancelado { background: #f8eceb; color: #b2655d; }
.status.concluido { background: #f0eef6; color: #796992; }
.empty-state { padding: 30px 12px; color: var(--muted); text-align: center; font-size: 11px; }
.chart-wrap { position: relative; height: 174px; padding-top: 11px; }
.chart-grid { position: absolute; inset: 15px 0 25px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart-grid span { display: block; border-top: 1px dashed #eee7e8; }
.chart-bars { position: absolute; inset: 10px 0 20px; display: flex; align-items: flex-end; justify-content: space-around; gap: 8px; padding: 0 7px; }
.chart-column { display: flex; flex: 1; align-items: flex-end; justify-content: center; height: 100%; }
.chart-bar { width: min(27px, 66%); min-height: 3px; border-radius: 6px 6px 2px 2px; background: #e7b5c5; transition: height .25s; }
.chart-bar.current { background: var(--pink); }
.chart-labels { position: absolute; right: 0; bottom: 0; left: 0; display: flex; justify-content: space-around; color: #aaa0a4; font-size: 8px; }
.chart-legend { display: flex; gap: 6px; align-items: center; color: #978b91; font-size: 9px; }
.chart-legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--pink); }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin-top: 16px; }
.quick-card { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border: 1px solid #f0e9e9; border-radius: 11px; background: #fff; color: inherit; text-align: left; }
.quick-card:hover { border-color: #e8c8d3; }
.quick-card > span:first-child { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--pink-pale); color: var(--pink); font-size: 15px; }
.quick-card strong { display: block; font-size: 10px; }
.quick-card small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 15px; }
.field, .select { min-height: 36px; padding: 0 11px; border: 1px solid #eae2e4; border-radius: 8px; outline: 0; background: #fff; color: var(--ink); font-size: 11px; }
.field:focus, .select:focus, textarea:focus { border-color: #cd8ba0; box-shadow: 0 0 0 3px #f8e9ee; }
.search-field { min-width: 210px; }
.toolbar-spacer { flex: 1; }
.data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { padding: 11px 12px; border-bottom: 1px solid var(--line); color: #a0959a; font-size: 9px; font-weight: 600; white-space: nowrap; }
.data-table td { padding: 12px; border-bottom: 1px solid #f4efef; color: #63575e; font-size: 10px; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: 0; }
.table-person { display: flex; align-items: center; gap: 9px; }
.table-person strong { color: #50444b; font-size: 10px; }
.table-person small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.row-actions { display: flex; gap: 5px; }
.tag { display: inline-flex; padding: 4px 7px; border-radius: 6px; background: #f7f1f3; color: #927d86; font-size: 9px; }
.notice { margin-bottom: 15px; padding: 12px 14px; border: 1px solid #f3e3d2; border-radius: 9px; background: #fffaf3; color: #89744e; font-size: 10px; line-height: 1.5; }
.notice strong { color: #806639; }
.demo-warning { border-color: #efcfaf; background: #fff7ec; color: #8b6230; }
.demo-warning strong { color: #80551f; }
.portal-shell { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(250px, .7fr); gap: 18px; max-width: 960px; margin: 5px auto; }
.portal-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 25px; }
.portal-brand .brand-mark { width: 35px; height: 35px; font-size: 20px; }
.portal-brand strong { font: 600 19px 'Playfair Display', serif; }
.portal-card { padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.portal-card h2 { margin-bottom: 6px; font: 600 20px 'Playfair Display', serif; }
.portal-card > p { margin-bottom: 18px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-field { display: grid; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { color: #766a70; font-size: 10px; font-weight: 600; }
.form-field input, .form-field select, .form-field textarea { width: 100%; min-height: 38px; padding: 9px 10px; border: 1px solid #eae2e4; border-radius: 8px; outline: 0; background: white; color: var(--ink); font-size: 11px; }
.form-field textarea { min-height: 75px; resize: vertical; }
.form-footnote { margin: 12px 0 0 !important; color: #9c9096 !important; font-size: 9px !important; }
.portal-side { align-self: start; padding: 22px; border-radius: 14px; background: linear-gradient(155deg, #f8e8ed, #fcf4ef); }
.portal-side h3 { margin: 0 0 14px; font: 600 18px 'Playfair Display', serif; }
.portal-side ul { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.portal-side li { display: flex; gap: 9px; color: #76666e; font-size: 10px; line-height: 1.5; }
.portal-side li span { color: var(--pink); font-weight: 700; }
.service-grid, .team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.service-card, .team-card { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.service-top { display: flex; justify-content: space-between; gap: 8px; }
.service-card h3, .team-card h3 { margin: 0 0 4px; font: 600 16px 'Playfair Display', serif; }
.service-card p, .team-card p { margin: 0; color: var(--muted); font-size: 10px; }
.service-price { margin-top: 14px; color: var(--pink-dark); font-size: 19px; font-weight: 700; }
.service-price small { color: #a0949a; font-size: 9px; font-weight: 500; }
.team-card { display: flex; align-items: center; gap: 11px; }
.team-card .avatar { width: 39px; height: 39px; }
.team-card .team-meta { flex: 1; }
.tabs { display: flex; gap: 5px; padding: 4px; border-radius: 9px; background: #f6f1f2; }
.tab-button { padding: 7px 10px; border: 0; border-radius: 6px; background: transparent; color: #887b82; font-size: 9px; }
.tab-button.active { background: #fff; color: var(--pink-dark); box-shadow: 0 2px 5px #342b3110; font-weight: 700; }
.finance-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin: 15px 0; }
.finance-summary .stat-card { min-height: 97px; padding: 14px; }
.finance-summary .stat-value { font-size: 19px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 16px; background: rgba(39, 27, 33, .38); backdrop-filter: blur(3px); }
.modal { width: min(510px, 100%); max-height: min(88vh, 760px); overflow: auto; padding: 23px; border: 1px solid #f0e7e9; border-radius: 15px; background: #fff; box-shadow: 0 22px 65px #28151f30; }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.modal-heading h2 { margin: 0 0 4px; font: 600 21px 'Playfair Display', serif; }
.modal-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.close-button { width: 29px; height: 29px; border: 0; border-radius: 8px; background: #f8f2f4; color: #8d7b83; font-size: 17px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.toast { position: fixed; right: 22px; bottom: 20px; z-index: 20; max-width: calc(100vw - 40px); padding: 12px 16px; border-radius: 10px; background: #342b31; color: #fff; box-shadow: 0 8px 25px #342b3133; opacity: 0; pointer-events: none; transform: translateY(10px); transition: .2s; font-size: 11px; }
.toast.show { opacity: 1; transform: translateY(0); }
.muted { color: var(--muted); }
.section-spacer { height: 18px; }
.divider { height: 1px; margin: 18px 0; background: var(--line); }
.inline-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.inline-meta span { color: var(--muted); font-size: 9px; }
.finance-locked { max-width: 400px; margin: 60px auto; text-align: center; }
.lock-circle { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 18px; background: var(--pink-pale); color: var(--pink); font-size: 22px; }

@media (max-width: 1080px) {
  .sidebar { width: 218px; }
  .main-area { margin-left: 218px; }
  .page-content { padding-right: 24px; padding-left: 24px; }
  .topbar { padding-right: 24px; padding-left: 24px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .sidebar { width: 252px; transform: translateX(-100%); transition: transform .22s; box-shadow: 12px 0 35px #342b3110; }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .topbar { height: 59px; padding: 0 16px; }
  .mobile-menu { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; background: transparent; color: #65575f; font-size: 17px; }
  .breadcrumb { margin-right: auto; margin-left: 10px; }
  .today-label { display: none; }
  .topbar-right { gap: 10px; }
  .page-content { padding: 24px 16px 40px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
  .quick-card { padding: 10px 12px; }
  .portal-shell { grid-template-columns: 1fr; }
  .portal-side { order: -1; }
  .service-grid, .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading .button { align-self: stretch; }
  h1 { font-size: 25px; }
  .stats-grid { gap: 9px; }
  .stat-card { min-height: 112px; padding: 13px; }
  .stat-value { font-size: 20px; }
  .panel { padding: 15px 13px; }
  .appointment-row { grid-template-columns: 40px 32px minmax(75px, 1fr) auto; gap: 7px; }
  .appointment-row .status { padding: 4px 6px; font-size: 7px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .service-grid, .team-grid { grid-template-columns: 1fr; }
  .finance-summary { grid-template-columns: 1fr; gap: 8px; }
  .finance-summary .stat-card { min-height: auto; }
  .search-field { min-width: 100%; }
  .toolbar-spacer { display: none; }
  .topbar-right { gap: 7px; }
  .install-button { min-height: 30px; padding: 0 7px; font-size: 9px; }
}
@media print {
  :root, body { background: #fff; }
  .sidebar, .topbar, .page-heading > .button, .toolbar, .text-button, .row-actions, .quick-grid, #modal-root { display: none !important; }
  .main-area { margin: 0; }
  .page-content { max-width: none; padding: 0; }
  .panel, .stat-card { break-inside: avoid; border-color: #ddd; box-shadow: none; }
}
