:root{
    --navy:#10243c;
    --navy-2:#183451;
    --accent:#0ea8b8;
    --accent-dark:#0b8e9b;
    --accent-soft:#e9f9fb;
    --bg:#f2f5f8;
    --card:#ffffff;
    --text:#18314a;
    --muted:#6b7f93;
    --line:#dbe5ec;
    --line-strong:#c7d6e2;
    --success:#15803d;
    --success-bg:#eaf8ef;
    --warning:#b7791f;
    --warning-bg:#fff7e8;
    --danger:#c74444;
    --danger-dark:#ad3434;
    --danger-bg:#fdecec;
    --shadow:0 8px 24px rgba(15,35,55,.06);
    --shadow-lg:0 20px 54px rgba(13,33,52,.18);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
    font-family:Inter,Segoe UI,Arial,sans-serif;
    background:var(--bg);
    color:var(--text);
}
body.dk-modal-open,
body.dk-is-busy{overflow:hidden}
a{color:inherit}
.dk-shell{min-height:100vh}

.dk-topbar{
    background:var(--navy);
    color:#fff;
    box-shadow:0 2px 10px rgba(0,0,0,.12);
}
.dk-topbar-inner{
    max-width:1320px;
    margin:0 auto;
    min-height:72px;
    padding:0 24px;
    display:grid;
    grid-template-columns:auto 1fr auto;
    align-items:center;
    gap:18px;
}
.dk-brand a{
    color:#fff;
    text-decoration:none;
    font-size:22px;
    font-weight:800;
    letter-spacing:.2px;
}
.dk-brand span{color:#73dae2}

.dk-nav{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    flex-wrap:wrap;
}
.dk-nav a{
    color:#d9e5ef;
    text-decoration:none;
    font-size:13px;
    font-weight:700;
    line-height:1;
    padding:10px 14px;
    border-radius:999px;
    transition:background-color .15s ease,color .15s ease, transform .15s ease;
}
.dk-nav a:hover,
.dk-nav a.active{
    color:#fff;
    background:rgba(255,255,255,.10);
}
.dk-nav a:hover{transform:translateY(-1px)}

.dk-userbox{
    display:flex;
    align-items:center;
    gap:12px;
    justify-content:flex-end;
}
.dk-user-name{
    color:#d9e5ef;
    font-size:13px;
    font-weight:600;
    white-space:nowrap;
}

.dk-main{
    max-width:1080px;
    margin:0 auto;
    padding:30px 24px 56px;
}
.dk-page-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    margin:0 0 20px;
    flex-wrap:wrap;
}
.dk-page-head-meta{display:flex;flex-direction:column;gap:6px}
.dk-title{
    margin:0;
    font-size:26px;
    line-height:1.15;
}
.dk-subtitle{
    margin:0;
    color:var(--muted);
    font-size:14px;
    line-height:1.5;
}
.dk-breadcrumb-link{
    text-decoration:none;
    font-weight:700;
    color:#36597c;
}
.dk-breadcrumb-link:hover{color:#1f425f}

.dk-grid{
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:14px;
    margin-bottom:22px;
}
.dk-grid.two{
    grid-template-columns:repeat(2,minmax(0,1fr));
}

.dk-card,
.dk-panel{
    background:var(--card);
    border:1px solid var(--line);
    border-radius:16px;
    box-shadow:var(--shadow);
}
.dk-card{
    padding:18px;
}
.dk-kpi-label{
    color:var(--muted);
    font-size:12px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.35px;
}
.dk-kpi-value{
    font-size:34px;
    line-height:1;
    margin-top:10px;
    font-weight:800;
}

.dk-panel{
    overflow:hidden;
    margin-bottom:20px;
}
.dk-panel-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:18px 20px;
    border-bottom:1px solid var(--line);
    background:#fff;
}
.dk-panel-head h2{
    margin:0;
    font-size:18px;
    line-height:1.2;
}
.dk-panel-body{padding:20px}
.dk-table-wrap{overflow:auto}

.dk-table-wrap table,
table{
    width:100%;
    border-collapse:collapse;
    min-width:780px;
}
th,td{
    text-align:left;
    padding:14px 16px;
    border-bottom:1px solid #edf2f6;
    vertical-align:top;
    font-size:13px;
}
thead th{
    background:#fbfcfd;
    color:var(--muted);
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:.4px;
    font-weight:800;
}
tbody tr:hover{background:#fbfdff}
tbody tr:last-child td{border-bottom:0}

.dk-form-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px 18px;
}
.dk-inline-form{
    display:flex;
    gap:12px;
    align-items:flex-end;
    flex-wrap:wrap;
}
.dk-inline-form .dk-field{min-width:220px;flex:1}
.dk-field{min-width:0}
.dk-field.full{grid-column:1/-1}
label{
    display:block;
    margin:0 0 8px;
    font-size:12px;
    font-weight:800;
    color:#27435f;
}
input,select,textarea{
    width:100%;
    border:1px solid #ccd8e2;
    border-radius:12px;
    padding:12px 13px;
    font:inherit;
    outline:none;
    background:#fff;
    color:var(--text);
    transition:border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
input:focus,select:focus,textarea:focus{
    border-color:var(--accent);
    box-shadow:0 0 0 4px rgba(14,168,184,.12);
}
textarea{
    min-height:100px;
    resize:vertical;
}

button,.dk-button,.dk-logout-button{
    border:0;
    border-radius:12px;
    padding:12px 18px;
    background:var(--accent);
    color:#fff;
    font-weight:800;
    letter-spacing:.1px;
    cursor:pointer;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    transition:background-color .15s ease, transform .15s ease, box-shadow .15s ease, opacity .15s ease;
    box-shadow:0 8px 18px rgba(14,168,184,.18);
}
button:hover,.dk-button:hover,.dk-logout-button:hover{
    background:var(--accent-dark);
    transform:translateY(-1px);
}
button:disabled,.dk-button:disabled,.dk-logout-button:disabled{
    opacity:.65;
    cursor:not-allowed;
    transform:none;
}
.dk-button.secondary,
button.secondary{
    background:#eef3f7;
    color:#284766;
    box-shadow:none;
}
.dk-button.secondary:hover,
button.secondary:hover{
    background:#dfe8ef;
}
.dk-button.ghost,
button.ghost{
    background:#fff;
    color:#21415f;
    border:1px solid var(--line-strong);
    box-shadow:none;
}
.dk-button.ghost:hover,
button.ghost:hover{background:#f8fbfd}
.dk-button.danger,
button.danger{background:var(--danger);box-shadow:0 8px 18px rgba(199,68,68,.16)}
.dk-button.danger:hover,
button.danger:hover{background:var(--danger-dark)}
.dk-button.compact,
button.compact{padding:9px 12px;border-radius:10px;font-size:12px;box-shadow:none}
.dk-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:16px;
}

.dk-alert{display:none}
.dk-toast-data{display:none}

.dk-pill{
    display:inline-flex;
    align-items:center;
    padding:5px 10px;
    border-radius:999px;
    font-size:11px;
    font-weight:800;
    line-height:1;
}
.dk-pill.active{background:var(--success-bg);color:var(--success)}
.dk-pill.suspended,.dk-pill.expired,.dk-pill.revoked,.dk-pill.released{
    background:var(--danger-bg);
    color:var(--danger);
}
.dk-pill.other{background:#edf2f7;color:#516273}

.dk-note{
    margin-top:8px;
    color:var(--muted);
    font-size:12px;
    line-height:1.55;
}
.dk-muted{color:var(--muted)}
.dk-value{
    font-size:20px;
    font-weight:800;
    margin-top:5px;
}

.dk-stats-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
    margin-bottom:14px;
}
.dk-stat{
    background:#fbfcfe;
    border:1px solid var(--line);
    border-radius:14px;
    padding:18px 16px;
}
.dk-stat-label{
    color:var(--muted);
    font-size:11px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.35px;
}
.dk-stat-value{
    margin-top:8px;
    font-size:24px;
    font-weight:800;
    line-height:1.15;
}
.dk-stat-sub{
    margin-top:7px;
    font-size:12px;
    color:var(--muted);
    line-height:1.45;
}

.dk-info-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
}
.dk-info-item{
    background:#fff;
    border:1px solid var(--line);
    border-radius:14px;
    padding:14px 16px;
}
.dk-info-label{
    color:var(--muted);
    font-size:11px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.35px;
}
.dk-info-value{
    margin-top:6px;
    font-size:15px;
    font-weight:700;
    line-height:1.45;
    word-break:break-word;
}

