/* Tsunami Tech Indonesia pilot operations layer */

.app-container {
    max-width: 1440px;
}

.version-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 20px;
    padding: 0 6px;
    border: 1px solid #B8DCDD;
    border-radius: 4px;
    color: #0D7377;
    background: #EFF9F9;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.brand-name {
    letter-spacing: 0;
}

html[lang="en"] .conversation-list:empty::after {
    content: 'No conversations yet';
}

.platform-nav {
    display: flex;
    align-items: stretch;
    min-height: 48px;
    padding: 0 24px;
    border-bottom: 1px solid #E5E9EC;
    background: #FFFFFF;
    flex-shrink: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.platform-nav::-webkit-scrollbar {
    display: none;
}

.platform-nav-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 18px;
    color: #5D6972;
    background: transparent;
    border: 0;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
}

.platform-nav-item::after {
    content: '';
    position: absolute;
    right: 16px;
    bottom: 0;
    left: 16px;
    height: 2px;
    background: transparent;
}

.platform-nav-item:hover {
    color: #0D7377;
    background: #F7FBFB;
}

.platform-nav-item.active {
    color: #0D7377;
}

.platform-nav-item.active::after {
    background: #0D7377;
}

.platform-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid #CBD4D8;
    border-radius: 4px;
    color: #6C787F;
    font-size: 9px;
    font-weight: 700;
}

.platform-nav-item.active .platform-nav-icon {
    border-color: #0D7377;
    color: #0D7377;
    background: #EAF7F7;
}

.platform-count {
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 9px;
    background: #B6403A;
    color: #FFFFFF;
    font-size: 10px;
    line-height: 19px;
    text-align: center;
}

.platform-screen {
    min-height: 0;
}

.platform-screen[hidden] {
    display: none !important;
}

.platform-screen-chat {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
}

.marketplace-screen {
    flex: 1;
    overflow-y: auto;
    padding: 28px 32px 48px;
    background: #F6F8F9;
}

.workspace-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    max-width: 1080px;
    margin: 0 auto 24px;
}

.workspace-kicker {
    margin: 0 0 5px;
    color: #79858B;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0;
}

.workspace-heading h1 {
    margin: 0;
    color: #172027;
    font-size: 26px;
    line-height: 1.25;
    letter-spacing: 0;
}

.workspace-status {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-left: 3px solid #C7922E;
    color: #6C531D;
    background: #FFF8E8;
    font-size: 12px;
    font-weight: 600;
}

.match-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
    max-width: 1080px;
    margin: 0 auto;
}

.market-form,
.matching-standard {
    border: 1px solid #DDE3E6;
    border-radius: 8px;
    background: #FFFFFF;
}

.market-form {
    overflow: hidden;
}

.form-section {
    padding: 24px;
    border-bottom: 1px solid #E7EBED;
}

.form-section h2,
.matching-standard h2 {
    margin: 0 0 18px;
    color: #263238;
    font-size: 16px;
    line-height: 1.35;
    letter-spacing: 0;
}

.field-label {
    display: block;
    margin: 16px 0 7px;
    color: #4D5960;
    font-size: 12px;
    font-weight: 600;
}

.field-label:first-of-type {
    margin-top: 0;
}

.market-input {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #C8D1D5;
    border-radius: 5px;
    color: #202B31;
    background: #FFFFFF;
    font-size: 16px;
    line-height: 1.4;
    outline: none;
}

.market-input:focus {
    border-color: #0D7377;
    box-shadow: 0 0 0 3px rgba(13, 115, 119, 0.12);
}

.market-input.has-error {
    border-color: #B3261E;
    box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.1);
}

.field-error {
    margin: 6px 0 0;
    color: #B3261E;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
}

.field-error[hidden] {
    display: none;
}

.market-consent.has-error {
    color: #B3261E;
}

.market-textarea {
    min-height: 150px;
    resize: vertical;
}

.two-column-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.segmented-control {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: hidden;
    border: 1px solid #C8D1D5;
    border-radius: 5px;
}

