/* =========================================================
   RESET
========================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    min-height: 100vh;
    font-family: "Inter", sans-serif;
    color: #33251c;
    background-color: #f1eee7;
    background-image: url("../images/background.png");
    background-repeat: repeat;
    background-position: top left;
    background-size: 100% auto;
    line-height: 1.5;
}
button,
input,
textarea {
    font: inherit;
}
button,
label {
    -webkit-tap-highlight-color: transparent;
}
button {
    border: 0;
}
a {
    color: inherit;
    text-decoration: none;
}
img {
    display: block;
    max-width: 100%;
}
[hidden] {
    display: none !important;
}
/* =========================================================
   VARIABLES
========================================================= */
:root {
    --background: #f1eee7;
    --paper: #faf8f2;
    --paper-secondary: #f5f0e7;
    --paper-dark: #ece3d6;
    --brown: #704b34;
    --brown-dark: #4c3223;
    --brown-deep: #33251c;
    --brown-light: #a78366;
    --gold: #b59065;
    --gold-light: #d6c0a4;
    --text: #33251c;
    --text-secondary: #766457;
    --text-light: #98877a;
    --border: rgba(78, 55, 39, 0.15);
    --border-strong: rgba(78, 55, 39, 0.27);
    --success: #52715a;
    --danger: #9c4f48;
    --shadow-small:
        0 8px 25px rgba(59, 42, 30, 0.05);
    --shadow-medium:
        0 18px 45px rgba(59, 42, 30, 0.08);
    --shadow-large:
        0 28px 70px rgba(59, 42, 30, 0.13);
    --radius-small: 10px;
    --radius-medium: 16px;
    --radius-large: 22px;
}
/* =========================================================
   SITE WRAPPER
========================================================= */
.site-wrapper {
    width: min(1100px, calc(100% - 320px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 0 58px;
    background: #faf8f2;
    border-left: 1px solid rgba(30, 30, 30, 0.15);
    border-right: 1px solid rgba(30, 30, 30, 0.15);
    box-shadow:
        -10px 0 30px rgba(0, 0, 0, 0.025),
        10px 0 30px rgba(0, 0, 0, 0.025);
}
/* =========================================================
   HEADER
========================================================= */
.header {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    border-bottom: 1px solid var(--border);
}
/* =========================================================
   BRAND
========================================================= */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.brand-logo {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    font-family: "Libre Caslon Display", serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--brown-dark);
    background:
        linear-gradient(
            145deg,
            #fffdf8,
            #eee5d8
        );
    box-shadow:
        inset 0 0 0 3px rgba(255, 255, 255, 0.45);
}
.brand-description {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.brand-description strong {
    font-family: "Libre Caslon Display", serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.1;
    color: var(--brown-deep);
}
.brand-description span {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--text-light);
}
/* =========================================================
   NAVIGATION
========================================================= */
.navigation {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
}
.navigation a {
    position: relative;
    padding: 8px 0;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    transition:
        color 0.2s ease,
        transform 0.2s ease;
}
.navigation a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 0;
    height: 1px;
    background: var(--brown);
    transform: translateX(-50%);
    transition: width 0.22s ease;
}
.navigation a:hover {
    color: var(--brown-dark);
}
.navigation a:hover::after {
    width: 100%;
}
/* =========================================================
   HEADER ACTIONS
========================================================= */
.header-actions {
    display: flex;
    align-items: center;
}
.header-icon {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    color: var(--brown-dark);
    cursor: pointer;
    transition:
        background 0.2s ease,
        transform 0.2s ease,
        border-color 0.2s ease;
}
.header-icon:hover {
    background: #fff;
    border-color: var(--border-strong);
    transform: translateY(-1px);
}
/* =========================================================
   TOOL PAGE
========================================================= */
.tool-page {
    padding: 32px 0 42px;
}
/* =========================================================
   BREADCRUMB
========================================================= */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}
.breadcrumb a {
    transition: color 0.2s ease;
}
.breadcrumb a:hover {
    color: var(--brown-dark);
}
.breadcrumb i {
    font-size: 7px;
    color: #b4a89f;
}
.breadcrumb span {
    color: var(--brown-dark);
}
/* =========================================================
   PAGE INTRO
========================================================= */
.page-intro {
    position: relative;
    margin-bottom: 26px;
}
.intro-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
}
.intro-content {
    max-width: 610px;
}
.intro-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 11px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--brown);
}
.intro-label i {
    font-size: 12px;
}
.intro-content h1 {
    max-width: 600px;
    margin-bottom: 12px;
    font-family: "Libre Caslon Display", serif;
    font-size: clamp(38px, 4vw, 48px);
    font-weight: 400;
    line-height: 0.99;
    letter-spacing: -0.025em;
    color: var(--brown-deep);
}
.intro-content p {
    max-width: 580px;
    font-size: 15px;
    line-height: 1.75;
    color: var(--text-secondary);
}
/* =========================================================
   INTRO INFO
========================================================= */
.intro-info {
    min-width: 215px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.8),
            rgba(239, 230, 216, 0.7)
        );
    box-shadow: var(--shadow-small);
}
.intro-info-icon {
    width: 37px;
    height: 37px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #e9ddcc;
    color: var(--brown);
    font-size: 16px;
}
.intro-info > div:last-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.intro-info strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--brown-dark);
}
.intro-info span {
    font-size: 11px;
    color: var(--text-secondary);
}
/* =========================================================
   APPLICATION LAYOUT
========================================================= */
.application-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 2.05fr)
        minmax(285px, 1fr);
    align-items: start;
    gap: 15px;
}
/* =========================================================
   CREATOR + PREVIEW PANEL
========================================================= */
.creator-panel,
.preview-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-large);
    background:
        linear-gradient(
            145deg,
            rgba(255, 253, 248, 0.97),
            rgba(247, 242, 233, 0.97)
        );
    box-shadow: var(--shadow-medium);
}
.creator-panel {
    padding: 17px;
}
.preview-panel {
    position: sticky;
    top: 18px;
    padding: 16px;
}
/* =========================================================
   STEPS
========================================================= */
.steps {
    display: flex;
    align-items: center;
    margin-bottom: 17px;
    padding: 4px 2px;
}
.step {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.step-number {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d8cec0;
    border-radius: 50%;
    background: #f0ebe3;
    font-size: 11px;
    font-weight: 700;
    color: #9c8e82;
    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
}
.step-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.step-text strong {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    color: #88786c;
}
.step-text span {
    font-size: 10px;
    line-height: 1.25;
    color: #aaa096;
}
.step-line {
    height: 1px;
    flex: 1;
    min-width: 14px;
    margin: 0 8px;
    background: #ddd4c8;
    transition: background 0.25s ease;
}
/* ACTIVE STEP */
.step.active .step-number {
    border-color: var(--brown);
    background: var(--brown);
    color: #fff;
}
.step.active .step-text strong {
    color: var(--brown-dark);
}
.step.active .step-text span {
    color: var(--text-secondary);
}
/* COMPLETED STEP */
.step.completed .step-number {
    border-color: var(--brown);
    background: var(--brown);
    color: #fff;
}
.step.completed .step-text strong {
    color: var(--brown-dark);
}
.step.completed + .step-line {
    background: var(--brown-light);
}
/* =========================================================
   UPLOAD BOX
========================================================= */
.upload-box {
    position: relative;
    overflow: hidden;
    margin-bottom: 11px;
    border: 1px dashed #bda78e;
    border-radius: 17px;
    background:
        radial-gradient(
            circle at top left,
            rgba(255, 255, 255, 0.9),
            transparent 42%
        ),
        #f4eee5;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}
.upload-box.drag-active {
    border-color: var(--brown);
    background: #eee3d5;
    box-shadow:
        inset 0 0 0 2px rgba(112, 75, 52, 0.08);
    transform: translateY(-1px);
}
.upload-content {
    min-height: 205px;
    display: grid;
    grid-template-columns:
        minmax(0, 1.45fr)
        minmax(150px, 0.55fr);
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
}
/* =========================================================
   UPLOAD MAIN
========================================================= */
.upload-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.upload-icon {
    width: 47px;
    height: 47px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    border-radius: 50%;
    background: #e9ddce;
    color: var(--brown);
    font-size: 20px;
    box-shadow:
        inset 0 0 0 1px rgba(112, 75, 52, 0.07);
}
.upload-main h2 {
    margin-bottom: 3px;
    font-family: "Libre Caslon Display", serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.25;
    color: var(--brown-deep);
}
.upload-main p {
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}
.upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 18px;
    margin-bottom: 7px;
    border-radius: 10px;
    background:
        linear-gradient(
            135deg,
            #795239,
            #5d3d2a
        );
    box-shadow:
        0 7px 18px rgba(77, 50, 34, 0.15);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}
.upload-button:hover {
    transform: translateY(-1px);
    box-shadow:
        0 10px 22px rgba(77, 50, 34, 0.2);
    filter: brightness(1.04);
}
.upload-main small {
    font-size: 10px;
    color: var(--text-light);
}
/* =========================================================
   UPLOAD DECORATION
========================================================= */
.upload-decoration {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    padding-left: 13px;
    border-left: 1px dashed rgba(112, 75, 52, 0.16);
    text-align: center;
}
.document-stack {
    position: relative;
    width: 75px;
    height: 83px;
}
.document-sheet {
    position: absolute;
    width: 54px;
    height: 70px;
    border: 1px solid rgba(112, 75, 52, 0.17);
    border-radius: 7px;
    background: #fffdf8;
    box-shadow:
        0 8px 20px rgba(74, 52, 37, 0.07);
}
.document-sheet-back {
    left: 4px;
    top: 8px;
    transform: rotate(-8deg);
    background: #e9dfd2;
}
.document-sheet-middle {
    right: 3px;
    top: 7px;
    transform: rotate(8deg);
    background: #f0e8dd;
}
.document-sheet-front {
    left: 50%;
    top: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transform: translateX(-50%);
    color: var(--brown);
}
.document-sheet-front i {
    font-size: 21px;
}
.document-sheet-front span {
    padding: 2px 5px;
    border-radius: 4px;
    background: var(--brown);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
}
.upload-decoration p {
    max-width: 150px;
    font-size: 10px;
    line-height: 1.5;
    color: var(--text-secondary);
}
/* =========================================================
   UPLOAD INFORMATION
========================================================= */
.upload-information {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 20px;
    padding: 10px 12px;
    border: 1px solid rgba(112, 75, 52, 0.09);
    border-radius: 11px;
    background: #f2eadf;
}
.upload-information-icon {
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    border-radius: 50%;
    background: #ddcdb9;
    color: var(--brown);
    font-size: 9px;
}
.upload-information p {
    font-size: 11px;
    line-height: 1.55;
    color: var(--text-secondary);
}
/* =========================================================
   UPLOADED FILE
========================================================= */
.uploaded-file {
    min-height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px;
}
.uploaded-file-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: #eadfd1;
    color: #96534b;
    font-size: 22px;
}
.uploaded-file-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.uploaded-file-content strong {
    max-width: 330px;
    overflow: hidden;
    font-size: 13px;
    font-weight: 700;
    color: var(--brown-dark);
    white-space: nowrap;
    text-overflow: ellipsis;
}
.uploaded-file-content span {
    font-size: 10px;
    color: var(--text-light);
}
.uploaded-file-success {
    width: 27px;
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    border-radius: 50%;
    background: #dfe9e0;
    color: var(--success);
    font-size: 11px;
}
/* =========================================================
   SECTION HEADING
========================================================= */
.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 12px;
}
.section-label {
    display: block;
    margin-bottom: 3px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.13em;
    color: var(--brown-light);
}
.section-heading h2 {
    margin-bottom: 2px;
    font-family: "Libre Caslon Display", serif;
    font-size: 19px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--brown-deep);
}
.section-heading p {
    font-size: 11px;
    color: var(--text-secondary);
}
.section-heading-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #eee4d7;
    color: var(--brown);
    font-size: 13px;
}
/* =========================================================
   INVOICE REVIEW
========================================================= */
.invoice-review {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background:
        linear-gradient(
            145deg,
            #fffdf9,
            #f7f1e8
        );
    box-shadow:
        0 10px 25px rgba(64, 44, 31, 0.035);
}
.review-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.review-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.review-field-wide {
    grid-column: 1 / -1;
}
.review-field label {
    padding-left: 2px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
}
.review-field input,
.review-field textarea {
    width: 100%;
    border: 1px solid #ded3c5;
    border-radius: 9px;
    outline: none;
    background: #fffdf9;
    color: var(--brown-deep);
    font-size: 12px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}