.dk-stack{display:flex;flex-direction:column;gap:20px}

.dk-license-controls{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:18px;
}
.dk-control-block{
    border:1px solid var(--line);
    border-radius:14px;
    background:#fbfcfe;
    padding:18px;
    display:flex;
    flex-direction:column;
    gap:10px;
}
.dk-control-title{font-size:16px;font-weight:800;line-height:1.25;margin:0}
.dk-control-summary{
    color:var(--muted);
    font-size:13px;
    line-height:1.55;
    margin:0;
}
.dk-control-form{
    display:flex;
    flex-direction:column;
    gap:14px;
    margin-top:4px;
}
.dk-control-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    align-items:center;
}
.dk-field-hint{
    display:block;
    margin-top:8px;
    color:var(--muted);
    font-size:12px;
    line-height:1.5;
}

.dk-login-page{
    min-height:100vh;
    display:grid;
    place-items:center;
    padding:24px;
    background:linear-gradient(135deg,var(--navy),#0c1b2d);
}
.dk-login{
    width:100%;
    max-width:430px;
    background:#fff;
    border-radius:16px;
    padding:30px;
    box-shadow:0 24px 70px rgba(0,0,0,.28);
}
.dk-login h1{margin:0 0 6px;font-size:26px}
.dk-login p{margin:0 0 18px;color:var(--muted);line-height:1.45}
.dk-login label{margin-top:12px}
.dk-login button{width:100%;margin-top:15px}

.dk-toast-stack{
    position:fixed;
    top:20px;
    right:20px;
    z-index:1200;
    display:flex;
    flex-direction:column;
    gap:12px;
    max-width:min(420px, calc(100vw - 24px));
    pointer-events:none;
}
.dk-toast{
    display:grid;
    grid-template-columns:auto 1fr auto;
    gap:12px;
    align-items:start;
    background:#fff;
    border:1px solid var(--line);
    border-left:4px solid #7a8fa6;
    border-radius:16px;
    box-shadow:var(--shadow-lg);
    padding:14px 14px 14px 12px;
    transform:translateY(-8px) translateX(16px);
    opacity:0;
    pointer-events:auto;
    transition:transform .18s ease, opacity .18s ease;
}
.dk-toast.show{transform:translateY(0) translateX(0);opacity:1}
.dk-toast.hide{opacity:0;transform:translateY(-6px) translateX(10px)}
.dk-toast.success{border-left-color:var(--success)}
.dk-toast.error{border-left-color:var(--danger)}
.dk-toast.info{border-left-color:var(--accent)}
.dk-toast-icon{
    width:28px;height:28px;border-radius:50%;margin-top:1px;
    background:#eff5f8;position:relative;
}
.dk-toast.success .dk-toast-icon{background:var(--success-bg)}
.dk-toast.error .dk-toast-icon{background:var(--danger-bg)}
.dk-toast.info .dk-toast-icon{background:var(--accent-soft)}
.dk-toast-icon::before{
    content:'';position:absolute;inset:0;display:block;margin:auto;width:12px;height:12px;border-radius:50%;background:#6b7f93;top:8px;left:8px;
}
.dk-toast.success .dk-toast-icon::before{background:var(--success)}
.dk-toast.error .dk-toast-icon::before{background:var(--danger)}
.dk-toast.info .dk-toast-icon::before{background:var(--accent)}
.dk-toast-title{font-size:13px;font-weight:800;color:var(--text);margin-bottom:3px}
.dk-toast-message{font-size:13px;line-height:1.5;color:#35506a}
.dk-toast-close{
    width:28px;height:28px;padding:0;border-radius:999px;background:transparent;color:#789;box-shadow:none;
}
.dk-toast-close:hover{background:#eef3f7;color:#234;transform:none}

.dk-modal-overlay[hidden],
.dk-processing-overlay[hidden]{
    display:none !important;
}

.dk-modal-overlay,
.dk-processing-overlay{
    position:fixed;
    inset:0;
    z-index:1100;
    background:rgba(10,24,40,.42);
    display:grid;
    place-items:center;
    padding:24px;
    backdrop-filter:blur(2px);
}
.dk-modal,
.dk-processing-card{
    width:100%;
    max-width:460px;
    background:#fff;
    border-radius:18px;
    box-shadow:var(--shadow-lg);
    border:1px solid rgba(214,225,233,.95);
}
.dk-modal-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    padding:20px 22px 14px;
    border-bottom:1px solid #edf2f6;
}
.dk-modal-eyebrow{
    color:var(--accent-dark);
    font-size:12px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.4px;
    margin-bottom:6px;
}
.dk-modal-head h3{
    margin:0;
    font-size:22px;
    line-height:1.2;
}
.dk-modal-close{
    width:34px;height:34px;padding:0;border-radius:999px;background:#eef3f7;color:#36597c;box-shadow:none;font-size:22px;line-height:1
}
.dk-modal-close:hover{background:#dfe8ef;transform:none}
.dk-modal-body{padding:18px 22px 8px}
.dk-modal-body p{margin:0;color:#35506a;line-height:1.65}
.dk-modal-actions{
    padding:18px 22px 22px;
    display:flex;
    justify-content:flex-end;
    gap:10px;
    flex-wrap:wrap;
}

.dk-processing-card{padding:28px 24px;text-align:center;max-width:420px}
.dk-spinner{
    width:46px;height:46px;border-radius:50%;
    border:4px solid #dcedf2;border-top-color:var(--accent);
    margin:0 auto 16px;animation:dk-spin .8s linear infinite;
}
.dk-processing-title{font-size:20px;font-weight:800;line-height:1.2;margin-bottom:8px}
.dk-processing-text{color:#48637c;font-size:14px;line-height:1.6}

@keyframes dk-spin{to{transform:rotate(360deg)}}

@media (max-width:1100px){
    .dk-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
    .dk-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:860px){
    .dk-topbar-inner{
        grid-template-columns:1fr;
        justify-items:start;
        padding:14px 18px;
        gap:12px;
    }
    .dk-nav{justify-content:flex-start}
    .dk-userbox{width:100%;justify-content:space-between}
    .dk-grid,.dk-grid.two,.dk-form-grid,.dk-info-grid,.dk-license-controls{grid-template-columns:1fr}
    .dk-main{padding:24px 16px 40px}
    .dk-page-head{margin-bottom:18px}
}
@media (max-width:620px){
    .dk-grid,.dk-stats-grid{grid-template-columns:1fr}
    .dk-title{font-size:24px}
    th,td{padding:12px 14px}
    .dk-panel-head,.dk-panel-body{padding-left:16px;padding-right:16px}
    .dk-toast-stack{top:12px;right:12px;left:12px;max-width:none}
    .dk-modal-actions{justify-content:stretch}
    .dk-modal-actions .dk-button,
    .dk-modal-actions button{flex:1}
}

/* DK4-004A · Creación de licencias */
.dk-create-grid{
    display:grid;
    grid-template-columns:minmax(0,1.65fr) minmax(300px,.75fr);
    gap:20px;
    align-items:start;
}
.dk-create-form-panel{margin-bottom:0}
.dk-create-summary-panel{
    position:sticky;
    top:20px;
    margin-bottom:0;
}
.dk-form-section{
    padding:0 0 22px;
    margin:0 0 22px;
    border-bottom:1px solid #edf2f6;
}
.dk-form-section:last-of-type{
    border-bottom:0;
    margin-bottom:0;
    padding-bottom:4px;
}
.dk-form-section-title{
    font-size:14px;
    font-weight:800;
    color:#183b58;
    margin:0 0 16px;
}
.dk-form-footer{
    display:flex;
    justify-content:flex-end;
    gap:10px;
    flex-wrap:wrap;
    padding-top:20px;
    border-top:1px solid #edf2f6;
}
.dk-readonly-field{
    min-height:46px;
    border:1px solid #d7e2e9;
    border-radius:12px;
    background:#f8fbfc;
    display:flex;
    align-items:center;
    gap:10px;
    padding:11px 13px;
    color:#48637c;
    font-size:13px;
    line-height:1.4;
}
.dk-summary-stack{
    display:flex;
    flex-direction:column;
    gap:0;
}
.dk-summary-row{
    display:flex;
    justify-content:space-between;
    gap:18px;
    align-items:flex-start;
    padding:12px 0;
    border-bottom:1px solid #edf2f6;
    color:#5a7085;
    font-size:13px;
    line-height:1.4;
}
.dk-summary-row strong{
    color:var(--text);
    text-align:right;
    font-size:13px;
}
.dk-summary-row.total{
    margin-top:4px;
    padding:15px 0;
}
.dk-summary-row.total strong{
    font-size:20px;
    color:#0b7e8a;
}
.dk-security-note{
    margin-top:18px;
    background:#eef9fa;
    border:1px solid #ccecef;
    border-radius:14px;
    padding:15px;
}
.dk-security-note-title{
    font-size:13px;
    font-weight:800;
    color:#0a6670;
    margin-bottom:6px;
}
.dk-security-note p{
    margin:0;
    color:#456878;
    font-size:12px;
    line-height:1.55;
}
.dk-empty-state{
    text-align:center;
    padding:24px 10px;
}
.dk-empty-state.compact{padding:10px 4px}
.dk-empty-state-title{
    font-size:18px;
    font-weight:800;
    margin-bottom:8px;
}
.dk-empty-state-text{
    max-width:620px;
    margin:0 auto 18px;
    color:var(--muted);
    font-size:13px;
    line-height:1.6;
}
.dk-key-panel{
    border-color:#bfe5e9;
    box-shadow:0 12px 30px rgba(14,168,184,.08);
}
.dk-key-intro{
    display:flex;
    justify-content:space-between;
    gap:18px;
    align-items:flex-start;
    margin-bottom:18px;
}
.dk-key-status{
    display:inline-flex;
    padding:5px 9px;
    border-radius:999px;
    background:var(--success-bg);
    color:var(--success);
    font-size:11px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.35px;
    margin-bottom:8px;
}
.dk-key-intro h3{
    margin:0 0 6px;
    font-size:22px;
}
.dk-key-intro p{
    margin:0;
    color:#597086;
    font-size:13px;
    line-height:1.55;
}
.dk-key-box{
    display:flex;
    align-items:center;
    gap:12px;
    padding:14px;
    border:1px dashed #93cfd6;
    background:#f6fcfd;
    border-radius:14px;
}
.dk-key-value{
    flex:1;
    min-width:0;
    font-family:Consolas,"Courier New",monospace;
    font-size:18px;
    font-weight:800;
    letter-spacing:.4px;
    color:#123f55;
    word-break:break-all;
    user-select:all;
}
.dk-one-time-warning{
    margin-top:14px;
    border-radius:12px;
    background:#fff8e8;
    border:1px solid #f0dfb3;
    color:#795b1c;
    padding:12px 14px;
    font-size:12px;
    line-height:1.55;
}
.dk-created-actions{justify-content:flex-end}

@media (max-width:900px){
    .dk-create-grid{grid-template-columns:1fr}
    .dk-create-summary-panel{position:static}
}
@media (max-width:620px){
    .dk-form-footer{justify-content:stretch}
    .dk-form-footer .dk-button,
    .dk-form-footer button{flex:1}
    .dk-key-box{align-items:stretch;flex-direction:column}
    .dk-key-value{font-size:15px}
}


/* DK4-004B · Pulido visual creación de licencias */
.dk-main{max-width:1120px}
.dk-panel-head{padding:20px 22px}
.dk-panel-body{padding:22px}
.dk-toast-stack{top:84px;right:24px}

.dk-create-grid{
    grid-template-columns:minmax(0,1.8fr) minmax(320px,.9fr);
    gap:24px;
}
.dk-create-summary-panel .dk-panel-body{padding:18px 22px}
.dk-form-grid{gap:18px 20px}
.dk-form-section{padding:0 0 24px;margin:0 0 24px}
.dk-form-section-title{font-size:15px;margin-bottom:18px}
.dk-readonly-field{align-items:flex-start;min-height:50px}
.dk-form-footer{padding-top:22px}

.dk-summary-stack{gap:2px}
.dk-summary-row{padding:14px 0;align-items:center}
.dk-summary-row span{padding-right:12px}
.dk-summary-row strong{max-width:58%;text-align:right;line-height:1.45}
.dk-summary-row.total{padding:17px 0}
.dk-summary-row.total strong{font-size:22px}
.dk-security-note{margin-top:20px;padding:16px 16px 15px}

.dk-key-panel .dk-panel-body{padding:24px}
.dk-key-intro{margin-bottom:20px}
.dk-key-intro h3{margin:0 0 8px;font-size:24px;line-height:1.2}
.dk-key-intro p{font-size:14px;line-height:1.65;max-width:760px}
.dk-key-layout{display:flex;flex-direction:column;gap:16px}
.dk-key-copy-area{
    padding:16px 18px;
    border:1px dashed #93cfd6;
    background:#f6fcfd;
    border-radius:16px;
}
.dk-key-caption{
    font-size:11px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.45px;
    color:#5b768e;
    margin-bottom:10px;
}
.dk-key-value{
    display:block;
    font-size:19px;
    line-height:1.65;
    overflow-wrap:anywhere;
    word-break:break-word;
}
.dk-key-action-bar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    flex-wrap:wrap;
}
.dk-key-action-note{
    color:var(--muted);
    font-size:12px;
    line-height:1.55;
}
.dk-one-time-warning{margin-top:2px}
.dk-created-actions{
    margin-top:22px;
    padding-top:20px;
    border-top:1px solid #edf2f6;
}

@media (max-width:900px){
    .dk-create-grid{grid-template-columns:1fr}
}
@media (max-width:760px){
    .dk-toast-stack{top:76px;right:14px;left:14px;max-width:none}
    .dk-summary-row{flex-direction:column;align-items:flex-start;gap:4px}
    .dk-summary-row strong{max-width:none;text-align:left}
    .dk-key-action-bar{flex-direction:column;align-items:stretch}
    .dk-key-action-bar .dk-button,
    .dk-key-action-bar button{width:100%}
}

/* DK4-005 · Custodia segura y autonomía de licencias */
.dk-license-identity-panel .dk-panel-body{padding:22px}
.dk-license-identity-grid{
    display:grid;
    grid-template-columns:minmax(260px,.8fr) minmax(420px,1.2fr);
    gap:18px;
}
.dk-license-number-card,
.dk-license-key-card{
    border:1px solid var(--border);
    border-radius:16px;
    background:#fbfdff;
    padding:18px;
    min-width:0;
}
.dk-license-number-value{
    margin-top:8px;
    font-size:22px;
    line-height:1.25;
    font-weight:800;
    letter-spacing:.25px;
    color:var(--navy);
    overflow-wrap:anywhere;
}
.dk-license-identity-help{
    margin:10px 0 0;
    color:var(--muted);
    font-size:12px;
    line-height:1.6;
}
.dk-masked-key{
    margin:9px 0 14px;
    padding:13px 14px;
    border:1px dashed #9fcbd1;
    border-radius:12px;
    background:#f4fbfc;
    font-family:Consolas,"SFMono-Regular",Menlo,monospace;
    font-size:15px;
    font-weight:700;
    letter-spacing:.5px;
    overflow-wrap:anywhere;
}
.dk-inline-form{margin:0}
.dk-revealed-key-row{
    margin-top:9px;
    display:flex;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
}
.dk-admin-key-value{
    flex:1 1 420px;
    min-width:0;
    padding:14px 16px;
    border:1px dashed #72c3cd;
    border-radius:12px;
    background:#f2fbfc;
    color:var(--navy);
    font-family:Consolas,"SFMono-Regular",Menlo,monospace;
    font-size:16px;
    font-weight:800;
    line-height:1.55;
    overflow-wrap:anywhere;
    word-break:break-word;
}
.dk-legacy-key-warning{
    margin:9px 0 16px;
    padding:13px 14px;
    border:1px solid #f0d59a;
    border-radius:12px;
    background:#fff9eb;
    color:#7d5b12;
    display:flex;
    flex-direction:column;
    gap:4px;
    font-size:12px;
    line-height:1.55;
}
.dk-legacy-key-warning strong{color:#6c4b08;font-size:13px}
.dk-legacy-key-form{margin-top:0}
.dk-legacy-key-form .dk-field{margin-bottom:14px}
.dk-vault-fingerprint{
    margin-top:18px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:13px 15px;
    border:1px solid var(--border);
    border-radius:12px;
    background:#f8fafc;
    color:var(--muted);
    font-size:12px;
}
.dk-vault-fingerprint code{
    color:var(--navy);
    font-weight:800;
    letter-spacing:.6px;
}
.dk-security-note-wide{margin-top:18px;max-width:none}
.dk-custody-info{background:#eefafa;border-color:#b7e2e6;color:#315c65}

@media (max-width:900px){
    .dk-license-identity-grid{grid-template-columns:1fr}
}
@media (max-width:640px){
    .dk-revealed-key-row{align-items:stretch;flex-direction:column}
    .dk-admin-key-value{flex-basis:auto;width:100%}
    .dk-revealed-key-row .dk-button{width:100%}
    .dk-vault-fingerprint{align-items:flex-start;flex-direction:column}
}

/* DK5-001 · Acceso de clientes */
.dk-access-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px}
.dk-access-card{border:1px solid var(--line);border-radius:16px;background:#fbfdff;padding:18px}
.dk-access-card h3{margin:0 0 8px;font-size:16px}
.dk-access-card p{margin:0 0 14px;color:var(--muted);line-height:1.55;font-size:13px}
.dk-access-status{display:flex;align-items:center;gap:10px;margin:10px 0 16px}
.dk-access-link-box{margin-top:18px;border:1px dashed #8fcbd2;background:#f4fcfd;border-radius:16px;padding:16px}
.dk-access-link-box label{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.45px;font-weight:800;color:#5f7488;margin-bottom:8px}
.dk-access-link-row{display:flex;gap:10px;align-items:center}
.dk-access-link-row input{flex:1;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px;background:#fff}
.dk-access-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}
.dk-access-meta .dk-info-item{min-height:84px}
.dk-button.small{padding:9px 13px;font-size:12px}
.dk-button.danger,.dk-actions button.danger{background:#d84848;color:#fff;border-color:#d84848}
.dk-button.danger:hover,.dk-actions button.danger:hover{background:#c63d3d}
@media(max-width:820px){.dk-access-grid{grid-template-columns:1fr}.dk-access-link-row{flex-direction:column;align-items:stretch}.dk-access-meta{grid-template-columns:1fr}}

/* DK5-001B · Pulido portal + eliminación reversible de licencias */
.dk-page-head-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.dk-panel-kicker{margin:4px 0 0;color:var(--muted);font-size:12px;line-height:1.5;font-weight:400}
.dk-danger-zone{border-color:#efcaca}
.dk-danger-zone .dk-panel-head{background:linear-gradient(180deg,#fff,#fffafa)}
.dk-danger-zone-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(320px,.75fr);gap:24px;align-items:start}
.dk-archive-form{padding:16px;border:1px solid #f0d2d2;border-radius:14px;background:#fffafa}
.dk-archive-form .dk-field{margin-bottom:14px}
.dk-archive-form button.danger{width:100%;justify-content:center}
@media(max-width:820px){
    .dk-page-head-actions{width:100%}
    .dk-page-head-actions .dk-button{flex:1 1 auto;text-align:center;justify-content:center}
    .dk-danger-zone-grid{grid-template-columns:1fr}
}

/* DK5-002B · Pulido visual del panel de eliminación */
.dk-danger-zone{
    margin-top:24px;
    border-color:#efcaca;
    box-shadow:0 10px 28px rgba(145,46,46,.05);
}
.dk-danger-zone .dk-panel-head{
    padding:20px 22px;
    background:linear-gradient(180deg,#fff,#fffafa);
    align-items:flex-start;
}
.dk-danger-zone-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:30px;
    padding:6px 11px;
    border-radius:999px;
    background:var(--danger-bg);
    color:var(--danger);
    font-size:11px;
    line-height:1;
    font-weight:800;
    white-space:nowrap;
}
.dk-danger-zone-body{padding:22px}
.dk-danger-zone-grid{
    display:grid;
    grid-template-columns:minmax(0,1.05fr) minmax(360px,.95fr);
    gap:28px;
    align-items:stretch;
}
.dk-danger-copy{
    padding:4px 2px;
    align-self:center;
}
.dk-danger-copy .dk-control-title{
    margin:0 0 10px;
    font-size:16px;
}
.dk-danger-copy .dk-control-summary{
    max-width:670px;
    margin:0;
    font-size:13px;
    line-height:1.7;
}
.dk-danger-note{
    margin-top:16px;
    padding:12px 14px;
    border:1px solid #f0d2d2;
    border-radius:12px;
    background:#fff8f8;
    color:#7c4444;
    font-size:12px;
    line-height:1.55;
}
.dk-archive-form{
    padding:20px;
    border:1px solid #f0d2d2;
    border-radius:16px;
    background:#fffafa;
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:16px;
}
.dk-archive-form .dk-field{margin:0}
.dk-archive-form .dk-field-hint{
    display:block;
    margin-top:10px;
    line-height:1.55;
}
.dk-archive-form label{
    display:flex;
    align-items:center;
    gap:8px;
    margin-bottom:8px;
}
.dk-optional-label{
    display:inline-flex;
    align-items:center;
    min-height:21px;
    padding:4px 7px;
    border-radius:999px;
    background:#f3f5f7;
    color:#687b8e;
    font-size:10px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.3px;
}
.dk-danger-actions{
    display:flex;
    justify-content:flex-end;
    padding-top:8px;
    margin-top:4px;
}
.dk-danger-actions button.danger{
    width:auto;
    min-width:170px;
    justify-content:center;
}
@media(max-width:900px){
    .dk-danger-zone-grid{grid-template-columns:1fr}
    .dk-danger-copy{padding:0}
}
@media(max-width:620px){
    .dk-danger-zone .dk-panel-head{flex-direction:column;gap:10px}
    .dk-danger-zone-body{padding:16px}
    .dk-archive-form{padding:16px}
    .dk-danger-actions{justify-content:stretch}
    .dk-danger-actions button.danger{width:100%}
}

/* DK5-004 · Base comercial de suscripciones */
.dk-subscription-panel{margin-top:24px}
.dk-subscription-panel .dk-panel-head{align-items:flex-start}
.dk-subscription-empty{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    padding:18px;
    border:1px dashed #bdd9df;
    border-radius:14px;
    background:#f7fcfd;
}
.dk-subscription-empty>div{display:flex;flex-direction:column;gap:5px}
.dk-subscription-empty strong{font-size:14px;color:var(--text)}
.dk-subscription-empty span{font-size:12px;line-height:1.55;color:var(--muted)}
.dk-subscription-summary-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
}
.dk-subscription-summary-grid .dk-info-item{min-height:98px}
.dk-subscription-controls{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:16px;
    margin-top:18px;
}
.dk-subscription-controls .dk-control-block{
    min-height:100%;
}
.dk-subscription-setup-flow{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
    margin-top:18px;
}
.dk-subscription-setup-flow>div{
    display:flex;
    flex-direction:column;
    gap:5px;
    padding:15px;
    border:1px solid var(--line);
    border-radius:13px;
    background:#fbfdfe;
}
.dk-subscription-setup-flow strong{font-size:13px;color:var(--text)}
.dk-subscription-setup-flow span{font-size:11px;line-height:1.5;color:var(--muted)}
.dk-pill.scheduled{background:#fff2df;color:#99600b}
@media(max-width:1050px){
    .dk-subscription-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .dk-subscription-controls{grid-template-columns:repeat(2,minmax(0,1fr))}
    .dk-subscription-setup-flow{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
    .dk-subscription-controls{grid-template-columns:1fr}
    .dk-subscription-empty{align-items:flex-start;flex-direction:column}
}
@media(max-width:560px){
    .dk-subscription-summary-grid,.dk-subscription-setup-flow{grid-template-columns:1fr}
}

/* DK5-005A · Pulido visual de alineación y jerarquía del administrador */
.dk-page-head{
    margin-bottom:22px;
}
.dk-page-head-meta{
    gap:5px;
}
.dk-title{
    line-height:1.12;
    letter-spacing:-.2px;
}
.dk-subtitle{
    line-height:1.45;
}

/* Dashboard: misma línea visual para títulos KPI y valores */
.dk-grid{
    align-items:stretch;
}
.dk-grid > .dk-card{
    min-height:112px;
    padding:19px 18px 18px;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
}
.dk-kpi-label{
    min-height:31px;
    display:flex;
    align-items:flex-start;
    line-height:1.35;
}
.dk-kpi-value{
    margin-top:auto;
    padding-top:12px;
    line-height:.95;
    letter-spacing:-.5px;
}

/* Encabezados de panel y tablas: alineación homogénea */
.dk-panel-head{
    min-height:70px;
}
.dk-panel-head h2{
    line-height:1.25;
}
.dk-table-wrap th,
.dk-table-wrap td{
    line-height:1.45;
}
.dk-table-wrap thead th{
    vertical-align:middle;
    padding-top:13px;
    padding-bottom:13px;
}
.dk-table-wrap tbody td{
    vertical-align:middle;
    padding-top:15px;
    padding-bottom:15px;
}
.dk-table-wrap tbody td .dk-note{
    margin-top:4px !important;
    line-height:1.4;
}
.dk-table-wrap tbody td > .dk-pill{
    vertical-align:middle;
}

/* Resúmenes generales: etiquetas, valores y ayudas con ritmo constante */
.dk-stat,
.dk-info-item{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
}
.dk-stat-label,
.dk-info-label{
    line-height:1.35;
}
.dk-stat-value,
.dk-info-value{
    width:100%;
}
.dk-stat-sub{
    line-height:1.45;
}

/* Detalle de licencia */
.dk-license-identity-grid{
    align-items:stretch;
}
.dk-license-number-card,
.dk-license-key-card{
    display:flex;
    flex-direction:column;
    justify-content:flex-start;
}
.dk-license-number-value{
    line-height:1.2;
}
.dk-license-identity-help{
    line-height:1.55;
}

/* Suscripción comercial: columnas y controles perfectamente alineados */
.dk-subscription-panel .dk-panel-head{
    min-height:76px;
}
.dk-subscription-panel .dk-panel-head > div:first-child{
    min-width:0;
    padding-right:12px;
}
.dk-subscription-panel .dk-panel-kicker{
    margin-top:5px;
    max-width:760px;
    line-height:1.5;
}
.dk-subscription-summary-grid{
    align-items:stretch;
}
.dk-subscription-summary-grid .dk-info-item{
    min-height:108px;
    padding:16px 17px;
    justify-content:flex-start;
}
.dk-subscription-summary-grid .dk-info-label{
    min-height:16px;
}
.dk-subscription-summary-grid .dk-info-value{
    margin-top:8px;
    font-size:15px;
    line-height:1.4;
}
.dk-subscription-summary-grid .dk-stat-sub{
    margin-top:7px;
}
.dk-subscription-controls{
    align-items:stretch;
    gap:18px;
    margin-top:20px;
}
.dk-subscription-controls .dk-control-block{
    padding:20px;
    gap:11px;
}
.dk-subscription-controls .dk-control-title{
    margin:0;
    line-height:1.3;
}
.dk-subscription-controls .dk-control-summary{
    min-height:44px;
    line-height:1.6;
}
.dk-subscription-controls .dk-control-form{
    margin-top:auto;
    gap:13px;
}
.dk-subscription-controls .dk-field label{
    margin-bottom:8px;
}
.dk-subscription-controls .dk-control-actions{
    margin-top:1px;
}

/* Formularios y bloques de acción */
.dk-control-block{
    line-height:1.45;
}
.dk-control-form label,
.dk-field label{
    line-height:1.35;
}
.dk-field-hint{
    line-height:1.55;
}
.dk-control-actions .dk-button,
.dk-control-actions button,
.dk-actions .dk-button,
.dk-actions button{
    align-items:center;
    justify-content:center;
    min-height:40px;
}

/* La zona de riesgo conserva separación clara entre ayuda y acción */
.dk-danger-actions{
    padding-top:12px;
    margin-top:8px;
}

@media(max-width:1050px){
    .dk-grid > .dk-card{min-height:108px}
    .dk-subscription-summary-grid .dk-info-item{min-height:100px}
}
@media(max-width:760px){
    .dk-panel-head{min-height:0}
    .dk-grid > .dk-card{min-height:100px}
    .dk-kpi-label{min-height:0}
    .dk-kpi-value{margin-top:10px;padding-top:0}
    .dk-subscription-panel .dk-panel-head{min-height:0}
    .dk-subscription-controls .dk-control-summary{min-height:0}
}

/* DK5-006 · Puente comercial DoverTech + alineación visual del administrador */

/* Dashboard: todos los valores numéricos comparten exactamente la misma base visual. */
.dk-grid:not(.two) > .dk-card{
    display:grid;
    grid-template-rows:36px 1fr;
    align-items:stretch;
    min-height:112px;
}
.dk-grid:not(.two) > .dk-card .dk-kpi-label{
    min-height:0;
    margin:0;
    align-self:start;
    display:block;
    line-height:1.35;
}
.dk-grid:not(.two) > .dk-card .dk-kpi-value{
    margin:0;
    padding:10px 0 0;
    align-self:end;
    line-height:1;
}

.dk-bridge-overview-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
    margin-bottom:22px;
}
.dk-bridge-kpi{
    min-height:112px;
    display:grid;
    grid-template-rows:36px 1fr;
    align-items:stretch;
    padding:19px 18px 18px;
}
.dk-bridge-kpi .dk-kpi-label{
    min-height:0;
    align-self:start;
    line-height:1.35;
}
.dk-bridge-kpi .dk-kpi-value,
.dk-bridge-kpi-value{
    align-self:end;
    margin:0;
    padding-top:10px;
}
.dk-bridge-kpi-value{
    font-size:22px;
    line-height:1.05;
    font-weight:800;
    letter-spacing:-.2px;
}
.dk-bridge-kpi-value.is-ready{color:var(--success)}
.dk-bridge-kpi-value.is-pending{color:var(--warning)}

.dk-bridge-status-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
    align-items:stretch;
}
.dk-bridge-status-grid .dk-info-item{
    min-height:118px;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    justify-content:flex-start;
    padding:16px 17px;
}
.dk-bridge-status-grid .dk-info-value{
    margin-top:8px;
    line-height:1.35;
}
.dk-bridge-status-grid .dk-stat-sub{
    margin-top:auto;
    padding-top:8px;
}

.dk-bridge-connection-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:18px;
    align-items:stretch;
}
.dk-bridge-connection-grid .dk-control-block{
    min-height:100%;
    padding:20px;
}
.dk-bridge-connection-grid .dk-control-summary{
    min-height:44px;
}

.dk-secret-row{
    display:flex;
    align-items:stretch;
    gap:10px;
    margin-top:auto;
    min-width:0;
}
.dk-secret-row code{
    flex:1 1 auto;
    min-width:0;
    display:flex;
    align-items:center;
    min-height:44px;
    padding:11px 13px;
    border:1px dashed #9dcfd5;
    border-radius:12px;
    background:#f4fbfc;
    color:#153d55;
    font-family:Consolas,"SFMono-Regular",Menlo,monospace;
    font-size:12px;
    font-weight:700;
    line-height:1.45;
    overflow-wrap:anywhere;
    word-break:break-word;
}
.dk-secret-row .dk-button,
.dk-secret-row button{
    flex:0 0 auto;
    justify-content:center;
}
.dk-secret-row-revealed code{
    border-style:solid;
    background:#edfafa;
}

.dk-bridge-endpoint-card{
    display:grid;
    grid-template-columns:minmax(0,1.35fr) minmax(260px,.65fr);
    gap:22px;
    align-items:center;
    margin-top:18px;
    padding:17px 18px;
    border:1px solid #bfe1e5;
    border-radius:14px;
    background:#f7fcfd;
}
.dk-bridge-endpoint-card > div{
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:7px;
}
.dk-code-label{
    color:#507086;
    font-size:10px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.45px;
}
.dk-bridge-endpoint-card code{
    color:#123b52;
    font-family:Consolas,"SFMono-Regular",Menlo,monospace;
    font-size:12px;
    font-weight:700;
    overflow-wrap:anywhere;
}
.dk-bridge-endpoint-card p{
    margin:0;
    color:var(--muted);
    font-size:12px;
    line-height:1.55;
}

.dk-bridge-contract{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
    margin-top:18px;
}
.dk-bridge-contract-step{
    display:grid;
    grid-template-columns:30px minmax(0,1fr);
    gap:10px;
    align-items:start;
    padding:15px;
    border:1px solid var(--line);
    border-radius:13px;
    background:#fbfdfe;
}
.dk-bridge-contract-step > span{
    width:30px;
    height:30px;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:var(--accent-soft);
    color:var(--accent-dark);
    font-size:12px;
    font-weight:900;
}
.dk-bridge-contract-step > div{
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:5px;
}
.dk-bridge-contract-step strong{
    color:var(--text);
    font-size:12px;
    line-height:1.35;
}
.dk-bridge-contract-step small{
    color:var(--muted);
    font-size:11px;
    line-height:1.5;
}
.dk-error-note{color:var(--danger)}

@media(max-width:1050px){
    .dk-bridge-overview-grid,
    .dk-bridge-status-grid,
    .dk-bridge-contract{grid-template-columns:repeat(2,minmax(0,1fr))}
    .dk-bridge-endpoint-card{grid-template-columns:1fr}
}
@media(max-width:760px){
    .dk-grid:not(.two) > .dk-card,
    .dk-bridge-kpi{
        grid-template-rows:auto auto;
        min-height:100px;
    }
    .dk-grid:not(.two) > .dk-card .dk-kpi-value,
    .dk-bridge-kpi .dk-kpi-value,
    .dk-bridge-kpi-value{
        align-self:start;
        margin-top:8px;
        padding-top:0;
    }
    .dk-bridge-connection-grid{grid-template-columns:1fr}
    .dk-bridge-connection-grid .dk-control-summary{min-height:0}
    .dk-secret-row{flex-direction:column}
    .dk-secret-row .dk-button,
    .dk-secret-row button{align-self:flex-start}
}
@media(max-width:560px){
    .dk-bridge-overview-grid,
    .dk-bridge-status-grid,
    .dk-bridge-contract{grid-template-columns:1fr}
}

/* DK5-008 · Datos del cliente y corrección segura de correo */
.dk-customer-profile-panel{margin-top:18px}
.dk-customer-profile-form .dk-form-grid{align-items:start}
.dk-customer-profile-form .dk-field{display:flex;flex-direction:column}
.dk-customer-profile-form .dk-field input{min-height:44px}
.dk-customer-profile-form .dk-field-hint{margin-top:7px;color:var(--muted);font-size:11px}
.dk-customer-email-note{margin-top:18px}
.dk-customer-profile-actions{margin-top:18px;padding-top:16px;border-top:1px solid #edf2f6}
.dk-customer-profile-actions button{min-width:150px}
@media(max-width:640px){
    .dk-customer-profile-actions button{width:100%}
}

/* DK5-013 · Usuarios internos, RBAC, contraseñas y auditoría */
.dk-user-link{
    text-decoration:none;
    padding:8px 10px;
    border-radius:10px;
    transition:background-color .15s ease,color .15s ease;
}
.dk-user-link:hover{background:rgba(255,255,255,.09);color:#fff}
.dk-account-grid{
    display:grid;
    grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);
    gap:20px;
    align-items:start;
}
.dk-account-grid>.dk-panel{margin-bottom:0}
.dk-account-info-grid{grid-template-columns:1fr}
.dk-account-info-grid .full{grid-column:auto}
.dk-account-force-note{margin:0 0 20px}
.dk-password-form{display:flex;flex-direction:column;gap:16px}
.dk-password-form .dk-field{margin:0}
.dk-password-policy{
    padding:15px 16px;
    border:1px solid #cfe4e8;
    border-radius:13px;
    background:#f6fcfd;
}
.dk-password-policy>strong{display:block;margin-bottom:10px;font-size:12px;color:var(--text)}
.dk-password-policy ul{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px 16px;
    margin:0;
    padding:0;
    list-style:none;
}
.dk-password-policy li{
    position:relative;
    padding-left:20px;
    color:var(--muted);
    font-size:11px;
    line-height:1.45;
}
.dk-password-policy li::before{content:'•';position:absolute;left:4px;top:0;color:#9fb1be;font-weight:900}
.dk-password-policy li.is-valid{color:#18783a;font-weight:750}
.dk-password-policy li.is-valid::before{content:'✓';left:0;color:#1a9a50}
.dk-password-policy li.is-invalid{color:#a53b3b}
.dk-password-policy li.is-invalid::before{content:'×';left:1px;color:#c74444}
.dk-password-policy.compact-policy ul{grid-template-columns:repeat(2,minmax(0,1fr))}
.dk-password-match{margin-top:7px;color:var(--muted);font-size:11px;line-height:1.45}
.dk-password-match.is-valid{color:#18783a;font-weight:750}
.dk-password-match.is-error{color:#b13e3e;font-weight:750}
.dk-password-actions{margin-top:2px;padding-top:14px;border-top:1px solid #edf2f6}
.dk-password-input-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:stretch}
.dk-password-input-row .dk-button{min-width:92px}
.dk-login-wide{width:min(100% - 32px,520px)}
.dk-login-password-policy{margin:12px 0 4px;text-align:left}
.dk-login-password-policy ul{grid-template-columns:1fr}
.dk-role-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.dk-role-card{
    min-height:150px;
    display:flex;
    flex-direction:column;
    gap:8px;
    padding:16px;
    border:1px solid var(--line);
    border-radius:14px;
    background:#fbfdfe;
}
.dk-role-card>span{align-self:flex-start;padding:4px 8px;border-radius:999px;background:var(--accent-soft);color:var(--accent-dark);font-size:10px;font-weight:850;text-transform:uppercase}
.dk-role-card>strong{font-size:14px;line-height:1.3}
.dk-role-card>p{margin:0;color:var(--muted);font-size:11px;line-height:1.55}
.dk-role-strip{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.dk-role-step{display:grid;grid-template-columns:30px minmax(0,1fr);gap:9px;align-items:center;padding:13px;border:1px solid var(--line);border-radius:12px;background:#fbfdfe}
.dk-role-step>span{width:30px;height:30px;display:grid;place-items:center;border-radius:50%;background:var(--accent-soft);color:var(--accent-dark);font-size:11px;font-weight:900}
.dk-role-step>strong{font-size:11px;line-height:1.3}
.dk-role-badge{display:inline-flex;align-items:center;padding:6px 9px;border-radius:999px;background:#edf3f7;color:#29445e;font-size:10px;font-weight:850;line-height:1}
.dk-role-badge.role-superadmin{background:#eaf0ff;color:#354f9e}
.dk-role-badge.role-administrator{background:#e9f9fb;color:#087987}
.dk-role-badge.role-supervisor{background:#eef8ee;color:#287b3b}
.dk-role-badge.role-support_advanced{background:#fff6e7;color:#98620e}
.dk-role-badge.role-support{background:#f0f3f6;color:#586a79}
.dk-admin-users-table td{vertical-align:middle}
.dk-admin-user-summary .dk-stat{min-height:112px}
.dk-stat-value-text{font-size:17px;line-height:1.35;word-break:break-word}
.dk-user-management-grid{align-items:start}
.dk-user-management-grid>.dk-panel{margin-bottom:0;min-height:100%}
.dk-audit-table td{vertical-align:middle}
.dk-audit-table th:first-child,.dk-audit-table td:first-child{white-space:nowrap}

@media(max-width:1050px){
    .dk-role-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .dk-role-strip{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:820px){
    .dk-account-grid{grid-template-columns:1fr}
    .dk-role-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:640px){
    .dk-role-grid,.dk-role-strip{grid-template-columns:1fr}
    .dk-password-policy ul,.dk-password-policy.compact-policy ul{grid-template-columns:1fr}
    .dk-password-input-row{grid-template-columns:1fr}
    .dk-password-input-row .dk-button{width:100%}
}

/* DK5-014 · Acceso, recordar sesión, contraseñas y bloqueos visibles */
.dk-password-visibility{position:relative;width:100%;min-width:0}
.dk-password-visibility>input{width:100%;padding-right:48px!important}
.dk-password-toggle{
    position:absolute;right:7px;top:50%;transform:translateY(-50%);
    width:34px!important;height:34px!important;min-width:34px;padding:0!important;margin:0!important;
    display:grid;place-items:center;border:0;border-radius:9px;background:transparent!important;color:#6f8294;
    box-shadow:none!important;cursor:pointer;z-index:2
}
.dk-password-toggle:hover{background:#edf4f7!important;color:var(--navy);transform:translateY(-50%)!important}
.dk-password-toggle:focus-visible{outline:2px solid rgba(14,168,184,.35);outline-offset:1px}
.dk-password-toggle svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.dk-password-toggle.is-visible{color:var(--accent-dark);background:var(--accent-soft)!important}
.dk-password-input-row>.dk-password-visibility{min-width:0}

.dk-remember-control{
    margin-top:13px!important;padding:2px 0;
    display:flex!important;align-items:center;gap:9px;cursor:pointer;text-align:left
}
.dk-remember-control>input{width:17px;height:17px;min-width:17px;margin:0;padding:0;accent-color:var(--accent);cursor:pointer}
.dk-remember-control strong{font-size:12px;color:var(--text);line-height:1.35}
.dk-login .dk-remember-control+button{margin-top:15px}
.dk-remembered-user{
    width:100%;min-height:43px;padding:0 8px 0 13px;border:1px solid var(--line);border-radius:10px;background:#fff;
    display:flex;align-items:center;justify-content:space-between;gap:10px
}
.dk-remembered-user-value{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text);font-size:14px;font-weight:700}
.dk-remembered-user-change{
    width:auto!important;min-width:0!important;margin:0!important;padding:7px 9px!important;border:0!important;border-radius:8px!important;
    background:transparent!important;color:var(--accent-dark)!important;font-size:11px!important;font-weight:800!important;box-shadow:none!important
}
.dk-remembered-user-change:hover{background:var(--accent-soft)!important;transform:none!important}
#dk-email-editor[hidden]{display:none!important}
#dk-email-editor input{margin:0}

.dk-pill.locked{background:#fff0e8;color:#a94c1f}
.dk-table-status-note{font-size:10px!important;margin:5px 0 0!important;white-space:nowrap}
.dk-security-alert{
    display:flex;align-items:center;justify-content:space-between;gap:18px;
    padding:15px 17px;margin:0 0 20px;border:1px solid #efddb8;border-radius:14px;background:#fff9ed;
    color:#6b4a16;text-decoration:none;box-shadow:0 5px 16px rgba(54,42,15,.035)
}
.dk-security-alert>div{display:flex;flex-direction:column;gap:4px;min-width:0}
.dk-security-alert strong{font-size:13px;color:#6b470c}
.dk-security-alert span{font-size:11px;line-height:1.5;color:#816333}
.dk-security-alert-link{font-weight:850!important;white-space:nowrap;color:#8a5b0b!important}
.dk-dashboard-alert:hover{border-color:#e0c27f;background:#fff6e3}
.dk-user-lock-alert{align-items:center}
.dk-user-lock-alert .dk-lock-action{margin:0;flex:0 0 auto}
.dk-user-lock-alert .dk-lock-action button{white-space:nowrap}
.dk-admin-user-summary{grid-template-columns:repeat(5,minmax(0,1fr))}

@media(max-width:1050px){
    .dk-admin-user-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:700px){
    .dk-security-alert{align-items:flex-start;flex-direction:column}
    .dk-user-lock-alert .dk-lock-action,.dk-user-lock-alert .dk-lock-action button{width:100%}
    .dk-admin-user-summary{grid-template-columns:1fr}
}

/* DK5-015 · Catálogo multiproducto */
.dk-catalog-summary{grid-template-columns:repeat(4,minmax(0,1fr))}
.dk-code-badge{
    display:inline-flex;align-items:center;min-height:26px;padding:4px 9px;border:1px solid var(--line-strong);border-radius:8px;
    background:#f7fafc;color:#24445f;font-family:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace;font-size:12px;font-weight:850;letter-spacing:.35px
}
.dk-catalog-description{max-width:520px;margin-top:5px!important}
.dk-catalog-form input[readonly]{background:#f4f7f9;color:#52687b;cursor:not-allowed}
.dk-catalog-form textarea{min-height:118px}
.dk-catalog-status-alert{margin:0;align-items:center}
.dk-catalog-status-alert form{margin:0;flex:0 0 auto}
.dk-catalog-status-alert button{white-space:nowrap}
.dk-catalog-product-inactive,.dk-catalog-lock-note{margin-bottom:20px}
.dk-catalog-lock-note{background:#f7fbfd;border-color:#cfe3e8;color:#365766}
.dk-catalog-lock-note .dk-security-note-title{color:#244c5b}
.dk-catalog-lock-note p{color:#4f6e7a}
@media(max-width:900px){
    .dk-catalog-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:700px){
    .dk-catalog-status-alert form,.dk-catalog-status-alert button{width:100%}
}
@media(max-width:580px){
    .dk-catalog-summary{grid-template-columns:1fr}
}

/* DK5-026C · Fecha y botón alineados en una sola fila para generar credenciales S2S */
.dk-credential-create-form{
    margin:0;
}
.dk-credential-create-grid{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:14px;
    align-items:start;
}
.dk-credential-create-field{
    min-width:0;
}
.dk-credential-create-field input{
    min-width:0;
}
.dk-credential-create-action{
    display:flex;
    align-items:flex-start;
    padding-top:26px;
}
.dk-credential-create-action button{
    min-width:190px;
    min-height:46px;
    padding:0 22px;
    white-space:nowrap;
}
@media(max-width:760px){
    .dk-credential-create-grid{
        grid-template-columns:1fr;
        gap:12px;
    }
    .dk-credential-create-action{
        padding-top:0;
    }
    .dk-credential-create-action button{
        width:100%;
        min-width:0;
    }
}