.segmented-control button {
    min-height: 40px;
    padding: 7px 10px;
    border-right: 1px solid #C8D1D5;
    color: #536068;
    background: #FFFFFF;
    font-size: 12px;
}

.segmented-control button:last-child {
    border-right: 0;
}

.segmented-control button.active {
    color: #FFFFFF;
    background: #0D7377;
}

.market-consent {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    margin-top: 18px;
    color: #536068;
    font-size: 12px;
    line-height: 1.55;
    cursor: pointer;
}

.market-consent input {
    appearance: auto;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: #0D7377;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: #FBFCFC;
}

.primary-command,
.secondary-command,
.quote-select-button,
.bridge-button {
    min-height: 40px;
    padding: 9px 16px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 700;
}

.primary-command,
.quote-select-button,
.bridge-button {
    color: #FFFFFF;
    background: #0D7377;
}

.primary-command:hover,
.quote-select-button:hover,
.bridge-button:hover {
    background: #095E61;
}

.primary-command:disabled,
.quote-select-button:disabled {
    color: #849096;
    background: #DCE2E4;
    cursor: not-allowed;
}

.secondary-command {
    border: 1px solid #AAB6BC;
    color: #344149;
    background: #FFFFFF;
}

.secondary-command:hover {
    border-color: #0D7377;
    color: #0D7377;
}

.form-feedback {
    margin: 0;
    color: #4D5960;
    font-size: 12px;
    line-height: 1.45;
}

.form-feedback.success {
    color: #157347;
}

.form-feedback.error {
    color: #B3261E;
}

.matching-standard {
    align-self: start;
    padding: 22px;
}

.matching-standard dl {
    margin: 0;
}

.matching-standard dl div {
    padding: 14px 0;
    border-top: 1px solid #E7EBED;
}

.matching-standard dt {
    margin-bottom: 4px;
    color: #0D7377;
    font-size: 12px;
    font-weight: 700;
}

.matching-standard dd {
    margin: 0;
    color: #59666D;
    font-size: 12px;
    line-height: 1.5;
}

.operational-note {
    margin: 16px 0 0;
    padding: 12px;
    border-left: 3px solid #C7922E;
    color: #69572F;
    background: #FFF9EC;
    font-size: 11px;
    line-height: 1.55;
}

.price-method {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: center;
    max-width: 1080px;
    min-height: 54px;
    margin: 0 auto 18px;
    border: 1px solid #DDE3E6;
    border-radius: 8px;
    color: #46535A;
    background: #FFFFFF;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
}

.price-plus {
    color: #9AA4A9;
    font-size: 18px;
}

.service-catalog {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    max-width: 1080px;
    margin: 0 auto;
}

.service-product {
    min-height: 220px;
    padding: 20px;
    border: 1px solid #DDE3E6;
    border-radius: 8px;
    background: #FFFFFF;
}

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

.service-product h2 {
    margin: 0;
    color: #263238;
    font-size: 16px;
    line-height: 1.4;
}

.service-code {
    flex-shrink: 0;
    padding: 3px 6px;
    border: 1px solid #D8DEE1;
    border-radius: 4px;
    color: #7B878D;
    font-size: 9px;
    font-weight: 700;
}

.service-description,
.service-scope {
    margin: 0 0 12px;
    color: #5A666D;
    font-size: 12px;
    line-height: 1.6;
}

.service-scope {
    padding-top: 12px;
    border-top: 1px solid #EBEEF0;
}

.price-guide {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding: 12px;
    background: #F5F9F9;
}

.price-section-label {
    margin: 16px 0 6px;
    color: #344149;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.historical-price-list {
    margin-top: 14px;
    border-top: 2px solid #0D7377;
}

.historical-price-row {
    padding: 14px 0;
    border-bottom: 1px solid #E2E8EA;
}

.historical-price-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.historical-price-heading span {
    color: #344149;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.historical-price-amount {
    flex-shrink: 0;
    color: #0D7377;
    font-size: 19px;
    line-height: 1.2;
    text-align: right;
}

