:root {
    --bg: #07100d;
    --surface: #0d1a16;
    --raised: #10231c;
    --raised-2: #142b22;
    --line: rgba(189, 236, 214, .14);
    --line-strong: rgba(189, 236, 214, .27);
    --text: #edf8f2;
    --muted: #91a99e;
    --teal: #3ed5ad;
    --blue: #78b9f7;
    --amber: #f2b96b;
    --red: #f17c74;
    --violet: #b39cf4;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; background: var(--bg); color: var(--text); }
body::before { position: fixed; z-index: -1; inset: 0; content: ""; background: radial-gradient(circle at 86% -10%, rgba(62, 213, 173, .1), transparent 31rem), radial-gradient(circle at 4% 48%, rgba(120, 185, 247, .055), transparent 25rem); pointer-events: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; }

.panel-header { position: sticky; z-index: 20; top: 0; display: flex; align-items: center; gap: 18px; min-height: 76px; padding: 0 clamp(20px, 5vw, 76px); border-bottom: 1px solid var(--line); background: rgba(7, 16, 13, .86); backdrop-filter: blur(18px); }
.panel-brand { display: inline-flex; align-items: center; gap: 10px; margin-right: 18px; color: var(--text); font-size: 14px; letter-spacing: .08em; text-decoration: none; }
.panel-brand strong { font-weight: 800; }.panel-brand em { margin-left: 2px; color: var(--teal); font-style: normal; font-weight: 800; }
.brand-mark { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid rgba(62, 213, 173, .45); border-radius: 9px; color: var(--teal); font-size: 17px; font-weight: 800; box-shadow: inset 0 0 20px rgba(62, 213, 173, .1); }
.panel-header nav { display: flex; gap: 25px; margin-right: auto; }.panel-header nav a { position: relative; color: var(--muted); font-size: 14px; text-decoration: none; }.panel-header nav a:hover, .panel-header nav a.active { color: var(--text); }.panel-header nav a.active::after { position: absolute; right: 0; bottom: -29px; left: 0; height: 2px; background: var(--teal); content: ""; }
.profile-button, .action-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(19, 38, 31, .55); color: var(--text); cursor: pointer; font-size: 12px; font-weight: 800; transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.profile-button:hover, .action-button:hover { border-color: rgba(62, 213, 173, .52); background: var(--raised); transform: translateY(-1px); }.profile-button span { color: var(--teal); }

.panel-shell { max-width: 1500px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 76px) 92px; }
.panel-hero { position: relative; display: flex; align-items: end; justify-content: space-between; gap: 30px; min-height: 326px; margin-top: clamp(28px, 5vw, 64px); padding: clamp(34px, 5vw, 62px); border: 1px solid rgba(62, 213, 173, .24); border-radius: 26px; overflow: hidden; background: linear-gradient(124deg, rgba(14, 42, 34, .96), rgba(12, 26, 21, .98) 62%, rgba(10, 20, 18, .98)); box-shadow: 0 28px 80px rgba(0, 0, 0, .18); }.panel-hero::before { position: absolute; width: 520px; height: 520px; top: -325px; right: -65px; border: 1px solid rgba(62,213,173,.14); border-radius: 50%; box-shadow: 0 0 0 72px rgba(62,213,173,.025), 0 0 0 144px rgba(62,213,173,.018); content: ""; }.panel-hero > * { position: relative; z-index: 1; }.eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 15px; color: var(--teal); font-size: 10px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }.eyebrow span { width: 20px; height: 1px; background: currentColor; }
h1, h2, h3, p { margin-top: 0; }h1 { margin-bottom: 15px; font-size: clamp(44px, 6vw, 76px); letter-spacing: -.065em; line-height: .92; }h1 span { color: var(--teal); }.panel-hero > div > p:not(.eyebrow) { max-width: 610px; margin-bottom: 0; color: var(--muted); font-size: 15px; line-height: 1.68; }
.hero-status { display: grid; grid-template-columns: auto auto; align-items: center; gap: 3px 8px; flex: 0 0 auto; min-width: 172px; padding: 16px 18px; border: 1px solid rgba(193,235,216,.2); border-radius: 13px; background: rgba(6,17,13,.42); color: var(--teal); font-size: 10px; letter-spacing: .09em; }.hero-status small { grid-column: 2; color: var(--muted); font-size: 10px; letter-spacing: 0; }.status-dot { grid-row: span 2; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 11px var(--teal); }

