:root {
   --bg: #ffffff;
   --muted: #6b7280;
   --accent: #2563eb;
   --danger: #dc2626;
   --radius: 8px;
   --modal-width: 520px;
}


.button {
   background: var(--accent);
   color: white;
   padding: .6rem 1rem;
   border-radius: 6px;
   border: 0;
   cursor: pointer;
   font-weight: 600;
}

.btn:active {
   transform: translateY(1px)
}

.overlay {
   position: fixed;
   inset: 0;
   background: rgba(15, 23, 42, 0.5);
   display: none;
   align-items: center;
   justify-content: center;
   z-index: 1000;
   padding: 1.5rem;
   backdrop-filter: blur(2px);
}

.overlay.show {
   display: flex;
}

.modal {
   position: relative;
   width: 100%;
   max-width: var(--modal-width);
   background: var(--bg);
   border-radius: var(--radius);
   color: #111827;
   font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
   box-shadow: 0 10px 30px rgba(2, 6, 23, 0.2);
   line-height: 1.4;
   padding: 1rem;
   margin: 0;
}

.modal-header {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 0.75rem;
   margin-bottom: .5rem;
}

.modal-title {
   font-weight: 700;
   font-size: 1.05rem;
}

.close-btn {
   background: transparent;
   border: 0;
   font-size: 1.25rem;
   line-height: 1;
   cursor: pointer;
   color: var(--muted);
}

form .row {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: .6rem;
   margin-bottom: .6rem;
}

form .col {
   display: flex;
   flex-direction: column;
}

label {
   font-size: 0.85rem;
   color: var(--muted);
   margin-bottom: 0.35rem;
}

input,
select {
   font-size: 0.95rem;
   background: #f8f8f8;
   border: 1px solid #e6e9ee;
   /* box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05); */
   padding: .5rem .6rem;
   border-radius: 6px;
}

input:focus,
select:focus {
   outline: 2px solid rgba(37, 99, 235, 0.15);
   border-color: rgba(37, 99, 235, 0.25);
}

.full {
   grid-column: 1 / -1;
}

.help {
   font-size: 0.82rem;
   color: var(--muted);
   margin-top: .25rem;
}

.error {
   border-color: var(--danger) !important;
   box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.06);
}

.error-msg {
   color: var(--danger);
   font-size: 0.82rem;
   margin-top: 0.25rem;
   display: none;
}

.error-msg.show {
   display: block;
}

.actions {
   display: flex;
   gap: .5rem;
   justify-content: flex-end;
   margin-top: .5rem;
}

.secondary {
   background: #f3f4f6;
   color: #0f172a;
   border: 0;
   padding: .5rem .9rem;
   border-radius: 6px;
   cursor: pointer;
}

/* small screens */
@media (max-width:560px) {
   .modal {
      padding: .8rem;
   }

   form .row {
      grid-template-columns: 1fr;
   }
}