.historical-price-unit {
    display: block;
    margin-top: 3px;
    color: #738086;
    font-size: 10px;
    font-weight: 500;
}

.historical-price-scope,
.historical-price-detail,
.historical-price-source,
.historical-price-notice {
    margin: 7px 0 0;
    color: #5A666D;
    font-size: 11px;
    line-height: 1.55;
}

.historical-price-detail strong {
    color: #344149;
}

.historical-price-source {
    color: #7B878D;
}

.historical-price-notice {
    padding: 10px 12px;
    border-left: 3px solid #D59B21;
    background: #FFF9EC;
}

@media (max-width: 560px) {
    .historical-price-heading {
        display: block;
    }

    .historical-price-amount {
        margin-top: 7px;
        text-align: left;
    }
}

.price-guide strong {
    color: #0D7377;
    font-size: 17px;
}

.price-guide span,
.price-insufficient {
    color: #738086;
    font-size: 11px;
}

.price-insufficient {
    margin-top: 14px;
    padding: 12px;
    border-left: 3px solid #A8B3B8;
    background: #F7F8F8;
    line-height: 1.5;
}

.project-list {
    display: grid;
    gap: 14px;
    max-width: 1080px;
    margin: 0 auto;
}

.project-item {
    border: 1px solid #DDE3E6;
    border-radius: 8px;
    background: #FFFFFF;
    overflow: hidden;
}

.project-header {
    display: grid;
    grid-template-columns: 145px minmax(0, 1fr) 110px 120px;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid #E7EBED;
}

.project-number {
    color: #0D7377;
    font-size: 12px;
    font-weight: 700;
}

.project-title {
    overflow: hidden;
    color: #2F3A40;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 3px 8px;
    border-radius: 4px;
    color: #4E5B62;
    background: #EDF0F2;
    font-size: 10px;
    font-weight: 700;
}

.status-chip.quoted,
.status-chip.engaged,
.status-chip.in_delivery,
.status-chip.completed {
    color: #0D6366;
    background: #E3F4F3;
}

.project-date {
    color: #7A868C;
    font-size: 11px;
    text-align: right;
}

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

.project-summary {
    margin: 0 0 14px;
    color: #56636A;
    font-size: 12px;
    line-height: 1.6;
}

.matter-provider {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
    margin-bottom: 14px;
    padding: 10px 12px;
    border-left: 3px solid #0D7377;
    color: #526067;
    background: #F2F8F8;
    font-size: 11px;
}

