:root {
    --ink: #18212f;
    --muted: #697386;
    --line: #dfe8e3;
    --soft: #f3f7f5;
    --white: #ffffff;
    --navy: #0b251d;
    --navy-light: #163d30;
    --accent: #137c55;
    --accent-dark: #0d6242;
    --accent-soft: #e3f3eb;
    --accent-shadow: rgba(19, 124, 85, .22);
    --accent-ring: rgba(19, 124, 85, .12);
    --avatar-bg: #dff2e9;
    --avatar-ink: #0f6547;
    --sidebar-avatar-bg: #254d3f;
    --sidebar-avatar-ink: #d3f1e6;
    --focus: #6ab89d;
    --success: #167652;
    --error: #b63838;
    --radius: 14px;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--soft);
    font-synthesis: none;
}

:root[data-theme="ocean"] {
    --line: #e4e8ef;
    --soft: #f5f7fa;
    --navy: #101b2d;
    --navy-light: #1b2940;
    --accent: #2864dc;
    --accent-dark: #1d4fb9;
    --accent-soft: #edf3ff;
    --accent-shadow: rgba(40, 100, 220, .22);
    --accent-ring: rgba(40, 100, 220, .11);
    --avatar-bg: #e4edff;
    --avatar-ink: #214780;
    --sidebar-avatar-bg: #253a5c;
    --sidebar-avatar-ink: #cfe0ff;
    --focus: #7da8ff;
}

:root[data-theme="forest"] {
    --line: #dfe8e3;
    --soft: #f3f7f5;
    --navy: #0b251d;
    --navy-light: #163d30;
    --accent: #137c55;
    --accent-dark: #0d6242;
    --accent-soft: #e3f3eb;
    --accent-shadow: rgba(19, 124, 85, .22);
    --accent-ring: rgba(19, 124, 85, .12);
    --avatar-bg: #dff2e9;
    --avatar-ink: #0f6547;
    --sidebar-avatar-bg: #254d3f;
    --sidebar-avatar-ink: #d3f1e6;
    --focus: #6ab89d;
}

:root[data-theme="amber"] {
    --line: #e9e1d6;
    --soft: #faf7f2;
    --navy: #271d13;
    --navy-light: #3d2d1f;
    --accent: #ad590f;
    --accent-dark: #8f4708;
    --accent-soft: #fff0df;
    --accent-shadow: rgba(173, 89, 15, .22);
    --accent-ring: rgba(173, 89, 15, .12);
    --avatar-bg: #fbe8d3;
    --avatar-ink: #91470a;
    --sidebar-avatar-bg: #513824;
    --sidebar-avatar-ink: #f9dfc0;
    --focus: #e2a15f;
}

:root[data-theme="plum"] {
    --line: #e7dfec;
    --soft: #f7f4fa;
    --navy: #21162d;
    --navy-light: #39254a;
    --accent: #8b4fc4;
    --accent-dark: #7138aa;
    --accent-soft: #f2e9fa;
    --accent-shadow: rgba(139, 79, 196, .22);
    --accent-ring: rgba(139, 79, 196, .12);
    --avatar-bg: #eee2f8;
    --avatar-ink: #67339a;
    --sidebar-avatar-bg: #4a3260;
    --sidebar-avatar-ink: #eddcfb;
    --focus: #b282dd;
}

:root[data-theme="coral"] {
    --line: #ebdfe1;
    --soft: #faf5f6;
    --navy: #2a171c;
    --navy-light: #45252d;
    --accent: #b64259;
    --accent-dark: #973146;
    --accent-soft: #fbe8ec;
    --accent-shadow: rgba(182, 66, 89, .22);
    --accent-ring: rgba(182, 66, 89, .12);
    --avatar-bg: #f8dfe4;
    --avatar-ink: #a83249;
    --sidebar-avatar-bg: #58303a;
    --sidebar-avatar-ink: #f8dce2;
    --focus: #e48798;
}

* { box-sizing: border-box; }

body { margin: 0; min-height: 100vh; }

