/* Tool-specific styles only - base styles are in tool-layout.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #0a0a0a;
    color: #e5e7eb;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #141414;
    border-bottom: 1px solid #374151;
    z-index: 100;
}

    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

    margin-top: 60px;
    padding: 48px 24px;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    max-width: 720px;
    margin: 0 auto;
}

.tool-main {
    flex: 1;
    padding: 32px 24px 120px;
}

.tool-container {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    background-color: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.required {
    color: #ef4444;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group > label,
.setting-content > label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.text-input {
    background-color: #0a0a0a;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.text-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.text-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.text-input::placeholder {
    color: #6b7280;
}

.text-input.has-error {
    border-color: #ef4444;
}

.textarea-input {
    resize: vertical;
    line-height: 1.5;
}

.select-input {
    background-color: #0a0a0a;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.select-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.select-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.select-input option {
    background-color: #1a1a1a;
}

input[type="date"].text-input {
    color-scheme: dark;
}

.template-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.template-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    background-color: #0a0a0a;
    border: 1px solid #374151;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 150ms ease, background-color 150ms ease;
    text-align: left;
    font-family: inherit;
    position: relative;
    color: #e5e7eb;
}

.template-card:hover {
    border-color: #4b5563;
    background-color: #111111;
}

.template-card.active {
    border-color: #3b82f6;
    background-color: #0f1a2e;
}

.template-card .pro-badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

.template-card-name {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
}

.template-card-desc {
    font-size: 13px;
    color: #9ca3af;
}

.template-description {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.pro-badge {
    color: #0a0a0a;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
    display: inline-block;
}

.pro-feature {
    position: relative;
    opacity: 0.6;
}

.pro-feature.unlocked {
    opacity: 1;
}

.setting-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.file-upload-zone {
    background-color: #0a0a0a;
    border: 2px dashed #374151;
    border-radius: 8px;
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 150ms ease, background-color 150ms ease;
    position: relative;
    outline: none;
}

.upload-icon {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    opacity: 0.5;
    color: #6b7280;
    letter-spacing: 2px;
}

.upload-primary {
    font-size: 14px;
    font-weight: 400;
    color: #e5e7eb;
    margin-bottom: 4px;
}

.upload-secondary {
    font-size: 13px;
    font-weight: 400;
    color: #9ca3af;
}

.logo-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background-color: #0a0a0a;
    border: 1px solid #374151;
    border-radius: 6px;
}

.logo-preview img {
    max-width: 120px;
    max-height: 50px;
    object-fit: contain;
}

.button-text {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    padding: 4px 8px;
    transition: opacity 150ms ease;
}

.button-text:hover {
    opacity: 0.8;
}

.milestone-header {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #2a2a2a;
}

.ms-col-name { flex: 1 1 0; }

.ms-col-date { flex: 0 0 120px; }

.ms-col-desc { flex: 1.5 1 0; }

.ms-col-action { flex: 0 0 40px; }

.milestone-header span {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.milestone-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.milestone-row {
    display: flex;
    gap: 8px;
    align-items: start;
}

.milestone-row .text-input:nth-child(1) { flex: 1 1 0; }

.milestone-row .text-input:nth-child(2) { flex: 0 0 120px; }

.milestone-row .text-input:nth-child(3) { flex: 1.5 1 0; }

.milestone-row .milestone-remove { flex: 0 0 40px; }

.milestone-row .text-input {
    padding: 8px 10px;
    font-size: 14px;
}

.milestone-remove {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 18px;
    padding: 6px;
    transition: color 150ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.milestone-remove:hover {
    color: #ef4444;
}

.line-items-header {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #2a2a2a;
}

.li-col-desc { flex: 2 1 0; }

.li-col-qty { flex: 0 0 60px; }

.li-col-unit { flex: 0 0 80px; }

.li-col-price { flex: 0 0 100px; }

.li-col-total { flex: 0 0 100px; }

.li-col-action { flex: 0 0 40px; }

.line-items-header span {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.line-items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.line-item-row {
    display: flex;
    gap: 8px;
    align-items: start;
}

.line-item-row .text-input:nth-child(1) { flex: 2 1 0; min-width: 0; }

.line-item-row .text-input:nth-child(2) { flex: 0 0 60px; }

.line-item-row .text-input:nth-child(3) { flex: 0 0 80px; }

.line-item-row .text-input:nth-child(4) { flex: 0 0 100px; }

.line-item-row .line-item-total { flex: 0 0 100px; }

.line-item-row .line-item-remove { flex: 0 0 40px; }

.line-item-row .text-input,
.line-item-row .select-input {
    padding: 8px 10px;
    font-size: 14px;
}

.line-item-total {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
    padding: 8px 0;
    text-align: right;
}

.line-item-remove {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 18px;
    padding: 6px;
    transition: color 150ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.line-item-remove:hover {
    color: #ef4444;
}

.category-header-row {
    padding: 10px 0 4px;
    border-bottom: 1px solid #2a2a2a;
}

.category-header-row span {
    font-size: 14px;
    font-weight: 600;
    color: #3b82f6;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 6px;
    font-size: 13px;
    color: #e5e7eb;
}

.category-tag-remove {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 14px;
    padding: 0 2px;
    transition: color 150ms ease;
}

.category-tag-remove:hover {
    color: #ef4444;
}

.category-add-row {
    display: flex;
    gap: 8px;
}

.category-add-row .text-input {
    flex: 1;
}

.category-add-row .button-secondary {
    white-space: nowrap;
}

.limit-message {
    font-size: 13px;
    color: #f59e0b;
}

.totals-section {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 16px;
    border-top: 1px solid #2a2a2a;
    padding-top: 16px;
}

.totals-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}

.totals-row.pro-feature {
    opacity: 0.6;
}

.totals-row.pro-feature.unlocked {
    opacity: 1;
}

.totals-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #9ca3af;
}

.totals-value {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
    text-align: right;
}

.totals-grand {
    border-top: 1px solid #374151;
    margin-top: 4px;
    padding-top: 12px;
}

.totals-grand .totals-label {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.totals-grand .totals-value {
    font-size: 18px;
    font-weight: 700;
    color: #10b981;
}

.inline-select {
    background-color: #0a0a0a;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.inline-select:focus {
    border-color: #3b82f6;
}

.inline-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.inline-input {
    background-color: #0a0a0a;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    width: 72px;
}

.inline-input:focus {
    border-color: #3b82f6;
}

.inline-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tax-rate-input {
    background-color: #0a0a0a;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    width: 60px;
}

.tax-rate-input:focus {
    border-color: #3b82f6;
}

.terms-library {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.terms-clause {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    background-color: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    transition: border-color 150ms ease;
}

.terms-clause:hover {
    border-color: #374151;
}

.pro-term {
    opacity: 0.6;
}

.pro-term.unlocked {
    opacity: 1;
}

.term-preview {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    padding-left: 26px;
}

.term-edit-body {
    font-size: 13px;
    margin-left: 26px;
}

label.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #e5e7eb;
}

label.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 4px;
    position: relative;
    transition: all 150ms ease;
    flex-shrink: 0;
}

label.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

label.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 4px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

label.checkbox-label input[type="checkbox"]:disabled + .checkbox-custom {
    opacity: 0.5;
    cursor: not-allowed;
}

.validation-errors {
    background-color: #7f1d1d;
    border: 1px solid #dc2626;
    color: #fca5a5;
    padding: 16px 20px;
    border-radius: 6px;
    font-size: 14px;
}

.validation-errors ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.validation-errors ul li::before {
    content: '- ';
}

.button-generate {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
}

.generate-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #374151;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 14px;
    color: #9ca3af;
}

.button-primary {
    background-color: #3b82f6;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

.button-secondary {
    background-color: #1a1a1a;
    color: #e5e7eb;
    border: 1px solid #374151;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

.button-download {
    background-color: #059669;
    color: #ffffff;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
    width: 100%;
}

.output-section {
    background-color: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.output-header h3 {
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
    color: #ffffff;
}

.preview-container {
    border: 1px solid #374151;
    border-radius: 8px;
    overflow: hidden;
    max-height: 600px;
    overflow-y: auto;
}

.preview-document {
    color: #1a1a1a;
    padding: 48px 40px;
    font-family: 'Inter', Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    max-width: 680px;
    margin: 0 auto;
}

.preview-document .preview-letterhead {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid #3b82f6;
    margin-bottom: 24px;
}

.preview-document .preview-letterhead img {
    max-width: 120px;
    max-height: 50px;
    object-fit: contain;
}

.preview-document .preview-letterhead-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.preview-document .preview-letterhead-company {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.preview-document .preview-letterhead-detail {
    font-size: 12px;
    color: #6b7280;
}

.preview-document .preview-title {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin: 24px 0 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.preview-document .preview-metadata {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
    padding: 16px;
    border-radius: 6px;
    font-size: 13px;
}

.preview-document .preview-meta-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preview-document .preview-meta-label {
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
}

.preview-document .preview-meta-value {
    color: #1a1a1a;
}

.preview-document .preview-section-title {
    font-size: 16px;
    font-weight: 700;
    margin: 24px 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e5e7eb;
}

.preview-document .preview-section-body {
    font-size: 14px;
    color: #374151;
    line-height: 1.7;
    white-space: pre-wrap;
    margin-bottom: 16px;
}

.preview-document .preview-milestone {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.preview-document .preview-milestone-name {
    font-weight: 600;
    min-width: 120px;
    color: #1a1a1a;
}

.preview-document .preview-milestone-date {
    font-size: 13px;
    color: #6b7280;
    min-width: 100px;
}

.preview-document .preview-milestone-desc {
    font-size: 13px;
    color: #374151;
}

.preview-document .preview-pricing-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 13px;
}

.preview-document .preview-pricing-table th {
    background-color: #3b82f6;
    color: #ffffff;
    font-weight: 600;
    padding: 10px 12px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-document .preview-pricing-table th:last-child {
    text-align: right;
}

.preview-document .preview-pricing-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

.preview-document .preview-pricing-table td:last-child {
    text-align: right;
    font-weight: 500;
}

.preview-document .preview-pricing-table .category-row td {
    font-weight: 700;
    color: #1a1a1a;
    padding-top: 14px;
}

.preview-document .preview-totals {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    margin: 12px 0 24px;
    font-size: 14px;
}

.preview-document .preview-totals-row {
    display: flex;
    justify-content: space-between;
    width: 240px;
    padding: 4px 0;
}

.preview-document .preview-totals-row.grand-total {
    font-weight: 700;
    font-size: 16px;
    border-top: 2px solid #1a1a1a;
    padding-top: 8px;
    margin-top: 4px;
}

.preview-document .preview-terms-item {
    margin-bottom: 12px;
}

.preview-document .preview-terms-title {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.preview-document .preview-terms-body {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.6;
}

.preview-document .preview-signature-block {
    margin-top: 48px;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.preview-document .preview-signature-col {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.preview-document .preview-signature-line {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preview-document .preview-signature-line span:first-child {
    font-size: 12px;
    color: #6b7280;
}

.preview-document .preview-signature-line span:last-child {
    border-bottom: 1px solid #374151;
    min-height: 24px;
}

.preview-document .preview-acceptance-note {
    font-size: 12px;
    font-style: italic;
    color: #6b7280;
    text-align: center;
    margin-top: 32px;
}

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

.proposal-summary .stat-item {
    flex: 1 1 calc(25% - 9px);
    min-width: 100px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
    padding: 12px;
    background-color: #1a1a1a;
    border-radius: 6px;
}

.stat-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 15px;
    font-weight: 600;
    color: #e5e7eb;
}

.stat-highlight {
    color: #10b981;
}

.download-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pro-cta-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.pro-cta-text {
    font-size: 14px;
    color: #d1d5db;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
}

.modal-overlay.modal-hidden {
    display: none;
}

.modal-overlay.modal-visible {
    display: flex;
}

.modal {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 0;
    max-width: 480px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
}

.modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #e5e7eb;
}

.modal-content {
    padding: 24px;
}

.modal-feature-label {
    font-size: 14px;
    color: #9ca3af;
    margin-bottom: 16px;
}

.pro-features-list {
    margin-bottom: 24px;
}

.pro-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.feature-check {
    width: 20px;
    height: 20px;
    background-color: #059669;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.feature-text {
    font-size: 14px;
    color: #e5e7eb;
}

.modal-cta {
    width: 100%;
    display: block;
}

.error-message {
    background-color: #7f1d1d;
    border: 1px solid #dc2626;
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 8px;
}

.success-message {
    background-color: #064e3b;
    border: 1px solid #059669;
    color: #6ee7b7;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 8px;
}

.footer {
    background-color: #0a0a0a;
    border-top: 1px solid #374151;
    padding: 32px 24px;
    text-align: center;
    margin-top: auto;
}

.footer p {
    font-size: 14px;
    color: #6b7280;
}

@media (max-width: 768px) {
        padding: 32px 16px;
    }

        font-size: 28px;
        line-height: 36px;
    }

        font-size: 14px;
    }

    .tool-main {
        padding: 24px 16px 100px;
    }

    .tool-container {
        gap: 32px;
    }

    .form-section {
        padding: 16px;
    }

    .output-section {
        padding: 16px;
    }

    .proposal-summary {
        gap: 8px;
    }

    .proposal-summary .stat-item {
        flex: 1 1 calc(50% - 4px);
    }

    .preview-document {
        padding: 32px 24px;
    }

    .preview-document .preview-metadata {
        flex-direction: column;
        gap: 12px;
    }

    .preview-document .preview-signature-block {
        flex-direction: column;
        gap: 32px;
    }

    .pro-cta-content {
        flex-direction: column;
        gap: 10px;
    }

        padding: 0 16px;
    }

    .button-primary,
    .button-secondary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    /* Milestones: card layout */
    .milestone-header {
        display: none;
    }

    .milestone-row {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 12px;
        background-color: #0a0a0a;
        border: 1px solid #2a2a2a;
        border-radius: 6px;
        position: relative;
    }

    .milestone-row .text-input {
        width: 100%;
    }

    .milestone-remove {
        position: absolute;
        top: 8px;
        right: 8px;
    }

    /* Line items: card layout */
    .line-items-header {
        display: none;
    }

    .line-item-row {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 12px;
        background-color: #0a0a0a;
        border: 1px solid #2a2a2a;
        border-radius: 6px;
        position: relative;
    }

    .line-item-row .text-input,
    .line-item-row .select-input {
        width: 100%;
    }

    .line-item-total {
        text-align: left;
        font-weight: 600;
    }

    .line-item-remove {
        position: absolute;
        top: 8px;
        right: 8px;
    }

    /* Category add row */
    .category-add-row {
        flex-direction: column;
    }

    /* Preview totals */
    .preview-document .preview-totals-row {
        width: 100%;
    }

    /* Summary stats */
    .proposal-summary .stat-item {
        flex: 1 1 calc(50% - 4px);
    }
}