html, body { width: 100%; max-width: 100%; margin: 0; padding: 0; }
#wrapper, #container, #center, #squeeze, .left-corner, .right-corner,
.clear-block, .view, .view-content, .node {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    background-image: none !important;
}
#header { width: 100% !important; max-width: 100% !important; }
#header table.contract-header,
table.contract-form,
table.contract-actions {
    width: 100% !important;
    max-width: 100% !important;
}
.contract-content {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding: 0 24px 24px 24px;
}
.contract-content table {
    width: 100% !important;
    max-width: 100%;
}
.contract-content table.contract-form > tbody > tr > td:first-child {
    width: 220px;
    white-space: nowrap;
    vertical-align: top;
}
.contract-step-heading { margin: 0 0 4px 0; }
.contract-selected-name {
    margin: 0 0 16px 0;
    font-size: 1.7em;
    line-height: 1.25;
    color: #1a237e;
}
.compact-agreement { max-width: 760px; }
.compact-agreement p { margin: 18px 0 8px 0; line-height: 1.45; }
.compact-hint { margin-top: 0; color: #333; }
.compact-field { margin: 0 0 16px 0; }
.compact-field label { display: block; font-weight: bold; margin: 0 0 4px 0; }
.compact-field .compact-next {
    display: block;
    font-weight: normal;
    font-size: 0.9em;
    color: #555;
    margin: 2px 0 4px 0;
}
.contract-address-hint {
    margin: 0 0 8px 0;
    color: #555;
    font-size: 0.92em;
    line-height: 1.4;
}
.contract-address-lines {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
}
.contract-address-lines td {
    padding: 3px 0;
    vertical-align: middle;
}
.contract-address-lines td:first-child {
    width: 150px;
    white-space: nowrap;
    color: #333;
    font-size: 0.95em;
}
.contract-address-lines label {
    font-weight: normal;
}
.contract-content input[type="text"],
.contract-content textarea,
.contract-content select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.contract-content input[type="text"][size="10"] {
    width: 120px;
}
.contract-content .compact-agreement input[type="text"] {
    display: block;
    width: 100%;
    margin: 0;
}
.contract-content .compact-weeks input[type="text"] {
    display: inline-block;
    width: 120px;
    margin-right: 6px;
}
.contract-preview-frame {
    display: block;
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100%;
    min-height: 85vh;
    height: 85vh;
    border: 1px solid #ccc;
    background: #fff;
    margin-top: 16px;
}
.contract-status { border: 2px solid; padding: 12px 16px; margin: 0 0 16px 0; border-radius: 4px; }
.contract-status p { margin: 0 0 8px 0; }
.contract-status ul { margin: 0; padding-left: 20px; }
.contract-status-success { border-color: #2e7d32; background: #e8f5e9; color: #1b5e20; }
.contract-status-error { border-color: #c62828; background: #ffebee; color: #b71c1c; }
.contract-status-warning { border-color: #ef6c00; background: #fff3e0; color: #e65100; }
.contract-sample-status { margin: 12px 0 0 0; font-weight: bold; color: #1565c0; }
#footer { padding: 12px 24px; }
body { font-family: Roboto, Arial, sans-serif; background: #f5f5f5; }
#header h1, .contract-selected-name, .contract-step-heading { font-family: Roboto, Arial, sans-serif; }
.sig-modal { position: fixed; inset: 0; z-index: 100000; background: rgba(10, 22, 40, 0.72); display: flex; align-items: center; justify-content: center; padding: 24px; }
.sig-modal[hidden] { display: none !important; }
.sig-dialog { background: #fff; width: min(920px, 100%); max-height: calc(100vh - 48px); overflow: auto; padding: 24px; box-shadow: 0 12px 40px rgba(0,0,0,0.25); }
.sig-dialog h2 { margin: 0 0 8px 0; color: #1a237e; font-size: 1.4em; }
.sig-stage { position: relative; width: 100%; background: #fff; border: 1px solid #d5d5d5; }
.sig-stage canvas { width: 100%; height: auto; display: block; }
#sig-frame { position: absolute; overflow: hidden; border: 2px solid #c62828; box-shadow: 0 0 0 1px #fff; background: rgba(255,255,255,0.25); cursor: grab; }
#sig-image { position: absolute; max-width: none; user-select: none; -webkit-user-drag: none; }
.sig-tools { display: flex; gap: 12px; align-items: center; margin: 14px 0; flex-wrap: wrap; }
.sig-tools input[type="range"] { width: 220px; }
.sig-preview { display: block; max-width: 280px; max-height: 80px; width: auto; height: auto; margin-top: 8px; border: 1px solid #ccc; background: #fff; object-fit: contain; }
.contract-signature-row { padding-top: 16px; }
.contract-signature-field { max-width: 520px; }
.contract-signature-field input[type="file"] { width: auto; max-width: 100%; }
.contract-annexure-heading {
    margin: 18px 0 8px 0;
    color: #1a237e;
    font-size: 1.15em;
}
.contract-annexure-rule {
    border: 0;
    border-top: 1px solid #ccc;
    margin: 20px 0 8px 0;
}
.contract-type-form label {
    display: block;
    margin: 0 0 6px 0;
    font-weight: normal;
    line-height: 1.4;
}
.contract-type-form textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 0 14px 0;
    min-height: 96px;
}
