:root {
    --jd-sec-primary: #5b5cf0;
    --jd-sec-primary-dark: #4338ca;
    --jd-sec-secondary: #0ea5e9;
    --jd-sec-success: #10b981;
    --jd-sec-warning: #f59e0b;
    --jd-sec-danger: #ef4444;
    --jd-sec-pink: #ec4899;
    --jd-sec-purple: #8b5cf6;
    --jd-sec-slate-950: #0f172a;
    --jd-sec-slate-900: #172033;
    --jd-sec-slate-700: #334155;
    --jd-sec-slate-600: #475569;
    --jd-sec-slate-500: #64748b;
    --jd-sec-slate-300: #cbd5e1;
    --jd-sec-slate-200: #e2e8f0;
    --jd-sec-slate-100: #f1f5f9;
    --jd-sec-white: #ffffff;
    --jd-sec-radius: 18px;
    --jd-sec-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    --jd-sec-shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.jd-sec-page {
    padding: 1.35rem;
}

.jd-sec-hero {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background:
        radial-gradient(circle at 88% 18%, rgba(255,255,255,.24), transparent 21%),
        radial-gradient(circle at 15% 100%, rgba(14,165,233,.34), transparent 35%),
        linear-gradient(135deg, #172554 0%, #4338ca 48%, #7c3aed 100%);
    color: #fff;
    padding: 1.6rem 1.75rem;
    box-shadow: 0 22px 55px rgba(67, 56, 202, .24);
    margin-bottom: 1.25rem;
}

.jd-sec-hero::after {
    content: '';
    position: absolute;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    right: -80px;
    bottom: -125px;
    border: 35px solid rgba(255,255,255,.08);
}

.jd-sec-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .38rem .75rem;
    border: 1px solid rgba(255,255,255,.25);
    background: rgba(255,255,255,.11);
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: .8rem;
}

.jd-sec-hero h1 {
    font-size: clamp(1.55rem, 2.5vw, 2.25rem);
    font-weight: 800;
    margin: 0 0 .35rem;
    letter-spacing: -.025em;
}

.jd-sec-hero p {
    margin: 0;
    color: rgba(255,255,255,.8);
    max-width: 760px;
}

.jd-sec-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    align-items: center;
    justify-content: flex-end;
}

.jd-sec-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 42px;
    border-radius: 12px;
    border: 0;
    padding: .68rem 1rem;
    font-weight: 750;
    text-decoration: none;
    transition: all .2s ease;
    cursor: pointer;
}

