* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f6f8;
    color: #1f2933;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a.btn,
button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 40px;
    text-align: center;
    padding: 10px 14px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    background: #e4e7eb;
    color: #334e68;
    appearance: none;
}

a.btn-primary,
button.btn-primary {
    background: #0b69a3;
    color: white;
}

a.btn-primary:hover,
button.btn-primary:hover {
    background: #095a8c;
}

a.btn-secondary,
button.btn-secondary {
    background: #e4e7eb;
    color: #334e68;
}

a.btn-secondary:hover,
button.btn-secondary:hover {
    background: #cbd2d9;
}

a.btn-danger,
button.btn-danger {
    background: #d64545;
    color: white;
}

a.btn-danger:hover,
button.btn-danger:hover {
    background: #b83a3a;
}

a.btn-send,
button.btn-send {
    background: #eef8ff;
    border-color: #9ac8e6;
    color: #0b5f8a;
}

a.btn-send:hover,
button.btn-send:hover {
    background: #d9effc;
}

a.btn:disabled,
button.btn:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.form-help {
    color: #627d98;
    font-size: 13px;
    line-height: 1.4;
}

.blocked-control {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: max-content;
    cursor: not-allowed;
}

.blocked-control-wide {
    width: 100%;
}

.blocked-control-wide input {
    width: 100%;
}

.blocked-control input:disabled {
    cursor: not-allowed;
}

.blocked-control::after {
    content: attr(data-blocked-message);
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    z-index: 20;
    display: none;
    width: min(280px, 80vw);
    padding: 9px 10px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #102a43;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    box-shadow: 0 10px 24px rgba(16, 42, 67, 0.22);
}

.blocked-control::before {
    content: "";
    position: absolute;
    left: 8px;
    bottom: calc(100% + 2px);
    z-index: 21;
    display: none;
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #102a43 transparent transparent;
}

.blocked-control:hover::before,
.blocked-control:hover::after,
.blocked-control:focus::before,
.blocked-control:focus::after,
.blocked-control:focus-within::before,
.blocked-control:focus-within::after {
    display: block;
}

.project-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.project-list .project-card {
    background: #ffffff;
    border: 1px solid #cfd8e3;
    border-radius: 14px;
    padding: 0;
    box-shadow: 0 6px 16px rgba(16, 42, 67, 0.10);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
}

.project-list .project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(16, 42, 67, 0.15);
}

.project-card-body {
    padding: 22px;
}

.project-card h2 {
    margin: 0 0 8px 0;
    font-size: 1.3rem;
}

.project-card h2 a {
    color: #111827;
    text-decoration: none;
}

.project-meta {
    color: #6b7280;
    margin: 0 0 14px 0;
}

.project-status {
    display: inline-block;
    background: #f1f5f9;
    color: #334155;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    margin-bottom: 18px;
}

.project-card-footer {
    margin-top: 20px;
}

.project-health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 14px;
}

.project-health-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #d9e2ec;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(16, 42, 67, 0.05);
}

.project-health-meta {
    color: #52606d;
    font-size: 14px;
    margin-top: 6px;
}

.project-health-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.project-health-stat {
    background: #f8fafc;
    border: 1px solid #eef2f6;
    border-radius: 8px;
    padding: 10px;
}

.project-health-stat span {
    display: block;
    color: #52606d;
    font-size: 12px;
    font-weight: 700;
}

.project-health-stat strong {
    display: block;
    color: #102a43;
    font-size: 20px;
    margin-top: 4px;
}

.project-risk-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
    color: #52606d;
    font-size: 14px;
    font-weight: 700;
}

.project-health-card .card-actions {
    margin-top: auto;
}

.site-header {
    /* background: #ffffff;
    border-bottom: 1px solid #d9e2ec; */
    background: #1f2937; /* dark slate */
    color: white;
}



/* .main-nav a {
    text-decoration: none;
    color: #334e68;
    font-weight: 600;
}

.main-nav a:hover {
    color: #0b69a3;
} */

/* Desktop header */
.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    font-size: 1.2rem;
    font-weight: 800;
    /* color: #222; */
    color: #ffffff;
    white-space: nowrap;
    text-decoration: none;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
}

.main-nav a {
    /* color: #444; */
    color: #d1d5db;
    text-decoration: none;
    font-weight: 500;
}

.main-nav a.active {
    color: #ffffff;
    font-weight: 700;
}

.main-nav a:hover {
    /* color: #111; */
    color: #ffffff;
}

.public-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
}

.public-nav a:not(.btn) {
    color: #d1d5db;
    text-decoration: none;
    font-weight: 600;
}

.public-nav a:not(.btn):hover {
    color: #ffffff;
}

.logout-form {
    margin: 0;
}

.nav-logout {
    background: #dc3545;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.nav-logout:hover {
    background: #bb2d3b;
}

.nav-toggle,
.nav-toggle-label,
.nav-close {
    display: none;
}


.page-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px 40px;
    width: 100%;
    flex: 1;
}

