/* ==========================================
   Monthly Card Settlement Management - Main Stylesheet
   Modern, Clean Financial Dashboard UI with Progressive Disclosure & Drag-Drop Support
   ========================================== */

:root {
    --bg-main: #f4f6f9;
    --bg-card: #ffffff;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;

    --color-primary: #2b6cb0;
    --color-primary-hover: #2c5282;
    --color-success: #38a169;
    --color-warning: #dd6b20;
    --color-danger: #e53e3e;
    --color-info: #3182ce;

    --taeho-bg: #ebf8ff;
    --taeho-border: #90cdf4;
    --taeho-text: #2c5282;

    --jaehyun-bg: #faf5ff;
    --jaehyun-border: #d6bcfa;
    --jaehyun-text: #553c9a;

    --border-color: #e2e8f0;
    --border-radius: 8px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans KR", sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header & Top Bar */
.app-header {
    background-color: #1a365d;
    color: #ffffff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.app-brand h1 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header-meta {
    font-size: 0.85rem;
    color: #cbd5e0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-role-badge {
    padding: 0.25rem 0.65rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

.user-role-badge.role-admin {
    background-color: #2b6cb0;
    color: #ffffff;
}

.user-role-badge.role-viewer {
    background-color: #d69e2e;
    color: #ffffff;
}

.user-role-badge.role-guest {
    background-color: #e2e8f0;
    color: #4a5568;
}

.cloud-save-status {
    padding: 0.25rem 0.65rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.cloud-save-status.status-saved {
    background-color: #276749;
    color: #ffffff;
}

.cloud-save-status.status-saving {
    background-color: #d69e2e;
    color: #ffffff;
}

.cloud-save-status.status-failed {
    background-color: #c53030;
    color: #ffffff;
}

/* Fullscreen Login Overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(26, 32, 44, 0.85);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-card {
    background: #ffffff;
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.login-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.login-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.25rem;
}

.login-header p {
    font-size: 0.85rem;
    color: #718096;
}

.login-error-msg {
    background-color: #fff5f5;
    border: 1px solid #feb2b2;
    color: #c53030;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.825rem;
    line-height: 1.4;
}

.btn-block {
    width: 100%;
    display: block;
}

/* Read-only mode for Viewer role (Father) */
.amount-static-display {
    padding: 0.4rem 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.amount-static-display.zero-text {
    color: var(--color-success);
}

.static-memo-display {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    min-height: 40px;
}

/* Navigation Tabs */
.app-nav {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0 2rem;
    display: flex;
    gap: 0.5rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    color: var(--color-primary);
}

.tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    background-color: #f7fafc;
}

/* Main Container */
.app-container {
    flex: 1;
    padding: 1.5rem 2rem;
    max-width: 1920px;
    margin: 0 auto;
    width: 100%;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Cards Panels & Dashboard Cards */
.card-panel {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.panel-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    border-left: 4px solid var(--color-primary);
    padding-left: 0.5rem;
}

.header-bar-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.month-selector-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.month-title-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.month-title-display h2 {
    font-size: 1.5rem;
    font-weight: 800;
}

.month-actions-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Compact 1-Line Summary Bar */
.compact-summary-bar {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 1rem 1.5rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.summary-label {
    color: var(--text-secondary);
    font-weight: 600;
}

.summary-val {
    font-size: 1.15rem;
    font-weight: 700;
}

.total-amount-val {
    font-size: 1.35rem;
    color: var(--color-primary);
}

.summary-divider {
    width: 1px;
    height: 24px;
    background-color: var(--border-color);
}

/* Target Status Banner */
.target-status-banner {
    background: #edf2f7;
    border: 1px solid #cbd5e0;
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    transition: all 0.2s ease;
}

.target-status-banner.highlight-target {
    background: #ebf8ff;
    border-color: #3182ce;
    color: #2b6cb0;
}

/* Warnings Alert Box */
.warning-alert-box {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: var(--border-radius);
    padding: 1rem 1.25rem;
    color: #c53030;
    margin-bottom: 1.5rem;
}

.warning-alert-box h4 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.warning-alert-box ul {
    margin-left: 1.25rem;
    font-size: 0.9rem;
}

/* 6 Cards Interactive Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

@media (max-width: 1400px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
}

.card-box {
    background: #ffffff;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.card-box:hover {
    box-shadow: var(--shadow-md);
}

.card-box.active-paste-target {
    border-color: #3182ce !important;
    box-shadow: 0 0 0 4px rgba(49, 130, 206, 0.2), var(--shadow-md);
    background-color: #f7fafc;
}

.card-box.disabled-card {
    opacity: 0.85;
}

/* Drag Over Highlight Overlay */
.card-box.drag-over-highlight {
    border-color: #38a169 !important;
    background-color: #f0fff4 !important;
    box-shadow: 0 0 0 4px rgba(56, 161, 105, 0.3), var(--shadow-md);
}

.drag-drop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(240, 255, 244, 0.95);
    border: 3px dashed #38a169;
    border-radius: var(--border-radius);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    pointer-events: none;
    padding: 1rem;
    text-align: center;
    font-size: 1.05rem;
    color: #276749;

}

.card-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Card Holder Visual Distinction (Subtle Left Accent Bar + Faint Background Tone) */
.card-box.holder-taeho {
    border-left: 5px solid #3b82f6; /* Soft Royal Blue Accent Bar */
    background-color: #f8fafc;       /* Faint Slate Blue Tint */
}

.card-box.holder-jaehyun {
    border-left: 5px solid #10b981; /* Soft Emerald Accent Bar */
    background-color: #f6fbf8;       /* Faint Mint Tint */
}

.card-box.holder-gyuseok {
    border-left: 5px solid #8b5cf6; /* Soft Indigo Accent Bar */
    background-color: #f9f8fe;       /* Faint Soft Lavender Tint */
}

.logo-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(241, 245, 249, 0.85);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 4px;
    padding: 2px 6px;
    height: 22px;
    flex-shrink: 0;
}

.card-issuer-logo {
    height: 18px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
    vertical-align: middle;
    flex-shrink: 0;
}

.card-name {
    font-size: 1.05rem;
    font-weight: 700;
}

.group-tag {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.tag-taeho {
    background: var(--taeho-bg);
    color: var(--taeho-text);
    border: 1px solid var(--taeho-border);
}

.tag-jaehyun_gyuseok {
    background: var(--jaehyun-bg);
    color: var(--jaehyun-text);
    border: 1px solid var(--jaehyun-border);
}

.card-due-badge-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.card-due-badge {
    font-size: 0.85rem;
    background: #edf2f7;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
}

.card-account-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
}

.jaehyun-notice-tag {
    font-size: 0.75rem;
    color: #c53030;
    font-weight: 600;
}

/* Amount Input Section */
.card-amount-section {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.input-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.input-label {
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.img-count-badge {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.amount-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.amount-input {
    width: 100%;
    padding: 0.5rem 2.2rem 0.5rem 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: right;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: border-color 0.2s;
}

.amount-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.amount-input.zero-input {
    background-color: #f0fff4;
    color: #276749;
}

.currency-unit {
    position: absolute;
    right: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    pointer-events: none;
}

/* Status Badges */
.status-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.status-unentered {
    background: #fffaf0;
    color: #dd6b20;
    border: 1px solid #fbd38d;
}

.status-zero {
    background: #f0fff4;
    color: #276749;
    border: 1px solid #9ae6b4;
}

.status-entered {
    background: #ebf8ff;
    color: #2b6cb0;
    border: 1px solid #90cdf4;
}

.card-warning-box {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #c53030;
}

.card-compact-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 0.5rem;
    margin-top: 0.2rem;
}

.btn-expand-toggle {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
}

.card-details-collapsible {
    border-top: 1px dashed var(--border-color);
    padding-top: 0.75rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.due-date-edit-label {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.due-date-input {
    width: 38px;
    padding: 0.1rem 0.2rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    border: 1px solid #90cdf4;
    border-radius: 4px;
    color: var(--color-primary);
}

/* Thumbnails Grid */
.card-images-section {
    border-top: 1px dashed var(--border-color);
    padding-top: 0.75rem;
}

.images-section-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.thumbnails-grid {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    min-height: 60px;
}

.empty-dropzone {
    width: 100%;
    border: 2px dashed #cbd5e0;
    border-radius: 6px;
    padding: 0.75rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    background: #faf5ff;
}

.thumbnail-item {
    width: 65px;
    height: 65px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.thumb-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: space-between;
    padding: 2px 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.thumbnail-item:hover .thumb-actions {
    opacity: 1;
}

.btn-thumb-nav, .btn-thumb-del {
    background: none;
    border: none;
    color: #fff;
    font-size: 0.7rem;
    cursor: pointer;
}

.btn-thumb-del:hover {
    color: #feb2b2;
}

/* Memo & Checkbox */
.card-memo-section {
    margin-top: 0.25rem;
}

.memo-input {
    width: 100%;
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    resize: vertical;
    height: 40px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    cursor: pointer;
}

.sub-text-account {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: normal;
}

.sub-text-recommended {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Buttons & Badges */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #ffffff;
}

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

.btn-secondary {
    background-color: #e2e8f0;
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: #cbd5e0;
}

.btn-outline {
    background-color: transparent;
    border-color: #cbd5e0;
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: #edf2f7;
}

.btn-success {
    background-color: var(--color-success);
    color: #ffffff;
}

.btn-warning {
    background-color: var(--color-warning);
    color: #ffffff;
}

.btn-danger {
    background-color: var(--color-danger);
    color: #ffffff;
}

.btn-sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-xs {
    padding: 0.15rem 0.4rem;
    font-size: 0.75rem;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 12px;
}

.badge-open {
    background: #ebf8ff;
    color: #2b6cb0;
}

.badge-closed {
    background: #edf2f7;
    color: #4a5568;
}

.badge-success {
    background: #f0fff4;
    color: #276749;
}

.badge-danger {
    background: #fff5f5;
    color: #c53030;
}

.badge-warning {
    background: #fffaf0;
    color: #dd6b20;
}

.badge-date {
    background: #edf2f7;
    color: #2d3748;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.data-table th, .data-table td {
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    text-align: left;
}

.data-table th {
    background-color: #f7fafc;
    font-weight: 700;
    color: var(--text-secondary);
}

.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-danger { color: var(--color-danger) !important; }
.text-success { color: var(--color-success) !important; }
.text-muted { color: var(--text-muted) !important; }
.fw-bold { font-weight: 700 !important; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }

.table-input {
    width: 100%;
    padding: 0.4rem;
    font-size: 0.85rem;
    text-align: right;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.table-input-date {
    width: 100%;
    padding: 0.3rem;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* Deposit Summaries Grid */
.deposit-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dep-card {
    background: #f7fafc;
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 6px;
}

.dep-card-highlight {
    background: #ebf8ff;
    border-color: #90cdf4;
}

.dep-card-warning {
    background: #fff5f5;
    border-color: #feb2b2;
}

.dep-card-success {
    background: #f0fff4;
    border-color: #9ae6b4;
}

.dep-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.dep-val {
    font-size: 1.4rem;
    font-weight: 800;
    margin-top: 0.2rem;
}

.inline-form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    background: #f8fafc;
    padding: 1rem;
    border-radius: 6px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control {
    padding: 0.45rem 0.75rem;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.urgent-alert-box {
    background: #fffaf0;
    border: 1px solid #fbd38d;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.urgent-amount {
    font-size: 1.2rem;
    font-weight: 800;
    color: #c05621;
    margin: 0 0.5rem;
}

/* Printable Document */
.transmission-document-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    max-width: 900px;
    margin: 0 auto;
}

.doc-header {
    border-bottom: 2px solid #1a365d;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.doc-header h2 {
    font-size: 1.6rem;
    color: #1a365d;
}

.doc-section {
    margin-bottom: 1.5rem;
}

.doc-section h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: #2b6cb0;
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.25rem;
}

.doc-table th, .doc-table td {
    border: 1px solid #cbd5e0;
    padding: 0.7rem 0.8rem;
    font-size: 0.95rem;
    vertical-align: middle;
}

.doc-table th {
    background: #edf2f7;
    font-weight: 700;
    color: #1a202c;
}

.doc-totals-box {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    padding: 1.25rem;
    border-radius: 6px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    font-size: 0.95rem;
}

.main-total {
    font-size: 1.25rem;
    font-weight: 800;
    border-top: 1px solid #cbd5e0;
    padding-top: 0.5rem;
    margin-top: 0.25rem;
}

.account-box {
    background: #ebf8ff;
    border: 1px solid #90cdf4;
    padding: 1rem;
    border-radius: 6px;
    font-size: 1.1rem;
    color: #2c5282;
}

.doc-text-area {
    width: 100%;
    height: 180px;
    padding: 0.75rem;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #f8fafc;
    line-height: 1.6;
}

.doc-imgs-flex {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.doc-img-item img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #cbd5e0;
    cursor: pointer;
}

.print-controls-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin: 0 auto 1.5rem auto;
}

/* Modals & Overlays */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal-overlay.active {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.modal-content {
    background: #ffffff;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-lg {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.audit-summary-banner {
    padding: 1rem;
    border-radius: 6px;
    font-weight: 700;
    margin-bottom: 1rem;
}

.banner-pass {
    background: #f0fff4;
    color: #276749;
    border: 1px solid #9ae6b4;
}

.banner-fail {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.audit-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.audit-item-title {
    font-weight: 700;
    font-size: 0.9rem;
}

.audit-item-detail {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 2000;
}

.toast {
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    transition: opacity 0.4s ease;
}

.toast-info { background: #3182ce; }
.toast-success { background: #38a169; }
.toast-warning { background: #dd6b20; }
.toast-error { background: #e53e3e; }
.toast.fade-out { opacity: 0; }

.backup-warning-panel {
    background: #fffaf0;
    border: 1px solid #fbd38d;
}

.backup-alert-box {
    margin-bottom: 1.5rem;
    color: #7b341e;
}

.backup-actions-flex {
    display: flex;
    gap: 2rem;
}

.backup-item {
    flex: 1;
    background: #ffffff;
    padding: 1.25rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.backup-item h4 {
    margin-bottom: 0.5rem;
}

.backup-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.last-backup-badge {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Transmission Controls Panel 2-Row Clean Layout */
.print-controls-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.transmission-options-row {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    align-items: center;
}

.transmission-actions-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.transmission-actions-row .btn {
    height: 40px;
    padding: 0 1.1rem;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

/* Print Styles */
@media print {
    body {
        background: #ffffff;
        color: #000000;
    }
    .app-header, .app-nav, .print-controls-panel, #toast-container, .target-status-banner {
        display: none !important;
    }
    .app-container {
        padding: 0;
        max-width: 100%;
    }
    .transmission-document-card {
        border: none;
        box-shadow: none;
        padding: 0;
        width: 100%;
    }
    .doc-text-area {
        border: none;
        background: none;
        height: auto;
    }
}
