/* Invoice Submission Form – styles */

#isf-form-wrap {
    max-width: 860px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #2d2d2d;
}

.isf-form-title {
    font-size: 1.9rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 6px;
}

.isf-form-intro {
    color: #666;
    margin-bottom: 28px;
    font-size: 0.95rem;
}

/* ── Section ────────────────────────────────────────────────────────────── */
.isf-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 28px 28px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.isf-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.isf-section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #3465a4;
    color: #fff;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Grid ───────────────────────────────────────────────────────────────── */
.isf-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.isf-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1 1 200px;
    margin-bottom: 14px;
}

.isf-col-full  { flex: 1 1 100%; }
.isf-col-half  { flex: 1 1 calc(50% - 8px); }
.isf-col-third { flex: 1 1 calc(33.33% - 12px); }
.isf-col-logo  { flex: 0 0 160px; }
.isf-col-grow  { flex: 1 1 0; min-width: 0; }

/* ── Fields ─────────────────────────────────────────────────────────────── */
label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.isf-req { color: #e53e3e; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid #d1d5db;
    border-radius: 7px;
    font-size: 0.92rem;
    color: #1a1a2e;
    background: #fafafa;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #3465a4;
    box-shadow: 0 0 0 3px rgba(52,101,164,.12);
    background: #fff;
}

textarea { resize: vertical; min-height: 70px; }

/* ── Logo upload ────────────────────────────────────────────────────────── */
.isf-logo-upload-area {
    width: 160px;
    height: 140px;
    border: 2px dashed #d1d5db;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-align: center;
    padding: 10px;
    background: #f8fafc;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
    overflow: hidden;
}

.isf-logo-upload-area:hover { border-color: #3465a4; background: #f0f4fa; }
.isf-logo-upload-area.drag-over { border-color: #3465a4; background: #e8f0fb; }

.isf-logo-upload-area input[type="file"] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}

#isf-logo-placeholder { display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
#isf-logo-placeholder p { margin: 0; font-size: 0.75rem; color: #888; line-height: 1.4; }
#isf-logo-preview { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }

/* ── File upload areas ──────────────────────────────────────────────────── */
.isf-file-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 9px;
    padding: 20px;
    background: #f8fafc;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
}
.isf-file-upload-area:hover, .isf-file-upload-area.drag-over {
    border-color: #3465a4; background: #f0f4fa;
}
.isf-file-upload-area input[type="file"] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.isf-file-upload-label { pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.isf-file-upload-label p { margin: 0; font-size: 0.8rem; color: #888; line-height: 1.4; }

.isf-file-list { margin-top: 12px; text-align: left; }
.isf-file-item {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 8px; background: #e8f0fb; border-radius: 5px;
    margin-bottom: 4px; font-size: 0.82rem; color: #2d4a7a;
}
.isf-file-item svg { flex-shrink: 0; }

/* ── Line items ─────────────────────────────────────────────────────────── */
.isf-line-item-header {
    display: flex; gap: 12px; padding: 0 0 4px;
    font-size: 0.78rem; font-weight: 600; color: #888; text-transform: uppercase; letter-spacing: 0.04em;
}
.isf-line-item-header .isf-li-desc-label  { flex: 1; }
.isf-line-item-header .isf-li-amt-label   { width: 130px; }

.isf-line-item {
    display: flex; gap: 12px; align-items: center; margin-bottom: 8px;
}
.isf-li-desc   { flex: 1; }
.isf-li-amount { width: 130px; flex-shrink: 0; }

.isf-remove-line {
    background: none; border: none; color: #e53e3e; font-size: 1.3rem;
    cursor: pointer; padding: 0 4px; line-height: 1;
}
.isf-remove-line:hover { color: #c53030; }

.isf-total-row {
    display: flex; align-items: center; justify-content: flex-end; gap: 14px;
    margin-top: 10px; font-size: 1rem; color: #555;
}
.isf-total-row strong { color: #1a1a2e; font-size: 1.15rem; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.isf-btn-secondary {
    background: none;
    border: 1.5px solid #3465a4;
    color: #3465a4;
    padding: 8px 16px;
    border-radius: 7px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    transition: background 0.15s, color 0.15s;
}
.isf-btn-secondary:hover { background: #3465a4; color: #fff; }

.isf-submit-row { display: flex; justify-content: flex-end; margin-top: 8px; }

.isf-btn-primary {
    background: #3465a4;
    color: #fff;
    border: none;
    padding: 14px 36px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    min-width: 180px;
}
.isf-btn-primary:hover    { background: #2a529c; }
.isf-btn-primary:active   { transform: scale(0.98); }
.isf-btn-primary:disabled { background: #9aadcc; cursor: not-allowed; }

/* ── Notices ────────────────────────────────────────────────────────────── */
.isf-notice {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    font-weight: 500;
}
.isf-notice-success { background: #e6f4ea; border: 1px solid #81c784; color: #1b5e20; }
.isf-notice-error   { background: #fce4e4; border: 1px solid #e57373; color: #b71c1c; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .isf-section { padding: 18px 16px; }
    .isf-col-logo { flex: 1 1 100%; }
    .isf-col-half, .isf-col-third { flex: 1 1 100%; }
    .isf-li-amount { width: 100px; }
}