button, input, select, textarea { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

a { color: inherit; text-decoration: none; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-size: 18px;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: #fff;
    background: var(--accent);
    font-weight: 800;
    box-shadow: 0 7px 18px var(--accent-shadow);
}

.brand--light { color: #fff; }

.eyebrow {
    display: block;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.eyebrow--light { color: #f0c65a; }

.login-page {
    --accent: #137c55;
    --accent-dark: #0d6242;
    --accent-shadow: rgba(19, 124, 85, .24);
    --accent-ring: rgba(19, 124, 85, .12);
    background: #fff;
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(380px, 44%) 1fr;
    min-height: 100vh;
}

.login-intro {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    min-height: 100vh;
    padding: 44px 9%;
    color: #fff;
    background:
        radial-gradient(circle at 94% 7%, rgba(230, 177, 42, .34), transparent 34%),
        radial-gradient(circle at 5% 96%, rgba(180, 52, 56, .11), transparent 32%),
        linear-gradient(150deg, #153b2e 0%, #0b251d 72%);
}

.login-intro::before,
.login-intro::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 50%;
}

.login-intro::before { width: 560px; height: 560px; left: -330px; bottom: -230px; }
.login-intro::after { width: 360px; height: 360px; right: -180px; top: 30%; }

.intro-copy { position: relative; z-index: 1; max-width: 540px; }

.intro-copy h1 {
    margin: 20px 0 22px;
    font-size: clamp(42px, 5vw, 72px);
    line-height: .99;
    letter-spacing: -.055em;
}

.intro-copy p {
    max-width: 430px;
    margin: 0;
    color: #c0d2c8;
    font-size: 17px;
    line-height: 1.65;
}

.intro-footer { position: relative; z-index: 1; margin: 0; color: #8da79b; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }

.login-panel { display: grid; place-items: center; padding: 48px 8%; background: linear-gradient(180deg, #fff 0%, #fbfdfc 100%); }

.login-form-wrap { width: min(100%, 430px); }

.mobile-brand { display: none; }

.login-form-wrap h2 {
    margin: 13px 0 10px;
    font-size: clamp(30px, 3vw, 42px);
    line-height: 1.1;
    letter-spacing: -.045em;
}

.form-lead { margin: 0 0 36px; color: var(--muted); line-height: 1.55; }

.auth-form { display: grid; gap: 20px; }

.field { display: grid; gap: 8px; }

.field label { font-size: 13px; font-weight: 700; }

.field input,
.project-form input,
.field select,
.field textarea {
    width: 100%;
    height: 50px;
    border: 1px solid #d7dce5;
    border-radius: 10px;
    outline: none;
    color: var(--ink);
    background: #fff;
    padding: 0 15px;
    transition: border-color .18s, box-shadow .18s;
}

.field input:focus,
.project-form input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-ring);
}

.field input::placeholder,
.project-form input::placeholder,
.field textarea::placeholder { color: #a0a8b5; }

.field textarea { height: auto; min-height: 86px; padding-top: 12px; padding-bottom: 12px; resize: vertical; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    min-height: 48px;
    border: 0;
    border-radius: 10px;
    padding: 0 20px;
    cursor: pointer;
    font-weight: 750;
    transition: transform .15s, background .15s, box-shadow .15s;
}

.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }

.button--primary {
    color: #fff;
    background: var(--accent);
    box-shadow: 0 7px 16px var(--accent-shadow);
}

.button--primary:hover { background: var(--accent-dark); }
.button--wide { width: 100%; margin-top: 6px; }
.button--secondary { border: 1px solid var(--line); color: var(--ink); background: #fff; box-shadow: none; }
.button--secondary:hover { border-color: #cbd6d0; background: var(--soft); }

.privacy-note { margin: 25px 0 0; color: #929baa; text-align: center; font-size: 12px; }

.alert {
    margin-bottom: 22px;
    border: 1px solid;
    border-radius: 10px;
    padding: 13px 15px;
    font-size: 14px;
}

.alert--error { color: #9d2e2e; border-color: #f0c9c9; background: #fff5f5; }
.alert--success { color: #126343; border-color: #bce2d2; background: #f1fbf7; }

.app-page { display: flex; background: var(--soft); }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    width: 250px;
    padding: 30px 22px 20px;
    color: #d8deea;
    background: var(--navy);
}

.sidebar .brand { padding: 0 9px; color: #fff; }

.main-nav { margin-top: 52px; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 46px;
    border-radius: 10px;
    padding: 0 13px;
    color: #9da9bb;
    font-size: 14px;
    font-weight: 650;
}

.nav-item svg { width: 19px; fill: currentColor; }
.nav-item--active { color: #fff; background: var(--navy-light); }

.sidebar-foot {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: 14px;
}

.user-mini { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }

.user-mini--link {
    margin-left: -7px;
    border-radius: 10px;
    padding: 7px;
    transition: background .16s, color .16s;
}

.user-mini--link:hover,
.user-mini--active { background: var(--navy-light); }

.user-mini--link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.avatar {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: var(--sidebar-avatar-ink);
    background: var(--sidebar-avatar-bg);
    font-size: 13px;
    font-weight: 800;
}

.avatar--small { width: 32px; height: 32px; color: var(--avatar-ink); background: var(--avatar-bg); }

.user-mini-copy { display: grid; min-width: 0; }
.user-mini-copy strong { overflow: hidden; color: #fff; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.user-mini-copy small { overflow: hidden; margin-top: 2px; color: #7f8da2; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.account-chevron { margin-left: auto; color: #718198; font-size: 20px; line-height: 1; }
.user-mini--link:hover .account-chevron,
.user-mini--active .account-chevron { color: #c9d4e5; }

.logout-button { display: grid; place-items: center; width: 31px; height: 31px; border: 0; border-radius: 8px; color: #8795a9; background: transparent; cursor: pointer; }
.logout-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.logout-button:hover { color: #fff; }

.workspace { width: calc(100% - 250px); min-height: 100vh; margin-left: 250px; }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 64px;
    border-bottom: 1px solid var(--line);
    padding: 0 32px;
    background: rgba(255,255,255,.92);
}

.topbar-context { display: flex; min-width: 0; align-items: center; gap: 14px; }
.topbar-current { display: grid; min-width: 0; }
.topbar-current small { margin-bottom: 2px; color: #929baa; font-size: 8px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.topbar-current h1 { overflow: hidden; max-width: min(34vw, 430px); margin: 0; font-size: 12px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.topbar-user { display: flex; align-items: center; gap: 12px; border-radius: 10px; padding: 5px 6px 5px 10px; color: #576174; font-size: 13px; font-weight: 650; transition: background .16s; }
.topbar-user:hover { background: #f1f4f8; }
.topbar-user:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mobile-logo { display: none; align-items: center; gap: 9px; font-weight: 750; }

.page-container,
.project-page-shell,
.account-shell {
    width: min(1180px, calc(100% - 64px));
    margin-right: auto;
    margin-left: auto;
}

.page-container { padding: 18px 0 24px; }

.create-card {
    display: grid;
    grid-template-columns: auto minmax(180px, .65fr) minmax(380px, 1.35fr);
    align-items: center;
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(29, 42, 62, .045);
}

.create-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--accent); background: var(--accent-soft); font-size: 27px; font-weight: 300; }
.create-copy h2 { margin: 0 0 5px; font-size: 15px; }
.create-copy p { margin: 0; color: var(--muted); font-size: 12px; }

.project-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.project-form input { min-width: 0; height: 46px; }
.project-form .button { min-height: 46px; }

.projects-section { margin-top: 42px; }
.projects-section--first { margin-top: 0; }
.section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.section-title h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.count-badge { display: inline-grid; place-items: center; min-width: 23px; height: 23px; border-radius: 7px; color: #637084; background: #e7ebf1; font-size: 11px; font-weight: 800; }
.project-tab-contact-status i, .contact-panel-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.empty-state {
    display: grid;
    justify-items: center;
    min-height: 290px;
    border: 1px dashed #d7dce5;
    border-radius: var(--radius);
    padding: 60px 24px;
    text-align: center;
    background: rgba(255,255,255,.55);
}

.empty-illustration { position: relative; width: 84px; height: 62px; margin-bottom: 22px; }
.empty-illustration span { position: absolute; display: block; width: 50px; height: 36px; border: 1px solid #cbd3df; border-radius: 8px; background: #fff; box-shadow: 0 5px 15px rgba(24,33,47,.05); }
.empty-illustration span:nth-child(1) { left: 0; top: 18px; transform: rotate(-7deg); }
.empty-illustration span:nth-child(2) { right: 0; top: 18px; transform: rotate(7deg); }
.empty-illustration span:nth-child(3) { left: 17px; top: 3px; border-color: #adc3ec; background: #f3f7ff; }
.empty-state h3 { margin: 0 0 7px; font-size: 16px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 13px; }

.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.project-card { display: flex; align-items: center; gap: 15px; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 20px; background: #fff; box-shadow: 0 5px 18px rgba(29,42,62,.035); transition: transform .16s, border-color .16s, box-shadow .16s; }
.project-card:hover { transform: translateY(-2px); border-color: #c7d8cf; box-shadow: 0 10px 26px rgba(29,42,62,.075); }
.project-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.project-symbol { display: grid; flex: 0 0 auto; place-items: center; width: 43px; height: 43px; border-radius: 11px; color: var(--accent-dark); background: var(--accent-soft); font-weight: 800; }
.project-card-copy { flex: 1 1 auto; min-width: 0; }
.project-card h3 { overflow: hidden; margin: 0 0 5px; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.project-card p { margin: 0; color: var(--muted); font-size: 11px; }
.project-card-arrow { margin-left: auto; color: #9ba6b3; font-size: 18px; transition: color .16s, transform .16s; }
.project-card:hover .project-card-arrow { color: var(--accent); transform: translateX(2px); }

.project-detail-page { overflow: hidden; }
.project-workspace { height: 100vh; min-height: 0; }

.project-page-shell {
    position: relative;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 64px);
    min-height: 0;
    padding: 18px 0 24px;
}

.project-alert { margin-bottom: 12px; padding: 10px 13px; }

.panel-kicker { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.member-avatar { display: grid; flex: 0 0 auto; place-items: center; width: 35px; height: 35px; border-radius: 10px; color: var(--accent-dark); background: var(--accent-soft); font-size: 12px; font-weight: 850; }
.member-role { margin-left: auto; border-radius: 6px; padding: 4px 6px; color: #667283; background: #f1f3f5; font-size: 8px; font-weight: 800; text-transform: uppercase; }

.project-tabs {
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.project-tab {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    min-height: 58px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px 12px;
    color: var(--ink);
    text-align: left;
    background: rgba(255,255,255,.72);
    cursor: pointer;
    transition: border-color .16s, background .16s, box-shadow .16s;
}
.project-tab:hover { border-color: #c5d8ce; background: #fff; }
.project-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.project-tab--active { border-color: var(--accent); background: #fff; box-shadow: 0 6px 18px rgba(29,42,62,.06); }
.project-tab-icon { display: grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: #778394; background: #edf1ef; font-size: 17px; font-weight: 800; }
.project-tab--active .project-tab-icon { color: #fff; background: var(--accent); }
.project-tab > span:last-child { display: grid; min-width: 0; }
.project-tab strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.project-tab small { overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.project-tab-contact-status { display: flex; align-items: center; gap: 5px; }
.project-tab--contact-complete .project-tab-contact-status { color: var(--accent); }
.project-tab--contact-partial .project-tab-contact-status { color: #a16b13; }
.project-tab--contact-missing .project-tab-contact-status { color: #b25238; }
.project-tab--contact-partial .project-tab-icon { color: #99600c; background: #fff1cf; }
.project-tab--contact-missing .project-tab-icon { color: #a94f36; background: #ffebe4; }
.project-tab--contact-partial { border-color: #edd5a5; }
.project-tab--contact-missing { border-color: #ecc6ba; }

.project-panel-wrap { flex: 1 1 auto; min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 8px 28px rgba(29,42,62,.04); }
.project-section { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: 22px 24px; }
.project-section[hidden] { display: none; }
.project-section-head { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); padding-bottom: 17px; }
.project-section-head h2 { margin: 0 0 4px; font-size: 20px; letter-spacing: -.03em; }
.project-section-head p { margin: 0; color: var(--muted); font-size: 10px; }
.project-section-head .button { min-height: 40px; padding: 0 15px; font-size: 11px; white-space: nowrap; }

.project-timeline { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 8px 6px 8px 0; scrollbar-width: thin; scrollbar-color: #cbd6d0 transparent; }
.readonly-badge { display: inline-flex; align-items: center; min-height: 30px; border: 1px solid var(--line); border-radius: 999px; padding: 0 11px; color: var(--muted); background: var(--soft); font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.timeline-item { display: grid; grid-template-columns: 72px 16px minmax(0, 1fr); gap: 15px; min-height: 86px; }
.timeline-item time { display: grid; align-content: start; justify-items: end; padding-top: 15px; color: var(--muted); font-size: 9px; }
.timeline-item time strong { color: var(--ink); font-size: 10px; }
.timeline-marker { position: relative; display: block; width: 10px; height: 10px; margin-top: 17px; border: 3px solid var(--accent-soft); border-radius: 50%; background: var(--accent); box-sizing: content-box; }
.timeline-marker::after { content: ""; position: absolute; top: 13px; bottom: -62px; left: 4px; width: 1px; background: var(--line); }
.timeline-item:last-child .timeline-marker::after { display: none; }
.timeline-copy { align-self: start; margin: 7px 0; border: 1px solid #e8eeeb; border-radius: 11px; padding: 10px 13px; background: #fbfcfc; }
.timeline-meta { display: flex; align-items: center; gap: 9px; }
.timeline-type { border-radius: 6px; padding: 4px 6px; color: var(--accent-dark); background: var(--accent-soft); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.timeline-copy small { color: var(--muted); font-size: 8px; }
.timeline-edit { margin-left: auto; border: 0; border-radius: 6px; padding: 4px 7px; color: var(--accent); background: transparent; cursor: pointer; font-size: 8px; font-weight: 800; }
.timeline-edit:hover { background: var(--accent-soft); }
.timeline-edit:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.timeline-copy h3 { margin: 7px 0 0; font-size: 12px; }
.timeline-copy p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }

.project-empty { display: grid; flex: 1 1 auto; align-content: center; justify-items: center; min-height: 0; padding: 24px; text-align: center; }
.project-empty > span { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 13px; border-radius: 14px; color: var(--accent); background: var(--accent-soft); font-size: 23px; }
.project-empty h3 { margin: 0 0 6px; font-size: 15px; }
.project-empty p { margin: 0 0 15px; color: var(--muted); font-size: 10px; }
.project-empty .button { min-height: 38px; font-size: 10px; }

.environment-form, .environment-readonly { display: grid; flex: 1 1 auto; align-content: start; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; min-height: 0; padding-top: 18px; }
.environment-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: #fbfcfc; }
.environment-badge { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; font-size: 9px; font-weight: 900; }
.environment-badge--test { color: #8b5a0b; background: #fff1cc; }
.environment-badge--production { color: var(--accent-dark); background: var(--accent-soft); }
.environment-card .field { min-width: 0; }
.environment-card .field input { height: 42px; font-size: 11px; }
.environment-card .field label { font-size: 10px; }
.environment-card h3 { margin: 0 0 5px; font-size: 13px; }
.environment-card p { overflow: hidden; margin: 0; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.external-link { color: var(--accent); font-size: 10px; font-weight: 800; white-space: nowrap; }
.external-link:hover { text-decoration: underline; }
.project-form-actions { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: 20px; }
.project-form-actions > span { color: var(--muted); font-size: 9px; }
.project-form-actions .button { min-height: 42px; font-size: 11px; }
.environment-readonly .button { min-height: 38px; padding: 0 12px; font-size: 10px; }

.contact-form { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; padding-top: 17px; }
.contact-panel-status { display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; padding: 7px 9px; font-size: 9px; font-weight: 850; white-space: nowrap; }
.contact-panel-status--complete { color: var(--accent-dark); background: var(--accent-soft); }
.contact-panel-status--partial { color: #94600e; background: #fff3d9; }
.contact-panel-status--missing { color: #a24b34; background: #fff0e9; }
.contact-form-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px 15px; }
.contact-form-fields .field--wide { grid-column: 1 / -1; }
.contact-form-fields .field { gap: 6px; }
.contact-form-fields .field label { font-size: 10px; }
.contact-form-fields .field input { height: 40px; font-size: 11px; }
.contact-form-fields .field textarea { min-height: 58px; font-size: 11px; resize: none; }
.contact-form .project-form-actions { margin-top: 0; padding-top: 14px; }
.contact-profile { display: grid; flex: 1 1 auto; align-content: start; grid-template-columns: auto minmax(180px, .75fr) minmax(300px, 1.25fr); align-items: center; gap: 22px; min-height: 0; padding: 28px 8%; }
.contact-avatar { display: grid; place-items: center; width: 78px; height: 78px; border-radius: 24px; color: var(--accent-dark); background: var(--accent-soft); font-size: 25px; font-weight: 850; }
.contact-identity h3 { margin: 0 0 6px; font-size: 21px; letter-spacing: -.03em; }
.contact-identity p { margin: 0; color: var(--muted); font-size: 11px; }
.contact-details { display: grid; gap: 8px; margin: 0; border-left: 1px solid var(--line); padding-left: 22px; }
.contact-details div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 12px; border-bottom: 1px solid #edf0ee; padding: 8px 0; }
.contact-details div:last-child { border-bottom: 0; }
.contact-details dt { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.contact-details dd { margin: 0; font-size: 10px; line-height: 1.45; }
.contact-details a { color: var(--accent); font-weight: 750; }

.document-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-top: 8px; scrollbar-width: thin; }
.document-list-head, .document-row { display: grid; grid-template-columns: minmax(260px, 1.7fr) 100px 110px 90px minmax(190px, auto); align-items: center; gap: 14px; }
.document-list-head { border-bottom: 1px solid var(--line); padding: 8px 12px; color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.document-row { border-bottom: 1px solid #edf0ee; padding: 11px 12px; font-size: 10px; }
.document-row:last-child { border-bottom: 0; }
.document-name { display: flex; align-items: center; gap: 11px; min-width: 0; }
.document-name > span { display: grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--accent-dark); background: var(--accent-soft); font-size: 11px; font-weight: 900; }
.document-name > div { display: grid; min-width: 0; }
.document-name strong, .document-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.document-name strong { font-size: 11px; }
.document-name small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.document-status { width: fit-content; border-radius: 6px; padding: 5px 7px; color: #596677; background: #f0f2f4; font-size: 8px; font-weight: 800; }
.document-status--sent { color: #245794; background: #e9f2ff; }
.document-status--accepted, .document-status--paid { color: var(--accent-dark); background: var(--accent-soft); }
.document-status--refused { color: #a23b3b; background: #fff0f0; }
.document-status--archived { color: #657087; background: #eef1f3; }
.document-amount { font-size: 10px; }
.document-row time { color: var(--muted); }
.document-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.document-row-actions form { margin: 0; }
.document-edit-button { border: 0; padding: 0; color: var(--accent); background: transparent; cursor: pointer; font: inherit; font-weight: 800; }
.document-edit-button:hover, .document-edit-button:focus-visible { text-decoration: underline; }
.document-delete-button { border: 0; padding: 0; color: #a23b3b; background: transparent; cursor: pointer; font: inherit; font-weight: 800; }
.document-delete-button:hover, .document-delete-button:focus-visible { text-decoration: underline; }
.edit-generated-notice { border-radius: 10px; padding: 11px 13px; color: var(--accent-dark); background: var(--accent-soft); font-size: 11px; line-height: 1.45; }

.project-members-grid { display: grid; flex: 1 1 auto; align-content: start; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; min-height: 0; overflow-y: auto; padding-top: 16px; }
.project-member-card { display: flex; align-items: center; gap: 11px; min-width: 0; border: 1px solid var(--line); border-radius: 11px; padding: 13px; background: #fbfcfc; }
.project-member-card > div { display: grid; min-width: 0; }
.project-member-card strong, .project-member-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-member-card strong { font-size: 11px; }
.project-member-card small { margin-top: 3px; color: var(--muted); font-size: 8px; }

.showcase-head-actions { display: flex; align-items: center; gap: 8px; }
.project-showcase-content { display: grid; align-content: start; gap: 13px; min-height: 0; overflow-y: auto; padding: 15px 4px 4px 0; scrollbar-width: thin; }
.project-showcase-url { display: grid; grid-template-columns:auto minmax(0,1fr) auto; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; background: var(--soft); }
.project-showcase-url span { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.project-showcase-url strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.project-showcase-url button { border: 0; padding: 5px; color: var(--accent); background: transparent; cursor: pointer; font-size: 9px; font-weight: 800; }
.project-showcase-admin-grid { display: grid; grid-template-columns:minmax(0,1fr) 170px; gap: 11px; }
.project-showcase-settings,.project-showcase-summary { border: 1px solid var(--line); border-radius: 11px; padding: 13px; background: #fbfcfc; }
.project-showcase-settings { display: grid; gap: 10px; }
.project-showcase-settings > label { display: grid; gap: 6px; font-size: 9px; font-weight: 800; }
.project-showcase-settings textarea { min-height: 58px; border: 1px solid #d6dde6; border-radius: 8px; padding: 8px 10px; color: var(--ink); background:#fff; font-size: 10px; line-height: 1.45; resize: vertical; }
.project-showcase-settings > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.publish-toggle { display: flex; align-items: center; gap: 8px; color: var(--muted); cursor: pointer; font-size: 9px; font-weight: 700; }
.publish-toggle input { position: absolute; opacity: 0; }
.publish-toggle span { position: relative; width: 30px; height: 17px; border-radius: 999px; background: #cbd3db; transition: background .15s; }
.publish-toggle span::after { content:""; position:absolute; width:11px; height:11px; top:3px; left:3px; border-radius:50%; background:#fff; transition:transform .15s; }
.publish-toggle input:checked + span { background: var(--accent); }
.publish-toggle input:checked + span::after { transform: translateX(13px); }
.publish-toggle input:focus-visible + span { outline:2px solid var(--accent); outline-offset:2px; }
.project-showcase-summary { display: grid; align-content: center; text-align: center; }
.project-showcase-summary .panel-kicker { margin-bottom: 3px; }
.project-showcase-summary > strong { color: var(--accent); font-size: 28px; }
.project-showcase-summary p { margin: 3px 0 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.showcase-inline-empty { display:flex; align-items:center; gap:12px; min-height:76px; border:1px dashed var(--line); border-radius:11px; padding:13px; }
.showcase-inline-empty > span { display:grid; flex:0 0 auto; place-items:center; width:38px; height:38px; border-radius:10px; color:var(--accent); background:var(--accent-soft); font-size:18px; }
.showcase-inline-empty > div { display:grid; flex:1 1 auto; }
.showcase-inline-empty strong { font-size:11px; }
.showcase-inline-empty p { margin:3px 0 0; color:var(--muted); font-size:9px; }
.project-visual-list { display:grid; gap:7px; }
.project-visual-card { display:grid; grid-template-columns:28px minmax(180px,1fr) minmax(170px,.75fr) auto auto; align-items:center; gap:11px; border:1px solid var(--line); border-radius:10px; padding:10px 12px; background:#fff; }
.project-visual-card > span:first-child { color:var(--accent); font-size:9px; font-weight:900; }
.project-visual-card > div:nth-child(2) { display:grid; min-width:0; }
.project-visual-card > div:nth-child(2) strong,.project-visual-card > div:nth-child(2) small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.project-visual-card > div:nth-child(2) strong { font-size:10px; }
.project-visual-card > div:nth-child(2) small { margin-top:3px; color:var(--muted); font-size:8px; }
.project-visual-stats { color:var(--muted); font-size:8px; white-space:nowrap; }
.project-visual-stats b { color:var(--ink); }
.project-visual-choice { width:fit-content; border-radius:999px; padding:5px 8px; color:var(--accent-dark); background:var(--accent-soft); font-size:8px; font-weight:800; }
.project-visual-choice--empty { color:var(--muted); background:#f0f2f4; }
.project-visual-card > a,.project-visual-card form button { border:0; padding:4px; color:var(--accent); background:transparent; cursor:pointer; font-size:8px; font-weight:800; white-space:nowrap; }
.project-visual-card form { margin:0; }
.project-visual-card form button { color:#a23b3b; }
.project-feedback-list { display:grid; gap:6px; border-top:1px solid var(--line); padding-top:12px; }
.project-feedback-list > .panel-kicker { margin:0; }
.project-feedback-list article { display:grid; grid-template-columns:180px minmax(0,1fr); gap:13px; border-radius:9px; padding:9px 11px; background:var(--soft); }
.project-feedback-list article > div { display:grid; }
.project-feedback-list strong { font-size:9px; }
.project-feedback-list small { margin-top:2px; color:var(--accent-dark); font-size:8px; }
.project-feedback-list p { margin:0; color:var(--muted); font-size:9px; line-height:1.45; }
.visual-source-separator { display:flex; grid-column:1 / -1; align-items:center; gap:12px; color:var(--muted); font-size:9px; font-weight:800; text-transform:uppercase; }
.visual-source-separator::before,.visual-source-separator::after { content:""; flex:1 1 auto; height:1px; background:var(--line); }

.access-dialog { width: min(700px, calc(100% - 32px)); max-height: min(760px, calc(100vh - 40px)); margin: clamp(20px, 7vh, 72px) auto auto; border: 0; border-radius: 18px; padding: 0; color: var(--ink); background: #fff; box-shadow: 0 24px 80px rgba(13,28,23,.26); }
.access-dialog::backdrop { background: rgba(8,24,19,.58); backdrop-filter: blur(4px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 25px; border-bottom: 1px solid var(--line); padding: 26px 28px 22px; }
.dialog-head h2 { margin: 8px 0 6px; font-size: 25px; letter-spacing: -.035em; }
.dialog-head p { margin: 0; color: var(--muted); font-size: 12px; }
.dialog-close { display: grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; color: #718091; background: #fff; cursor: pointer; font-size: 21px; }
.dialog-close:hover { color: var(--ink); background: var(--soft); }
.dialog-tabs { display: flex; gap: 6px; padding: 18px 28px 0; }
.dialog-tab { min-height: 36px; border: 0; border-radius: 9px; padding: 0 13px; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; font-weight: 750; }
.dialog-tab--active { color: var(--accent-dark); background: var(--accent-soft); }
.dialog-tab:disabled { cursor: not-allowed; opacity: .45; }
.dialog-panel { padding: 20px 28px 28px; }
.client-form { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.client-form .field--wide { grid-column: 1 / -1; }
.field-label-row { display: flex; align-items: center; justify-content: space-between; }
.field-label-row button { border: 0; padding: 0; color: var(--accent); background: transparent; cursor: pointer; font-size: 10px; font-weight: 800; }
.field small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.dialog-actions { display: flex; justify-content: flex-end; grid-column: 1 / -1; margin-top: 3px; }
.existing-user-form { display: grid; gap: 20px; }
.dialog-empty { display: grid; min-height: 130px; place-items: center; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 12px; }
.project-dialog form { margin: 0; }
.dialog-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; padding: 20px 28px 12px; }
.dialog-form-grid .field--wide { grid-column: 1 / -1; }
.dialog-form-grid + .dialog-actions { gap: 8px; padding: 0 28px 26px; }
.dialog-form-grid + .dialog-actions .button { min-height: 42px; font-size: 11px; }

.account-page { overflow: hidden; }
.account-workspace { height: 100vh; min-height: 0; }

.account-shell {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 64px);
    min-height: 0;
    padding: 18px 0 24px;
}

.account-alert { flex: 0 0 auto; margin-bottom: 12px; padding: 10px 13px; }

.account-layout {
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 16px;
    min-height: 0;
}

.account-menu-card,
.account-content-card {
    min-height: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 8px 28px rgba(29,42,62,.04);
}

.account-menu-card { display: flex; flex-direction: column; padding: 20px; }
.account-identity { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 11px; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.account-avatar { display: grid; grid-row: 1 / span 2; place-items: center; width: 44px; height: 44px; border-radius: 13px; color: var(--accent-dark); background: var(--accent-soft); font-size: 15px; font-weight: 850; }
.account-identity-copy { display: grid; align-content: center; min-width: 0; }
.account-identity-copy strong,
.account-identity-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-identity-copy strong { font-size: 13px; }
.account-identity-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.account-status { display: inline-flex; grid-column: 1 / -1; width: fit-content; align-items: center; gap: 7px; margin-top: 7px; border-radius: 7px; padding: 6px 8px; color: #176647; background: #f0faf5; font-size: 9px; font-weight: 750; }
.account-status i { width: 6px; height: 6px; border-radius: 50%; background: #24a473; }

.account-tabs { display: grid; gap: 7px; margin-top: 16px; }
.account-tab { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 11px; width: 100%; min-height: 64px; border: 0; border-radius: 11px; padding: 9px 10px; color: var(--ink); text-align: left; background: transparent; cursor: pointer; }
.account-tab:hover { background: var(--soft); }
.account-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.account-tab--active { color: var(--accent-dark); background: var(--accent-soft); }
.account-tab--active:hover { background: var(--accent-soft); }
.account-tab-icon { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; color: #788596; background: #fff; }
.account-tab-icon svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.account-tab--active .account-tab-icon { border-color: transparent; color: #fff; background: var(--accent); box-shadow: 0 5px 12px var(--accent-shadow); }
.account-tab > span:nth-child(2) { display: grid; min-width: 0; }
.account-tab strong { font-size: 12px; }
.account-tab small { overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.account-tab b { color: #a1aab6; font-size: 18px; font-weight: 500; }
.account-tab--active b { color: var(--accent); }
.account-menu-note { margin: auto 4px 0; color: var(--muted); font-size: 9px; line-height: 1.5; }

.account-content-card { overflow: hidden; }
.account-panel { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: 26px 28px; }
.account-panel[hidden] { display: none; }
.account-panel-head { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.account-panel-head h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.03em; }
.account-panel-head p { max-width: 540px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.account-form { display: grid; align-content: start; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 22px 0 0; }
.account-form .field input { height: 47px; }
.account-form .field--full { grid-column: 1 / -1; }
.account-form-hint { align-self: center; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.account-form-actions { display: flex; justify-content: flex-end; }
.account-form-actions .button { min-height: 44px; font-size: 12px; }

.account-theme-form { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; padding-top: 22px; }
.account-theme-grid { gap: 9px; }
.account-theme-grid .theme-option { gap: 8px; padding: 8px; }
.account-theme-grid .theme-preview { height: 58px; }
.account-theme-grid .theme-option-copy strong { font-size: 11px; }
.account-theme-grid .theme-option-copy small { font-size: 8px; white-space: nowrap; }
.account-theme-grid .theme-check { top: 12px; right: 12px; width: 18px; height: 18px; font-size: 9px; }
.account-theme-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; }
.account-theme-actions .button { min-height: 44px; font-size: 12px; }

.settings-grid { display: grid; gap: 18px; }

.settings-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(29, 42, 62, .04);
}

.settings-card-head { display: flex; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 22px; }
.settings-card-head h2 { margin: 0 0 6px; font-size: 17px; letter-spacing: -.02em; }
.settings-card-head p { margin: 0; color: var(--muted); font-size: 13px; }
.settings-number { display: grid; flex: 0 0 auto; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--accent); background: var(--accent-soft); font-size: 11px; font-weight: 800; }
.settings-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding-top: 24px; }
.settings-form .form-actions { display: flex; justify-content: flex-end; grid-column: 1 / -1; }

.theme-form { padding-top: 24px; }

.theme-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.theme-option {
    --preview-accent: #2864dc;
    --preview-sidebar: #101b2d;
    position: relative;
    display: grid;
    gap: 11px;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    background: #fff;
    transition: border-color .16s, box-shadow .16s, transform .16s;
}

.theme-option:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(29, 42, 62, .08); }
.theme-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-ring); }

.theme-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.theme-option--forest { --preview-accent: #137c55; --preview-sidebar: #0b251d; }
.theme-option--amber { --preview-accent: #c66a1b; --preview-sidebar: #271d13; }
.theme-option--plum { --preview-accent: #8b4fc4; --preview-sidebar: #21162d; }
.theme-option--coral { --preview-accent: #d34f67; --preview-sidebar: #2a171c; }

.theme-preview {
    display: grid;
    grid-template-columns: 28% 1fr;
    overflow: hidden;
    height: 72px;
    border: 1px solid rgba(24, 33, 47, .08);
    border-radius: 8px;
    background: #f6f7f9;
}

.theme-preview-sidebar { background: var(--preview-sidebar); }
.theme-preview-content { display: grid; align-content: center; gap: 6px; padding: 10px; }
.theme-preview-content i { display: block; width: 72%; height: 5px; border-radius: 5px; background: #dce1e8; }
.theme-preview-content i:nth-child(2) { width: 48%; }
.theme-preview-content b { display: block; width: 68%; height: 15px; margin-top: 2px; border-radius: 5px; background: var(--preview-accent); }

.theme-option-copy { display: grid; min-width: 0; }
.theme-option-copy strong { font-size: 13px; }
.theme-option-copy small { overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.35; text-overflow: ellipsis; }

.theme-check {
    position: absolute;
    top: 16px;
    right: 16px;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: transparent;
    background: #fff;
    box-shadow: 0 2px 7px rgba(20, 30, 45, .16);
    font-size: 11px;
    font-weight: 900;
}

.theme-option:has(input:checked) .theme-check { color: #fff; background: var(--accent); }

.theme-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 22px; }
.theme-hint { color: var(--muted); font-size: 11px; }

@media (max-width: 900px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-intro { display: none; }
    .login-panel { min-height: 100vh; padding: 40px 7%; }
    .mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 64px; font-size: 18px; font-weight: 750; }
    .sidebar { display: none; }
    .workspace { width: 100%; margin-left: 0; }
    .topbar { justify-content: space-between; padding: 0 20px; }
    .mobile-logo { display: flex; }
    .mobile-logo .brand-mark { width: 30px; height: 30px; border-radius: 8px; }
    .page-container,
    .project-page-shell,
    .account-shell { width: min(100% - 40px, 760px); padding: 22px 0 42px; }
    .create-card { grid-template-columns: auto 1fr; }
    .project-form { grid-column: 1 / -1; }
    .project-grid { grid-template-columns: repeat(2, 1fr); }
    .theme-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .project-detail-page { overflow: auto; }
    .project-workspace { height: auto; min-height: 100vh; }
    .project-page-shell { height: auto; min-height: calc(100vh - 64px); }
    .project-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .project-panel-wrap { min-height: 500px; overflow: visible; }
    .project-section { min-height: 500px; }
    .environment-form, .environment-readonly { grid-template-columns: 1fr; align-content: start; }
    .contact-form-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .contact-profile { grid-template-columns: auto minmax(0, 1fr); padding: 28px 5%; }
    .contact-details { grid-column: 1 / -1; border-top: 1px solid var(--line); border-left: 0; padding-top: 12px; padding-left: 0; }
    .document-list-head, .document-row { grid-template-columns: minmax(190px, 1fr) 78px 88px 70px 180px; gap: 9px; }
    .project-members-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .project-visual-card { grid-template-columns:28px minmax(160px,1fr) auto auto; }
    .project-visual-stats { grid-column:2; }
    .account-page { overflow: auto; }
    .account-workspace { height: auto; min-height: 100vh; }
    .account-shell { height: auto; min-height: calc(100vh - 64px); }
    .account-layout { grid-template-columns: 1fr; }
    .account-menu-card { padding: 16px; }
    .account-identity { grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; padding-bottom: 15px; }
    .account-avatar { grid-row: auto; width: 40px; height: 40px; }
    .account-status { grid-column: auto; margin-top: 0; }
    .account-tabs { grid-template-columns: repeat(3, 1fr); }
    .account-tab { grid-template-columns: 32px minmax(0, 1fr); min-height: 58px; }
    .account-tab-icon { width: 32px; height: 32px; }
    .account-tab b { display: none; }
    .account-menu-note { display: none; }
    .account-content-card { min-height: 470px; }
}

@media (max-width: 560px) {
    .topbar-user > span:first-child { display: none; }
    .topbar { gap: 10px; padding: 0 14px; }
    .topbar-context { flex: 1 1 auto; justify-content: flex-start; gap: 7px; }
    .topbar-current { display: grid; flex: 1 1 auto; }
    .topbar-current small { display: none; }
    .topbar-current h1 { max-width: 34vw; font-size: 11px; }
    .page-container,
    .project-page-shell,
    .account-shell { width: calc(100% - 28px); padding: 18px 0 36px; }
    .create-card { padding: 18px; }
    .project-form { grid-template-columns: 1fr; }
    .project-grid { grid-template-columns: 1fr; }
    .login-form-wrap h2 { font-size: 32px; }
    .settings-card { padding: 20px; }
    .settings-form { grid-template-columns: 1fr; }
    .settings-form .form-actions { grid-column: auto; }
    .settings-form .button { width: 100%; }
    .theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .theme-actions { align-items: stretch; flex-direction: column; }
    .theme-actions .button { width: 100%; }
    .project-tabs { display: flex; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
    .project-tab { flex: 0 0 auto; min-width: 128px; min-height: 50px; padding: 7px 9px; }
    .project-tab-icon { width: 30px; height: 30px; }
    .project-tab small { display: none; }
    .project-section { min-height: 540px; padding: 18px 15px; }
    .project-section-head { align-items: flex-start; flex-direction: column; gap: 12px; padding-bottom: 14px; }
    .project-section-head .button { width: 100%; }
    .showcase-head-actions { width:100%; align-items:stretch; flex-direction:column; }
    .project-showcase-url { grid-template-columns:1fr auto; }
    .project-showcase-url span { grid-column:1 / -1; }
    .project-showcase-admin-grid { grid-template-columns:1fr; }
    .project-showcase-settings > div { align-items:stretch; flex-direction:column; }
    .project-showcase-settings .button { width:100%; }
    .showcase-inline-empty { align-items:flex-start; flex-wrap:wrap; }
    .showcase-inline-empty .button { width:100%; }
    .project-visual-card { grid-template-columns:24px minmax(0,1fr) auto; }
    .project-visual-stats,.project-visual-choice { grid-column:2 / -1; }
    .project-visual-card form { grid-column:3; }
    .project-feedback-list article { grid-template-columns:1fr; gap:6px; }
    .timeline-item { grid-template-columns: 54px 13px minmax(0, 1fr); gap: 9px; }
    .environment-card { grid-template-columns: auto minmax(0, 1fr); padding: 13px; }
    .environment-card .external-link, .environment-card .button { grid-column: 2; justify-self: start; }
    .project-form-actions { align-items: stretch; flex-direction: column; }
    .project-form-actions .button { width: 100%; }
    .contact-form-fields { grid-template-columns: 1fr; }
    .contact-form-fields .field--wide { grid-column: auto; }
    .contact-profile { align-content: start; grid-template-columns: auto minmax(0, 1fr); gap: 15px; padding: 24px 0; }
    .contact-avatar { width: 56px; height: 56px; border-radius: 17px; font-size: 19px; }
    .contact-identity h3 { font-size: 17px; }
    .contact-details div { grid-template-columns: 64px minmax(0, 1fr); }
    .document-list-head { display: none; }
    .document-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 12px 4px; }
    .document-row .document-status { justify-self: end; }
    .document-row .document-amount, .document-row time { padding-left: 45px; }
    .document-row > span:last-child { display: flex; justify-self: end; }
    .project-members-grid { grid-template-columns: 1fr; }
    .access-dialog { max-height: calc(100vh - 20px); margin: 10px auto auto; }
    .dialog-head { padding: 22px 20px 18px; }
    .dialog-head h2 { font-size: 22px; }
    .dialog-tabs { overflow-x: auto; padding: 15px 20px 0; }
    .dialog-tab { white-space: nowrap; }
    .dialog-panel { padding: 18px 20px 22px; }
    .client-form { grid-template-columns: 1fr; }
    .client-form .field--wide, .dialog-actions { grid-column: auto; }
    .dialog-actions .button { width: 100%; }
    .dialog-form-grid { grid-template-columns: 1fr; padding: 18px 20px 10px; }
    .dialog-form-grid .field--wide { grid-column: auto; }
    .dialog-form-grid + .dialog-actions { padding: 0 20px 20px; }
    .account-identity { grid-template-columns: 40px minmax(0, 1fr); }
    .account-status { display: none; }
    .account-tabs { gap: 5px; }
    .account-tab { display: flex; min-width: 0; min-height: 66px; flex-direction: column; justify-content: center; gap: 5px; padding: 7px 4px; text-align: center; }
    .account-tab > span:nth-child(2) { display: block; }
    .account-tab small { display: none; }
    .account-tab strong { font-size: 10px; }
    .account-content-card { min-height: 540px; }
    .account-panel { padding: 21px 18px; }
    .account-panel-head { padding-bottom: 16px; }
    .account-panel-head h2 { font-size: 20px; }
    .account-form { grid-template-columns: 1fr; margin: 22px 0 0; }
    .account-form .field--full { grid-column: auto; }
    .account-form-actions { justify-content: stretch; }
    .account-form-actions .button { width: 100%; }
    .account-theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .account-theme-actions { align-items: stretch; flex-direction: column; }
    .account-theme-actions .button { width: 100%; }
}

/* Documents commerciaux */
.document-head-actions { display: flex; align-items: center; justify-content: center; gap: 9px; }
.document-builder-dialog { width: min(1180px, calc(100vw - 44px)); max-width: none; height: min(890px, calc(100vh - 32px)); max-height: none; }
.document-builder-dialog > form { display: flex; height: 100%; flex-direction: column; overflow: hidden; }
.document-builder-body { display: grid; flex: 1 1 auto; gap: 14px; min-height: 0; overflow: auto; padding: 18px 24px; background: var(--page-bg, #f4f8f6); }
.builder-section { padding: 17px; border: 1px solid var(--line, #dce6e1); border-radius: 15px; background: #fff; }
.builder-section h3 { margin: 0 0 13px; color: var(--ink, #132033); font-size: 15px; }
.builder-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.builder-section-title h3 { margin-bottom: 0; }
.builder-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.builder-grid--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.builder-grid .field--span-3 { grid-column: span 3; }
.builder-grid .field--wide { grid-column: 1 / -1; }
.builder-parties { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.document-lines { display: grid; gap: 8px; margin-top: 14px; }
.document-line { display: grid; grid-template-columns: minmax(220px, 2.4fr) minmax(90px, .65fr) minmax(120px, .9fr) minmax(90px, .65fr) 100px 34px; align-items: end; gap: 9px; padding: 10px; border: 1px solid var(--line, #dce6e1); border-radius: 12px; background: var(--page-bg, #f7faf8); }
.document-line .field label { font-size: 10px; }
.document-line .field input, .document-line .field select { min-height: 39px; padding: 8px 10px; }
.document-line > strong { align-self: center; padding-top: 17px; text-align: right; font-size: 13px; white-space: nowrap; }
.line-remove { width: 32px; height: 32px; align-self: center; margin-top: 17px; border: 0; border-radius: 9px; color: #8f3342; background: #fae9ec; cursor: pointer; font-size: 20px; }
.builder-totals { display: grid; width: min(330px, 100%); gap: 7px; margin: 14px 0 0 auto; }
.builder-totals div { display: flex; justify-content: space-between; gap: 20px; }
.builder-totals dt, .builder-totals dd { margin: 0; font-size: 13px; }
.builder-totals div:last-child { padding-top: 8px; border-top: 1px solid var(--line, #dce6e1); font-weight: 800; }
.document-builder-actions { flex: 0 0 auto; align-items: center; padding: 14px 24px; border-top: 1px solid var(--line, #dce6e1); background: #fff; }
.document-builder-actions > span { margin-right: auto; color: var(--muted, #657087); font-size: 12px; }
.button--small { min-height: 34px; padding: 7px 11px; font-size: 12px; }

/* Rendu imprimable d'un devis ou d'une facture */
.commercial-document-page { min-height: 100vh; margin: 0; color: #172033; background: #eef4f1; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.document-toolbar { position: sticky; z-index: 5; top: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 13px max(24px, calc((100vw - 900px) / 2)); border-bottom: 1px solid #dbe5e0; background: rgba(255, 255, 255, .96); }
.document-toolbar > div { display: grid; text-align: center; }
.document-toolbar small { color: #677388; }
.document-toolbar .button:last-child { justify-self: end; }
.document-toolbar-actions { display: flex !important; align-items: center; justify-self: end; gap: 12px; text-align: left !important; }
.document-toolbar-warning { color: #9a6500; font-size: 10px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.document-flash { width: min(900px, calc(100% - 32px)); margin: 18px auto 0; }
.commercial-document-preview-page { height: 100vh; overflow: hidden; }
.document-pdf-preview { width: min(920px, calc(100% - 32px)); height: calc(100vh - 94px); margin: 18px auto; overflow: hidden; border-radius: 8px; background: #fff; box-shadow: 0 18px 55px rgba(20, 50, 37, .11); }
.document-pdf-preview iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.document-pdf-preview > p { display: none; }
.document-sheet { width: min(900px, calc(100% - 32px)); min-height: 1120px; box-sizing: border-box; margin: 28px auto 60px; padding: 52px 56px 44px; overflow: hidden; border-top: 7px solid #d6a92f; border-radius: 8px; background: #fff; box-shadow: 0 18px 55px rgba(20, 50, 37, .11); }
.document-hero { display: grid; grid-template-columns: 1fr auto; gap: 28px 42px; padding-bottom: 30px; border-bottom: 1px solid #dbe5df; }
.document-brand-lockup { display: flex; align-items: center; gap: 13px; min-width: 0; }
.document-brand-mark { display: grid; width: 43px; height: 43px; flex: 0 0 43px; place-items: center; border-radius: 13px; color: #fff; background: #123f32; font-size: 20px; font-weight: 900; box-shadow: inset 0 -3px 0 rgba(214, 169, 47, .42); }
.document-brand-lockup > span:last-child { display: grid; gap: 3px; }
.document-brand-lockup strong { color: #12251f; font-size: 14px; letter-spacing: -.01em; }
.document-brand-lockup small { color: #758079; font-size: 9px; letter-spacing: .04em; }
.document-kind { align-self: center; text-align: right; }
.document-kind span, .document-object > span { color: #a37b14; font-size: 9px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.document-kind h1 { margin: 2px 0 0; color: #123f32; font-size: 34px; line-height: 1; letter-spacing: -.045em; }
.document-object { align-self: end; }
.document-object h2 { max-width: 430px; margin: 6px 0 0; color: #172033; font-size: 20px; line-height: 1.2; letter-spacing: -.025em; }
.document-meta { display: grid; min-width: 235px; gap: 7px; margin: 0; padding: 13px 15px; border-radius: 12px; background: #f2f7f4; }
.document-meta div { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.document-meta dt { color: #758079; font-size: 9px; }
.document-meta dd { margin: 0; color: #1c2a25; font-size: 10px; font-weight: 800; text-align: right; }
.document-parties { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 24px 0; }
.document-parties article { position: relative; min-height: 152px; padding: 18px 20px; border: 1px solid #e0e8e3; border-radius: 14px; background: #fff; }
.document-parties article::before { content: ""; position: absolute; width: 3px; top: 18px; bottom: 18px; left: -1px; border-radius: 0 3px 3px 0; background: #d6a92f; }
.document-parties .document-client { border-color: #d6e4dc; background: #f5f9f7; }
.document-parties article > span, .document-notes > span { color: #a37b14; font-size: 8px; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.document-parties h2 { margin: 8px 0; color: #17251f; font-size: 14px; }
.document-parties p { margin: 2px 0; color: #5f6c65; font-size: 9.5px; line-height: 1.42; }
.document-items { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 11px; }
.document-items-description { width: 48%; }
.document-items-quantity { width: 8%; }
.document-items-unit-price { width: 17%; }
.document-items-tax { width: 9%; }
.document-items-total { width: 18%; }
.document-items th { padding: 10px 10px; color: #fff; background: #123f32; font-size: 9px; font-weight: 750; letter-spacing: .03em; text-align: right; }
.document-items th:first-child { border-radius: 9px 0 0 9px; }
.document-items th:last-child { border-radius: 0 9px 9px 0; }
.document-items th:first-child, .document-items td:first-child { text-align: left; }
.document-items td { padding: 12px 10px; border-bottom: 1px solid #e3eae6; color: #25332d; text-align: right; vertical-align: top; }
.document-items tbody tr:nth-child(even) { background: #fbfcfb; }
.document-items th:not(:first-child), .document-items td:not(:first-child) { white-space: nowrap; }
.document-items td:first-child { overflow-wrap: anywhere; line-height: 1.45; }
.document-item-title { display: block; margin-bottom: 4px; color: #15251e; font-size: 10px; }
.document-item-details { display: block; color: #66736c; font-size: 9px; line-height: 1.5; }
.document-summary { display: grid; grid-template-columns: 1fr 260px; gap: 34px; margin-top: 23px; }
.document-conditions { display: grid; gap: 14px; }
.document-conditions h3, .document-notes h3 { margin: 0 0 4px; color: #17251f; font-size: 10px; }
.document-conditions p, .document-notes p { margin: 0; color: #66736c; font-size: 9px; line-height: 1.55; }
.document-bank p { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; }
.document-bank span { color: #8b958f; font-size: 8px; }
.document-bank strong { color: #27352f; font-size: 8.5px; overflow-wrap: anywhere; }
.document-calculation { display: grid; gap: 8px; margin: 0; }
.document-summary-aside { display: grid; align-content: start; gap: 12px; }
.document-calculation div { display: flex; justify-content: space-between; gap: 20px; padding: 0 4px; }
.document-calculation dt, .document-calculation dd { margin: 0; font-size: 10px; }
.document-calculation dd { font-weight: 750; }
.document-calculation div:last-child { margin-top: 5px; padding: 13px 14px; border-radius: 10px; color: #fff; background: #123f32; box-shadow: inset 4px 0 0 #d6a92f; font-weight: 850; }
.document-notes { margin-top: 24px; padding: 16px 18px; border: 1px solid #e2e9e5; border-radius: 13px; background: #fafcfb; }
.document-notes h3 { margin-top: 5px; }
.document-acceptance { display: grid; grid-template-columns: 1fr 1.45fr; gap: 24px; margin-top: 14px; padding: 12px 15px; border: 1px solid #dce5e0; border-radius: 12px; }
.document-acceptance > div { display: grid; align-content: start; gap: 3px; }
.document-acceptance > div > span { color: #a37b14; font-size: 8px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.document-acceptance > div strong { color: #163128; font-size: 10px; }
.document-acceptance > div small { color: #748079; font-size: 7.5px; }
.document-acceptance dl { display: grid; grid-template-columns: 1.2fr .7fr 1.3fr; gap: 12px; margin: 0; }
.document-acceptance dl div { display: grid; grid-template-rows: auto 1fr; gap: 5px; }
.document-acceptance dt { color: #748079; font-size: 7.5px; }
.document-acceptance dd { min-height: 20px; margin: 0; border-bottom: 1px solid #bfcac4; }
.document-summary-aside .document-acceptance { grid-template-columns: 1fr; gap: 8px; margin-top: 0; }
.document-summary-aside .document-acceptance dl { gap: 7px; }
.document-summary-aside .document-acceptance dt { font-size: 6.8px; }
.document-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 28px; padding-top: 16px; border-top: 1px solid #dbe5df; color: #748079; font-size: 8px; }
.document-footer strong { color: #123f32; font-size: 9px; }

@media (max-width: 900px) {
    .document-builder-dialog { width: calc(100vw - 20px); height: calc(100vh - 20px); }
    .builder-grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .builder-grid .field--span-3 { grid-column: auto; }
    .builder-parties { grid-template-columns: 1fr; }
    .document-line { grid-template-columns: minmax(180px, 2fr) 80px 110px 80px; }
    .document-line > strong { padding: 0; text-align: left; }
    .line-remove { margin: 0; }
}

@media (max-width: 620px) {
    .document-head-actions { width: 100%; }
    .document-head-actions .button { flex: 1; }
    .document-builder-body { padding: 14px; }
    .builder-grid, .builder-grid--four { grid-template-columns: 1fr; }
    .builder-grid .field--span-3, .builder-grid .field--wide { grid-column: auto; }
    .document-line { grid-template-columns: 1fr 1fr; }
    .document-line .field:first-child { grid-column: 1 / -1; }
    .document-builder-actions > span { display: none; }
    .document-toolbar { grid-template-columns: auto 1fr; padding: 10px 12px; }
    .document-toolbar > div:not(.document-toolbar-actions) { display: none; }
    .document-toolbar-actions { gap: 7px; }
    .document-toolbar-actions .button { min-height: 38px; padding: 8px 11px; font-size: 10px; }
    .document-pdf-preview { width: 100%; height: calc(100vh - 59px); margin: 0; border-radius: 0; box-shadow: none; }
    .document-sheet { width: calc(100% - 16px); margin: 8px auto 30px; padding: 25px 18px; }
    .document-hero, .document-parties, .document-summary { grid-template-columns: 1fr; gap: 24px; }
    .document-kind { text-align: left; }
    .document-items { display: block; overflow-x: auto; }
}

@media print {
    @page { size: A4; margin: 0; }
    html { width: auto !important; height: auto !important; overflow: visible !important; background: #fff !important; }
    body.commercial-document-page { display: block !important; width: auto !important; height: auto !important; min-height: 0 !important; overflow: visible !important; color: #172033 !important; background: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .document-toolbar, .document-flash { display: none !important; }
    .document-sheet { position: static !important; display: block !important; visibility: visible !important; width: 186mm !important; max-width: none !important; min-height: 0 !important; margin: 0 auto !important; padding: 12mm !important; overflow: visible !important; border-radius: 0 !important; box-shadow: none !important; }
    .document-sheet * { visibility: visible !important; }
    .document-hero, .document-parties, .document-summary, .document-notes, .document-acceptance, .document-footer, .document-items tr { break-inside: avoid; page-break-inside: avoid; }
    .document-items { table-layout: fixed !important; }
    .document-items th, .document-items td { font-size: 10px; }
    .document-hero { gap: 18px 36px; padding-bottom: 20px; }
    .document-object h2 { font-size: 18px; }
    .document-meta { padding: 10px 13px; }
    .document-parties { gap: 15px; padding: 18px 0; }
    .document-parties article { min-height: 128px; padding: 14px 17px; }
    .document-parties article::before { top: 14px; bottom: 14px; }
    .document-parties h2 { margin: 6px 0; }
    .document-parties p { font-size: 9px; line-height: 1.32; }
    .document-items th { padding: 8px 9px; font-size: 8.5px; }
    .document-items td { padding: 8px 9px; font-size: 9px; }
    .document-item-title { margin-bottom: 2px; font-size: 9px; }
    .document-item-details { font-size: 8px; line-height: 1.35; }
    .document-summary { gap: 28px; margin-top: 17px; }
    .document-conditions { gap: 9px; }
    .document-conditions p, .document-notes p { font-size: 8px; line-height: 1.4; }
    .document-calculation div:last-child { padding: 10px 12px; }
    .document-notes { margin-top: 10px; padding: 9px 12px; }
    .document-notes h3 { margin: 3px 0; }
    .document-notes p { column-count: 2; column-gap: 20px; }
    .document-acceptance { margin-top: 0; padding: 7px 10px; }
    .document-acceptance dd { min-height: 13px; }
    .document-footer { display: none !important; }
}

/* Paramètres commerciaux et catalogue */
.account-form--dense, .account-form--mentions { align-content: start; margin: 18px 0 0; overflow-y: auto; padding-right: 4px; }
.account-form--dense { gap: 11px 16px; }
.account-form--dense .field input { height: 42px; }
.account-form--dense textarea, .account-form--mentions textarea { min-height: 70px; }
.prefix-fields > div { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.prefix-fields small { color: var(--muted); font-size: 9px; }
.service-catalog { display: grid; align-content: start; gap: 9px; min-height: 0; margin-top: 16px; overflow-y: auto; padding-right: 4px; }
.service-card { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; background: #fbfcfc; }
.service-card > div { display: grid; min-width: 0; }
.service-card strong { font-size: 12px; }
.service-card small { margin-top: 3px; color: var(--accent-dark); font-size: 8px; font-weight: 750; }
.service-card p { max-height: 34px; overflow: hidden; margin: 6px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.service-card > b { font-size: 11px; white-space: nowrap; }
.service-card > button, .service-card form button { border: 0; padding: 5px; color: var(--accent); background: transparent; cursor: pointer; font-size: 9px; font-weight: 800; }
.service-card form button { color: #a23b3b; }
.catalog-empty { display: grid; place-items: center; min-height: 280px; color: var(--muted); text-align: center; }
.catalog-empty > span { font-size: 34px; }
.catalog-empty strong { color: var(--ink); font-size: 15px; }
.catalog-empty p { margin: 0; font-size: 10px; }

/* Assistant de création des documents */
.automatic-reference { display: grid; min-height: 47px; align-content: center; border: 1px dashed var(--accent); border-radius: 10px; padding: 6px 12px; background: var(--accent-soft); }
.automatic-reference strong { color: var(--accent-dark); font-size: 12px; }
.automatic-reference small { color: var(--muted); font-size: 8px; }
.business-summary { display: grid; gap: 5px; margin-top: 14px; border-radius: 12px; padding: 15px; background: var(--accent-soft); }
.business-summary strong { color: var(--accent-dark); font-size: 14px; }
.business-summary p { margin: 0; color: var(--ink); font-size: 10px; line-height: 1.5; }
.business-summary small { color: var(--muted); font-size: 9px; }
.builder-warning { display: grid; gap: 8px; margin-top: 14px; border: 1px solid #efd7a2; border-radius: 12px; padding: 14px; background: #fff9e9; }
.builder-warning p { margin: 0; color: #755d2e; font-size: 10px; line-height: 1.45; }
.builder-warning .button { justify-self: start; }
.company-lookup { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.company-lookup .button { min-height: 42px; }
.document-defaults-summary { display: grid; gap: 6px; margin: 12px 0; border-radius: 11px; padding: 12px; background: var(--soft); }
.document-defaults-summary p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.4; }
.document-defaults-summary strong { color: var(--ink); }
.builder-section-title > div > small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.document-line { grid-template-columns: minmax(150px, 1.1fr) minmax(240px, 1.8fr) 76px 112px 82px 90px 34px; }
.document-line textarea { min-height: 64px; padding: 8px 10px; resize: vertical; }
.document-line > strong, .document-line .line-remove { align-self: center; margin-top: 17px; }
.document-builder-actions button:disabled { cursor: not-allowed; opacity: .45; }

@media (max-width: 900px) {
    .account-tabs { grid-template-columns: repeat(3, 1fr); }
    .document-line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .document-line-service, .document-line-description { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
    .account-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .service-card { grid-template-columns: minmax(0, 1fr) auto; }
    .service-card > button, .service-card > form { justify-self: start; }
    .company-lookup { grid-template-columns: 1fr; }
}
