:root {
  --ink: #18201a;
  --muted: #747d72;
  --line: #dce5d8;
  --paper: #ffffff;
  --soft: #f4f8f1;
  --lime: #6bff00;
  --lime-dark: #2d8c16;
  --green: #3aa62a;
  --danger: #d64935;
  --shadow: 0 22px 70px rgba(45, 72, 37, .12);
  --radius: 24px;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: #f6faef; }
body { margin: 0; min-height: 100vh; color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; background: radial-gradient(circle at 5% 10%, #d9ffbd 0, transparent 28rem), linear-gradient(145deg, #f9fcf5, #eff6ec); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
.eyebrow { color: #3da42b; font-size: 12px; font-weight: 900; letter-spacing: .22em; }
.primary, .secondary, .ghost, .danger-btn { border-radius: 14px; min-height: 44px; padding: 0 18px; border: 1px solid transparent; font-weight: 800; cursor: pointer; transition: .18s ease; }
.primary { background: linear-gradient(135deg, #78ff12, #53e900); border-color: #58d813; box-shadow: 0 8px 22px rgba(93, 227, 13, .22); }
.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(93, 227, 13, .3); }
.secondary { background: #fff; border-color: #cfd9ca; }
.secondary:hover { background: #f5faF2; border-color: #8fbe7d; }
.ghost { background: transparent; border-color: #dde5d9; }
.danger-btn { background: #fff4f1; color: #a93628; border-color: #f1c1b9; }
.wide { width: 100%; }
.compact { min-height: 38px; padding: 0 12px; }
button:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }
label { display: grid; gap: 7px; color: #657064; font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid #d7e0d3; border-radius: 13px; background: #fff; color: var(--ink); padding: 12px 13px; outline: none; transition: .15s ease; }
input:focus, select:focus, textarea:focus { border-color: #6ecc48; box-shadow: 0 0 0 3px rgba(98, 224, 42, .14); }
textarea { resize: vertical; min-height: 110px; }

.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden; }
.login-glow { position: fixed; border-radius: 50%; filter: blur(12px); pointer-events: none; }
.login-glow-one { width: 480px; height: 480px; background: rgba(117, 255, 27, .18); left: -180px; top: -160px; }
.login-glow-two { width: 360px; height: 360px; background: rgba(43, 163, 48, .09); right: -120px; bottom: -120px; }
.login-card { width: min(430px, 100%); background: rgba(255,255,255,.91); backdrop-filter: blur(16px); border: 1px solid rgba(139, 178, 122, .4); border-radius: 30px; padding: 38px; box-shadow: var(--shadow); display: grid; gap: 18px; position: relative; }
.login-logo { width: 180px; max-height: 62px; object-fit: contain; object-position: left center; margin-bottom: 4px; }
.login-card h1 { font-size: 38px; margin: -6px 0 0; letter-spacing: -.04em; }
.login-card p { margin: -8px 0 4px; color: var(--muted); line-height: 1.5; }
.admin-switch, .check-row { display: flex; align-items: center; gap: 9px; color: #4f5a4e; }
.admin-switch input, .check-row input { width: 18px; height: 18px; accent-color: #59de0b; }
.form-error { border: 1px solid #efc0b8; background: #fff2ef; color: #9d3325; border-radius: 12px; padding: 11px 13px; font-size: 13px; }

.app-shell { min-height: 100vh; }
.topbar { width: min(1460px, calc(100% - 40px)); height: 86px; margin: 18px auto 0; padding: 10px 14px 10px 20px; background: rgba(255,255,255,.9); backdrop-filter: blur(18px); border: 1px solid rgba(182, 204, 173, .55); border-radius: 24px; box-shadow: 0 12px 45px rgba(50, 73, 43, .08); display: flex; align-items: center; gap: 24px; position: sticky; top: 14px; z-index: 20; }
.brand { border: 0; background: transparent; display: flex; align-items: center; gap: 12px; padding: 0; cursor: pointer; min-width: 210px; text-align: left; }
.brand img { width: 122px; height: 52px; object-fit: contain; }
.brand span { display: grid; line-height: .95; }
.brand small { font-weight: 900; font-size: 10px; letter-spacing: .14em; color: #47aa31; }
.brand strong { font-size: 26px; letter-spacing: -.04em; }
.main-nav { display: flex; align-items: center; gap: 5px; background: #f3f7f0; border-radius: 16px; padding: 5px; }
.nav-btn { border: 0; background: transparent; border-radius: 12px; padding: 11px 16px; font-weight: 800; color: #6b7469; cursor: pointer; }
.nav-btn.active { background: #fff; color: var(--ink); box-shadow: 0 3px 12px rgba(50,70,45,.1); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.count-badge { display: inline-grid; place-items: center; min-width: 21px; height: 21px; padding: 0 6px; background: #dfe8dc; border-radius: 20px; font-size: 11px; }
.count-badge.light { background: rgba(255,255,255,.65); }
.user-menu { position: relative; }
.avatar { width: 44px; height: 44px; border: 0; border-radius: 50%; background: #1d251e; color: white; font-weight: 900; cursor: pointer; }
.popover { position: absolute; right: 0; top: 52px; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 15px; display: grid; gap: 7px; }
.popover span { color: var(--muted); font-size: 12px; }
.popover button { margin-top: 6px; border: 0; background: #fff3f0; color: #aa382b; border-radius: 10px; padding: 9px; text-align: left; font-weight: 800; cursor: pointer; }
main { width: min(1460px, calc(100% - 40px)); margin: 24px auto 60px; }

.hero { padding: 34px 42px 32px; background: linear-gradient(120deg, rgba(255,255,255,.88), rgba(244,255,235,.92)); border: 1px solid rgba(178, 213, 159, .7); border-radius: 32px; box-shadow: var(--shadow); overflow: hidden; position: relative; }
.hero::after { content: ""; position: absolute; width: 440px; height: 440px; border-radius: 50%; right: -120px; top: -230px; background: radial-gradient(circle, rgba(105,255,0,.24), transparent 67%); }
.hero-copy { position: relative; z-index: 1; max-width: none; }
.hero-tagline { margin: 8px 0 0; color: var(--muted); font-size: 17px; line-height: 1.45; white-space: nowrap; }
.page-head h1 { margin: 8px 0 10px; font-size: clamp(38px, 5vw, 68px); letter-spacing: -.055em; line-height: 1.02; }
.page-head p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.5; max-width: 720px; }
.search-shell { position: relative; z-index: 1; max-width: 920px; margin: 24px auto 0; }
.search-shell input { height: 66px; border-radius: 22px; border: 1px solid #cbdac5; padding: 0 54px; font-size: 18px; box-shadow: 0 12px 28px rgba(40, 70, 31, .1); }
.search-icon { position: absolute; left: 20px; top: 15px; font-size: 31px; color: #667363; transform: rotate(-18deg); }
.search-clear { position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; border: 0; border-radius: 50%; font-size: 24px; background: #eef4ea; cursor: pointer; }
.catalog-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; margin-top: 22px; align-items: start; }
.filters-card { position: sticky; top: 116px; background: rgba(255,255,255,.88); border: 1px solid var(--line); border-radius: 22px; padding: 20px; display: grid; gap: 17px; }
.filters-head { display: flex; justify-content: space-between; align-items: center; }
.filters-head h2 { margin: 0; font-size: 20px; }
.link-btn { border: 0; background: transparent; color: #388a29; font-size: 12px; font-weight: 800; cursor: pointer; }
.range-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.field-label { display: block; margin-bottom: 9px; color: #657064; font-size: 13px; font-weight: 700; }
.check-stack { display: grid; gap: 8px; }
.check-stack label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.check-stack input { width: 16px; height: 16px; accent-color: #59de0b; }

select option.priority-city { font-weight: 900; }
.results-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 13px; }
.results-head > div { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.results-head span { font-size: 25px; font-weight: 900; }
.results-head small { color: var(--muted); white-space: nowrap; }
#mobileFiltersBtn { display: none; }
.catalog-content { min-width: 0; }
.card-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.talent-card { background: rgba(255,255,255,.94); border: 1px solid #dce7d8; border-radius: 17px; padding: 10px 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 12px; min-height: 86px; box-shadow: 0 6px 18px rgba(55, 83, 45, .045); transition: .18s ease; }
.talent-card:hover { transform: translateY(-1px); border-color: #acd397; box-shadow: 0 10px 25px rgba(55,83,45,.09); }
.talent-main { min-width: 0; display: grid; grid-template-rows: 1fr 1fr; }
.talent-line { min-width: 0; display: grid; align-items: center; gap: 12px; }
.talent-line-top { grid-template-columns: minmax(180px, 1.35fr) 110px 135px minmax(220px, 1.3fr); border-bottom: 1px solid #edf2ea; padding-bottom: 7px; }
.talent-line-bottom { grid-template-columns: minmax(180px, 1.35fr) 110px 135px minmax(220px, 1.3fr); padding-top: 7px; }
.talent-name-cell { min-width: 0; display: flex; align-items: center; gap: 7px; }
.category-pill { flex: 0 0 auto; display: inline-flex; align-items: center; max-width: 120px; padding: 5px 8px; border-radius: 100px; background: #e4f7da; color: #2f8f2a; font-size: 9px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.city-pill { display: inline-flex; justify-self: start; max-width: 100%; padding: 6px 9px; background: #f0f4ed; border-radius: 100px; color: #657064; font-size: 11px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.talent-card h3 { min-width: 0; font-size: 17px; margin: 0; line-height: 1.15; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dance-title { min-width: 0; display: flex; align-items: baseline; gap: 5px; white-space: nowrap; overflow: hidden; }
.dance-title h3 { flex: 0 1 auto; max-width: 65%; }
.dance-dash { flex: 0 0 auto; color: #8b9389; font-size: 12px; }
.dance-number-name { min-width: 0; color: #667064; font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price { font-size: 17px; font-weight: 900; white-space: nowrap; }
.description { grid-column: 1 / 4; min-width: 0; color: #697268; font-size: 12px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-row { grid-column: 4; min-width: 0; display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: 5px; overflow: hidden; }
.status-pill { flex: 0 0 auto; border-radius: 100px; padding: 5px 8px; font-size: 9px; font-weight: 900; background: #f2f4f1; color: #788076; white-space: nowrap; }
.status-pill.yes { background: #e0f9d4; color: #28731a; }
.status-pill.no { background: #fff0ed; color: #ad4638; }
.status-pill.language { background: #eef5ff; color: #3e6287; }
.contact-line { min-width: 0; font-size: 11px; color: #576256; display: flex; gap: 5px; flex-wrap: nowrap; align-items: center; justify-content: flex-end; text-align: right; white-space: nowrap; overflow: hidden; }
.contact-line span, .contact-line a { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.contact-line a { color: #2e7d21; text-decoration: none; flex: 0 1 auto; }
.contact-separator { color: #a0a8a0; flex: 0 0 auto; }
.contact-empty { color: #98a097; }
.card-actions { display: flex; align-items: center; gap: 6px; margin: 0; white-space: nowrap; align-self: stretch; }
.card-actions .primary { min-height: 38px; }
.empty-state { background: rgba(255,255,255,.72); border: 1px dashed #cbd8c6; border-radius: 22px; padding: 48px 24px; text-align: center; color: var(--muted); }
.empty-state h3 { color: var(--ink); margin: 8px 0 4px; }
.empty-state p { margin: 0; }
.empty-icon { font-size: 40px; }

.page-head { background: rgba(255,255,255,.87); border: 1px solid var(--line); border-radius: 28px; padding: 38px 42px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.page-head h1 { font-size: 52px; }
.draft-list { display: grid; gap: 10px; margin-top: 16px; }
.draft-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: grid; grid-template-columns: 1.4fr 1fr .6fr .6fr auto; gap: 16px; align-items: center; }
.draft-card h3 { margin: 0 0 5px; font-size: 18px; }
.draft-card p, .draft-card small { margin: 0; color: var(--muted); }
.draft-stat { display: grid; gap: 4px; }
.draft-stat span { color: var(--muted); font-size: 11px; text-transform: uppercase; font-weight: 800; }
.draft-stat strong { font-size: 15px; }
.draft-actions { display: flex; gap: 7px; }
.status-tag { display: inline-flex; align-items: center; width: max-content; border-radius: 100px; padding: 5px 9px; background: #eff4ec; color: #667064; font-size: 11px; font-weight: 900; }
.status-tag.transferred { background: #dcf8d0; color: #28731a; }

.estimate-shell { background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); overflow: hidden; }
.estimate-head { padding: 27px 30px 18px; display: flex; justify-content: space-between; gap: 18px; align-items: start; border-bottom: 1px solid var(--line); }
.estimate-head h1 { margin: 4px 0 0; font-size: 32px; letter-spacing: -.04em; }
.autosave { color: #6c7769; font-size: 12px; font-weight: 700; }
.autosave.saving { color: #c07b16; }
.autosave.saved { color: #39892c; }
.estimate-head-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: end; }
.event-fields { padding: 20px 30px; display: grid; grid-template-columns: 1.1fr 1.1fr .75fr .8fr .65fr; gap: 12px; background: #f7faf5; }
.event-fields .tax-field { grid-column: auto; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 30px 10px; }
.table-toolbar h2 { margin: 0; font-size: 20px; }
.estimate-table-wrap { margin: 0 30px; border: 1px solid #dce4d9; border-radius: 16px; overflow-x: auto; }
.estimate-table { width: 100%; min-width: 920px; border-collapse: collapse; table-layout: fixed; }
.estimate-table th { background: #edf5e9; color: #657064; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 11px 8px; text-align: left; }
.estimate-table td { padding: 6px; border-top: 1px solid #e4e9e2; }
.estimate-table input { border-radius: 9px; padding: 9px; border-color: transparent; background: transparent; }
.estimate-table input:focus { background: #fff; border-color: #6ecc48; }
.estimate-table .drag-cell { width: 36px; color: #8b9488; cursor: grab; text-align: center; font-size: 20px; }
.estimate-table .name-col { width: 25%; }
.estimate-table .num-col { width: 11%; }
.estimate-table .note-col { width: 21%; }
.estimate-table .amount-col { width: 13%; text-align: right; font-weight: 900; }
.estimate-table .action-col { width: 44px; text-align: center; }
.row-delete { width: 32px; height: 32px; border: 1px solid #efc6bf; border-radius: 9px; background: #fff; color: #c44837; cursor: pointer; }
.estimate-row.dragging { opacity: .4; }
.estimate-totals { margin: 18px 30px 26px auto; width: min(470px, calc(100% - 60px)); display: grid; gap: 7px; }
.total-line { display: flex; justify-content: space-between; align-items: center; padding: 10px 13px; background: #f7f9f6; border-radius: 11px; }
.total-line span { color: #667064; }
.total-line strong { font-size: 16px; }
.total-line.final { background: #e2ffd1; border: 1px solid #9bdb79; }
.total-line.final span, .total-line.final strong { color: #235f18; font-weight: 900; font-size: 19px; }
.transferred-banner { margin: 0 30px 26px; border: 1px solid #93d273; background: #ecffe3; border-radius: 15px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(21,30,20,.56); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; }
.modal { position: relative; width: min(720px, 100%); max-height: 92vh; overflow: auto; background: #fff; border-radius: 25px; box-shadow: 0 30px 90px rgba(0,0,0,.24); padding: 30px; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f0f3ef; font-size: 25px; cursor: pointer; }
.modal h2 { margin: 5px 0 7px; font-size: 30px; letter-spacing: -.035em; }
.modal-subtitle { color: var(--muted); margin: 0 0 22px; }
.card-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card-form .full { grid-column: 1 / -1; }
.radio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.radio-option { position: relative; }
.radio-option input { position: absolute; opacity: 0; }
.radio-option span { display: grid; place-items: center; min-height: 42px; border: 1px solid #d8dfd5; border-radius: 11px; cursor: pointer; font-size: 12px; font-weight: 800; }
.radio-option input:checked + span { border-color: #62c83d; background: #e8ffd9; color: #286e19; }
.form-actions { grid-column: 1/-1; display: flex; justify-content: space-between; gap: 9px; margin-top: 8px; }
.history-list { display: grid; gap: 8px; margin-top: 18px; }
.history-row { background: #f6f8f4; border-radius: 12px; padding: 11px 13px; font-size: 12px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 200; max-width: 410px; padding: 13px 16px; border-radius: 13px; background: #1d261d; color: #fff; box-shadow: 0 12px 34px rgba(0,0,0,.2); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #9e382c; }

@media (max-width: 1120px) {
  .event-fields { grid-template-columns: repeat(3, 1fr); }
  .draft-card { grid-template-columns: 1.3fr .8fr .7fr auto; }
  .draft-card .updated-stat { display: none; }
  .brand { min-width: 155px; }
  .brand span { display: none; }
}
@media (max-width: 820px) {
  .topbar { width: calc(100% - 20px); margin-top: 10px; top: 8px; height: 74px; padding: 8px 10px; gap: 8px; }
  .brand { min-width: auto; }
  .brand img { width: 88px; }
  .main-nav { margin-left: auto; }
  .nav-btn { padding: 9px 10px; font-size: 12px; }
  .top-actions .secondary { display: none; }
  .top-actions { margin-left: 0; }
  .top-actions .primary { padding: 0 11px; font-size: 12px; }
  main { width: calc(100% - 20px); margin-top: 12px; }
  .hero { padding: 28px 22px 26px; border-radius: 24px; }
  .hero-tagline { white-space: normal; }
  .catalog-layout { grid-template-columns: 1fr; }
  .filters-card { position: fixed; inset: auto 10px 10px; top: 90px; z-index: 40; transform: translateY(120%); transition: .25s ease; overflow: auto; box-shadow: var(--shadow); }
  .filters-card.mobile-open { transform: translateY(0); }
  #mobileFiltersBtn { display: block; }
  .card-grid { overflow-x: auto; padding-bottom: 5px; }
  .talent-card { min-width: 900px; }
  .page-head { padding: 28px 22px; align-items: start; flex-direction: column; }
  .page-head h1 { font-size: 42px; }
  .draft-card { grid-template-columns: 1fr auto; }
  .draft-card .draft-stat { display: none; }
  .estimate-head { padding: 22px; flex-direction: column; }
  .estimate-head-actions { justify-content: start; }
  .event-fields { padding: 18px 22px; grid-template-columns: 1fr 1fr; }
  .table-toolbar { padding-inline: 22px; }
  .estimate-table-wrap { margin-inline: 12px; }
  .estimate-totals { margin-right: 18px; width: calc(100% - 36px); }
  .card-form { grid-template-columns: 1fr; }
  .card-form .full { grid-column: auto; }
  .form-actions { grid-column: auto; }
}
@media (max-width: 520px) {
  .login-card { padding: 28px 22px; border-radius: 24px; }
  .login-card h1 { font-size: 32px; }
  .brand img { width: 66px; }
  .main-nav .nav-btn { font-size: 0; width: 42px; }
  .main-nav .nav-btn:first-child::before { content: "⌂"; font-size: 20px; }
  .main-nav .nav-btn:nth-child(2)::before { content: "▤"; font-size: 18px; }
  .main-nav .count-badge { font-size: 9px; position: absolute; margin: -8px 0 0 -5px; }
  .hero-tagline { font-size: 14px; }
  .search-shell input { height: 58px; font-size: 15px; }
  .event-fields { grid-template-columns: 1fr; }
  .draft-card { padding: 15px; }
  .draft-actions { grid-column: 1 / -1; }
  .modal { padding: 25px 18px; }
}