.profile-summary { display: flex; align-items: center; gap: 13px; min-height: 77px; width: min(100% - 48px, 1040px); margin: 22px auto 66px; padding: 15px 18px; border: 1px solid rgba(193,235,216,.19); border-radius: 13px; background: rgba(12, 31, 25, .93); box-shadow: 0 16px 42px rgba(0,0,0,.18); }.profile-avatar { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 11px; background: rgba(62, 213, 173, .13); color: var(--teal); font-size: 19px; }.profile-summary h2 { margin: 0 0 3px; font-size: 14px; letter-spacing: -.02em; }.profile-summary p { margin: 0; color: var(--muted); font-size: 12px; }.profile-summary .profile-edit { margin-left: auto; color: var(--teal); font-size: 12px; font-weight: 800; }

.tool-library, .calculator-library { scroll-margin-top: 25px; margin-bottom: 74px; }.library-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 23px; }.library-heading .eyebrow { margin-bottom: 12px; }.library-heading h2 { margin-bottom: 7px; font-size: clamp(26px, 3vw, 37px); letter-spacing: -.05em; }.library-heading p:not(.eyebrow) { margin-bottom: 0; color: var(--muted); font-size: 13px; }.library-heading p strong { color: var(--teal); }
.tool-search { display: flex; align-items: center; gap: 9px; width: min(100%, 300px); min-height: 44px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(7, 16, 13, .52); color: var(--muted); transition: border-color .2s ease, box-shadow .2s ease; }.tool-search:focus-within { border-color: rgba(62, 213, 173, .65); box-shadow: 0 0 0 3px rgba(62, 213, 173, .09); }.tool-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }.tool-search input::placeholder { color: #6c877a; }
.tool-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }.tool-card { --tone: var(--teal); display: flex; flex-direction: column; min-height: 224px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(145deg, rgba(16, 30, 25, .78), rgba(9, 18, 15, .83)); transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }.tool-card:hover { border-color: color-mix(in srgb, var(--tone) 60%, var(--line)); box-shadow: 0 16px 31px rgba(0, 0, 0, .16); transform: translateY(-3px); }.tool-card[hidden] { display: none; }.tool-card-body { flex: 1; padding: 17px 17px 13px; }.tool-icon { display: grid; width: 36px; height: 36px; place-items: center; margin-bottom: 13px; border-radius: 9px; background: color-mix(in srgb, var(--tone) 16%, transparent); color: var(--tone); font-size: 17px; font-weight: 850; }.tool-card h3 { margin: 0 0 7px; font-size: 13px; letter-spacing: -.02em; line-height: 1.22; }.tool-card p { margin: 0; color: #789086; font-size: 11px; line-height: 1.48; }.tool-card button { width: calc(100% - 26px); min-height: 35px; margin: 0 13px 13px; border: 0; border-radius: 8px; background: color-mix(in srgb, var(--tone) 88%, #5695ff); color: #062118; cursor: pointer; font-size: 11px; font-weight: 850; transition: filter .2s ease, transform .2s ease; }.tool-card button:hover { filter: brightness(1.09); transform: translateY(-1px); }.tone-blue { --tone: var(--blue); }.tone-red { --tone: var(--red); }.tone-amber { --tone: var(--amber); }.tone-violet { --tone: var(--violet); }.tone-teal { --tone: var(--teal); }.empty-tools { padding: 32px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); text-align: center; font-size: 13px; }
.calculator-result { margin-top: 21px; padding: 16px; border: 1px solid rgba(62, 213, 173, .28); border-radius: 10px; background: rgba(62, 213, 173, .075); color: #cce7db; font-size: 12px; line-height: 1.6; white-space: pre-line; }.calculator-result strong { display: block; margin-bottom: 4px; color: var(--teal); font-size: 17px; letter-spacing: -.03em; }

.workspace { scroll-margin-top: 24px; margin-top: 32px; border: 1px solid rgba(62, 213, 173, .34); border-radius: 16px; overflow: hidden; background: rgba(13, 26, 22, .86); box-shadow: 0 21px 64px rgba(0, 0, 0, .2); }.workspace-topbar { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding: 25px 28px 21px; border-bottom: 1px solid var(--line); background: rgba(7, 16, 13, .3); }.workspace-label { display: block; margin-bottom: 6px; color: var(--teal); font-size: 10px; font-weight: 850; letter-spacing: .15em; }.workspace-topbar h2 { margin: 0 0 5px; font-size: 27px; letter-spacing: -.045em; }.workspace-topbar p { margin: 0; color: var(--muted); font-size: 13px; }.close-workspace, .dialog-close { display: grid; flex: 0 0 auto; width: 29px; height: 29px; place-items: center; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; font-size: 23px; line-height: 1; }.close-workspace:hover, .dialog-close:hover { background: rgba(255,255,255,.06); color: var(--text); }
.workspace-layout { display: grid; grid-template-columns: minmax(285px, .74fr) minmax(0, 1.26fr); }.document-form { padding: 26px; border-right: 1px solid var(--line); background: rgba(7, 16, 13, .2); }.form-heading { display: flex; align-items: start; gap: 10px; margin-bottom: 21px; }.form-heading > span, .preview-toolbar > div > span { display: grid; flex: 0 0 25px; width: 25px; height: 25px; place-items: center; border: 1px solid rgba(62, 213, 173, .32); border-radius: 7px; color: var(--teal); font-size: 10px; font-weight: 850; }.form-heading h3 { margin: 1px 0 3px; font-size: 15px; }.form-heading p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.form-section { grid-column: 1 / -1; margin: 17px 0 2px; color: var(--teal); font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }.form-section:first-child { margin-top: 0; }.form-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }.field { display: grid; gap: 6px; min-width: 0; color: #b6cbc1; font-size: 11px; font-weight: 700; }.field.wide { grid-column: 1 / -1; }.field input, .field select, .field textarea { width: 100%; min-height: 39px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; outline: 0; background: rgba(14, 30, 24, .84); color: var(--text); font-size: 12px; transition: border-color .2s ease, box-shadow .2s ease; }.field textarea { min-height: 84px; resize: vertical; line-height: 1.5; }.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(62, 213, 173, .66); box-shadow: 0 0 0 3px rgba(62, 213, 173, .08); }.field option { background: #0e1e18; }
.preview-column { min-width: 0; }.preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 20px; border-bottom: 1px solid var(--line); }.preview-toolbar > div:first-child { display: flex; align-items: center; gap: 8px; font-size: 12px; }.preview-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 7px; }.action-button { min-height: 33px; padding: 0 10px; font-size: 11px; }.action-button.primary { border-color: transparent; background: var(--teal); color: #062118; }.action-button.primary:hover { background: #79e8ca; }.action-button.ghost { background: transparent; }
.document-preview { position: relative; min-height: 690px; margin: 24px; padding: clamp(23px, 3.5vw, 43px); overflow: hidden; border-radius: 3px; background: #f9fbfa; color: #17211d; box-shadow: 0 12px 31px rgba(0, 0, 0, .21); }.document-preview::before { position: absolute; z-index: 0; top: 50%; left: 50%; color: rgba(15, 132, 96, .055); content: "MEDYCYNA RP"; font-size: clamp(42px, 8vw, 90px); font-weight: 900; letter-spacing: .07em; white-space: nowrap; transform: translate(-50%, -50%) rotate(-31deg); pointer-events: none; }.document-preview > * { position: relative; z-index: 1; }.doc-header { display: flex; align-items: start; justify-content: space-between; gap: 15px; padding-bottom: 18px; border-bottom: 2px solid #1a8e6f; }.doc-brand { display: flex; align-items: center; gap: 9px; color: #0c513e; font-size: 11px; font-weight: 900; letter-spacing: .11em; }.doc-brand span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 7px; background: #0b8d6c; color: white; font-size: 15px; }.doc-type { margin-top: 19px; font-size: clamp(22px, 3vw, 32px); font-weight: 850; letter-spacing: -.045em; }.doc-subtitle { margin: 4px 0 0; color: #587168; font-size: 12px; }.doc-number { padding: 6px 8px; border: 1px solid #bad6cc; border-radius: 4px; color: #37675a; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-align: right; }.doc-data { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 22px; margin: 23px 0; }.doc-data div { padding-bottom: 7px; border-bottom: 1px solid #dae7e1; }.doc-data span { display: block; margin-bottom: 3px; color: #719087; font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }.doc-data strong { display: block; color: #22342e; font-size: 12px; overflow-wrap: anywhere; }.doc-section { margin-top: 21px; }.doc-section h3 { margin: 0 0 8px; padding-bottom: 5px; border-bottom: 1px solid #beddd1; color: #0d795c; font-size: 10px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }.doc-section p { margin: 0; color: #273b34; font-size: 12px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }.doc-table { width: 100%; border-collapse: collapse; font-size: 11px; }.doc-table th, .doc-table td { padding: 8px; border: 1px solid #cfdfd8; text-align: left; vertical-align: top; }.doc-table th { background: #eef7f3; color: #0f745a; font-size: 9px; letter-spacing: .07em; text-transform: uppercase; }.doc-signatures { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px; margin-top: 45px; }.signature-line { padding-top: 22px; border-top: 1px solid #70887f; color: #567168; font-size: 10px; text-align: center; }.signature-line em { display: block; margin-bottom: 2px; color: #1b4337; font-family: Georgia, serif; font-size: 17px; }.barcode { width: 135px; height: 32px; margin-top: 16px; background: repeating-linear-gradient(90deg, #1a2822 0 2px, transparent 2px 4px, #1a2822 4px 5px, transparent 5px 7px, #1a2822 7px 11px, transparent 11px 13px); }

.profile-dialog { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; padding: 20px; }.profile-dialog[hidden] { display: none; }.dialog-backdrop { position: absolute; inset: 0; background: rgba(2, 9, 6, .76); backdrop-filter: blur(8px); }.dialog-panel { position: relative; width: min(100%, 580px); padding: 32px; border: 1px solid var(--line-strong); border-radius: 16px; background: #102019; box-shadow: 0 28px 90px rgba(0,0,0,.47); }.dialog-close { position: absolute; top: 12px; right: 13px; }.dialog-panel h2 { margin-bottom: 8px; font-size: 29px; letter-spacing: -.045em; }.dialog-copy { margin-bottom: 21px; color: var(--muted); font-size: 13px; line-height: 1.55; }.profile-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }.profile-form label { display: grid; gap: 6px; color: #b6cbc1; font-size: 11px; font-weight: 750; }.profile-form input { min-height: 41px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; outline: 0; background: rgba(7,16,13,.45); color: var(--text); font-size: 12px; }.profile-form input:focus { border-color: rgba(62,213,173,.66); }.profile-actions { display: flex; justify-content: end; grid-column: 1 / -1; gap: 8px; margin-top: 6px; }
.panel-footer { display: flex; justify-content: space-between; gap: 20px; max-width: 1500px; margin: 0 auto; padding: 25px clamp(20px, 5vw, 76px); border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }.panel-footer span:last-child { max-width: 590px; text-align: right; }

@media (max-width: 1220px) { .tool-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 940px) { .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }.workspace-layout { grid-template-columns: 1fr; }.document-form { border-right: 0; border-bottom: 1px solid var(--line); }.document-preview { min-height: 590px; }.panel-hero { align-items: start; flex-direction: column; }.profile-summary { width: min(100% - 30px, 780px); } }
@media (max-width: 680px) { .panel-header { min-height: 65px; gap: 14px; padding: 0 20px; }.panel-header nav { display: none; }.profile-button { width: 36px; min-height: 36px; padding: 0; overflow: hidden; font-size: 0; }.profile-button span { font-size: 15px; }.panel-shell { padding: 0 20px 62px; }.panel-hero { min-height: 0; margin-top: 20px; padding: 32px 24px; border-radius: 19px; }.profile-summary { width: 100%; margin: 18px 0 54px; }.library-heading { align-items: stretch; flex-direction: column; }.tool-search { width: 100%; }.tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }.tool-card { min-height: 220px; }.workspace-topbar { padding: 20px 18px; }.workspace-topbar h2 { font-size: 23px; }.document-form { padding: 20px 18px; }.preview-toolbar { align-items: start; flex-direction: column; }.preview-actions { justify-content: start; }.document-preview { margin: 16px; padding: 23px 18px; }.doc-data, .doc-signatures { grid-template-columns: 1fr; }.profile-form { grid-template-columns: 1fr; }.dialog-panel { padding: 28px 20px 20px; }.panel-footer { align-items: start; flex-direction: column; gap: 9px; }.panel-footer span:last-child { text-align: left; } }
@media print { @page { margin: 10mm; size: A4; } body { background: white; } body::before, .panel-header, .panel-hero, .profile-summary, .tool-library, .calculator-library, .workspace-topbar, .document-form, .preview-toolbar, .panel-footer { display: none !important; }.panel-shell { max-width: none; padding: 0; }.workspace { display: block !important; border: 0; box-shadow: none; background: white; }.workspace-layout { display: block; }.preview-column { display: block; }.document-preview { min-height: auto; margin: 0; padding: 0; box-shadow: none; }.document-preview::before { color: rgba(15, 132, 96, .045); } }
