/* ============================================================
   Auth Modals – Login & Registration
   ============================================================ */

/* Backdrop + wrapper */
.kd-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 16px 24px;
    overflow-y: auto;
    background: rgba(0, 0, 0, .55);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
.kd-modal:not([hidden]) {
    opacity: 1;
    pointer-events: auto;
}
.kd-modal[hidden] { display: flex !important; } /* keep display:flex, only hide via opacity/pointer-events */

/* Dialog box */
.kd-modal__dialog {
    position: relative;
    background: #fff;
    border-radius: 0;
    width: 100%;
    max-width: 560px;
    padding: 36px 40px 32px;
    flex-shrink: 0;
    margin: auto 0;
    transform: translateY(-16px);
    transition: transform .22s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,.22);
}
.kd-modal:not([hidden]) .kd-modal__dialog {
    transform: translateY(0);
}

/* Close button */
.kd-modal__close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: #9ca3af;
    padding: 4px;
    transition: color .15s;
}
.kd-modal__close:hover { color: #374151; }

/* Title */
.kd-modal__title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .06em;
    margin: 0 0 14px;
    color: #111827;
}

.kd-modal__divider {
    border: 0;
    border-top: 2px solid #e5e7eb;
    margin: 0 -40px 24px;
}

/* Error banner */
.kd-modal__error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #991b1b;
    font-size: 14px;
    padding: 10px 14px;
    margin-bottom: 16px;
}
.kd-modal__error[hidden] { display: none; }

/* Switch link at bottom */
.kd-modal__switch {
    text-align: center;
    margin: 18px 0 0;
    font-size: 14px;
    color: #6b7280;
}
.kd-modal__switch a {
    color: var(--blue, #2563eb);
    font-weight: 600;
    text-decoration: none;
}
.kd-modal__switch a:hover { text-decoration: underline; }

/* ---- Role cards ---- */
.kd-role-label {
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 12px;
}

.kd-role-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.kd-role-card {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 14px;
    text-align: center;
    cursor: pointer;
    background: #fff;
    transition: border-color .15s, background .15s, color .15s;
    font-family: inherit;
}
.kd-role-card:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}
.kd-role-card.is-selected {
    background: #1b2a47;
    border-color: #1b2a47;
    color: #fff;
}

.kd-role-card__icon { font-size: 26px; margin-bottom: 8px; }
.kd-role-card__title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.kd-role-card__desc  { font-size: 12px; opacity: .72; }

/* ---- Form fields ---- */
.kd-field {
    margin-bottom: 14px;
}

.kd-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}
@media (max-width: 500px) {
    .kd-field-row { grid-template-columns: 1fr; }
    .kd-modal__dialog { padding: 28px 20px 24px; }
    .kd-modal__divider { margin-left: -20px; margin-right: -20px; }
}

.kd-hint {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 3px;
}

.kd-radio-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    line-height: 1.4;
}
.kd-radio-label input { flex-shrink: 0; margin-top: 2px; }
.kd-radio-label a { color: var(--blue, #2563eb); }

/* ---- Sector checklist ---- */
.kd-sector-checklist {
    max-height: 160px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.kd-sector-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    padding: 3px 2px;
    border-radius: 4px;
}
.kd-sector-check:hover { background: #f3f4f6; }
.kd-sector-check input { flex-shrink: 0; cursor: pointer; }

/* ---- CV dropzone ---- */
.kd-cv-dropzone {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: #f9fafb;
    transition: border-color .15s, background .15s;
    cursor: pointer;
}
.kd-cv-dropzone.is-over {
    border-color: #3b82f6;
    background: #eff6ff;
}
.kd-cv-dropzone__icon  { font-size: 28px; color: #9ca3af; margin-bottom: 6px; }
.kd-cv-dropzone__text  { font-size: 13px; color: #6b7280; margin-bottom: 6px; }
.kd-cv-dropzone__selected {
    font-size: 13px;
    font-weight: 600;
    color: #1d4ed8;
    margin-bottom: 6px;
}
.kd-cv-dropzone__selected[hidden] { display: none; }
.kd-cv-dropzone__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* small outline button variant for CV label */
.kd-btn--sm {
    padding: 6px 14px;
    font-size: 13px;
}
.kd-btn--outline {
    background: #fff;
    color: var(--blue, #2563eb);
    border: 2px solid var(--blue, #2563eb);
}
.kd-btn--outline:hover {
    background: #eff6ff;
}
