/* =======================================================
   SECTION 8 : DRAWING SHEET & TITLE BLOCK GENERATOR
======================================================= */
.drawing-sheet-section {
    position: relative;
    padding: 110px 5.5%;
    overflow: hidden;
    background:
        radial-gradient(circle at 10% 12%, rgba(46, 196, 255, 0.07), transparent 27%),
        radial-gradient(circle at 88% 76%, rgba(255, 177, 66, 0.05), transparent 26%),
        linear-gradient(180deg, #07131f 0%, #081a29 100%);
}
.drawing-sheet-section::before {
    position: absolute;
    inset: 0;
    content: "";
    opacity: 0.2;
    background-image:
        linear-gradient(rgba(97, 203, 248, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(97, 203, 248, 0.04) 1px, transparent 1px);
    background-size: 58px 58px;
    pointer-events: none;
}
.drawing-sheet-section .section-header,
.sheet-layout,
.revision-table-card,
.sheet-bottom-grid,
.sheet-actions {
    position: relative;
    z-index: 1;
    width: min(1380px, 100%);
    margin-right: auto;
    margin-left: auto;
}
/* ---------- Sheet layout ---------- */
.sheet-layout {
    display: grid;
    grid-template-columns: minmax(285px, 0.36fr) minmax(0, 0.64fr);
    align-items: start;
    gap: 24px;
}
/* ---------- Sheet settings ---------- */
.sheet-settings {
    padding: 23px;
}
.sheet-settings .card-header {
    margin-bottom: 20px;
}
.sheet-settings .card-header h3 {
    margin: 0;
    color: #e9faff;
    font-size: 0.95rem;
    font-weight: 600;
}
.sheet-settings .form-grid {
    grid-template-columns: 1fr;
    gap: 15px;
}
/* ---------- Title preview ---------- */
.title-preview {
    padding: 0;
    overflow: hidden;
}
.title-preview::before,
.revision-table-card::before {
    display: none;
}
.title-preview .card-header,
.revision-table-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
    padding: 18px 21px;
    border-bottom: 1px solid rgba(131, 211, 245, 0.13);
    background: rgba(46, 196, 255, 0.035);
}
.title-preview .card-header h3,
.revision-table-card .card-header h3 {
    margin: 0;
    color: #e8f9ff;
    font-size: 0.94rem;
    font-weight: 600;
}
.title-preview .card-header button,
.revision-table-card .card-header button {
    min-height: 34px;
    padding: 7px 11px;
    color: #a9d0df;
    border: 1px solid rgba(136, 212, 245, 0.2);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.025);
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s ease;
}
.title-preview .card-header button:hover,
.revision-table-card .card-header button:hover {
    transform: translateY(-2px);
    color: #ffffff;
    border-color: rgba(46, 196, 255, 0.5);
    background: rgba(46, 196, 255, 0.1);
}
.sheet-preview {
    padding: 24px;
    overflow: auto;
    background:
        linear-gradient(rgba(46, 196, 255, 0.026) 1px, transparent 1px),
        linear-gradient(90deg, rgba(46, 196, 255, 0.026) 1px, transparent 1px),
        #061521;
    background-size: 24px 24px;
}
.sheet-border {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 600px;
    aspect-ratio: 1.414 / 1;
    padding: 16px;
    border: 2px solid rgba(186, 232, 247, 0.72);
    background: #e9f4f8;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.33);
}
.drawing-area {
    position: relative;
    display: grid;
    flex: 1;
    min-height: 230px;
    border: 1px solid rgba(13, 54, 76, 0.54);
    background:
        linear-gradient(rgba(33, 103, 134, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(33, 103, 134, 0.12) 1px, transparent 1px),
        #eff9fc;
    background-size: 18px 18px;
    place-items: center;
}
.drawing-placeholder {
    color: #28526a;
    font-family: "Courier New", monospace;
    font-size: clamp(0.72rem, 1.2vw, 1rem);
    font-weight: 700;
    line-height: 1.8;
    letter-spacing: 0.1em;
    text-align: center;
}
/* ---------- Blueprint title block ---------- */
.title-block {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    min-height: 112px;
    border: 1px solid rgba(12, 51, 72, 0.7);
    border-top: 0;
    color: #17394d;
    background: #eaf6fa;
    font-family: "Arial", sans-serif;
}
.company-area {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px;
    border-right: 1px solid rgba(12, 51, 72, 0.62);
}
.logo-placeholder {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    color: #eaf6fa;
    background: #184c67;
    font-size: 0.52rem;
    font-weight: 700;
    place-items: center;
}
.company-area strong {
    display: block;
    font-size: 0.62rem;
    letter-spacing: 0.03em;
}
.company-area p {
    margin: 5px 0 0;
    font-size: 0.56rem;
}
.title-block table {
    width: 100%;
    border-collapse: collapse;
}
.title-block td {
    padding: 5px 9px;
    border-bottom: 1px solid rgba(12, 51, 72, 0.38);
    font-size: 0.59rem;
}
.title-block tr:last-child td {
    border-bottom: 0;
}
.title-block td:first-child {
    width: 34%;
    border-right: 1px solid rgba(12, 51, 72, 0.38);
    font-weight: 700;
}
/* ---------- Revision history table ---------- */
.revision-table-card {
    padding: 0;
    margin-top: 24px;
    overflow: hidden;
}
.revision-table {
    width: 100%;
    border-collapse: collapse;
}
.revision-table th,
.revision-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(131, 211, 245, 0.1);
    font-size: 0.73rem;
    text-align: left;
}
.revision-table th {
    color: #7ea4b5;
    background: rgba(3, 17, 29, 0.24);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.revision-table td {
    color: #aecad6;
}
.revision-table td:first-child {
    color: #7be0ff;
    font-family: "Courier New", monospace;
    font-weight: 700;
}
.revision-table td:last-child {
    color: #ffd288;
}
.revision-table tbody tr {
    transition: background 0.2s ease;
}
.revision-table tbody tr:hover {
    background: rgba(46, 196, 255, 0.045);
}
.revision-table tbody tr:last-child td {
    border-bottom: 0;
}
/* ---------- Sheet footer panels ---------- */
.sheet-bottom-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(230px, 0.72fr);
    gap: 18px;
    margin-top: 24px;
}
.sheet-bottom-grid .glass-card {
    min-height: 100%;
    padding: 22px;
}
.sheet-bottom-grid h3 {
    margin: 0 0 18px;
    color: #e7f9ff;
    font-size: 0.9rem;
    font-weight: 600;
}
.engineering-notes {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 21px;
    color: #a9c4d0;
}
.engineering-notes li {
    padding-left: 3px;
    font-size: 0.73rem;
    line-height: 1.6;
}
.engineering-notes li::marker {
    color: var(--cyan);
    font-weight: 700;
}
/* ---------- Approval form ---------- */
.approval-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}
.approval-grid > div {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.approval-grid label {
    color: #90afbd;
    font-size: 0.68rem;
    font-weight: 500;
}
.approval-grid input {
    width: 100%;
    min-height: 39px;
    padding: 0 10px;
    outline: none;
    color: #d7eff9;
    border: 1px solid rgba(135, 211, 244, 0.17);
    border-radius: 7px;
    background: rgba(3, 18, 30, 0.5);
    font-size: 0.72rem;
    transition: 0.2s ease;
}
.approval-grid input:focus {
    border-color: rgba(46, 196, 255, 0.62);
    box-shadow: 0 0 0 3px rgba(46, 196, 255, 0.08);
}
.approval-grid input::placeholder {
    color: rgba(149, 187, 204, 0.55);
}
/* ---------- Sheet option checkboxes ---------- */
.sheet-bottom-grid .glass-card:last-child {
    display: flex;
    flex-direction: column;
    gap: 11px;
}
.sheet-bottom-grid .glass-card:last-child h3 {
    margin-bottom: 5px;
}
.sheet-bottom-grid .glass-card:last-child label {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #acc8d5;
    font-size: 0.73rem;
    cursor: pointer;
}
.sheet-bottom-grid .glass-card:last-child input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--cyan);
    cursor: pointer;
}
/* ---------- Sheet action buttons ---------- */
.sheet-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 27px;
}
.sheet-actions .primary-btn,
.sheet-actions .secondary-btn {
    min-height: 45px;
    padding: 12px 19px;
    font-size: 0.77rem;
}
/* ---------- Responsive drawing sheet section ---------- */
@media (max-width: 1080px) {
    .drawing-sheet-section {
        padding: 88px 4%;
    }
    .sheet-layout {
        grid-template-columns: 1fr;
    }
    .sheet-settings .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .sheet-bottom-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .sheet-bottom-grid .glass-card:last-child {
        grid-column: 1 / -1;
    }
}
@media (max-width: 700px) {
    .drawing-sheet-section {
        padding: 72px 22px;
    }
    .sheet-layout,
    .sheet-bottom-grid {
        gap: 16px;
    }
    .sheet-settings .form-grid,
    .sheet-bottom-grid {
        grid-template-columns: 1fr;
    }
    .sheet-bottom-grid .glass-card:last-child {
        grid-column: auto;
    }
    .sheet-preview {
        padding: 15px;
    }
    .sheet-border {
        min-width: 530px;
        padding: 11px;
    }
    .drawing-area {
        min-height: 195px;
    }
    .title-block {
        min-height: 96px;
    }
    .company-area {
        padding: 8px;
    }
    .logo-placeholder {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
        font-size: 0.45rem;
    }
    .title-preview .card-header,
    .revision-table-card .card-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 17px;
    }
    .revision-table-card {
        overflow-x: auto;
    }
    .revision-table {
        min-width: 650px;
    }
    .revision-table th,
    .revision-table td {
        padding: 12px 10px;
        font-size: 0.68rem;
        white-space: nowrap;
    }
    .sheet-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
    .sheet-actions button {
        width: 100%;
    }
}
