/* ========== Quick-Add Modal ========== */

.qa-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    align-items: flex-start;
    justify-content: center;
    padding-top: 18vh;
}
.qa-overlay.open { display: flex; }

.qa-dialog {
    width: 600px;
    max-width: 95vw;
    background: white;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.qa-header {
    padding: 1rem 1.25rem 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text, #0f172a);
}

.qa-input {
    width: 100%;
    border: none;
    outline: none;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    font-family: 'SF Mono', Menlo, monospace;
    color: var(--text, #0f172a);
    background: var(--surface, #f8fafc);
    border-top: 1px solid var(--border, #e2e8f0);
    border-bottom: 1px solid var(--border, #e2e8f0);
}
.qa-input::placeholder { color: var(--muted, #94a3b8); font-family: inherit; }

.qa-preview {
    padding: 0.75rem 1.25rem;
    min-height: 2.5rem;
    font-size: 0.85rem;
    color: var(--muted, #475569);
    line-height: 1.6;
}
.qa-preview strong { color: var(--text, #0f172a); }

.qa-chip {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: 'SF Mono', Menlo, monospace;
    font-weight: 500;
    vertical-align: baseline;
}
.qa-chip-slug  { background: #dbeafe; color: #1e40af; }
.qa-chip-kind  { background: #e0e7ff; color: #3730a3; }
.qa-chip-pri   { background: #fef3c7; color: #854d0e; }
.qa-chip-rp    { background: #dcfce7; color: #166534; }
.qa-chip-label { background: #f3e8ff; color: #6b21a8; }
.qa-chip-user  { background: #fce7f3; color: #9d174d; }
.qa-chip-wbs   { background: #e2e8f0; color: #334155; }
.qa-chip-date  { background: #e2e8f0; color: #334155; }
.qa-chip-est   { background: #e2e8f0; color: #334155; }

.qa-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border, #e2e8f0);
}
.qa-intake-toggle {
    font-size: 0.8rem;
    color: var(--muted, #64748b);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}
.qa-buttons {
    display: flex;
    gap: 0.5rem;
}
.btn-primary, .btn-secondary {
    padding: 0.45rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 100ms;
}
.btn-primary {
    background: var(--primary, #2563eb);
    color: white;
    border-color: var(--primary, #2563eb);
}
.btn-primary:hover { background: #1d4ed8; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary {
    background: white;
    color: var(--text, #0f172a);
    border-color: var(--border, #e2e8f0);
}
.btn-secondary:hover { background: var(--surface, #f8fafc); }

/* ========== Shared modal styles (for risk/gate modals) ========== */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    align-items: flex-start;
    justify-content: center;
    padding-top: 18vh;
}
.modal-overlay.open { display: flex; }

.modal-dialog {
    width: 500px;
    max-width: 95vw;
    background: white;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}
.modal-header {
    padding: 1rem 1.25rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border, #e2e8f0);
}
.modal-body {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.modal-body label {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.8rem;
    color: var(--muted, #64748b);
}
.modal-body input, .modal-body select, .modal-body textarea {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text, #0f172a);
}
.modal-body textarea { min-height: 80px; resize: vertical; }
.modal-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border, #e2e8f0);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}