.message-list {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.message {
    padding: 12px 14px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #ffffff;
    color: #334e68;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    box-shadow: 0 1px 2px rgba(16, 42, 67, 0.05);
}

.message.success {
    border-color: #9ae6b4;
    background: #f0fff4;
    color: #276749;
}

.message.error {
    border-color: #feb2b2;
    background: #fff5f5;
    color: #9b2c2c;
}

.message.warning {
    border-color: #f6d365;
    background: #fffaf0;
    color: #7b4f00;
}

.message.info {
    border-color: #90cdf4;
    background: #ebf8ff;
    color: #2a4365;
}

.site-footer {
    border-top: 1px solid #d9e2ec;
    background: #ffffff;
    margin-top: auto;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 20px;
    color: #7b8794;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #52606d;
    text-decoration: none;
}

.footer-links a:hover {
    color: #0b69a3;
}

.public-hero {
    min-height: 520px;
    display: flex;
    align-items: center;
    width: 100vw;
    margin: -24px calc(50% - 50vw) 0;
    padding: 70px 20px 76px;
    background:
        radial-gradient(circle at 82% 18%, rgba(245, 158, 11, 0.16), transparent 28%),
        linear-gradient(135deg, #f8fafc 0%, #eef6fb 52%, #f7f3ec 100%);
    color: #102a43;
    border-bottom: 1px solid #d9e2ec;
}

.public-hero-content {
    width: min(100%, 1100px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 56px;
}

.public-hero-copy-block {
    max-width: 690px;
}

.public-kicker {
    display: inline-flex;
    margin-bottom: 18px;
    color: #0b69a3;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.public-hero h1 {
    margin: 0;
    font-size: 56px;
    line-height: 1.05;
    color: #102a43;
    max-width: 720px;
}

.public-hero-tagline {
    margin: 20px 0 0;
    max-width: 680px;
    font-size: 22px;
    line-height: 1.35;
    font-weight: 800;
    color: #243b53;
}

.public-hero-copy {
    max-width: 640px;
    margin: 16px 0 0;
    color: #52606d;
    font-size: 17px;
    line-height: 1.6;
}

.public-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.public-hero-actions .btn {
    min-height: 46px;
    padding: 12px 18px;
}

.public-hero-panel {
    background: #ffffff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 20px 50px rgba(16, 42, 67, 0.12);
}

.public-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 12px;
    border-bottom: 1px solid #eef2f6;
}

.public-panel-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

.public-panel-header strong,
.public-panel-header span,
.public-panel-row span,
.public-panel-row strong {
    display: block;
}

.public-panel-header strong {
    color: #102a43;
    font-size: 18px;
}

.public-panel-header span,
.public-panel-row span {
    color: #627d98;
    font-size: 13px;
}

.public-panel-row {
    padding: 14px 0;
}

.public-panel-row + .public-panel-row {
    border-top: 1px solid #eef2f6;
}

.public-panel-row strong {
    margin-top: 4px;
    color: #102a43;
    font-size: 16px;
}

.public-section,
.public-page {
    max-width: 1100px;
    margin: 0 auto;
}

.public-section {
    display: block;
    padding: 56px 0 60px;
}

.public-section p,
.public-page p {
    color: #52606d;
    line-height: 1.6;
}

.public-section-intro .section-title {
    margin-top: 0;
}

.public-section-intro {
    max-width: 760px;
    margin-bottom: 24px;
}

.public-workflow {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.public-workflow-step {
    min-height: 188px;
    padding: 24px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(16, 42, 67, 0.06);
}

.public-workflow-step > span,
.public-workflow-step strong,
.public-workflow-step p {
    display: block;
}

.public-workflow-step > span {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border-radius: 8px;
    background: #e6f2fb;
    color: #0b69a3;
    font-size: 13px;
    font-weight: 800;
}

.public-workflow-step strong {
    color: #102a43;
    font-size: 18px;
}

.public-workflow-step p {
    margin: 8px 0 0;
    color: #52606d;
    line-height: 1.5;
}

.public-info-page {
    padding: 28px 0 48px;
}

.public-page-hero {
    padding: 48px;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(11, 105, 163, 0.10), rgba(245, 158, 11, 0.08)),
        #ffffff;
    border: 1px solid #d9e2ec;
    box-shadow: 0 12px 36px rgba(16, 42, 67, 0.08);
}

.public-page-hero h1 {
    max-width: 760px;
    margin: 0;
    color: #102a43;
    font-size: 44px;
    line-height: 1.1;
}

.public-page-hero p {
    max-width: 720px;
    margin: 16px 0 0;
    color: #334e68;
    font-size: 18px;
}

.public-updated {
    display: inline-flex;
    margin-top: 18px;
    color: #627d98;
    font-size: 14px;
    font-weight: 700;
}

.public-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.public-info-card,
.public-contact-card,
.public-content-panel {
    background: #ffffff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(16, 42, 67, 0.05);
}

.public-info-card,
.public-contact-card {
    padding: 22px;
}

.public-info-card h2,
.public-info-card strong,
.public-contact-card h2,
.public-contact-card strong {
    display: block;
    margin: 0 0 10px;
    color: #102a43;
    font-size: 19px;
}

.public-contact-card > span {
    display: block;
    margin-bottom: 8px;
    color: #627d98;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.public-info-card p,
.public-contact-card p {
    margin: 0;
}

.public-content-panel {
    margin-top: 18px;
    padding: 34px;
}

.public-content-panel h2 {
    margin: 28px 0 10px;
    color: #102a43;
    font-size: 20px;
}

.public-content-panel h2:first-child {
    margin-top: 0;
}

.public-content-panel p {
    max-width: 780px;
    margin: 0 0 14px;
}

.public-content-panel p:last-child {
    margin-bottom: 0;
}

.public-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.public-contact-card a,
.public-content-panel a {
    color: #0b69a3;
    font-weight: 700;
}

.card {
    background: #ffffff;
    border: 1px solid #d9e2ec;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(16, 42, 67, 0.05);
}

.section-title {
    margin: 24px 0 12px;
    color: #102a43;
}

.card .section-title:first-child {
    margin-top: 0;
}

.action-bar,
.page-footer-actions,
.pagination {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.action-bar button[type="submit"] {
    margin-top: 0;
}

.empty-state {
    color: #52606d;
}

.empty-state p {
    margin: 0 0 12px;
}

.empty-state p:last-child {
    margin-bottom: 0;
}

.page-title {
    margin-top: 0;
    margin-bottom: 4px;
    color: #102a43;
}

.page-subtitle {
    color: #52606d;
    margin: 0;
}

.meta {
    color: #7b8794;
    font-size: 14px;
}

.form-note {
    margin: 0 0 16px;
    padding: 10px 12px;
    border: 1px solid #f5d08a;
    border-radius: 8px;
    background: #fff7e6;
    color: #7c4a03;
    font-size: 14px;
    line-height: 1.45;
}

.maintenance-notice {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid #f0c36d;
    border-radius: 8px;
    background: #fff8e5;
    color: #5f3f00;
    text-align: left;
}

.maintenance-notice-title {
    margin-bottom: 4px;
    color: #3f2a00;
    font-weight: 800;
}

.maintenance-notice-message {
    font-size: 14px;
    line-height: 1.45;
}

.material-unit-hint {
    margin-top: 8px;
    color: #334e68;
    font-size: 14px;
    font-weight: 700;
}

.material-unit-hint-custom {
    color: #92400e;
}

.additional-request-items {
    margin: 22px 0;
    padding-top: 18px;
    border-top: 1px solid #eef2f6;
}

.additional-request-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.additional-request-row {
    margin-bottom: 10px;
    padding: 12px 14px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f8fafc;
}

.additional-request-row-header strong {
    display: block;
    color: #102a43;
}

.additional-request-row-header small {
    display: block;
    margin-top: 3px;
    color: #486581;
    font-size: 13px;
    line-height: 1.35;
}

.additional-request-items > .btn {
    margin-top: 2px;
}

.searchable-select {
    position: relative;
}

.searchable-select-native {
    display: none;
}

.searchable-select-input {
    padding-right: 38px;
    background:
        linear-gradient(45deg, transparent 50%, #52606d 50%),
        linear-gradient(135deg, #52606d 50%, transparent 50%),
        #ffffff;
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 12px) 50%,
        0 0;
    background-size:
        6px 6px,
        6px 6px,
        100% 100%;
    background-repeat: no-repeat;
}

.searchable-select-options {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    z-index: 20;
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid #bcccdc;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 16px 32px rgba(16, 42, 67, 0.18);
}

.searchable-select-option {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #102a43;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.searchable-select-option:hover,
.searchable-select-option:focus {
    background: #e6f6ff;
    outline: none;
}

.searchable-select-empty {
    padding: 10px 12px;
    color: #7b8794;
    font-size: 14px;
}

/* .btn + .btn {
    margin-top: 10px;
} */

.action-block {
    margin-top: 20px;
}

.bulk-action-bar,
.sticky-actions {
    position: sticky;
    bottom: 12px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: #ffffff;
    padding: 12px;
    margin-top: 20px;
    border: 1px solid #d9e2ec;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(16, 42, 67, 0.14);
}

.bulk-selected-count {
    color: #334e68;
    font-size: 14px;
    font-weight: 700;
    margin-right: auto;
}

.bulk-action-bar button[type="submit"] {
    margin-top: 0;
}

/* .btn-danger {
    background: #d64545;
    color: white;
}

.btn-danger:hover {
    background: #b83a3a;
} */

.link-list {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.link-button {
    display: inline-block;
    text-decoration: none;
    background: #0b69a3;
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 600;
}

/* .link-button:hover {
    background: #095a8c;
} */

.simple-list {
    display: grid;
    gap: 12px;
}

.simple-item {
    background: #ffffff;
    border: 1px solid #d9e2ec;
    border-radius: 10px;
    padding: 14px 16px;
}

form p {
    margin-bottom: 14px;
}

input,
select,
textarea {
    width: 100%;
    max-width: 500px;
    padding: 10px;
    border: 1px solid #bcccdc;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

button[type="submit"] {
    margin-top: 8px;
}

/* Auth pages (login) */

.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.auth-card {
    background: #ffffff;
    border: 1px solid #d9e2ec;
    border-radius: 10px;
    padding: 30px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 2px 6px rgba(16, 42, 67, 0.08);
}

.auth-title {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}

.auth-link-row {
    margin-top: 18px;
    text-align: center;
}

.auth-link-row a {
    color: #0b69a3;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.auth-link-row a:hover {
    text-decoration: underline;
}

.project-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.project-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.project-stat-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 8px;
    color: #52606d;
    font-size: 13px;
    font-weight: 700;
}

.project-stat-strip strong {
    color: #102a43;
}

.project-header-edit {
    margin-top: 2px;
}

.project-header-edit[open] {
    flex-basis: 100%;
    order: 2;
}

.project-header-edit summary {
    margin-left: auto;
}

.project-header-edit form {
    margin-top: 12px;
    padding: 16px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #ffffff;
}

.project-details-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.dashboard-company-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.dashboard-company-summary {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.dashboard-company-summary div {
    min-width: 120px;
    padding: 12px;
    border: 1px solid #eef2f6;
    border-radius: 8px;
    background: #f8fafc;
}

.dashboard-company-summary span {
    display: block;
    color: #102a43;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}

.dashboard-company-summary strong {
    display: block;
    color: #52606d;
    font-size: 13px;
    margin-top: 6px;
}

.dashboard-stat-card {
    display: block;
    min-width: 0;
    padding: 14px;
    border: 1px solid #d9e2ec;
    border-radius: 10px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(16, 42, 67, 0.05);
}

.dashboard-stat-card:hover {
    border-color: #0b69a3;
}

.dashboard-stat-warning {
    border-left: 4px solid #f59e0b;
}

.dashboard-stat-danger {
    border-left: 4px solid #dc2626;
}

.dashboard-stat-value {
    display: block;
    color: #102a43;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

.dashboard-stat-label {
    display: block;
    color: #52606d;
    font-size: 13px;
    font-weight: 700;
    margin-top: 8px;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
    gap: 16px;
    align-items: start;
}

.pilot-feedback-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.pilot-feedback-banner .section-title {
    margin-bottom: 4px;
}

.pilot-feedback-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pilot-feedback-actions form {
    display: flex;
    align-items: stretch;
    margin: 0;
}

.pilot-feedback-actions .btn {
    height: 42px;
    min-width: 130px;
}

.pilot-feedback-actions button[type="submit"] {
    margin-top: 0;
}

.pilot-feedback-card {
    max-width: 840px;
}

.pilot-feedback-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.pilot-feedback-intro .section-title {
    margin-bottom: 4px;
}

.pilot-feedback-usage {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.pilot-feedback-usage div {
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    padding: 14px;
    background: #f8fbfd;
}

.pilot-feedback-usage span {
    display: block;
    color: #0b69a3;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 6px;
}

.pilot-feedback-usage strong {
    color: #52606d;
    font-size: 13px;
}

.pilot-feedback-question-list {
    display: grid;
    gap: 14px;
}

.pilot-feedback-question {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 0;
    padding: 16px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #ffffff;
}

.pilot-feedback-question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #e6f4fb;
    color: #0b5f8a;
    font-size: 14px;
    font-weight: 800;
}

.pilot-feedback-question label {
    color: #102a43;
    font-size: 15px;
    line-height: 1.35;
    margin-bottom: 10px;
}

.pilot-feedback-card ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pilot-feedback-card li {
    margin: 0;
}

.pilot-feedback-card li label {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f8fafc;
    color: #334e68;
    font-size: 14px;
    font-weight: 600;
}

.pilot-feedback-card input[type="radio"] {
    width: auto;
    margin-right: 6px;
}

.dashboard-action-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.dashboard-action-list .btn {
    width: 100%;
    min-height: 44px;
}

.dashboard-action-list .btn + .btn {
    margin: 0;
}

.dashboard-project-list {
    display: grid;
    gap: 10px;
}

.dashboard-project-row {
    display: grid;
    grid-template-columns: minmax(160px, 1.5fr) repeat(5, minmax(90px, 1fr));
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid #eef2f6;
    border-radius: 8px;
    color: #334e68;
    text-decoration: none;
}

.dashboard-project-row:hover {
    border-color: #0b69a3;
    background: #f8fafc;
}

.dashboard-project-row strong {
    color: #102a43;
}

.dashboard-risk-warning {
    color: #92400e;
    font-weight: 700;
}

.dashboard-risk-danger {
    color: #991b1b;
    font-weight: 700;
}

.assistant-card textarea {
    min-height: 140px;
    resize: vertical;
}

.assistant-form .btn {
    min-width: 130px;
}

.assistant-context-note {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 6px 9px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f8fafc;
    color: #52606d;
    font-size: 13px;
    font-weight: 700;
}

.assistant-answer-card {
    border-color: #b7d9ee;
    background: #f8fcff;
}

.assistant-answer {
    color: #243b53;
    line-height: 1.6;
}

.assistant-answer p:first-child {
    margin-top: 0;
}

.assistant-answer p:last-child {
    margin-bottom: 0;
}

.assistant-answer p,
.assistant-panel-answer p {
    white-space: pre-line;
}

.assistant-answer-links,
.assistant-panel-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.assistant-panel-links {
    padding-top: 2px;
}

.assistant-suggestion-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.assistant-suggestion-list form {
    margin: 0;
}

.assistant-suggestion-button {
    display: inline-flex;
    padding: 8px 10px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f8fafc;
    color: #334e68;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.assistant-suggestion-button:hover,
.assistant-suggestion-button:focus {
    border-color: #0b69a3;
    background: #eef8ff;
    color: #0b4f79;
    outline: none;
}

.profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
    gap: 16px;
    align-items: start;
}

.profile-layout > .card:only-child {
    grid-column: 1 / -1;
}

.profile-summary-grid,
.profile-detail-list,
.profile-project-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.profile-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-summary-item,
.profile-detail-list div,
.profile-project-list a {
    min-width: 0;
    padding: 10px;
    border: 1px solid #eef2f6;
    border-radius: 8px;
    background: #f8fafc;
}

.profile-summary-item span,
.profile-detail-list span {
    display: block;
    color: #52606d;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-summary-item strong,
.profile-detail-list strong {
    color: #102a43;
    overflow-wrap: anywhere;
}

.profile-project-list a {
    color: #102a43;
    font-weight: 700;
    text-decoration: none;
}

.profile-project-list a:hover {
    border-color: #0b69a3;
}

.user-summary-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.material-plan-list {
    display: grid;
    gap: 4px;
}

.material-plan-row {
    border: 1px solid #eef2f6;
    border-radius: 6px;
    border-left: 3px solid #d9e2ec;
    padding: 7px 10px;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.material-plan-row:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.material-plan-row-near-limit {
    border-color: #f59e0b;
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.material-plan-row-near-limit:hover {
    background: #fef3c7;
    border-color: #f59e0b;
}

.material-plan-row-overused {
    border-color: #dc2626;
    border-left-color: #dc2626;
    background: #fef2f2;
}

.material-plan-row-overused:hover {
    background: #fee2e2;
    border-color: #dc2626;
}

.material-plan-main {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) repeat(3, minmax(90px, 120px)) auto;
    align-items: center;
    gap: 10px;
}

.material-plan-title {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.material-plan-title strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comparison-metric {
    min-width: 0;
}

.metric-label {
    display: block;
    color: #52606d;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 1px;
}

.metric-value {
    color: #102a43;
    font-size: 13px;
}

.material-plan-row-overused .metric-value {
    color: #7f1d1d;
}

.plan-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.material-plan-extra {
    display: none;
}

.material-plan-list.is-expanded .material-plan-extra {
    display: block;
}

.material-plan-toggle {
    margin-top: 12px;
}

.material-plan-toggle-less {
    display: none;
}

.material-plan-list.is-expanded + .material-plan-toggle .material-plan-toggle-more {
    display: none;
}

.material-plan-list.is-expanded + .material-plan-toggle .material-plan-toggle-less {
    display: inline;
}

.plan-status-ok {
    background: #dcfce7;
    color: #166534;
}

.plan-status-near-limit {
    background: #fef3c7;
    color: #92400e;
}

.plan-status-overused {
    background: #fee2e2;
    color: #991b1b;
}

.material-plan-row-unplanned {
    border-left-color: #64748b;
}

.plan-status-unplanned {
    background: #e2e8f0;
    color: #334155;
}

.material-usage-table-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow-x: auto;
}

.table-summary {
    color: #52606d;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
}

.report-section {
    display: block;
}

.report-section-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    list-style: none;
}

.report-section-summary::-webkit-details-marker {
    display: none;
}

.report-section-summary .section-title {
    display: block;
    margin: 0;
}

.report-section-summary .page-subtitle {
    display: block;
    margin-top: 4px;
}

.report-section-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    min-width: 56px;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eef2f6;
    color: #334e68;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.report-section-toggle::before {
    content: "Open";
}

.report-section[open] .report-section-toggle {
    background: #dbeafe;
    color: #1d4ed8;
}

.report-section[open] .report-section-toggle::before {
    content: "Close";
}

.report-section-summary + .table-summary,
.report-section-summary + .material-usage-table-wrap,
.report-section-summary + .empty-state {
    margin-top: 16px;
}

.report-section-actions {
    margin-top: 16px;
    margin-bottom: 12px;
}

.material-usage-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 680px;
    background: #ffffff;
}

.material-usage-table th,
.material-usage-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #eef2f6;
    text-align: left;
    vertical-align: middle;
}

.material-usage-table th {
    background: #f8fafc;
    color: #52606d;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.material-usage-table tbody tr:nth-child(even) {
    background: #fbfdff;
}

.material-usage-table tbody tr:hover {
    background: #f1f5f9;
}

.material-usage-table tbody tr:last-child td {
    border-bottom: 0;
}

.material-usage-table td:nth-child(2),
.material-usage-table th:nth-child(2) {
    text-align: right;
}

.material-usage-report-table td:nth-child(2),
.material-usage-report-table th:nth-child(2) {
    text-align: left;
}

.material-usage-report-table td:nth-child(3),
.material-usage-report-table th:nth-child(3) {
    text-align: right;
}

.material-usage-report-table {
    min-width: 760px;
}

.material-usage-report-table td:nth-child(4),
.material-usage-report-table th:nth-child(4) {
    text-align: right;
}

.material-usage-table td:nth-child(3),
.material-usage-table td:nth-child(4),
.material-usage-table td:nth-child(5) {
    white-space: nowrap;
}

.material-usage-report-table td:nth-child(5),
.material-usage-report-table td:nth-child(6) {
    white-space: nowrap;
}

.company-material-totals-table {
    min-width: 760px;
}

.company-material-totals-table td:nth-child(2),
.company-material-totals-table th:nth-child(2),
.company-material-totals-table td:nth-child(3),
.company-material-totals-table th:nth-child(3),
.company-material-totals-table td:nth-child(5),
.company-material-totals-table th:nth-child(5) {
    text-align: right;
}

.company-material-totals-table td:nth-child(2),
.company-material-totals-table td:nth-child(3),
.company-material-totals-table td:nth-child(4),
.company-material-totals-table td:nth-child(5),
.company-material-totals-table td:nth-child(6) {
    white-space: nowrap;
}

.material-usage-table td:first-child strong {
    color: #102a43;
}

.material-usage-row-overused {
    background: #fef2f2 !important;
}

.material-usage-row-overused:hover {
    background: #fee2e2 !important;
}

.material-usage-row-near-limit {
    background: #fffbeb !important;
}

.material-usage-row-near-limit:hover {
    background: #fef3c7 !important;
}

.material-usage-row-unplanned {
    background: #f8fafc !important;
}

.material-usage-row-unplanned:hover {
    background: #e2e8f0 !important;
}

.over-plan-warning {
    background: #fffbeb;
    border: 1px solid #f59e0b;
    border-radius: 10px;
    color: #78350f;
    margin-top: 16px;
    padding: 14px;
}

.over-plan-warning-top {
    background: #fef2f2;
    border-color: #dc2626;
    color: #7f1d1d;
    margin: 18px 0;
    padding: 18px;
}

.over-plan-warning-top h2 {
    font-size: 24px;
    margin: 0 0 8px;
}

.over-plan-warning-top .btn {
    margin-top: 8px;
}

.over-plan-warning h3 {
    margin: 0 0 8px;
}

.over-plan-warning p {
    margin: 0 0 12px;
}

.over-plan-list {
    display: grid;
    gap: 10px;
}

.over-plan-item {
    background: #ffffff;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 10px;
}

.order-selected-summary {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    margin-top: 14px;
    padding: 8px 12px;
    border: 1px solid #d9e2ec;
    border-radius: 999px;
    background: #f8fafc;
    color: #334e68;
    font-size: 14px;
    font-weight: 700;
}

.material-plan-edit {
    margin-top: 10px;
}

.material-plan-edit summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #e4e7eb;
    color: #334e68;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.material-plan-edit summary:hover {
    background: #cbd2d9;
}

.material-plan-edit form {
    margin-top: 12px;
}

.material-plan-edit .form-row,
.material-plan-add .form-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.material-plan-edit .form-row .form-group,
.material-plan-add .form-row .form-group {
    min-width: 0;
}

.material-plan-edit input,
.material-plan-edit select,
.material-plan-add input,
.material-plan-add select {
    height: 42px;
    width: 100%;
    max-width: none;
}

.material-plan-edit .form-actions .btn {
    height: 40px;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
    width: 96px;
}

.material-plan-add {
    margin-top: 16px;
}

.material-plan-add summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #e4e7eb;
    color: #334e68;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    list-style: none;
    cursor: pointer;
}

.material-plan-add summary:hover {
    background: #cbd2d9;
}

.material-plan-add summary::-webkit-details-marker,
.material-plan-edit summary::-webkit-details-marker {
    display: none;
}

.project-edit-panel summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #e4e7eb;
    color: #334e68;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    list-style: none;
    cursor: pointer;
}

.project-edit-panel summary:hover {
    background: #cbd2d9;
}

.project-edit-panel summary::-webkit-details-marker {
    display: none;
}

.project-edit-panel form {
    margin-top: 16px;
}

.request-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.request-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #d9e2ec;
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(16, 42, 67, 0.05);
}

.request-card input[type="checkbox"] {
    transform: scale(1.4);
    margin-top: 4px;
}

.request-content {
    flex: 1;
}

.request-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 6px;
    color: #102a43;
}

.request-meta {
    font-size: 14px;
    color: #52606d;
    margin-bottom: 3px;
}

.request-card:has(input:checked) {
    border-color: #0b69a3;
    background: #eef8ff;
}

.card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #d9e2ec;
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    /* box-shadow: 0 1px 2px rgba(16, 42, 67, 0.05); */
    transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.card-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.card-item input[type="checkbox"] {
    transform: scale(1.4);
    margin-top: 4px;
    width: auto;
}

.card-content {
    flex: 1;
}

.card-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 6px;
    color: #102a43;
}

.card-meta {
    font-size: 14px;
    color: #52606d;
    margin-bottom: 3px;
}

.material-catalog-list {
    display: grid;
    gap: 5px;
}

.material-catalog-row {
    border: 1px solid #eef2f6;
    border-radius: 6px;
    background: #ffffff;
    padding: 7px 10px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.material-catalog-row:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.material-catalog-main {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(110px, 150px) auto auto;
    align-items: center;
    gap: 12px;
}

.material-catalog-name {
    color: #102a43;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.material-catalog-unit {
    min-width: 0;
}

.material-catalog-unit strong {
    color: #102a43;
    font-size: 13px;
}

.material-catalog-edit {
    min-height: 32px;
    padding: 6px 12px;
}

.supplier-catalog-list,
.user-catalog-list {
    display: grid;
    gap: 5px;
}

.supplier-catalog-row,
.user-catalog-row {
    border: 1px solid #eef2f6;
    border-radius: 6px;
    background: #ffffff;
    padding: 7px 10px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.supplier-catalog-row:hover,
.user-catalog-row:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.supplier-catalog-main,
.user-catalog-main,
.invite-catalog-main {
    display: grid;
    align-items: center;
    gap: 12px;
}

.supplier-catalog-main {
    grid-template-columns: minmax(150px, 1fr) minmax(190px, 1.3fr) minmax(110px, 140px) auto auto;
}

.user-catalog-main {
    grid-template-columns: minmax(140px, 1fr) minmax(80px, 100px) minmax(110px, 140px) minmax(180px, 1.2fr) minmax(105px, 130px) auto auto;
}

.invite-catalog-main {
    grid-template-columns: minmax(190px, 1fr) auto minmax(140px, 170px) minmax(140px, 170px) minmax(130px, 160px);
}

.supplier-catalog-name,
.user-catalog-name {
    color: #102a43;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.supplier-catalog-email,
.supplier-catalog-phone,
.user-catalog-role,
.user-catalog-username,
.user-catalog-email,
.user-catalog-phone,
.invite-catalog-main div {
    min-width: 0;
}

.supplier-catalog-email strong,
.supplier-catalog-phone strong,
.user-catalog-role strong,
.user-catalog-username strong,
.user-catalog-email strong,
.user-catalog-phone strong,
.invite-catalog-main strong {
    color: #102a43;
    display: block;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.supplier-catalog-notes {
    margin-top: 6px;
    color: #52606d;
    font-size: 13px;
}

.supplier-catalog-edit,
.user-catalog-edit {
    min-height: 32px;
    padding: 6px 12px;
}

.workflow-cue {
    color: #334e68;
    font-size: 13px;
    font-weight: 700;
    margin: 2px 0 8px;
}

.activity-timeline {
    display: grid;
    gap: 0;
}

.activity-item {
    display: grid;
    grid-template-columns: 14px 1fr;
    gap: 10px;
    padding: 0 0 14px;
    position: relative;
}

.activity-item:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 14px;
    bottom: 0;
    left: 6px;
    border-left: 1px solid #d9e2ec;
}

.activity-dot {
    width: 13px;
    height: 13px;
    border-radius: 999px;
    background: #0b69a3;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 2px #dbeafe;
    margin-top: 2px;
    z-index: 1;
}

.activity-message {
    color: #102a43;
    font-size: 14px;
    font-weight: 700;
}

.activity-meta {
    color: #7b8794;
    font-size: 13px;
    margin-top: 3px;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #eef2f6;
}

.order-overview-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.order-overview-item {
    min-width: 0;
    padding: 12px;
    border: 1px solid #eef2f6;
    border-radius: 8px;
    background: #f8fafc;
}

.overview-label {
    display: block;
    color: #52606d;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 5px;
}

.overview-value {
    display: block;
    color: #102a43;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.overview-subvalue {
    display: block;
    color: #627d98;
    font-size: 13px;
    margin-top: 4px;
}

.overview-action {
    display: inline-block;
    color: #0b69a3;
    font-size: 13px;
    font-weight: 700;
    margin-top: 6px;
    text-decoration: none;
}

.overview-action:hover {
    text-decoration: underline;
}

.order-detail-form,
.order-notes,
.order-action-section,
.delivery-action-section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #eef2f6;
}

.action-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-group-label {
    color: #627d98;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.action-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.action-row form,
.delivery-action-section form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.action-row button[type="submit"] {
    margin-top: 0;
}

.action-row .form-help {
    width: 100%;
}

.order-status-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
    align-items: start;
    gap: 16px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #eef2f6;
}

.order-status-actions .delivery-action-section {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.order-management-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
    justify-self: end;
    text-align: right;
}

.revise-order-section,
.cancel-order-section {
    justify-self: end;
    text-align: right;
}

.revise-order-section .form-help,
.cancel-order-section .form-help {
    max-width: 320px;
    text-align: left;
}

.cancel-order-section .inline-confirmation {
    width: min(560px, calc(100vw - 48px));
    text-align: left;
}

.revision-item-list,
.revision-request-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.revision-item-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid #e4e7eb;
    border-radius: 8px;
    background: #f8fafc;
}

.revision-remove-option,
.revision-request-option {
    margin: 0;
}

.revision-request-option span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.inline-confirmation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 14px;
    border: 1px solid #b7d9ee;
    border-radius: 8px;
    background: #f5fbff;
}

.inline-confirmation[hidden] {
    display: none;
}

.inline-confirmation-title {
    color: #102a43;
    font-weight: 700;
}

.inline-confirmation-copy {
    margin-top: 4px;
    color: #486581;
    font-size: 14px;
    line-height: 1.4;
}

.inline-confirmation-warning {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #f0c36d;
    border-radius: 8px;
    background: #fff8e5;
    color: #8a5a00;
    font-size: 14px;
    line-height: 1.4;
}

.inline-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 16px;
    padding: 14px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.inline-alert-danger {
    border: 1px solid #f5b5b5;
    background: #fff5f5;
    color: #7f1d1d;
}

.inline-alert strong {
    display: block;
    margin-bottom: 4px;
}

.inline-confirmation-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    min-width: max-content;
}

.inline-confirmation-actions form {
    display: inline-flex;
    margin: 0;
}

.inline-confirmation-actions .btn {
    width: auto;
    min-width: 130px;
    margin-top: 0;
}

.inline-confirmation-actions button[type="submit"] {
    margin-top: 0;
}

.inline-confirmation-form {
    display: grid;
    gap: 12px;
    min-width: min(100%, 520px);
}

body.modal-open {
    overflow: hidden;
}

.send-preview-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(16, 42, 67, 0.48);
}

