
.tab-btn{padding:8px 14px;border:1.5px solid var(--tool-border);border-radius:8px;background:#fff;cursor:pointer;font-size:12px;transition:all .15s;}
.tab-btn.active{border-color:var(--tool-primary);background:#eff6ff;color:var(--tool-primary);font-weight:600;}
.tab-btn:hover{border-color:var(--tool-primary);}
.tip-preset{padding:6px 12px;border:1.5px solid #e2e8f0;border-radius:6px;background:#fff;cursor:pointer;font-size:13px;transition:all .15s;}
.tip-preset.active{border-color:var(--tool-primary);background:#eff6ff;font-weight:600;}

/* ── Modal, A4 & toast (v2.63) ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 18, 0.68);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal-dialog {
    background: var(--psg-card);
    border: 1px solid var(--psg-border-strong);
    border-radius: 16px;
    max-width: 760px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 40px rgba(0,0,0,0.16);
    overflow: hidden;
}
.modal-head {
    padding: 1rem 1.25rem;
    background: var(--psg-surface);
    border-bottom: 1px solid var(--psg-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-body {
    padding: 1.25rem;
    overflow-y: auto;
}
.modal-foot {
    padding: 0.85rem 1.25rem;
    background: var(--psg-surface);
    border-top: 1px solid var(--psg-border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
}

.a4-paper {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 2rem;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.a4-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2.5px solid #1a3c34;
    padding-bottom: 0.85rem;
    margin-bottom: 1.25rem;
}
.a4-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    margin-bottom: 1.25rem;
}
.a4-table th, .a4-table td {
    border: 1px solid #cbd5e1;
    padding: 0.55rem 0.75rem;
    text-align: left;
}
.a4-table th {
    background: #f1f5f9;
    font-weight: 700;
    color: #0f172a;
}

.toast-container {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.toast-msg {
    background: var(--psg-primary);
    color: #ffffff;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideUp 0.2s ease;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