.review-field input {
    min-height: 38px;
    padding: 0 11px;
}
.review-field textarea {
    min-height: 62px;
    padding: 9px 11px;
    resize: vertical;
}
.review-field input:focus,
.review-field textarea:focus {
    border-color: #a9896d;
    background: #fff;
    box-shadow:
        0 0 0 3px rgba(112, 75, 52, 0.07);
}
/* =========================================================
   DOCUMENT TYPES
========================================================= */
.document-types {
    margin-top: 4px;
    margin-bottom: 14px;
}
.document-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 8px;
}
/* =========================================================
   DOCUMENT CARD
========================================================= */
.document-card {
    position: relative;
    min-width: 0;
    min-height: 135px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border: 1px solid #ddd2c4;
    border-radius: 13px;
    background:
        linear-gradient(
            145deg,
            #fffdf9,
            #f5eee5
        );
    cursor: pointer;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}
.document-card:hover {
    transform: translateY(-2px);
    border-color: #b99e84;
    box-shadow:
        0 10px 25px rgba(71, 49, 34, 0.07);
}
.document-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.document-radio {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 15px;
    height: 15px;
    border: 1px solid #bcae9f;
    border-radius: 50%;
    background: #fff;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}
.document-card-icon {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #eee3d5;
    color: var(--brown);
    font-size: 14px;
}
.document-card-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 3px;
}
.document-card-content strong {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--brown-dark);
}
.document-card-content > span {
    font-size: 10px;
    line-height: 1.45;
    color: var(--text-secondary);
}
/* SELECTED DOCUMENT */
.document-card.selected {
    border-color: #927258;
    background:
        linear-gradient(
            145deg,
            #fffdf8,
            #eee2d2
        );
    box-shadow:
        0 8px 23px rgba(78, 53, 35, 0.08),
        inset 0 0 0 1px rgba(112, 75, 52, 0.05);
}
.document-card.selected .document-radio {
    border: 4px solid var(--brown);
    background: #fff;
}
.document-card.selected .document-card-icon {
    background: #dfcdb8;
    color: var(--brown-dark);
}
/* =========================================================
   CREATE BUTTON
========================================================= */
.create-button {
    width: 100%;
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 15px;
    border-radius: 13px;
    background:
        linear-gradient(
            135deg,
            #795239,
            #553724
        );
    color: #fff;
    cursor: pointer;
    box-shadow:
        0 10px 24px rgba(74, 47, 30, 0.18);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}