.send-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.send-preview-overlay[hidden],
.send-preview-modal[hidden] {
    display: none;
}

.send-preview-card {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(860px, 100%);
    max-height: min(88vh, 820px);
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(16, 42, 67, 0.28);
    overflow: hidden;
}

.send-preview-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid #d9e2ec;
}

.section-eyebrow {
    margin-bottom: 4px;
    color: #627d98;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.send-preview-title {
    margin: 0;
    color: #102a43;
    font-size: 24px;
}

.send-preview-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f8fafc;
    color: #102a43;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.send-preview-scroll {
    min-height: 0;
    padding: 18px 20px;
    overflow-y: auto;
}

.send-preview-card > form {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 0;
    overflow: hidden;
}

.email-preview-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.email-preview-meta > div {
    min-width: 0;
    padding: 12px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f8fafc;
}

.email-preview-meta dt {
    margin: 0 0 4px;
    color: #627d98;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.email-preview-meta dd {
    margin: 0;
    color: #102a43;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.email-preview-section {
    margin-top: 18px;
}

.email-preview-section h3 {
    margin: 0 0 10px;
    color: #102a43;
    font-size: 17px;
}

.email-preview-items {
    display: grid;
    gap: 8px;
}

.email-preview-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #ffffff;
    color: #334e68;
}

