/* The parent dialog and its iframe require separately scoped styles. */
.inv-create-modal-overlay { background: rgba(0,0,0,.6); backdrop-filter: blur(5px); font-family: Inter,system-ui,-apple-system,sans-serif; }
.inv-create-modal-overlay .inv-create-modal-container {
    width: 95%; max-width: 1200px; height: 90vh; max-height: 90vh;
    background: linear-gradient(to bottom right,#ffffff,#f8f9fa);
    border-radius: 0; border: 1px solid rgba(255,255,255,.2);
    box-shadow: 0 10px 30px rgba(0,0,0,.15),0 0 0 1px rgba(0,0,0,.05);
    position: relative; overflow: hidden; display: flex; flex-direction: column;
}
.inv-create-modal-overlay.show .inv-create-modal-container { animation: invFleetSlide .25s ease-out; }
@keyframes invFleetSlide { from { transform: translateY(15px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.inv-create-modal-overlay .inv-create-modal-header {
    padding: 1.5rem 2rem; background: rgba(255,255,255,.95);
    border-bottom: 1px solid rgba(0,0,0,.08); box-shadow: 0 2px 15px rgba(0,0,0,.03);
    flex-shrink: 0; gap: 10px;
}
.inv-create-modal-overlay .inv-create-modal-header h3 { font-size: 1.1rem; font-weight: 600; color: #1a1a1a; margin: 0; position: relative; }
.inv-create-modal-overlay .inv-create-modal-header h3::after { content: ''; position: absolute; bottom: -8px; left: 0; width: 40px; height: 3px; background: #3b82f6; border-radius: 2px; }
.inv-create-modal-overlay .inv-create-modal-close {
    background: none; border: none; font-size: 1.5rem; color: #666;
    width: 36px; height: 36px; border-radius: 50%; padding: 0;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .2s ease;
}
.inv-create-modal-overlay .inv-create-modal-close:hover { background: #f0f0f0; color: #333; transform: rotate(90deg); }
.inv-create-modal-overlay .inv-create-modal-iframe { flex: 1 1 0; min-height: 0; width: 100%; border: none; background: transparent; }
.inv-modal-cancel { display: none; }
body.in-iframe { background: transparent; }
body.in-iframe .main-content { padding: 0 !important; height: 100%; min-height: 0; }
body.in-iframe .content { height: 100%; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
body.in-iframe .content > .tab-content { padding: 1.25rem 1.5rem; min-height: 0; scrollbar-width: thin; scrollbar-color: #ddd transparent; }
body.in-iframe .content > .tab-content::-webkit-scrollbar { width: 6px; }
body.in-iframe .content > .tab-content::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }
body.in-iframe .form-section { padding: 10px; border: 1px solid #e0e0e0; border-radius: 8px; margin-bottom: 12px; background: #fff; }
body.in-iframe .form-grid { gap: 12px; }
body.in-iframe .content .form-group label { font-size: .75rem !important; color: #334155; font-weight: 600; }
body.in-iframe .content .form-group input,
body.in-iframe .content .form-group select,
body.in-iframe .content .form-group textarea { padding: 8px 10px; border: 1px solid #dfe3e8; border-radius: 6px; font-size: .85rem !important; color: #333; }
body.in-iframe .form-group input:focus,
body.in-iframe .form-group select:focus,
body.in-iframe .form-group textarea:focus { outline: none; border-color: #80bdff; box-shadow: 0 0 0 2px rgba(0,123,255,.15); }
body.in-iframe .content > .button-group {
    padding: 1rem 1.5rem; border-top: 1px solid rgba(0,0,0,.08); gap: .85rem;
    display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end;
    background: #fff; flex-shrink: 0; position: relative;
    box-shadow: 0 -2px 15px rgba(0,0,0,.03); margin-top: 0;
}
body.in-iframe .content > .button-group .btn { width: 36px; height: 36px; padding: 0; justify-content: center; gap: 0; flex-shrink: 0; border: none; border-radius: 6px; font-size: .7rem !important; font-weight: 600; }
body.in-iframe .content > .button-group .btn:focus-visible { outline: 3px solid #38bdf8; outline-offset: 2px; }
body.in-iframe .content > .button-group .btn * { font-size: inherit !important; }
body.in-iframe .button-group .inv-modal-cancel { display: inline-flex; background: #3498db; color: #fff; }
body.in-iframe .button-group .btn-primary { background: #2c3e50; color: #fff; }
body.in-iframe .button-group .btn-outline, body.in-iframe .button-group .btn-success { background: #efefef; color: #333; }
@media screen and (max-width: 600px) {
    .inv-create-modal-overlay .inv-create-modal-header { padding: 1rem; }
    body.in-iframe .content > .tab-content { padding: 1rem; }
    body.in-iframe .content > .button-group { padding: .75rem 1rem; gap: .5rem; }
}
@media (prefers-reduced-motion: reduce) { .inv-create-modal-overlay.show .inv-create-modal-container { animation: none; } }