.create-button:hover {
    transform: translateY(-2px);
    box-shadow:
        0 14px 30px rgba(74, 47, 30, 0.24);
    filter: brightness(1.04);
}
.create-button:active {
    transform: translateY(0);
}
.create-button-icon {
    width: 35px;
    height: 35px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 14px;
}
.create-button-text {
    min-width: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    text-align: left;
}
.create-button-text strong {
    font-size: 15px;
    font-weight: 700;
}
.create-button-text small {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.69);
}
.create-button > i {
    font-size: 12px;
    transition: transform 0.2s ease;
}
.create-button:hover > i {
    transform: translateX(3px);
}
/* =========================================================
   PREVIEW HEADING
========================================================= */
.preview-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.preview-label {
    display: block;
    margin-bottom: 2px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.13em;
    color: var(--brown-light);
}
.preview-heading h2 {
    font-family: "Libre Caslon Display", serif;
    font-size: 21px;
    font-weight: 400;
    color: var(--brown-deep);
}
.preview-heading > i {
    margin-top: 4px;
    color: var(--brown-light);
    font-size: 18px;
}
/* =========================================================
   PREVIEW AREA
========================================================= */
.preview-area {
    position: relative;
    min-height: 285px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 10px;
    padding: 15px 10px;
    border: 1px solid #ded5ca;
    border-radius: 13px;
    background:
        linear-gradient(
            135deg,
            rgba(246, 242, 235, 0.95),
            rgba(237, 231, 222, 0.95)
        );
}
.preview-empty {
    max-width: 210px;
    text-align: center;
}
.preview-empty-icon {
    width: 47px;
    height: 47px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.65);
    color: #aa9c90;
    font-size: 20px;
    box-shadow:
        0 8px 20px rgba(62, 45, 33, 0.04);
}
.preview-empty h3 {
    margin-bottom: 4px;
    font-family: "Libre Caslon Display", serif;
    font-size: 16px;
    font-weight: 400;
    color: var(--brown-dark);
}
.preview-empty p {
    font-size: 11px;
    line-height: 1.55;
    color: var(--text-light);
}
/* =========================================================
   PREVIEW DOCUMENT
========================================================= */
.preview-document-stage {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow: hidden;
}
.preview-document-wrapper {
    position: relative;
    flex: 0 0 auto;
    transform-origin: top left;
}
.preview-document-clickable {
    cursor: zoom-in;
}
.preview-document-clickable::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border: 1px solid rgba(0, 0, 0, 0.05);
}
.preview-document-toolbar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 9px;
    padding: 7px 9px;
    border: 1px solid #ddd2c5;
    border-radius: 9px;
    background: #f8f3eb;
}
.preview-document-toolbar-left,
.preview-document-toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}
.preview-document-toolbar span {
    font-size: 9px;
    font-weight: 600;
    color: var(--text-secondary);
}
.preview-document-toolbar button {
    width: 27px;
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d9cec0;
    border-radius: 7px;
    background: #fffdf9;
    color: var(--brown);
    cursor: pointer;
}
/* =========================================================
   PREVIEW BUTTONS
========================================================= */
.download-button,
.new-invoice-button {
    width: 100%;
    min-height: 41px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}