.email-preview-item strong {
    color: #102a43;
    white-space: nowrap;
}

.email-preview-body {
    margin: 0;
    padding: 14px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f8fafc;
    color: #243b53;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.send-preview-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid #d9e2ec;
    background: #ffffff;
}

.send-preview-actions form {
    display: inline-flex;
    margin: 0;
}

.send-preview-actions .btn {
    width: auto;
    min-width: 130px;
    margin-top: 0;
}

.card-item:has(input:checked) {
    border-color: #0b69a3;
    background: #eef8ff;
}

.main-nav {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.logout-form {
    margin-left: auto;
}

.card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    background: #e5e7eb;
    color: #374151;
}

.status-badge-group {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.status-pending,
.status-created {
    background: #e5e7eb;
    color: #374151;
}

.status-approved {
    background: #dbeafe;
    color: #1e40af;
}

.status-ordered {
    background: #ede9fe;
    color: #5b21b6;
}

.status-delivered {
    background: #dcfce7;
    color: #166534;
}

.status-sent {
    background: #e0f2fe;
    color: #075985;
}

.status-failed {
    background: #fee2e2;
    color: #991b1b;
}

.status-cancelled {
    background: #f3f4f6;
    color: #4b5563;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.email-log-card {
    display: grid;
    gap: 10px;
}

.email-log-item {
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.email-log-item summary {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
}

.email-log-summary-main {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.email-log-subject,
.email-log-summary-meta {
    color: #627d98;
    font-size: 14px;
}

.email-log-details {
    border-top: 1px solid #eef2f6;
    padding: 14px;
}

.email-log-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.email-log-meta-grid span,
.email-log-body span {
    color: #627d98;
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.email-log-error {
    margin-top: 14px;
    padding: 10px 12px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fef2f2;
    color: #991b1b;
}

.email-log-body {
    margin-top: 14px;
}

.email-log-body pre {
    margin: 0;
    padding: 12px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f8fafc;
    color: #102a43;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

.form-row {
    display: flex;
    gap: 10px;
}

.form-row .form-group {
    flex: 1;
}

input, select, textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
}

.choice-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.choice-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    min-width: 140px;
    padding: 10px 12px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f8fafc;
    color: #102a43;
    font-weight: 700;
    cursor: pointer;
}

.choice-option input {
    width: auto;
    margin: 0;
}

.choice-option:has(input:checked) {
    border-color: #0b69a3;
    background: #e0f2fe;
    color: #0b4f71;
}

.choice-row-stacked {
    display: grid;
    width: 100%;
}

.choice-row-stacked .choice-option {
    width: 100%;
    align-items: flex-start;
}

.choice-option small {
    display: block;
    margin-top: 3px;
    color: #486581;
    font-weight: 500;
    line-height: 1.35;
}

.errorlist {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    color: #991b1b;
    font-size: 13px;
    font-weight: 700;
}

.errorlist li {
    margin: 4px 0 0;
}

.errorlist.nonfield {
    margin-bottom: 14px;
    padding: 10px 12px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fef2f2;
}

.errorlist + input,
.errorlist + select,
.errorlist + textarea {
    border-color: #dc2626;
    background: #fffafa;
}

.form-group:has(.errorlist) input,
.form-group:has(.errorlist) select,
.form-group:has(.errorlist) textarea {
    border-color: #dc2626;
    background: #fffafa;
}

.inactive-users-toggle {
    margin-top: 20px;
}

.inactive-users-toggle summary {
    cursor: pointer;
    font-weight: 700;
    color: #374151;
    padding: 10px 0;
}

.inactive-users-list {
    margin-top: 12px;
}

.inactive-card {
    opacity: 0.72;
    background: #f8fafc;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #e5e7eb;
    color: #374151;
}

.filter-form {
    margin-bottom: 0;
}

.form-actions {
    display: flex;
    align-items: stretch;
    gap: 12px;
    flex-wrap: wrap;
}

.form-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #7b8794;
    font-size: 13px;
    font-weight: 800;
    margin: 8px 0 14px;
    text-transform: uppercase;
}

.form-divider::before,
.form-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #eef2f6;
}

.form-actions button[type="submit"] {
    margin-top: 0;
}

.filter-form .form-actions .btn {
    height: 40px;
    padding-top: 0;
    padding-bottom: 0;
}

.filter-form input,
.filter-form select {
    height: 42px;
}

.filter-form .form-actions button[type="submit"] {
    margin-top: 0;
}

.material-form-actions .btn {
    height: 40px;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.active-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #eef2f6;
}

.active-filters-label {
    color: #52606d;
    font-size: 14px;
    font-weight: 700;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eef2f6;
    color: #334e68;
    font-size: 13px;
    font-weight: 600;
}

.filter-clear {
    color: #0b69a3;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.filter-clear:hover {
    text-decoration: underline;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.page-header .btn {
    flex: 0 0 auto;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.team-role-groups {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.manage-team-card {
    margin-top: 20px;
}

.team-filter-row {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(150px, 180px) minmax(150px, 180px);
    gap: 12px;
    margin-bottom: 12px;
}

.team-filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.team-assignment-list {
    display: grid;
    gap: 5px;
    margin-bottom: 14px;
}

.team-assignment-row {
    display: grid;
    grid-template-columns: auto minmax(140px, 1fr) minmax(90px, 110px) minmax(180px, 1.4fr) auto;
    align-items: center;
    gap: 12px;
    padding: 7px 10px;
    border: 1px solid #eef2f6;
    border-radius: 6px;
    background: #ffffff;
}

.team-assignment-row:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.team-assignment-row:has(input:checked) {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.team-assignment-name,
.team-assignment-row strong {
    color: #102a43;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-assignment-row input {
    width: auto;
}

.team-assignment-row[hidden],
.team-no-results[hidden] {
    display: none;
}

.team-assignment-status {
    justify-content: center;
    min-width: 82px;
}

.assigned-team-groups {
    display: grid;
    gap: 12px;
}

.assigned-team-group h4 {
    margin: 0 0 6px;
    color: #334e68;
}

.assigned-team-group ul {
    margin: 0;
    padding-left: 20px;
}

.team-role-group summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f8fafc;
    color: #334e68;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.team-role-group summary:hover {
    background: #eef2f6;
    border-color: #cbd5e1;
}

.team-role-group summary::-webkit-details-marker {
    display: none;
}

.team-role-count {
    color: #52606d;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.team-role-search-wrap {
    margin-top: 8px;
}

.team-role-search {
    width: 100%;
    height: 38px;
}

.team-checkbox-list {
    display: grid;
    gap: 4px;
    max-height: 280px;
    margin-top: 8px;
    overflow: auto;
}

.team-checkbox {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 7px 8px;
    border: 1px solid #eef2f6;
    border-radius: 6px;
    background: #ffffff;
    font-size: 14px;
}

.team-checkbox:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.team-checkbox:has(input:checked) {
    order: -1;
    border-color: #bfdbfe;
    background: #eff6ff;
}

.team-checkbox input {
    width: auto;
}

.team-checkbox-user {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.team-checkbox-user strong,
.team-checkbox-user .meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-no-results {
    margin: 8px 0 0;
}

@media (max-width: 530px) {
    .filter-form .form-row {
        flex-direction: column;
        gap: 0;
    }

    .filter-form .form-group {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .order-status-actions {
        grid-template-columns: 1fr;
    }

    .order-management-actions,
    .revise-order-section,
    .cancel-order-section {
        align-items: stretch;
        justify-self: stretch;
        text-align: left;
    }

    .revise-order-section .form-help,
    .cancel-order-section .form-help,
    .cancel-order-section .inline-confirmation {
        max-width: none;
        width: 100%;
    }

    .revision-item-row {
        grid-template-columns: 1fr;
    }

    .header-inner,
    .public-nav {
        flex-wrap: wrap;
    }

    .public-nav {
        justify-content: flex-start;
        margin-left: 0;
        width: 100%;
    }

    .public-hero {
        min-height: auto;
        margin: -24px calc(50% - 50vw) 0;
        padding: 42px 20px 48px;
        background:
            radial-gradient(circle at 88% 12%, rgba(245, 158, 11, 0.14), transparent 32%),
            linear-gradient(135deg, #f8fafc 0%, #eef6fb 54%, #f7f3ec 100%);
    }

    .public-hero-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .public-hero h1 {
        font-size: 36px;
    }

    .public-hero-tagline {
        font-size: 19px;
    }

    .public-hero-copy {
        font-size: 15px;
    }

    .public-hero-panel {
        padding: 14px;
    }

    .public-section,
    .public-workflow {
        grid-template-columns: 1fr;
    }

    .public-section {
        gap: 18px;
        padding: 32px 0;
    }

    .public-workflow-step {
        min-height: auto;
    }

    .public-info-page {
        padding: 16px 0 32px;
    }

    .public-page-hero {
        padding: 28px 20px;
    }

    .public-page-hero h1 {
        font-size: 32px;
    }

    .public-page-hero p {
        font-size: 16px;
    }

    .public-info-grid,
    .public-contact-grid {
        grid-template-columns: 1fr;
    }

    .public-content-panel {
        padding: 22px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .pilot-feedback-banner {
        align-items: stretch;
        flex-direction: column;
    }

    .pilot-feedback-actions,
    .pilot-feedback-actions form,
    .pilot-feedback-actions .btn {
        width: 100%;
    }

    .pilot-feedback-usage {
        grid-template-columns: 1fr;
    }

    .pilot-feedback-question {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .pilot-feedback-card ul,
    .pilot-feedback-card li,
    .pilot-feedback-card li label {
        width: 100%;
    }

    .project-page-header {
        flex-direction: column;
    }

    .project-header-edit,
    .project-header-edit summary {
        margin-left: 0;
    }

    .material-plan-main {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .material-plan-title,
    .plan-status {
        grid-column: 1 / -1;
    }

    .plan-status {
        justify-self: flex-start;
    }

    .material-plan-edit .form-row,
    .material-plan-add .form-row {
        grid-template-columns: 1fr;
    }

    .material-plan-edit .form-actions .btn {
        width: 100%;
        height: 48px;
        min-height: 48px;
        padding: 0 16px;
        font-size: 16px;
    }

    .material-plan-edit .form-actions .btn + .btn {
        margin-top: 10px;
    }

    .project-details-grid {
        grid-template-columns: 1fr;
    }

    .team-filter-row,
    .team-assignment-row {
        grid-template-columns: 1fr;
    }

    .team-assignment-status {
        justify-self: flex-start;
    }

    .material-catalog-main {
        grid-template-columns: 1fr auto;
        gap: 8px;
    }

    .material-catalog-name,
    .material-catalog-unit {
        grid-column: 1 / -1;
    }

    .material-catalog-edit {
        justify-self: flex-start;
    }

    .supplier-catalog-main,
    .user-catalog-main,
    .invite-catalog-main {
        grid-template-columns: 1fr auto;
        gap: 8px;
    }

    .supplier-catalog-name,
    .supplier-catalog-email,
    .supplier-catalog-phone,
    .user-catalog-name,
    .user-catalog-role,
    .user-catalog-username,
    .user-catalog-email,
    .user-catalog-phone,
    .invite-catalog-main > strong,
    .invite-catalog-main > div {
        grid-column: 1 / -1;
    }

    .supplier-catalog-edit,
    .user-catalog-edit {
        justify-self: flex-start;
    }

    .order-overview-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-company-card {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-company-summary div {
        flex: 1 1 140px;
    }

    .profile-layout,
    .profile-summary-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-project-row {
        grid-template-columns: 1fr;
    }

    .project-list {
        grid-template-columns: 1fr;
    }

    .project-card-body {
        padding: 18px;
    }

    .page-header .btn,
    .card .btn,
    form .btn,
    .pagination .btn,
    .bulk-action-bar .btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 14px 16px;
        font-size: 16px;
    }

    .filter-form .form-actions .btn {
        height: 48px;
    }

    .page-header .btn + .btn,
    .card .btn + .btn,
    form .btn + .btn,
    .pagination .btn + .btn,
    .bulk-action-bar .btn + .btn {
        margin-top: 10px;
    }

    .dashboard-action-list .btn {
        min-height: 52px;
        padding: 14px 16px;
    }

    .dashboard-action-list .btn + .btn {
        margin-top: 0;
    }

    .inline-confirmation,
    .inline-alert {
        align-items: stretch;
        flex-direction: column;
    }

    .inline-confirmation-actions {
        align-items: stretch;
        flex-direction: column;
        justify-content: flex-start;
        min-width: 0;
        width: 100%;
    }

    .inline-confirmation-actions form {
        width: 100%;
    }

    .inline-confirmation-actions .btn {
        width: 100%;
    }

    .inline-confirmation-actions .btn + .btn {
        margin-top: 0;
    }

    .send-preview-modal {
        align-items: stretch;
        padding: 10px;
    }

    .send-preview-card {
        max-height: calc(100vh - 20px);
    }

    .send-preview-header,
    .send-preview-scroll,
    .send-preview-actions {
        padding-left: 14px;
        padding-right: 14px;
    }

    .send-preview-title {
        font-size: 21px;
    }

    .email-preview-meta {
        grid-template-columns: 1fr;
    }

    .email-preview-item {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .send-preview-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .send-preview-actions form,
    .send-preview-actions .btn {
        width: 100%;
    }
}

@media (min-width: 768px) {
    .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: auto;
        padding: 10px 14px;
        font-size: 14px;
    }

    .btn + .btn {
        margin-top: 0;
        margin-left: 8px;
    }

    .project-layout {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        align-items: start;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .order-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* @media (max-width: 765px) {

    .card-title-row .status-badge {

        align-self: flex-start;

        margin-top: 2px;
    }

    .header-inner {
        display: block;
    }

    .brand {
        display: block;
        text-align: center;
        font-size: 1.4rem;
        margin-bottom: 12px;
    }

    .nav-toggle-label {
        display: block;
        width: 100%;
        padding: 10px 12px;
        border-radius: 10px;
        background: #f3f4f6;
        text-align: center;
        font-weight: 700;
        box-sizing: border-box;
        color: #333;
        cursor: pointer;
    }

    

    .main-nav {
        display: none;
        margin-top: 12px;
        margin-left: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .nav-toggle:checked ~ .main-nav {
        display: flex;
    }

    .main-nav a,
    .nav-close {
        display: block;
        width: 100%;
        padding: 11px 12px;
        border-radius: 10px;
        background: #f8f9fa;
        text-align: center;
        box-sizing: border-box;
    }

    .logout-form {
        width: 100%;
    }

    .nav-logout {
        display: block;
        width: 100%;
        padding: 11px 12px;
        border-radius: 10px;
        background: #dc3545;
        color: white;
        text-align: center;
        box-sizing: border-box;
    }

    .nav-close {
        display: block;
        background: #eeeeee;
        font-weight: 700;
    }
} */

@media (max-width: 900px) {
    .card-title-row {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 8px;
    }

    .card-title-row .card-title,
    .card-title-row strong {
        width: 100%;
    }

    .card-title-row .status-badge {
        align-self: flex-start;
        margin-top: 0;
    }

    .header-inner {
        display: block;
    }

    .brand {
        display: block;
        text-align: center;
        font-size: 1.4rem;
        margin-bottom: 12px;
        color: #ffffff;
    }

    .nav-toggle-label {
        display: block;
        width: 100%;
        padding: 10px 12px;
        border-radius: 10px;
        background: #374151;
        text-align: center;
        font-weight: 700;
        box-sizing: border-box;
        color: #ffffff;
        cursor: pointer;
    }

    .main-nav {
        display: none;
        margin-top: 12px;
        margin-left: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        background: #1f2937;
        border-radius: 12px;
        padding: 10px;
        box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    }

    .nav-toggle:checked ~ .main-nav {
        display: flex;
    }

    .main-nav a {
        display: block;
        width: 100%;
        padding: 11px 12px;
        border-radius: 8px;
        background: transparent;
        color: #e5e7eb;
        text-align: center;
        box-sizing: border-box;
    }

    .main-nav a.active {
        background: #374151;
        color: #ffffff;
    }

    .main-nav a:hover {
        background: #374151;
        color: #ffffff;
    }

    .logout-form {
        width: 100%;
    }

    .nav-logout {
        display: block;
        width: 100%;
        padding: 11px 12px;
        border-radius: 8px;
        background: #dc3545;
        color: white;
        text-align: center;
        box-sizing: border-box;
        border: none;
    }

    .nav-close {
        display: block;
        width: 100%;
        padding: 11px 12px;
        border-radius: 8px;
        background: #374151;
        color: #e5e7eb;
        text-align: center;
        box-sizing: border-box;
        font-weight: 700;
        cursor: pointer;
    }
}

.owner-approval-list {
    display: grid;
    gap: 16px;
}

.owner-approval-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 20px;
    padding: 18px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #ffffff;
}

.owner-approval-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.owner-company-name {
    margin: 0 0 4px;
    font-size: 18px;
}

.owner-approval-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.owner-field-label {
    display: block;
    margin-bottom: 4px;
    color: #627d98;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.owner-admin-panel {
    padding-top: 14px;
    border-top: 1px solid #edf2f7;
}

.owner-admin-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.owner-admin-row span {
    color: #627d98;
}

.owner-approval-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-self: center;
}

.owner-action-button {
    width: 100%;
}

.owner-history-section {
    margin-top: 18px;
}

.owner-history-list {
    display: grid;
    gap: 12px;
}

.owner-history-card {
    padding: 16px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #ffffff;
}

.assistant-panel-open {
    overflow: hidden;
}

.assistant-fab {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 30;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 92px;
    min-height: 48px;
    padding: 10px 16px 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: linear-gradient(135deg, #0b69a3 0%, #084f7a 100%);
    color: #ffffff;
    font: inherit;
    font-weight: 800;
    box-shadow: 0 16px 36px rgba(16, 42, 67, 0.25);
    cursor: pointer;
}

.assistant-fab:hover,
.assistant-fab:focus {
    background: linear-gradient(135deg, #095c8f 0%, #063f63 100%);
    outline: none;
}

.assistant-fab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #f59e0b;
    color: #102a43;
    font-size: 17px;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.assistant-fab-label {
    line-height: 1;
}

.assistant-overlay {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(16, 42, 67, 0.42);
}

.assistant-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 50;
    display: grid;
    grid-template-rows: auto 1fr auto;
    width: min(440px, 100vw);
    height: 100vh;
    background: #ffffff;
    box-shadow: -18px 0 40px rgba(16, 42, 67, 0.22);
}

.assistant-panel[hidden],
.assistant-overlay[hidden] {
    display: none;
}

.assistant-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border-bottom: 1px solid #d9e2ec;
}

.assistant-panel-header h2 {
    margin: 0 0 4px;
    color: #102a43;
    font-size: 22px;
}

.assistant-panel-header p {
    margin: 0;
    color: #627d98;
    font-size: 14px;
}

.assistant-panel-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f8fafc;
    color: #102a43;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.assistant-panel-body {
    overflow-y: auto;
    padding: 18px;
}

.assistant-panel-recent {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #ffffff;
}

.assistant-panel-recent[hidden] {
    display: none;
}

.assistant-panel-recent > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.assistant-panel-recent strong {
    color: #102a43;
}

.assistant-panel-recent button {
    font: inherit;
    cursor: pointer;
}

.assistant-panel-recent [data-assistant-clear] {
    padding: 0;
    border: 0;
    background: transparent;
    color: #627d98;
    font-weight: 800;
}

.assistant-panel-recent [data-assistant-clear]:hover,
.assistant-panel-recent [data-assistant-clear]:focus {
    color: #0b69a3;
    outline: none;
}

.assistant-panel-recent-question {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f8fafc;
    color: #334e68;
    font-weight: 800;
    text-align: left;
}

.assistant-panel-recent-question:hover,
.assistant-panel-recent-question:focus {
    border-color: #0b69a3;
    background: #eef8ff;
    color: #0b4f79;
    outline: none;
}

.assistant-panel-answer,
.assistant-panel-empty {
    padding: 14px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f8fafc;
    color: #243b53;
    line-height: 1.5;
}

.assistant-panel-answer p:first-child {
    margin-top: 0;
}

.assistant-panel-answer p:last-child {
    margin-bottom: 0;
}

.assistant-panel-error {
    border-color: #f5c2c7;
    background: #fff5f5;
    color: #842029;
}

.assistant-panel-empty {
    display: grid;
    gap: 8px;
}

.assistant-panel-empty strong {
    color: #102a43;
}

.assistant-panel-empty [data-assistant-quick-list] {
    display: grid;
    gap: 8px;
}

.assistant-panel-empty button {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #ffffff;
    color: #334e68;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.assistant-panel-empty button:hover,
.assistant-panel-empty button:focus {
    border-color: #0b69a3;
    background: #eef8ff;
    color: #0b4f79;
    outline: none;
}

.assistant-panel-form {
    padding: 18px;
    border-top: 1px solid #d9e2ec;
    background: #ffffff;
}

.assistant-panel-form label {
    display: block;
    margin-bottom: 6px;
    color: #102a43;
    font-weight: 800;
}

.assistant-panel-form textarea {
    min-height: 96px;
    resize: vertical;
}

.assistant-panel-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 12px;
}

@media (max-width: 900px) {
    .owner-approval-card {
        grid-template-columns: 1fr;
    }

    .owner-approval-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .owner-approval-actions {
        align-self: stretch;
    }
}

@media (max-width: 560px) {
    .assistant-fab {
        right: 16px;
        bottom: 16px;
        min-width: 80px;
        min-height: 44px;
        padding: 9px 13px 9px 10px;
    }

    .assistant-fab-icon {
        width: 24px;
        height: 24px;
        font-size: 16px;
    }

    .assistant-panel {
        width: 100vw;
    }

    .assistant-panel-header,
    .assistant-panel-body,
    .assistant-panel-form {
        padding: 16px;
    }

    .assistant-panel-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .assistant-panel-actions .btn {
        width: 100%;
    }

    .owner-approval-heading {
        flex-direction: column;
    }

    .owner-approval-grid {
        grid-template-columns: 1fr;
    }
}
