:root {
  --bg: #eef3f9;
  --card: #ffffff;
  --soft: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --line: #d8e2ee;
  --blue: #2563eb;
  --blue2: #1e40af;
  --green: #16a34a;
  --yellow: #d97706;
  --red: #dc2626;
  --violet: #7c3aed;
  --shadow: 0 16px 44px rgba(15, 23, 42, 0.10);
  --r: 18px;
}
* { box-sizing: border-box; }
body { margin: 0; background: linear-gradient(135deg, #edf5ff, #f8fafc 55%, #eef3f9); font-family: Inter, Segoe UI, Arial, sans-serif; color: var(--text); }
button, input, select, textarea { font-family: inherit; }
button:focus, input:focus, select:focus, textarea:focus { outline: 3px solid #bfdbfe; outline-offset: 1px; }
.top { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07); }
.brand { min-height: 54px; background: linear-gradient(90deg, #10294d, #17458a, #2563eb); color: #fff; display: flex; justify-content: space-between; align-items: center; padding: 10px 22px; gap: 12px; }
.brand b { font-size: 18px; }
.brand small { display: block; opacity: 0.78; }
.logo { width: 34px; height: 34px; border-radius: 11px; background: rgba(255, 255, 255, 0.16); display: grid; place-items: center; margin-right: 10px; }
.brand-left, .brand-right { display: flex; align-items: center; gap: 12px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #fff; color: #1e40af; display: grid; place-items: center; font-weight: 900; }
.tabs { min-height: 42px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 2px; padding: 6px 18px 0; background: #f9fbff; overflow: visible; }
.tab { border: 1px solid transparent; border-bottom: 0; background: transparent; padding: 10px 15px; border-radius: 12px 12px 0 0; font-weight: 900; color: #475569; cursor: pointer; white-space: nowrap; }
.tab.active { background: #fff; border-color: var(--line); color: var(--blue2); }
.ribbon { display: flex; gap: 13px; padding: 10px 18px 12px; background: #fff; overflow: auto; }
.rg { border-right: 1px solid var(--line); padding-right: 13px; min-width: 150px; }
.rg:last-child { border-right: 0; }
.rg-title { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 900; margin-bottom: 7px; }
.rb { border: 1px solid var(--line); background: var(--soft); padding: 8px 10px; border-radius: 11px; font-size: 12px; font-weight: 900; margin: 0 5px 5px 0; cursor: pointer; }
.rb:hover { background: #eff6ff; color: var(--blue2); border-color: #bfdbfe; }
.rb.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.ribbon-help { padding: 8px 18px 12px; border-top: 1px solid var(--line); background: #f8fafc; color: #334155; font-size: 13px; font-weight: 700; line-height: 1.35; }
.wrap { display: grid; grid-template-columns: 270px 1fr; gap: 22px; padding: 24px; }
.side { background: rgba(255, 255, 255, 0.9); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); height: max-content; position: sticky; top: 180px; }
.search { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 14px; }
.nav { display: grid; gap: 7px; }
.nav button { display: flex; justify-content: space-between; align-items: center; border: 1px solid transparent; background: transparent; border-radius: 14px; padding: 12px; font-weight: 900; text-align: left; cursor: pointer; }
.nav button:hover, .nav button.active { background: #eff6ff; color: var(--blue2); border-color: #bfdbfe; }
.badge { font-size: 11px; border-radius: 99px; padding: 4px 8px; background: #dbeafe; color: #1e40af; font-weight: 900; }
.hero { background: linear-gradient(135deg, #10294d, #2563eb); color: #fff; border-radius: 24px; padding: 24px; display: flex; justify-content: space-between; gap: 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.hero h1 { margin: 0 0 7px; }
.hero p { margin: 0; opacity: 0.88; line-height: 1.5; }
.card { background: rgba(255, 255, 255, 0.94); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; min-width: 0; overflow-x: auto; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.head h2, .head h3 { margin: 0; }
.head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.btn { border: 1px solid var(--line); background: #fff; border-radius: 13px; padding: 9px 12px; font-weight: 900; cursor: pointer; }
.btn.blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; }
.btn.small { font-size: 12px; padding: 7px 10px; }
.grid { display: grid; gap: 14px; }
.stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.two { grid-template-columns: 1.2fr 0.8fr; }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { padding: 16px; }
.stat small { color: var(--muted); font-weight: 900; text-transform: uppercase; font-size: 11px; }
.stat b { display: block; font-size: 25px; margin-top: 8px; }
.stat span { color: var(--muted); font-size: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f8fafc; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
tr:hover td { background: #fbfdff; }
.pill { display: inline-flex; border-radius: 99px; padding: 5px 9px; font-size: 12px; font-weight: 900; }
.green { background: #dcfce7; color: #166534; }
.yellow { background: #fef3c7; color: #92400e; }
.red { background: #fee2e2; color: #991b1b; }
.bluep { background: #dbeafe; color: #1e40af; }
.violet { background: #ede9fe; color: #5b21b6; }
.switch { display: flex; background: #f8fafc; border: 1px solid var(--line); border-radius: 13px; padding: 5px; gap: 5px; }
.switch button { border: 0; background: transparent; border-radius: 10px; padding: 8px 10px; font-weight: 900; color: var(--muted); cursor: pointer; }
.switch button.active { background: #fff; color: var(--blue2); box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08); }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(230px, 1fr)); gap: 14px; overflow: auto; }
.col { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 18px; padding: 12px; min-height: 220px; }
.col-title { display: flex; justify-content: space-between; font-weight: 900; margin-bottom: 10px; }
.drag { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin-bottom: 10px; box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06); cursor: grab; }
.drag h4 { margin: 0 0 5px; }
.drag p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.drop { background: #eff6ff !important; border-color: var(--blue) !important; }
.rooms { display: grid; grid-template-columns: repeat(6, minmax(130px, 1fr)); gap: 12px; }
.room { background: #fff; border: 1px solid var(--line); border-radius: 17px; padding: 13px; min-height: 108px; cursor: pointer; }
.room:hover { box-shadow: 0 10px 20px rgba(15, 23, 42, 0.09); transform: translateY(-1px); }
.room b { font-size: 18px; }
.room small { display: block; color: var(--muted); margin: 6px 0; }
.form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.field label { display: block; font-weight: 900; margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #f8fafc; }
.dropzone { border: 2px dashed #bfdbfe; background: #eff6ff; border-radius: 16px; text-align: center; padding: 22px; font-weight: 900; color: var(--blue2); }
.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.48); display: none; align-items: center; justify-content: center; padding: 18px; z-index: 99; }
.modal.show { display: flex; }
.modal-card { width: min(1180px, 100%); max-height: 90vh; overflow: auto; background: #fff; border-radius: 24px; padding: 20px; box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28); }
.subtabs { display: flex; flex-wrap: wrap; gap: 6px; background: #f8fafc; border: 1px solid var(--line); border-radius: 15px; padding: 6px; margin-bottom: 14px; }
.subtabs button { border: 0; background: transparent; border-radius: 11px; padding: 9px 11px; font-weight: 900; color: var(--muted); cursor: pointer; }
.subtabs button.active { background: #fff; color: var(--blue2); box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08); }
.mini { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; margin-bottom: 14px; }
.mini div { border: 1px solid var(--line); background: #f8fafc; border-radius: 15px; padding: 12px; }
.mini small { color: var(--muted); font-weight: 900; text-transform: uppercase; font-size: 11px; }
.mini b { display: block; margin-top: 6px; font-size: 18px; }
.toast { position: fixed; right: 22px; bottom: 22px; background: #10294d; color: #fff; border-radius: 15px; padding: 14px 16px; font-weight: 900; box-shadow: var(--shadow); transform: translateY(120px); opacity: 0; transition: 0.22s; z-index: 200; }
.toast.show { transform: translateY(0); opacity: 1; }
.calendar { display: grid; grid-template-columns: 80px 1fr; gap: 8px; }
.slot { border: 1px dashed #cbd5e1; background: #f8fafc; border-radius: 15px; padding: 10px; min-height: 56px; }
.appt { border-left: 5px solid var(--blue); background: #fff; border-radius: 13px; padding: 10px; margin-bottom: 8px; box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05); cursor: grab; }
.admin-menu { display: grid; grid-template-columns: 230px 1fr; gap: 14px; }
.admin-menu .left { display: grid; gap: 8px; align-content: start; }
.admin-menu .left button { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 13px; padding: 11px; font-weight: 900; cursor: pointer; }
.admin-menu .left button.active { background: #eff6ff; color: var(--blue2); border-color: #bfdbfe; }
@media (max-width: 1200px) { .wrap { grid-template-columns: 1fr; } .side { position: static; } .stats { grid-template-columns: repeat(3, 1fr); } .rooms { grid-template-columns: repeat(3, 1fr); } .hero { display: block; } .form { grid-template-columns: repeat(2, 1fr); } .mini { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .brand { height: auto; padding: 12px; align-items: flex-start; flex-direction: column; } .wrap { padding: 14px; } .stats, .two, .form, .mini, .admin-menu { grid-template-columns: 1fr; } .kanban { grid-template-columns: 1fr; } .rooms { grid-template-columns: repeat(2, 1fr); } }