.jd-sec-btn:hover { transform: translateY(-1px); }
.jd-sec-btn--light { background: #fff; color: #3730a3; box-shadow: 0 8px 20px rgba(15,23,42,.14); }
.jd-sec-btn--glass { background: rgba(255,255,255,.13); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.jd-sec-btn--primary { background: linear-gradient(135deg, var(--jd-sec-primary), var(--jd-sec-purple)); color: #fff; }
.jd-sec-btn--success { background: linear-gradient(135deg, #059669, #10b981); color: #fff; }
.jd-sec-btn--danger { background: linear-gradient(135deg, #dc2626, #f43f5e); color: #fff; }
.jd-sec-btn--warning { background: linear-gradient(135deg, #d97706, #f59e0b); color: #fff; }
.jd-sec-btn--secondary { background: #eef2ff; color: #4338ca; }
.jd-sec-btn--muted { background: #f1f5f9; color: #334155; }
.jd-sec-btn--sm { min-height: 34px; border-radius: 10px; padding: .42rem .72rem; font-size: .82rem; }

.jd-sec-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.jd-sec-stat {
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--jd-sec-radius);
    padding: 1.1rem 1.15rem;
    box-shadow: var(--jd-sec-shadow-sm);
}

.jd-sec-stat::after {
    content: '';
    position: absolute;
    width: 90px;
    height: 90px;
    right: -30px;
    top: -35px;
    border-radius: 50%;
    background: var(--stat-soft, #eef2ff);
}

.jd-sec-stat__icon {
    position: relative;
    z-index: 1;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--stat-color, #4f46e5);
    background: var(--stat-soft, #eef2ff);
    font-size: 1.15rem;
    margin-bottom: .75rem;
}

.jd-sec-stat__value {
    font-size: 1.75rem;
    font-weight: 850;
    color: var(--jd-sec-slate-950);
    line-height: 1;
}

.jd-sec-stat__label {
    margin-top: .42rem;
    color: var(--jd-sec-slate-500);
    font-size: .83rem;
    font-weight: 700;
}

.jd-sec-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--jd-sec-radius);
    box-shadow: var(--jd-sec-shadow-sm);
    overflow: hidden;
    margin-bottom: 1.1rem;
}

.jd-sec-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #edf1f6;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.jd-sec-card__title {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin: 0;
    color: var(--jd-sec-slate-900);
    font-weight: 800;
    font-size: 1rem;
}

.jd-sec-card__title i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #eef2ff;
    color: #4f46e5;
}

.jd-sec-card__body { padding: 1.2rem; }
.jd-sec-card__body--flush { padding: 0; }

.jd-sec-filter {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(140px, 1fr)) auto;
    gap: .75rem;
    align-items: end;
}

.jd-sec-label {
    display: block;
    margin-bottom: .4rem;
    font-size: .76rem;
    color: #475569;
    font-weight: 800;
    letter-spacing: .02em;
}

.jd-sec-input,
.jd-sec-select,
.jd-sec-textarea {
    width: 100%;
    min-height: 43px;
    border: 1px solid #dbe2ea;
    border-radius: 12px;
    padding: .68rem .78rem;
    color: #172033;
    background: #fff;
    outline: 0;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.jd-sec-textarea { min-height: 105px; resize: vertical; }
.jd-sec-input:focus,
.jd-sec-select:focus,
.jd-sec-textarea:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 4px rgba(99,102,241,.12);
}

.jd-sec-input.is-invalid,
.jd-sec-select.is-invalid,
.jd-sec-textarea.is-invalid { border-color: #ef4444; }
.jd-sec-error { color: #dc2626; font-size: .78rem; margin-top: .35rem; font-weight: 650; }
.jd-sec-help { color: #64748b; font-size: .78rem; margin-top: .35rem; }

.jd-sec-table-wrap { overflow-x: auto; }
.jd-sec-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 960px; }
.jd-sec-table th {
    padding: .82rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    color: #475569;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    font-weight: 850;
    white-space: nowrap;
}
.jd-sec-table td {
    padding: .9rem 1rem;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
    color: #334155;
    font-size: .88rem;
}
.jd-sec-table tbody tr:hover { background: #fafbff; }
.jd-sec-table tbody tr:last-child td { border-bottom: 0; }

.jd-sec-user {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.jd-sec-avatar {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #4f46e5, #8b5cf6);
    color: #fff;
    font-size: .82rem;
    font-weight: 850;
    box-shadow: 0 8px 18px rgba(79,70,229,.22);
}
.jd-sec-avatar--lg { width: 68px; height: 68px; border-radius: 20px; font-size: 1.15rem; }

.jd-sec-user__name { color: #172033; font-weight: 800; line-height: 1.15; }
.jd-sec-user__meta { color: #64748b; font-size: .78rem; margin-top: .2rem; }

.jd-sec-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .34rem .62rem;
    border-radius: 999px;
    font-size: .72rem;
    line-height: 1;
    font-weight: 800;
    white-space: nowrap;
}
.jd-sec-badge--success { background: #dcfce7; color: #047857; }
.jd-sec-badge--danger { background: #fee2e2; color: #b91c1c; }
.jd-sec-badge--warning { background: #fef3c7; color: #b45309; }
.jd-sec-badge--info { background: #e0f2fe; color: #0369a1; }
.jd-sec-badge--purple { background: #ede9fe; color: #6d28d9; }
.jd-sec-badge--slate { background: #f1f5f9; color: #475569; }
.jd-sec-badge--pink { background: #fce7f3; color: #be185d; }
.jd-sec-badge--indigo { background: #e0e7ff; color: #4338ca; }
.jd-sec-badge--blue { background: #dbeafe; color: #1d4ed8; }
.jd-sec-badge--cyan { background: #cffafe; color: #0e7490; }
.jd-sec-badge--green { background: #dcfce7; color: #047857; }
.jd-sec-badge--amber { background: #fef3c7; color: #b45309; }
.jd-sec-badge--orange { background: #ffedd5; color: #c2410c; }
.jd-sec-badge--gray { background: #f3f4f6; color: #4b5563; }
.jd-sec-badge--red { background: #fee2e2; color: #b91c1c; }

.jd-sec-actions { display: flex; align-items: center; justify-content: flex-end; gap: .4rem; flex-wrap: wrap; }

.jd-sec-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.jd-sec-form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.jd-sec-col-span-2 { grid-column: span 2; }
.jd-sec-col-span-3 { grid-column: span 3; }

.jd-sec-section-title {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin: 0 0 1rem;
    color: #172033;
    font-size: .95rem;
    font-weight: 850;
}
.jd-sec-section-title i { color: #4f46e5; }

.jd-sec-switch {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .85rem;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    background: #f8fafc;
}
.jd-sec-switch input { margin-top: .18rem; width: 18px; height: 18px; accent-color: #4f46e5; }
.jd-sec-switch strong { display: block; color: #1e293b; font-size: .85rem; }
.jd-sec-switch span { display: block; color: #64748b; font-size: .76rem; margin-top: .2rem; }

/* Administrator role cards ---------------------------------------------- */
.jd-sec-role-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
    align-items: stretch;
}

.jd-sec-role-option {
    position: relative;
    display: block;
    min-width: 0;
    height: 100%;
    margin: 0;
}

.jd-sec-role-option > input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    clip-path: inset(50%);
}

.jd-sec-role-option__card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    min-height: 154px;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid #dfe6ef;
    border-radius: 16px;
    padding: 1rem;
    background: linear-gradient(145deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 7px 20px rgba(15, 23, 42, .055);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
    cursor: pointer;
}

.jd-sec-role-option__card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--jd-role-accent, #6366f1);
    opacity: .72;
}

.jd-sec-role-option__card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--jd-role-accent, #6366f1) 45%, #dfe6ef);
    box-shadow: 0 13px 28px rgba(15, 23, 42, .1);
}

.jd-sec-role-option__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .78rem;
}

.jd-sec-role-option__icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--jd-role-accent, #4f46e5);
    background: var(--jd-role-soft, #eef2ff);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--jd-role-accent, #4f46e5) 16%, transparent);
}

.jd-sec-role-option__check {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid #d8e0ea;
    border-radius: 9px;
    color: transparent;
    background: #fff;
    font-size: .72rem;
    transition: all .2s ease;
}

.jd-sec-role-option__title {
    display: block;
    min-width: 0;
    color: #172033;
    font-size: .9rem;
    line-height: 1.25;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.jd-sec-role-option__desc {
    display: block;
    min-width: 0;
    color: #64748b;
    font-size: .76rem;
    line-height: 1.55;
    margin-top: .38rem;
    overflow-wrap: anywhere;
}

.jd-sec-role-option__meta {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-top: auto;
    padding-top: .8rem;
    color: #94a3b8;
    font-size: .68rem;
    font-weight: 750;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.jd-sec-role-option > input:focus-visible + .jd-sec-role-option__card {
    outline: 3px solid rgba(99, 102, 241, .22);
    outline-offset: 2px;
}

.jd-sec-role-option > input:checked + .jd-sec-role-option__card {
    border-color: var(--jd-role-accent, #6366f1);
    background: linear-gradient(145deg, var(--jd-role-soft, #f5f3ff) 0%, #ffffff 80%);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--jd-role-accent, #6366f1) 13%, transparent),
                0 14px 30px rgba(15, 23, 42, .1);
}

.jd-sec-role-option > input:checked + .jd-sec-role-option__card .jd-sec-role-option__check {
    border-color: var(--jd-role-accent, #6366f1);
    color: #fff;
    background: var(--jd-role-accent, #6366f1);
    box-shadow: 0 6px 13px color-mix(in srgb, var(--jd-role-accent, #6366f1) 28%, transparent);
}

.jd-sec-permission-module {
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: .85rem;
}
.jd-sec-permission-module__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .82rem 1rem;
    background: linear-gradient(90deg, #f8fafc, #eef2ff);
    border-bottom: 1px solid #e2e8f0;
}
.jd-sec-permission-module__header strong { color: #312e81; font-size: .88rem; }
.jd-sec-permission-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.jd-sec-permission-item {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .78rem 1rem;
    border-bottom: 1px solid #eef2f7;
}
.jd-sec-permission-item:nth-child(odd) { border-right: 1px solid #eef2f7; }
.jd-sec-permission-item input { width: 17px; height: 17px; accent-color: #4f46e5; margin-top: .18rem; }
.jd-sec-permission-item__name { font-size: .82rem; font-weight: 800; color: #1e293b; }
.jd-sec-permission-item__desc { font-size: .72rem; color: #64748b; margin-top: .2rem; }

.jd-sec-override-select {
    min-width: 105px;
    border-radius: 9px;
    border: 1px solid #dbe2ea;
    font-size: .75rem;
    padding: .35rem .45rem;
}

.jd-sec-tabs {
    display: flex;
    gap: .4rem;
    overflow-x: auto;
    padding: .35rem;
    background: #f1f5f9;
    border-radius: 14px;
    margin-bottom: 1rem;
}
.jd-sec-tabs a {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .58rem .8rem;
    border-radius: 10px;
    text-decoration: none;
    color: #475569;
    white-space: nowrap;
    font-weight: 750;
    font-size: .82rem;
}
.jd-sec-tabs a.active { background: #fff; color: #4338ca; box-shadow: 0 4px 13px rgba(15,23,42,.08); }

.jd-sec-alert {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    border-radius: 13px;
    padding: .85rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}
.jd-sec-alert i { margin-top: .15rem; }
.jd-sec-alert--success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.jd-sec-alert--danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.jd-sec-alert--warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.jd-sec-alert--info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }

.jd-sec-timeline { position: relative; padding-left: 1.5rem; }
.jd-sec-timeline::before { content: ''; position: absolute; left: .45rem; top: .4rem; bottom: .4rem; width: 2px; background: #e2e8f0; }
.jd-sec-timeline__item { position: relative; padding: 0 0 1rem 1rem; }
.jd-sec-timeline__item::before { content: ''; position: absolute; left: -1.38rem; top: .25rem; width: 12px; height: 12px; border-radius: 50%; background: #6366f1; border: 3px solid #eef2ff; }
.jd-sec-timeline__title { font-weight: 800; color: #1e293b; font-size: .84rem; }
.jd-sec-timeline__meta { color: #64748b; font-size: .73rem; margin-top: .2rem; }

.jd-sec-empty { text-align: center; padding: 3rem 1rem; color: #64748b; }
.jd-sec-empty i { display: block; font-size: 2.2rem; color: #cbd5e1; margin-bottom: .75rem; }
.jd-sec-empty strong { display: block; color: #334155; margin-bottom: .25rem; }

.jd-sec-code {
    display: block;
    width: 100%;
    padding: .8rem;
    border-radius: 12px;
    background: #0f172a;
    color: #c4b5fd;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .78rem;
    word-break: break-all;
}

.jd-sec-recovery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
}
.jd-sec-recovery-code {
    padding: .65rem .75rem;
    text-align: center;
    background: #f8fafc;
    border: 1px dashed #94a3b8;
    border-radius: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 800;
    letter-spacing: .08em;
}

.jd-sec-pagination { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; border-top: 1px solid #eef2f7; color: #64748b; font-size: .8rem; }
.jd-sec-pagination nav { margin-left: auto; }

.jd-sec-login {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr);
    background: #f8fafc;
}
.jd-sec-login__visual {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(2rem, 5vw, 5rem);
    color: #fff;
    background:
        radial-gradient(circle at 85% 20%, rgba(56,189,248,.35), transparent 24%),
        radial-gradient(circle at 20% 85%, rgba(236,72,153,.28), transparent 30%),
        linear-gradient(145deg, #0f172a 0%, #312e81 48%, #6d28d9 100%);
}
.jd-sec-login__visual::before,
.jd-sec-login__visual::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.12);
}
.jd-sec-login__visual::before { width: 420px; height: 420px; right: -180px; top: -100px; }
.jd-sec-login__visual::after { width: 260px; height: 260px; left: -100px; bottom: -90px; }
.jd-sec-login__brand { position: relative; z-index: 1; display: flex; align-items: center; gap: .75rem; font-weight: 850; font-size: 1.05rem; }
.jd-sec-login__logo { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.2); font-size: 1.2rem; }
.jd-sec-login__copy { position: relative; z-index: 1; max-width: 650px; }
.jd-sec-login__copy h1 { font-size: clamp(2.2rem, 5vw, 4.6rem); line-height: 1.02; letter-spacing: -.05em; font-weight: 900; margin: 0 0 1.2rem; }
.jd-sec-login__copy p { color: rgba(255,255,255,.76); max-width: 560px; font-size: 1rem; }
.jd-sec-login__features { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .75rem; margin-top: 2rem; }
.jd-sec-login__feature { border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.08); backdrop-filter: blur(8px); border-radius: 14px; padding: .85rem; }
.jd-sec-login__feature i { color: #7dd3fc; margin-bottom: .55rem; }
.jd-sec-login__feature strong { display: block; font-size: .82rem; }
.jd-sec-login__feature span { display: block; color: rgba(255,255,255,.6); font-size: .7rem; margin-top: .2rem; }
.jd-sec-login__panel { display: grid; place-items: center; padding: 2rem; background: linear-gradient(145deg, #fff, #f8fafc); }
.jd-sec-login__card { width: 100%; max-width: 460px; }
.jd-sec-login__eyebrow { display: inline-flex; align-items: center; gap: .45rem; color: #4f46e5; font-size: .76rem; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .65rem; }
.jd-sec-login__card h2 { margin: 0 0 .45rem; color: #0f172a; font-size: 2rem; font-weight: 900; letter-spacing: -.03em; }
.jd-sec-login__card > p { color: #64748b; margin-bottom: 1.5rem; }
.jd-sec-login__field { position: relative; margin-bottom: .95rem; }
.jd-sec-login__field i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: #64748b; }
.jd-sec-login__field input { width: 100%; min-height: 52px; border-radius: 14px; border: 1px solid #dbe2ea; padding: .8rem 2.9rem .8rem 2.75rem; outline: 0; transition: all .2s ease; }
.jd-sec-login__field input:focus { border-color: #6366f1; box-shadow: 0 0 0 4px rgba(99,102,241,.11); }
.jd-sec-login__toggle { position: absolute; right: .75rem; left: auto !important; cursor: pointer; }
.jd-sec-login__submit { width: 100%; min-height: 52px; border: 0; border-radius: 14px; background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; font-weight: 850; box-shadow: 0 14px 26px rgba(79,70,229,.22); transition: all .2s ease; }
.jd-sec-login__submit:hover { transform: translateY(-1px); box-shadow: 0 18px 30px rgba(79,70,229,.28); }
.jd-sec-login__footer { margin-top: 1.2rem; text-align: center; color: #64748b; font-size: .78rem; }
.jd-sec-login__footer a { color: #4f46e5; font-weight: 800; text-decoration: none; }

.jd-sec-profile-summary {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
}
.jd-sec-profile-summary h2 { margin: 0; font-size: 1.2rem; font-weight: 850; color: #172033; }
.jd-sec-profile-summary p { margin: .25rem 0 0; color: #64748b; font-size: .82rem; }

.jd-sec-detail-list { display: grid; gap: .75rem; }
.jd-sec-detail-row { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .75rem; border-bottom: 1px solid #eef2f7; }
.jd-sec-detail-row:last-child { border-bottom: 0; padding-bottom: 0; }
.jd-sec-detail-row span:first-child { color: #64748b; font-size: .8rem; }
.jd-sec-detail-row span:last-child { color: #1e293b; font-weight: 750; text-align: right; }

@media (max-width: 1199px) {
    .jd-sec-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .jd-sec-filter { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .jd-sec-role-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .jd-sec-form-grid--3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .jd-sec-col-span-3 { grid-column: span 2; }
}

@media (max-width: 991px) {
    .jd-sec-login { grid-template-columns: 1fr; }
    .jd-sec-login__visual { min-height: 390px; padding: 2rem; }
    .jd-sec-login__copy h1 { font-size: 2.7rem; }
    .jd-sec-login__panel { padding: 2rem 1rem; }
}

@media (max-width: 767px) {
    .jd-sec-page { padding: .85rem; }
    .jd-sec-hero { padding: 1.2rem; border-radius: 18px; }
    .jd-sec-hero__actions { justify-content: flex-start; margin-top: 1rem; }
    .jd-sec-stats { grid-template-columns: 1fr; }
    .jd-sec-filter,
    .jd-sec-form-grid,
    .jd-sec-form-grid--3,
    .jd-sec-role-grid,
    .jd-sec-permission-grid { grid-template-columns: 1fr; }
    .jd-sec-col-span-2,
    .jd-sec-col-span-3 { grid-column: span 1; }
    .jd-sec-permission-item:nth-child(odd) { border-right: 0; }
    .jd-sec-card__header { align-items: flex-start; flex-direction: column; }
    .jd-sec-profile-summary { grid-template-columns: auto 1fr; }
    .jd-sec-profile-summary > :last-child { grid-column: 1 / -1; }
    .jd-sec-login__features { grid-template-columns: 1fr; }
    .jd-sec-login__visual { min-height: 460px; }
}


@media (max-width: 560px) {
    .jd-sec-role-grid { grid-template-columns: 1fr; }
    .jd-sec-role-option__card { min-height: 138px; }
}

/* Header and account menu -------------------------------------------------- */
.jd-security-topbar {
    border-bottom: 1px solid rgba(148, 163, 184, .18);
    box-shadow: 0 8px 28px rgba(15, 23, 42, .06);
}
.jd-security-topbar__pill {
    display: inline-flex !important;
    align-items: center;
    gap: .45rem;
    margin-right: .3rem;
    padding: .44rem .75rem !important;
    border-radius: 999px;
    color: #475569 !important;
    font-size: .78rem;
    font-weight: 800;
    background: #f1f5f9;
    transition: all .2s ease;
}
.jd-security-topbar__pill:hover,
.jd-security-topbar__pill.active {
    color: #4338ca !important;
    background: #eef2ff;
    box-shadow: inset 0 0 0 1px #c7d2fe;
}
.jd-security-user-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: .65rem;
    padding-top: .35rem !important;
    padding-bottom: .35rem !important;
}
.jd-security-user-toggle strong,
.jd-security-user-toggle small { display: block; line-height: 1.15; }
.jd-security-user-toggle strong { color: #172033; font-size: .8rem; }
.jd-security-user-toggle small { max-width: 180px; margin-top: .15rem; overflow: hidden; color: #64748b; font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
.jd-security-avatar {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    border-radius: 16px;
    color: #fff;
    font-weight: 900;
    letter-spacing: -.02em;
    background: linear-gradient(135deg, #4f46e5, #7c3aed 58%, #db2777);
    box-shadow: 0 9px 20px rgba(79, 70, 229, .25);
}
.jd-security-avatar--small { width: 38px; height: 38px; font-size: .72rem; }
.jd-security-avatar--large { width: 64px; height: 64px; border-radius: 20px; font-size: 1rem; }
.jd-security-user-menu {
    overflow: hidden;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .18);
}
.jd-security-user-menu__header {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1.1rem;
    color: #fff;
    background: linear-gradient(135deg, #111827, #312e81 55%, #6d28d9);
}
.jd-security-user-menu__header strong,
.jd-security-user-menu__header span,
.jd-security-user-menu__header small { display: block; }
.jd-security-user-menu__header strong { font-size: .95rem; }
.jd-security-user-menu__header span { margin-top: .18rem; color: rgba(255,255,255,.72); font-size: .72rem; }
.jd-security-user-menu__header small { margin-top: .42rem; color: rgba(255,255,255,.82); font-size: .68rem; }
.jd-security-user-menu__header small i { margin-right: .3rem; font-size: .5rem; }
.jd-security-user-menu__links { display: grid; gap: .2rem; padding: .65rem; background: #fff; }
.jd-security-user-menu__links a {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .72rem .78rem;
    border-radius: 11px;
    color: #334155;
    font-size: .78rem;
    font-weight: 750;
    text-decoration: none;
    transition: all .18s ease;
}
.jd-security-user-menu__links a i { width: 18px; color: #6366f1; text-align: center; }
.jd-security-user-menu__links a:hover { color: #4338ca; background: #eef2ff; transform: translateX(2px); }
.jd-security-user-menu__footer { padding: .75rem; border-top: 1px solid #e2e8f0; background: #f8fafc; }

@media (max-width: 575px) {
    .jd-security-user-menu { width: min(94vw, 360px); }
}
