:root {
    --prop-primary: #0891b2;
    --prop-primary-hover: #0e7490;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --cell-bg: #f8fafc;
    --danger: #ef4444;
}

.main-content {
    padding: 2rem;
    display: flex;
    justify-content: center;
}

.prop-wrapper {
    background-color: #ffffff;
    width: 100%;
    max-width: 900px;
    padding: 3rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.doc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--prop-primary);
    padding-bottom: 1.5rem;
}

.company-details textarea {
    font-size: 0.875rem;
    color: var(--text-muted);
    min-height: 80px;
    width: 300px;
}
.company-name {
    font-size: 1.5rem !important;
    font-weight: 700;
    color: var(--text-main) !important;
    min-height: 40px !important;
    margin-bottom: 0.5rem;
}

.prop-title-section {
    text-align: right;
}

.prop-title-section h1 {
    font-size: 2rem;
    color: var(--prop-primary);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.meta-row {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.hidden-input, .hidden-input-inline {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-main);
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    padding: 0.25rem;
    border-radius: 0.25rem;
}

textarea.hidden-input { resize: none; width: 100%; }
.hidden-input:hover, .hidden-input:focus, .hidden-input-inline:hover, .hidden-input-inline:focus {
    border-color: var(--border);
    background: var(--cell-bg);
}

.parties-section {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.party-box {
    width: 50%;
}
.party-box h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}
.party-name { font-weight: 600; min-height: 30px;}
.party-address { min-height: 60px; font-size: 0.875rem; color: var(--text-muted);}

.scope-section {
    margin-bottom: 2rem;
}
.scope-section h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}
.scope-input {
    min-height: 100px;
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.5;
}

.table-responsive { overflow-x: auto; margin-bottom: 2rem;}

.prop-table {
    width: 100%;
    border-collapse: collapse;
}

.prop-table th, .prop-table td {
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0.5rem;
    text-align: right;
    vertical-align: top;
}

.prop-table th {
    background-color: var(--cell-bg);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

.prop-table th.col-desc, .prop-table td.col-desc { text-align: left; }
.col-desc { width: 46%; }
.col-total { font-weight: 600; }
.col-action { width: 4%; border: none !important; }

.num-input { width: 80px; text-align: right; }

.btn-delete {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    margin-top: 5px;
}
.btn-delete:hover { color: var(--danger); background: #fee2e2; }

.prop-summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.notes-section {
    width: 55%;
}
.notes-section h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.notes-input {
    min-height: 120px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.totals-section {
    width: 35%;
    border-radius: 0.5rem;
    padding: 1rem;
    background: var(--cell-bg);
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.grand-total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    border-top: 1px solid var(--border);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

.signature-section {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
}

.signature-box {
    width: 40%;
    text-align: center;
}
.signature-box p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}
.signature-line {
    border-top: 1px solid var(--text-main);
    margin-bottom: 0.5rem;
}

.prop-actions .btn-primary {
    background-color: var(--prop-primary);
}
.prop-actions .btn-primary:hover {
    background-color: var(--prop-primary-hover);
}

@media print {
    body { background: white; }
    .hide-in-pdf { display: none !important; }
    .main-content { padding: 0; }
    .prop-wrapper { box-shadow: none; padding: 0; }
    .hidden-input, .hidden-input-inline { border: none !important; background: transparent !important; }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .main-content { padding: 1rem; }
    .prop-wrapper { padding: 1.5rem; min-width: unset; }
    .doc-header { flex-direction: column; gap: 1rem; }
    .company-details textarea { width: 100%; }
    .prop-title-section { text-align: left; }
    .parties-section { flex-direction: column; gap: 1rem; }
    .party-box { width: 100%; }
    .prop-summary { flex-direction: column; gap: 1.5rem; }
    .notes-section, .totals-section { width: 100%; }
}