.matter-provider strong { color: #27343B; }

.matter-artifact,
.matter-timeline,
.matter-quote {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #E4E9EB;
}

.matter-artifact h3,
.matter-timeline h3,
.matter-quote h3 {
    margin: 0 0 10px;
    color: #28353C;
    font-size: 12px;
}

.matter-artifact-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.matter-artifact-heading h3 { margin: 0; }
.matter-artifact-heading span { padding: 3px 7px; border-radius: 4px; color: #6A5429; background: #FFF4D8; font-size: 9px; font-weight: 700; }

.matter-artifact-content {
    color: #536168;
    font-size: 11px;
    line-height: 1.7;
}

.matter-missing {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #E9D9B9;
    border-radius: 5px;
    color: #715A2C;
    background: #FFF9ED;
    font-size: 11px;
}

.matter-missing ul { margin: 6px 0 0; padding-left: 18px; }
.matter-missing li + li { margin-top: 4px; }

.matter-timeline ol {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.matter-timeline li {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
}

.matter-status-dot {
    width: 9px;
    height: 9px;
    margin-top: 4px;
    border: 2px solid #0D7377;
    border-radius: 50%;
    background: #FFFFFF;
}

.matter-timeline strong { color: #3B484F; font-size: 11px; }
.matter-timeline small { margin-left: 8px; color: #8A959A; font-size: 9px; }
.matter-timeline p { margin: 3px 0 0; color: #657279; font-size: 10px; line-height: 1.5; }

.formal-quote-card {
    padding: 14px;
    border: 1px solid #C9DDDE;
    border-radius: 6px;
    background: #FBFEFE;
}

.formal-quote-heading {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: #607077;
    font-size: 10px;
}

.formal-quote-heading > div { display: flex; gap: 9px; align-items: center; }
.formal-quote-heading strong { color: #26343B; font-size: 12px; }
.formal-quote-total { display: grid; justify-items: end; }
.formal-quote-total small { color: #738087; font-size: 9px; }
.formal-quote-total b { margin-top: 3px; color: #0D7377; font-size: 17px; }

.formal-quote-fees {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.formal-quote-fees > div {
    min-width: 0;
    padding: 10px;
    border: 1px solid #E1E7E9;
    background: #FFFFFF;
}

.formal-quote-fees span,
.formal-quote-fees strong { display: block; }
.formal-quote-fees span { color: #718087; font-size: 9px; }
.formal-quote-fees strong { margin-top: 5px; color: #0D7377; font-size: 12px; line-height: 1.45; }

.formal-quote-scope { margin: 12px 0; color: #4E5D64; font-size: 11px; }
.formal-quote-scope p { margin: 5px 0 0; line-height: 1.6; }
.formal-quote-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.formal-quote-details > div { padding: 9px 10px; border: 1px solid #E4E9EB; background: #FFFFFF; }
.formal-quote-details dt { color: #748188; font-size: 9px; font-weight: 700; }
.formal-quote-details dd { margin: 4px 0 0; color: #46545B; font-size: 10px; line-height: 1.5; }

.quote-table-wrap {
    overflow-x: auto;
}

.quote-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    font-size: 11px;
}

.quote-table th,
.quote-table td {
    padding: 10px;
    border: 1px solid #E0E5E7;
    vertical-align: top;
    text-align: left;
    line-height: 1.5;
}

.quote-table th {
    color: #526067;
    background: #F4F6F7;
    font-weight: 700;
}

.verified-provider {
    color: #157347;
    font-weight: 700;
}

.quote-total {
    color: #0D7377;
    font-weight: 700;
    white-space: nowrap;
}

.quote-select-button {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 11px;
    white-space: nowrap;
}

.empty-platform-state {
    padding: 54px 24px;
    border: 1px dashed #C8D1D5;
    border-radius: 8px;
    color: #718087;
    background: #FFFFFF;
    text-align: center;
    font-size: 13px;
}

.contact-success {
    flex-wrap: wrap;
    gap: 10px;
}

.bridge-button {
    width: 100%;
    margin-top: 6px;
}

@media (max-width: 980px) {
    .match-layout {
        grid-template-columns: 1fr;
    }

    .matching-standard {
        display: none;
    }

    .service-catalog {
        grid-template-columns: 1fr;
    }

    .formal-quote-fees {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    .platform-nav {
        padding: 0 8px;
    }

    .platform-nav-item {
        min-width: max-content;
        padding: 0 12px;
    }

    .platform-nav-item::after {
        right: 10px;
        left: 10px;
    }

    .marketplace-screen {
        padding: 20px 14px 36px;
    }

    .workspace-heading {
        align-items: flex-start;
    }

    .workspace-heading h1 {
        font-size: 21px;
    }

    .workspace-status {
        display: none;
    }

    .two-column-fields {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .price-method {
        grid-template-columns: 1fr;
        padding: 10px 14px;
        text-align: left;
    }

    .price-plus {
        display: none;
    }

    .price-method span:not(.price-plus) {
        padding: 5px 0;
    }

    .project-header {
        grid-template-columns: 1fr auto;
        gap: 7px 12px;
    }

    .project-title {
        grid-column: 1 / -1;
        grid-row: 2;
        white-space: normal;
    }

    .project-date {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .top-bar .brand-subtitle {
        display: none;
    }

    .platform-nav-icon {
        display: none;
    }

    .form-section {
        padding: 19px 16px;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column;
        padding: 16px;
    }

    .segmented-control {
        grid-template-columns: 1fr;
    }

    .segmented-control button {
        border-right: 0;
        border-bottom: 1px solid #C8D1D5;
    }

    .segmented-control button:last-child {
        border-bottom: 0;
    }
}