.download-button {
    margin-bottom: 7px;
    background: var(--brown);
    color: #fff;
    cursor: pointer;
}
.download-button:not(:disabled):hover {
    background: var(--brown-dark);
    transform: translateY(-1px);
}
.download-button:disabled {
    background: #ded6cb;
    color: #a99e94;
    cursor: not-allowed;
}
.new-invoice-button {
    border: 1px solid #d6c9bb;
    background: transparent;
    color: var(--brown);
    cursor: pointer;
}
.new-invoice-button:hover {
    border-color: #ae9278;
    background: #f0e8de;
}
/* =========================================================
   FEATURES
========================================================= */
.features {
    display: grid;
    grid-template-columns:
        1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    margin-top: 17px;
    padding: 13px 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background:
        rgba(248, 244, 237, 0.82);
    box-shadow: var(--shadow-small);
}
.feature {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}
.feature-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #e9ded0;
    color: var(--brown);
    font-size: 11px;
}
.feature > div:last-child {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.feature strong {
    font-size: 12px;
    font-weight: 700;
    color: var(--brown-dark);
}
.feature span {
    font-size: 9px;
    color: var(--text-light);
}
.feature-divider {
    width: 1px;
    height: 30px;
    background: var(--border);
}
/* =========================================================
   FOOTER
========================================================= */
.footer {
    min-height: 100px;
    display: grid;
    grid-template-columns:
        1fr auto 1fr;
    align-items: center;
    gap: 20px;
    border-top: 1px solid var(--border);
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.footer-brand .brand-logo {
    width: 35px;
    height: 35px;
    font-size: 12px;
}
.footer-brand > div:last-child {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.footer-brand strong {
    font-family: "Libre Caslon Display", serif;
    font-size: 13px;
    font-weight: 400;
    color: var(--brown-dark);
}
.footer-brand span {
    font-size: 10px;
    color: var(--text-light);
}
.footer-navigation {
    display: flex;
    align-items: center;
    gap: 15px;
}
.footer-navigation a {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}
.footer-navigation a:hover {
    color: var(--brown);
}
.footer-copyright {
    justify-self: end;
    font-size: 9px;
    color: var(--text-light);
}
/* =========================================================
   GENERATED A4
========================================================= */
.generated-a4 {
    position: relative;
    width: 210mm;
    min-width: 210mm;
    min-height: 297mm;
    overflow: hidden;
    background: #fff;
    color: #000;
    box-shadow:
        0 10px 35px rgba(0, 0, 0, 0.14);
    font-family: Arial, Helvetica, sans-serif;
}
/* =========================================================
   MUAYENE KABUL TUTANAĞI
========================================================= */
.inspection-document,
.inspection-report {
    width: 210mm;
    min-height: 297mm;
    padding:
        20mm
        17mm
        18mm;
    background: #fff;
    color: #000;
    font-family:
        "Times New Roman",
        Times,
        serif;
    font-size: 11pt;
    line-height: 1.35;
}
.inspection-report-inner {
    width: 100%;
}
.inspection-main-title {
    margin:
        3mm
        0
        13mm;
    text-align: center;
    font-family:
        "Times New Roman",
        Times,
        serif;
    font-size: 14pt;
    font-weight: 700;
    text-decoration: underline;
}
.inspection-top-information,
.inspection-reference-block {
    margin-bottom: 7mm;
}
.inspection-info-line {
    display: grid;
    grid-template-columns:
        40mm
        5mm
        1fr;
    align-items: start;
    margin-bottom: 2.3mm;
}
.inspection-info-line strong {
    font-weight: 700;
}
.inspection-reference-title {
    margin-bottom: 2.5mm;
    font-weight: 700;
    text-decoration: underline;
}
.inspection-legal-text {
    margin:
        6mm
        0;
    text-align: justify;
    text-indent: 12mm;
    line-height: 1.55;
}
.inspection-product-table {
    width: 100%;
    margin:
        7mm
        0;
    border-collapse: collapse;
    table-layout: fixed;
}
.inspection-product-table th,
.inspection-product-table td {
    padding:
        2.7mm
        2mm;
    border: 1px solid #000;
    vertical-align: middle;
    text-align: center;
    font-size: 10pt;
}
.inspection-product-table th {
    font-weight: 700;
}
.inspection-col-order {
    width: 11%;
}
.inspection-col-product {
    width: 27%;
}
.inspection-col-quantity {
    width: 14%;
}
.inspection-col-unit {
    width: 14%;
}
.inspection-col-result {
    width: 34%;
}
.inspection-result-text {
    margin-top: 8mm;
    text-align: justify;
    text-indent: 12mm;
    line-height: 1.55;
}
.inspection-signatures {
    display: grid;
    grid-template-columns:
        repeat(3, 1fr);
    gap: 8mm;
    margin-top: 24mm;
    text-align: center;
}
.inspection-signature {
    min-height: 30mm;
}
.inspection-signature strong {
    display: block;
    margin-bottom: 2mm;
    font-weight: 700;
}
.inspection-signature span {
    display: block;
    font-size: 10pt;
}
/* =========================================================
   DOCUMENT ZOOM MODAL
========================================================= */
.document-zoom-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 25px;
    background:
        rgba(29, 23, 19, 0.82);
    backdrop-filter: blur(7px);
}
.document-zoom-modal.active,
.document-zoom-modal.open {
    display: flex;
}
body.document-zoom-open {
    overflow: hidden;
}
.document-zoom-window {
    width: min(1180px, 96vw);
    height: min(920px, 94vh);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: #e8e3dc;
    box-shadow:
        0 35px 100px rgba(0, 0, 0, 0.36);
}
/* =========================================================
   ZOOM HEADER
========================================================= */
.document-zoom-header {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 8px 13px;
    border-bottom: 1px solid #d1c9c0;
    background: #faf8f3;
}
.document-zoom-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--brown-dark);
}
.document-zoom-title i {
    font-size: 14px;
}
.document-zoom-title span {
    font-size: 12px;
    font-weight: 700;
}
.document-zoom-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}
.zoom-control,
.zoom-close-button {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d8cfc4;
    border-radius: 8px;
    background: #fff;
    color: var(--brown-dark);
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}
.zoom-control:hover,
.zoom-close-button:hover {
    border-color: #b69c84;
    background: #f2e9de;
    transform: translateY(-1px);
}
.zoom-close-button {
    margin-left: 5px;
}
.zoom-percentage {
    min-width: 46px;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
}
/* =========================================================
   ZOOM CONTENT
========================================================= */
.document-zoom-content {
    position: relative;
    flex: 1;
    overflow: auto;
    padding: 35px;
    background:
        radial-gradient(
            circle at center,
            #d8d3cc,
            #c8c2ba
        );
}
.document-zoom-canvas {
    position: relative;
    min-width: 100%;
    min-height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.document-zoom-page {
    position: relative;
    flex: 0 0 auto;
    transform-origin: top center;
}
.document-zoom-page .generated-a4 {
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.24);
}
/* =========================================================
   ZOOM FOOTER
========================================================= */
.document-zoom-footer {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 12px;
    border-top: 1px solid #d1c9c0;
    background: #faf8f3;
    font-size: 9px;
    color: var(--text-light);
}
/* =========================================================
   NOTIFICATION
========================================================= */
.app-notification {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 12000;
    max-width: 360px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fffdf8;
    color: var(--brown-dark);
    box-shadow:
        0 15px 45px rgba(42, 29, 20, 0.18);
    font-size: 11px;
    animation:
        notificationIn
        0.25s ease;
}
.app-notification i {
    margin-top: 2px;
}
.app-notification.success i {
    color: var(--success);
}
.app-notification.error i {
    color: var(--danger);
}
.app-notification.info i {
    color: var(--brown);
}
@keyframes notificationIn {
    from {
        opacity: 0;
        transform:
            translateY(8px)
            scale(0.98);
    }
    to {
        opacity: 1;
        transform:
            translateY(0)
            scale(1);
    }
}
/* =========================================================
   RESPONSIVE - 1350
========================================================= */
@media (max-width: 1350px) {
    .site-wrapper {
        width: calc(100% - 160px);
        padding: 0 40px;
    }
}
/* =========================================================
   RESPONSIVE - 1100
========================================================= */
@media (max-width: 1100px) {
    .application-layout {
        grid-template-columns:
            minmax(0, 1.75fr)
            minmax(270px, 1fr);
    }
    .navigation {
        gap: 14px;
    }
    .intro-content h1 {
        font-size: 42px;
    }
    .document-grid {
        grid-template-columns: 1fr;
    }
    .document-card {
        min-height: 90px;
        flex-direction: row;
        align-items: center;
        padding-right: 38px;
    }
    .document-card-content {
        padding-right: 0;
    }
}
/* =========================================================
   RESPONSIVE - 900
========================================================= */
@media (max-width: 900px) {
    body {
        background-image: none;
        background-color: #faf8f2;
    }
    .site-wrapper {
        width: 100%;
        padding: 0 25px;
        border: 0;
        box-shadow: none;
    }
    .header {
        min-height: 78px;
    }
    .navigation {
        display: none;
    }
    .intro-row {
        align-items: flex-start;
        flex-direction: column;
    }
    .intro-info {
        min-width: 0;
        width: 100%;
    }
    .application-layout {
        grid-template-columns: 1fr;
    }
    .preview-panel {
        position: static;
    }
    .document-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }
    .document-card {
        min-height: 135px;
        flex-direction: column;
        align-items: flex-start;
        padding-right: 12px;
    }
    .footer {
        grid-template-columns: 1fr;
        padding: 24px 0;
        text-align: center;
    }
    .footer-brand {
        justify-content: center;
    }
    .footer-navigation {
        justify-content: center;
    }
    .footer-copyright {
        justify-self: center;
    }
    .preview-area:has(.preview-document-stage) {
        min-height: 500px;
        padding: 13px 10px 18px;
    }
}
/* =========================================================
   RESPONSIVE - 700
========================================================= */
@media (max-width: 700px) {
    .steps {
        align-items: flex-start;
    }
    .step {
        flex: 1;
        flex-direction: column;
        text-align: center;
    }
    .step-text {
        align-items: center;
    }
    .step-line {
        margin-top: 14px;
    }
    .upload-content {
        grid-template-columns: 1fr;
    }
    .upload-decoration {
        display: none;
    }
    .document-grid {
        grid-template-columns: 1fr;
    }
    .document-card {
        min-height: 85px;
        flex-direction: row;
        align-items: center;
        padding-right: 38px;
    }
    .review-grid {
        grid-template-columns: 1fr;
    }
    .review-field-wide {
        grid-column: auto;
    }
    .features {
        grid-template-columns: 1fr;
        gap: 11px;
    }
    .feature {
        justify-content: flex-start;
    }
    .feature-divider {
        width: 100%;
        height: 1px;
    }
    .document-zoom-modal {
        padding: 0;
    }
    .document-zoom-window {
        width: 100vw;
        height: 100vh;
        border: 0;
        border-radius: 0;
    }
    .document-zoom-header {
        padding: 8px 10px;
    }
    .document-zoom-title span {
        display: none;
    }
    .document-zoom-content {
        padding: 18px;
    }
    .document-zoom-footer {
        display: none;
    }
    .zoom-control,
    .zoom-close-button {
        width: 32px;
        height: 32px;
    }
    .zoom-percentage {
        min-width: 39px;
        font-size: 9px;
    }
}
/* =========================================================
   RESPONSIVE - 600
========================================================= */
@media (max-width: 600px) {
    .site-wrapper {
        padding: 0 18px;
    }
    .tool-page {
        padding-top: 25px;
    }
    .breadcrumb {
        flex-wrap: wrap;
    }
    .intro-content h1 {
        font-size: 37px;
    }
    .intro-content p {
        font-size: 13px;
    }
    .creator-panel,
    .preview-panel {
        padding: 13px;
    }
    .steps {
        margin-bottom: 14px;
    }
    .step-number {
        width: 26px;
        height: 26px;
        flex-basis: 26px;
    }
    .step-text strong {
        font-size: 10px;
    }
    .step-text span {
        display: none;
    }
    .upload-content {
        min-height: 190px;
        padding: 16px 12px;
    }
    .upload-main h2 {
        font-size: 17px;
    }
    .footer-navigation {
        flex-wrap: wrap;
    }
    .preview-document-toolbar-right {
        display: none;
    }
    .preview-area:has(.preview-document-stage) {
        min-height: 430px;
    }
    .app-notification {
        left: 15px;
        right: 15px;
        bottom: 15px;
        max-width: none;
    }
}
/* =========================================================
   RESPONSIVE - 430
========================================================= */
@media (max-width: 430px) {
    .brand-description strong {
        font-size: 13px;
    }
    .brand-description span {
        font-size: 8px;
    }
    .header-icon {
        width: 32px;
        height: 32px;
    }
    .intro-content h1 {
        font-size: 33px;
    }
    .intro-label {
        font-size: 9px;
    }
    .steps {
        gap: 2px;
    }
    .step-line {
        min-width: 5px;
        margin-left: 2px;
        margin-right: 2px;
    }
    .step-text strong {
        font-size: 9px;
    }
    .create-button-text small {
        display: none;
    }
}


/* =========================================================
   PRINT
========================================================= */
@media print {
    @page {
        size: A4;
        margin: 0;
    }
    html,
    body {
        width: 210mm;
        height: 297mm;
        margin: 0;
        padding: 0;
        background: #fff;
    }
    body * {
        visibility: hidden;
    }
    .generated-a4,
    .generated-a4 * {
        visibility: visible;
    }
    .generated-a4 {
        position: absolute;
        left: 0;
        top: 0;
        width: 210mm !important;
        min-width: 210mm !important;
        max-width: 210mm !important;
        height: 297mm !important;
        min-height: 297mm !important;
        max-height: none !important;
        margin: 0 !important;
        box-shadow: none !important;
        overflow: hidden !important;
    }
    .inspection-document,
    .inspection-report {
        width: 210mm !important;
        min-width: 210mm !important;
        max-width: 210mm !important;
        height: 297mm !important;
        min-height: 297mm !important;
        max-height: none !important;
        margin: 0 !important;
        box-shadow: none !important;
        overflow: hidden !important;
    }
}
.inspection-approval {
    width: 100%;
    margin-top: 20mm;
    text-align: center;
    break-inside: avoid;
}
.inspection-approval strong {
    display: block;
    font-size: 11pt;
    font-weight: 700;
}
.items-help { margin: 16px 0; font-size: 13px; line-height: 1.6; }
.extra-item-row { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 8px; margin-bottom: 10px; }
.extra-item-row input { width: 100%; min-width: 0; padding: 10px; border: 1px solid #d5c9bc; border-radius: 8px; }
.extra-item-row button { padding: 8px; cursor: pointer; }
.document-card:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.inspection-product-table td, .inspection-info-line span { overflow-wrap: anywhere; }
.inspection-signatures, .inspection-approval { break-inside: avoid; }
@media (max-width: 600px) { .extra-item-row { grid-template-columns: 1fr 1fr; } }
@media print {
    .generated-a4 { position: relative !important; height: auto !important; overflow: visible !important; }
    .inspection-document { height: auto !important; overflow: visible !important; }
    .inspection-product-table tr { break-inside: avoid; }
}
.generated-a4 { font-family: "Times New Roman", Times, serif; overflow: visible; }
.inspection-approval { margin-top: 20mm; min-height: 25mm; }
#dmoReview { margin-top: 20px; padding-top: 16px; border-top: 1px solid #d5c9bc; }
.dmo-edit-row { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 8px; margin: 10px 0; }
.dmo-edit-row input { min-width: 0; width: 100%; padding: 10px; border: 1px solid #d5c9bc; border-radius: 8px; }
.dmo-edit-row button { padding: 8px; cursor: pointer; }
@media(max-width:600px) { .dmo-edit-row { grid-template-columns: 1fr 1fr; } }
.application-layout > *, .creator-panel, .preview-panel, .review-field { min-width: 0; }





/* ========================================
   DİJİTAL ARŞİV — ORTAK HEADER
======================================== */

.archive-header {
    width: 100%;
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
    border-bottom: 1px solid #dedbd3;
    background: transparent;
    color: #181818;
}

.archive-header,
.archive-header * {
    box-sizing: border-box;
}

.archive-header a {
    color: inherit;
    text-decoration: none;
}

/* LOGO VE KİMLİK */

.archive-header .archive-header__brand {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.archive-header .archive-header__logo {
    display: block;
    font-family: "Libre Caslon Display", Georgia, serif;
    font-size: 36px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.04em;
}

.archive-header .archive-header__identity {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 20px;
    border-left: 1px solid #dedbd3;
}

.archive-header .archive-header__identity strong {
    font-family: "Libre Caslon Display", Georgia, serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.2;
}

.archive-header .archive-header__identity small {
    font-family: "Inter", Arial, sans-serif;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.4;
    color: #666;
}

/* MENÜ */

.archive-header .archive-header__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 22px;
    min-width: 0;
}

.archive-header .archive-header__nav a {
    position: relative;
    display: block;
    padding: 10px 0;
    font-family: "Libre Caslon Display", Georgia, serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.2;
    white-space: nowrap;
}

.archive-header .archive-header__nav a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 2px;
    left: 0;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}

.archive-header .archive-header__nav a:hover::after,
.archive-header .archive-header__nav a[aria-current]::after {
    transform: scaleX(1);
}

/* ÜYE GİRİŞİ */

.archive-header .archive-header__login {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    flex-shrink: 0;
    padding: 9px 15px;
    border: 1px solid #484848;
    border-radius: 5px;
    background: transparent;
    font-family: "Libre Caslon Display", Georgia, serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;
    white-space: nowrap;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.archive-header .archive-header__login svg {
    display: block;
    flex-shrink: 0;
}

.archive-header .archive-header__login:hover {
    border-color: #181818;
    background: #181818;
    color: #faf8f2;
}

/* KLAVYE ODAĞI */

.archive-header a:focus-visible {
    outline: 2px solid #704b34;
    outline-offset: 5px;
    border-radius: 3px;
}

/* DAR MASAÜSTÜ VE TABLET */

@media (max-width: 1200px) {
    .archive-header {
        flex-wrap: wrap;
        gap: 16px;
    }

    .archive-header .archive-header__login {
        margin-left: auto;
    }

    .archive-header .archive-header__nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        gap: 8px 24px;
    }
}

/* MOBİL */

@media (max-width: 600px) {
    .archive-header {
        min-height: 76px;
        gap: 14px 10px;
        padding: 16px 0;
    }

    .archive-header .archive-header__brand {
        gap: 10px;
        flex-shrink: 1;
        min-width: 0;
    }

    .archive-header .archive-header__logo {
        font-size: 29px;
    }

    .archive-header .archive-header__identity {
        gap: 3px;
        padding-left: 10px;
    }

    .archive-header .archive-header__identity strong {
        font-size: 15px;
    }

    .archive-header .archive-header__identity small {
        font-size: 9px;
    }

    .archive-header .archive-header__login {
        min-height: 40px;
        padding: 8px 10px;
        gap: 6px;
        font-size: 14px;
    }

    .archive-header .archive-header__login svg {
        width: 18px;
        height: 18px;
    }

    .archive-header .archive-header__nav {
        gap: 6px 18px;
    }

    .archive-header .archive-header__nav a {
        padding: 8px 0;
        font-size: 16px;
    }
}

@media (max-width: 380px) {
    .archive-header .archive-header__brand {
        width: 100%;
    }
}

/* HAREKET VE BASKI */

@media (prefers-reduced-motion: reduce) {
    .archive-header .archive-header__nav a::after,
    .archive-header .archive-header__login {
        transition: none;
    }
}

@media print {
    .archive-header {
        display: none;
    }
}