:root {
    --du-navy: #071d34;
    --du-blue: #0875e1;
    --du-green: #32e68b;
    --du-text: #23384c;
    --du-muted: #6a7d8f;
    --du-border: #e2eaf2;
    --du-bg: #f5f8fb;
}

.du-page-app .entry-header,
.du-page-app .entry-title,
.du-page-auth .entry-header,
.du-page-auth .entry-title {
    display: none !important;
}

.du-page-app #content,
.du-page-app .site-content,
.du-page-auth #content,
.du-page-auth .site-content {
    padding: 0 !important;
    margin: 0 !important;
}

.du-page-app #primary,
.du-page-app .content-area,
.du-page-auth #primary,
.du-page-auth .content-area {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.du-page-app .site-content > .ast-container,
.du-page-auth .site-content > .ast-container {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
}

.du-page-app .entry-content,
.du-page-auth .entry-content {
    margin: 0 !important;
}

.du-page-app .entry-content > *,
.du-page-auth .entry-content > * {
    max-width: none !important;
    margin-block-start: 0 !important;
}

.du-btn {
    appearance: none;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    font: inherit;
    font-weight: 750;
    text-decoration: none !important;
    cursor: pointer;
}

.du-btn-primary {
    background: var(--du-green);
    color: #042236 !important;
    box-shadow: 0 10px 25px rgba(50,230,139,.18);
}

.du-btn-secondary {
    background: #eaf3fb;
    color: var(--du-navy) !important;
}

.du-alert {
    border-radius: 12px;
    padding: 14px 16px;
    margin: 0 0 22px;
    font-size: 14px;
    line-height: 1.55;
}

.du-alert a { font-weight: 700; }
.du-alert-error { background: #fff0f0; color: #8b2525; border: 1px solid #f1c7c7; }
.du-alert-success { background: #eafaf2; color: #17643f; border: 1px solid #bfe9d3; }
.du-alert-info { background: #edf6ff; color: #174d7d; border: 1px solid #cfe6fb; }

/* Auth */
.du-auth-shell {
    min-height: calc(100vh - 80px);
    background: linear-gradient(145deg, #eef6ff 0%, #f9fbfd 55%, #fff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.du-auth-card {
    width: 100%;
    max-width: 470px;
    background: #fff;
    border: 1px solid var(--du-border);
    border-radius: 24px;
    padding: 38px;
    box-shadow: 0 24px 70px rgba(7,29,52,.10);
}

.du-auth-card-wide { max-width: 650px; }
.du-auth-brand { color: var(--du-blue) !important; font-size: 18px; font-weight: 850; text-decoration: none !important; }
.du-auth-card h1 { margin: 18px 0 8px; color: var(--du-navy); font-size: 34px; line-height: 1.1; }
.du-auth-subtitle { margin: 0 0 26px !important; color: var(--du-muted) !important; }
.du-auth-links { display: flex; flex-direction: column; gap: 8px; margin-top: 22px; font-size: 13px; color: var(--du-muted); }

/* Forms */
.du-form label { display: flex; flex-direction: column; gap: 7px; color: var(--du-text); font-size: 13px; font-weight: 700; }
.du-form label small { color: var(--du-muted); font-weight: 400; }
.du-form input {
    width: 100%;
    min-height: 46px;
    border: 1px solid #cfdbe6;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
    color: #14293d;
    font: inherit;
    outline: none;
}
.du-form input:focus { border-color: var(--du-blue); box-shadow: 0 0 0 3px rgba(8,117,225,.10); }
.du-form input:disabled { background: #f2f5f8; color: #7b8b99; }
.du-form > label + label { margin-top: 16px; }
.du-form > .du-btn { width: 100%; margin-top: 20px; }
.du-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.du-span-2 { grid-column: span 2; }
.du-form-actions { display: flex; justify-content: flex-end; margin-top: 26px; }

/* App */
.du-app-shell {
    min-height: calc(100vh - 80px);
    display: grid;
    grid-template-columns: 245px minmax(0,1fr);
    background: var(--du-bg);
}

.du-app-sidebar {
    background: #06192c;
    color: #fff;
    padding: 28px 18px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 80px);
}

.du-app-logo { color: #fff !important; font-size: 22px; font-weight: 850; text-decoration: none !important; padding: 0 12px 24px; }
.du-app-nav { display: flex; flex-direction: column; gap: 5px; }
.du-app-nav-item { position: relative; display: flex; align-items: center; gap: 11px; min-height: 46px; padding: 10px 12px; border-radius: 10px; color: rgba(255,255,255,.72) !important; text-decoration: none !important; font-size: 14px; font-weight: 650; }
.du-app-nav-item:hover, .du-app-nav-item.is-active { background: rgba(255,255,255,.09); color: #fff !important; }
.du-app-nav-icon { width: 20px; text-align: center; }
.du-app-soon { margin-left: auto; font-size: 10px; padding: 3px 6px; border-radius: 999px; background: rgba(50,230,139,.13); color: #77efae; }
.du-app-logout { margin-top: auto; padding: 15px 12px 0; color: rgba(255,255,255,.58) !important; font-size: 13px; text-decoration: none !important; }

.du-app-main { width: 100%; max-width: 1200px; padding: 48px 50px 70px; }
.du-app-header { display: flex; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.du-app-kicker { color: var(--du-blue); font-size: 12px; font-weight: 850; letter-spacing: 1.5px; text-transform: uppercase; }
.du-app-header h1 { margin: 7px 0 8px; color: var(--du-navy); font-size: 38px; line-height: 1.08; }
.du-app-header p { margin: 0 !important; color: var(--du-muted) !important; }

.du-dashboard-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.du-dashboard-card { background: #fff; border: 1px solid var(--du-border); border-radius: 18px; padding: 27px; min-height: 190px; box-shadow: 0 10px 35px rgba(7,29,52,.04); }
.du-dashboard-card-primary { border-color: rgba(8,117,225,.22); background: linear-gradient(145deg,#fff,#f4f9ff); }
.du-card-icon { display: flex; align-items:center; justify-content:center; width: 44px; height:44px; border-radius:12px; background:#edf6ff; color:var(--du-blue); font-size:22px; margin-bottom:20px; }
.du-dashboard-card h2 { margin: 0 0 8px; color: var(--du-navy); font-size: 20px; }
.du-dashboard-card p { margin: 0 !important; color: var(--du-muted) !important; font-size:14px; line-height:1.6; }
.du-pill { display:inline-flex; margin-top:20px; padding:5px 9px; border-radius:999px; background:#e8f9f1; color:#1c7650; font-size:11px; font-weight:750; }

.du-panel { background:#fff; border:1px solid var(--du-border); border-radius:20px; padding:30px; box-shadow:0 10px 35px rgba(7,29,52,.04); }
.du-panel-title { margin-bottom:24px; }
.du-panel-title h2 { margin:0 0 6px; color:var(--du-navy); font-size:21px; }
.du-panel-title p { margin:0 !important; color:var(--du-muted) !important; font-size:13px; }

.du-empty-state { max-width:620px; margin:70px auto; background:#fff; border:1px solid var(--du-border); border-radius:24px; padding:55px 35px; text-align:center; }
.du-empty-state > span { font-size:44px; }
.du-empty-state h1 { margin:15px 0 10px; color:var(--du-navy); }
.du-empty-state p { color:var(--du-muted) !important; margin-bottom:25px !important; }

@media (max-width: 850px) {
    .du-app-shell { grid-template-columns: 1fr; }
    .du-app-sidebar { min-height: auto; padding: 16px; }
    .du-app-logo { padding-bottom: 14px; }
    .du-app-nav { flex-direction: row; overflow-x:auto; padding-bottom:4px; }
    .du-app-nav-item { flex:0 0 auto; }
    .du-app-logout { display:none; }
    .du-app-main { padding: 32px 20px 60px; }
    .du-dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .du-auth-card { padding: 28px 20px; }
    .du-form-grid { grid-template-columns: 1fr; }
    .du-span-2 { grid-column: auto; }
    .du-app-header h1 { font-size: 31px; }
    .du-form-actions .du-btn { width:100%; }
}

/* DeCA Uno 0.2 - Clientes y vehiculos */
.du-form select {
    width: 100%;
    min-height: 46px;
    border: 1px solid #cfdbe6;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
    color: #14293d;
    font: inherit;
    outline: none;
}
.du-form select:focus { border-color: var(--du-blue); box-shadow: 0 0 0 3px rgba(8,117,225,.10); }
.du-checkbox-field { flex-direction: row !important; align-items: center; gap: 10px !important; font-weight: 650 !important; }
.du-checkbox-field input[type="checkbox"] { width: 18px; min-height: 18px; height: 18px; margin: 0; flex: 0 0 18px; }
.du-panel-form-section { margin-bottom: 22px; }
.du-list-panel { margin-top: 22px; }
.du-panel-title-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.du-btn-small { padding: 9px 15px; font-size: 12px; }
.du-dashboard-link { display: block; text-decoration: none !important; color: inherit !important; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.du-dashboard-link:hover { transform: translateY(-2px); border-color: rgba(8,117,225,.25); box-shadow: 0 16px 40px rgba(7,29,52,.07); }
.du-card-stat { display: inline-flex; margin-top: 18px; color: var(--du-blue); font-size: 12px; font-weight: 800; }
.du-table-wrap { width: 100%; overflow-x: auto; }
.du-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.du-table th, .du-table td { padding: 15px 14px; border-bottom: 1px solid #e8eef4; text-align: left; vertical-align: middle; }
.du-table th { color: #617487; font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; background: #f8fafc; }
.du-table td { color: #23384c; font-size: 13px; }
.du-table tbody tr:last-child td { border-bottom: 1px solid #e8eef4; }
.du-table td strong { display: block; color: var(--du-navy); font-size: 13px; }
.du-table td small { display: block; color: var(--du-muted); font-size: 11px; line-height: 1.5; }
.du-table-actions-head { text-align: right !important; }
.du-table-actions { white-space: nowrap; text-align: right !important; }
.du-table-actions a { display: inline-flex; margin-left: 10px; font-size: 12px; font-weight: 750; text-decoration: none !important; }
.du-link-danger { color: #b63a3a !important; }
.du-inline-empty { padding: 35px 20px; text-align: center; color: var(--du-muted); }
.du-inline-empty > span { display: block; font-size: 34px; margin-bottom: 10px; }
.du-inline-empty strong { display: block; color: var(--du-navy); margin-bottom: 6px; }
.du-inline-empty p { margin: 0 !important; color: var(--du-muted) !important; font-size: 13px; }
.du-status { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.du-status.is-active { background: #e6f8ef; color: #197348; }
.du-status.is-inactive { background: #eef1f4; color: #687785; }

@media (max-width: 620px) {
    .du-panel-title-row { align-items: flex-start; flex-direction: column; }
    .du-panel-title-row .du-btn { width: 100%; }
}


/* DeCA Uno 0.2.1 - Formato de matriculas */
.du-registration-field input {
    text-transform: uppercase;
    letter-spacing: .4px;
}
.du-registration-field small {
    color: var(--du-muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
}

/* DeCA Uno 0.3 - Nuevo DeCA y borradores */
.du-form textarea {
    width: 100%;
    min-height: 100px;
    border: 1px solid #cfdbe6;
    border-radius: 10px;
    padding: 11px 12px;
    background: #fff;
    color: #14293d;
    font: inherit;
    line-height: 1.55;
    outline: none;
    resize: vertical;
}
.du-form textarea:focus { border-color: var(--du-blue); box-shadow: 0 0 0 3px rgba(8,117,225,.10); }
.du-deca-form { display: flex; flex-direction: column; gap: 20px; }
.du-deca-section { margin: 0; }
.du-deca-section .du-panel-title { position: relative; padding-left: 44px; }
.du-section-number {
    position: absolute;
    left: 0;
    top: -3px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 31px;
    border-radius: 10px;
    background: #edf6ff;
    color: var(--du-blue);
    font-size: 12px;
    font-weight: 850;
}
.du-deca-readonly-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.du-deca-readonly-grid > div { border: 1px solid #e4ebf2; background: #f8fafc; border-radius: 12px; padding: 15px 16px; }
.du-deca-readonly-grid span { display: block; color: var(--du-muted); font-size: 11px; font-weight: 700; margin-bottom: 4px; }
.du-deca-readonly-grid strong { display: block; color: var(--du-navy); font-size: 14px; }
.du-deca-textarea-label { display: block !important; }
.du-deca-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 4px 0 0; }
.du-deca-actions .du-btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.du-app-header-actions { align-items: center; }
.du-status.is-draft { background: #fff5d8; color: #8b6512; }
.du-documents-panel { margin-top: 0; }
.du-deca-table { min-width: 980px; }
.du-empty-action { margin-top: 18px; }
.du-form input[type="date"] { min-height: 46px; }

@media (max-width: 850px) {
    .du-app-header-actions { align-items: flex-start; flex-direction: column; }
    .du-app-header-actions .du-btn { width: 100%; }
}

@media (max-width: 620px) {
    .du-deca-readonly-grid { grid-template-columns: 1fr; }
    .du-deca-actions { flex-direction: column-reverse; align-items: stretch; }
    .du-deca-actions .du-btn { width: 100%; }
}

/* DeCA Uno 0.4 - PDF, QR y mejoras de desplegables */
.du-form select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 44px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20'%3E%3Cpath fill='%2314293d' d='M5.6 7.4a1 1 0 0 1 1.4 0l3 3 3-3a1 1 0 1 1 1.4 1.4l-3.7 3.7a1 1 0 0 1-1.4 0L5.6 8.8a1 1 0 0 1 0-1.4Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 14px 14px;
}
.du-status.is-issued { background: #e6f8ef; color: #197348; }
.du-status.is-pending { background: #fff0db; color: #9a5c08; }
.du-link-generate { color: #0875e1 !important; }
.du-link-download { color: #197348 !important; }
.du-table-actions a { margin-top: 3px; margin-bottom: 3px; }


/* DeCA Uno 0.4.2 - Visualizar y compartir documentos emitidos */
.du-deca-table { min-width: 1180px; }
.du-document-share-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 7px;
    max-width: 410px;
    margin-left: auto;
}
.du-table-actions .du-document-share-actions a,
.du-table-actions .du-document-share-actions button {
    margin: 0;
}
.du-doc-action {
    appearance: none;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 9px;
    border: 1px solid #dbe6ef;
    border-radius: 8px;
    background: #fff;
    color: #294258 !important;
    font: inherit;
    font-size: 11px !important;
    line-height: 1.2;
    font-weight: 750 !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.du-doc-action:hover {
    transform: translateY(-1px);
    background: #f6f9fc;
    border-color: #c8d8e6;
}
.du-doc-action-view { color: #0875e1 !important; background: #f0f7ff; border-color: #d4e9fb; }
.du-doc-action-download { color: #197348 !important; background: #effaf5; border-color: #d3efdf; }
.du-doc-action-whatsapp { color: #167847 !important; background: #ecfbf3; border-color: #ccefdc; }
.du-doc-action-share, .du-doc-action-copy { color: #43566a !important; }
.du-share-feedback {
    min-height: 0;
    margin: -8px 0 12px;
    text-align: right;
    color: #197348;
    font-size: 12px;
    font-weight: 700;
    opacity: 0;
    transition: opacity .18s ease;
}
.du-share-feedback.is-visible { opacity: 1; }
@media (max-width: 850px) {
    .du-document-share-actions { justify-content: flex-start; margin-left: 0; max-width: none; }
    .du-share-feedback { text-align: left; }
}


/* DeCA Uno 0.4.3 - Responsive app y tablas sin scroll horizontal */
.du-page-app #masthead,
.du-page-app .site-header,
.du-page-app #colophon,
.du-page-app .site-footer { display: none !important; }
.du-page-app #page,
.du-page-app .site { min-height: 100vh; }
.du-app-shell { min-height: 100vh; }
.du-app-sidebar { position: sticky; top: 0; align-self: start; height: 100vh; }
.du-app-mobile-bar { display: block; }
.du-app-menu-toggle { display: none; }
.du-app-main { box-sizing: border-box; max-width: 1440px; padding: 44px 36px 64px; }
.du-documents-panel .du-table-wrap { overflow-x: visible; }
.du-deca-table { min-width: 0; table-layout: fixed; }
.du-deca-table th:nth-child(1), .du-deca-table td:nth-child(1) { width: 15%; }
.du-deca-table th:nth-child(2), .du-deca-table td:nth-child(2) { width: 9%; }
.du-deca-table th:nth-child(3), .du-deca-table td:nth-child(3) { width: 12%; }
.du-deca-table th:nth-child(4), .du-deca-table td:nth-child(4) { width: 11%; }
.du-deca-table th:nth-child(5), .du-deca-table td:nth-child(5) { width: 10%; }
.du-deca-table th:nth-child(6), .du-deca-table td:nth-child(6) { width: 10%; }
.du-deca-table th:nth-child(7), .du-deca-table td:nth-child(7) { width: 33%; }
.du-deca-table td { overflow-wrap: anywhere; }
.du-deca-table .du-table-actions { white-space: normal; text-align: left !important; }
.du-deca-table .du-table-actions > a { margin-left: 0; margin-right: 8px; }
.du-document-share-actions { justify-content: flex-start; margin-left: 0; max-width: none; }
.du-doc-action { white-space: nowrap; }

@media (max-width: 1050px) {
    .du-app-shell { grid-template-columns: 220px minmax(0,1fr); }
    .du-app-main { padding: 36px 24px 56px; }
    .du-panel { padding: 24px; }
    .du-deca-table th, .du-deca-table td { padding-left: 10px; padding-right: 10px; }
    .du-doc-action { padding: 6px 7px; font-size: 10px !important; }
}

@media (max-width: 850px) {
    .du-app-shell { display: block; min-height: 100vh; }
    .du-app-sidebar { position: sticky; top: 0; z-index: 100; width: 100%; height: auto; min-height: 0; padding: 0; box-shadow: 0 8px 24px rgba(3,18,32,.12); }
    .du-app-mobile-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 62px; padding: 11px 16px; }
    .du-app-logo { padding: 0; font-size: 19px; }
    .du-app-menu-toggle { appearance: none; display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 7px 11px; border: 1px solid rgba(255,255,255,.20); border-radius: 9px; background: rgba(255,255,255,.08); color: #fff; font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; }
    .du-app-menu-icon { font-size: 16px; line-height: 1; }
    .du-app-nav { display: none; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; padding: 10px 12px 12px; border-top: 1px solid rgba(255,255,255,.09); overflow: visible; }
    .du-app-sidebar.is-open .du-app-nav { display: grid; }
    .du-app-nav-item { min-width: 0; min-height: 42px; padding: 8px 10px; font-size: 12px; }
    .du-app-logout { display: none; margin: 0; padding: 10px 16px 14px; border-top: 1px solid rgba(255,255,255,.09); }
    .du-app-sidebar.is-open .du-app-logout { display: block; }
    .du-app-main { max-width: none; padding: 28px 16px 48px; }
    .du-app-header { margin-bottom: 22px; }
    .du-app-header h1 { font-size: 31px; }
    .du-panel { padding: 20px; border-radius: 16px; }
    .du-dashboard-card { padding: 22px; min-height: 0; }
    .du-table-wrap { overflow: visible; }
    .du-table { display: block; width: 100%; min-width: 0 !important; }
    .du-table thead { display: none; }
    .du-table tbody { display: grid; gap: 14px; }
    .du-table tr { display: block; width: 100%; padding: 14px 16px; border: 1px solid #e2eaf2; border-radius: 14px; background: #fff; box-shadow: 0 7px 24px rgba(7,29,52,.04); }
    .du-table td, .du-deca-table td { display: grid; grid-template-columns: minmax(92px,34%) minmax(0,1fr); gap: 12px; width: 100% !important; padding: 9px 0; border-bottom: 1px solid #eef2f6; text-align: left !important; white-space: normal; overflow-wrap: anywhere; }
    .du-table td::before { content: attr(data-label); color: #708397; font-size: 10px; font-weight: 850; letter-spacing: .5px; text-transform: uppercase; }
    .du-table tbody tr:last-child td, .du-table td:last-child { border-bottom: 0; }
    .du-table-actions { display: block !important; padding-top: 13px !important; }
    .du-table-actions::before { display: block; margin-bottom: 9px; }
    .du-table-actions > a { margin: 4px 8px 4px 0 !important; }
    .du-document-share-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin: 7px 0 0; }
    .du-doc-action { width: 100%; min-height: 38px; padding: 8px 9px; font-size: 11px !important; }
    .du-doc-edit-link { display: inline-flex !important; min-height: 36px; align-items: center; justify-content: center; padding: 7px 12px; border: 1px solid #dbe6ef; border-radius: 8px; background: #fff; color: #294258 !important; }
    .du-share-feedback { margin: 0 0 10px; }
}

@media (max-width: 520px) {
    .du-app-main { padding: 24px 12px 42px; }
    .du-app-header h1 { font-size: 28px; }
    .du-app-header p { font-size: 13px; line-height: 1.5; }
    .du-panel { padding: 16px; }
    .du-panel-title h2 { font-size: 19px; }
    .du-table tr { padding: 12px 13px; }
    .du-table td, .du-deca-table td { grid-template-columns: 1fr; gap: 4px; padding: 8px 0; }
    .du-table td::before { font-size: 9px; }
    .du-document-share-actions { grid-template-columns: 1fr 1fr; }
    .du-deca-section .du-panel-title { padding-left: 39px; }
    .du-section-number { width: 29px; height: 29px; }
}

/* DeCA Uno 0.5 - cuentas, filtros, duplicado, historial y envío al conductor */
.du-auth-secondary-form { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--du-border); }
.du-auth-secondary-form .du-btn { width: 100%; margin-top: 16px; }

.du-account-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.du-account-card { min-width: 0; }
.du-account-email-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; margin-bottom: 18px; border: 1px solid #e2eaf2; border-radius: 12px; background: #f8fafc; }
.du-account-email-row span:first-child { display: block; margin-bottom: 4px; color: var(--du-muted); font-size: 11px; font-weight: 700; }
.du-account-email-row strong { color: var(--du-navy); overflow-wrap: anywhere; }
.du-verified-badge { display: inline-flex !important; flex: 0 0 auto; align-items: center; padding: 5px 9px; border-radius: 999px; background: #e6f8ef; color: #197348 !important; font-size: 11px !important; font-weight: 800 !important; }
.du-account-pending { margin-bottom: 18px; }

.du-document-filters { padding: 18px 20px; margin-bottom: 18px; border-radius: 16px; }
.du-filter-grid { display: grid; grid-template-columns: minmax(220px,2fr) minmax(140px,.8fr) minmax(135px,.7fr) minmax(135px,.7fr) auto; gap: 12px; align-items: end; }
.du-filter-grid label { display: flex; flex-direction: column; gap: 6px; color: var(--du-text); font-size: 11px; font-weight: 800; }
.du-filter-grid input, .du-filter-grid select { width: 100%; min-height: 42px; border: 1px solid #cfdbe6; border-radius: 9px; padding: 8px 11px; background-color: #fff; color: #14293d; font: inherit; outline: none; }
.du-filter-grid select { appearance: none; -webkit-appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20'%3E%3Cpath fill='%2314293d' d='M5.6 7.4a1 1 0 0 1 1.4 0l3 3 3-3a1 1 0 1 1 1.4 1.4l-3.7 3.7a1 1 0 0 1-1.4 0L5.6 8.8a1 1 0 0 1 0-1.4Z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; }
.du-filter-grid input:focus, .du-filter-grid select:focus { border-color: var(--du-blue); box-shadow: 0 0 0 3px rgba(8,117,225,.08); }
.du-filter-actions { display: flex; align-items: center; gap: 10px; min-height: 42px; }
.du-filter-reset { color: var(--du-muted) !important; font-size: 12px; font-weight: 700; text-decoration: none !important; }

.du-status.is-finalized { background: #eef0ff; color: #4b4c9b; }
.du-doc-primary-actions, .du-document-core-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 7px; }
.du-table-actions .du-doc-primary-actions a,
.du-table-actions .du-document-core-actions a { margin: 0 !important; }
.du-doc-action-duplicate { color: #5b4c8c !important; background: #f6f2ff; border-color: #e5ddf6; }
.du-doc-action-qr { color: #5d4b1d !important; background: #fff9e8; border-color: #f2e6b9; }
.du-doc-finalize { display: inline-flex !important; margin: 5px 0 0 !important; color: #197348 !important; font-size: 11px !important; font-weight: 800 !important; text-decoration: none !important; }

.du-send-driver, .du-version-history { margin-top: 8px; border: 1px solid #e2eaf2; border-radius: 10px; background: #fbfcfd; overflow: hidden; }
.du-send-driver summary, .du-version-history summary { cursor: pointer; list-style: none; padding: 9px 11px; color: #294258; font-size: 11px; font-weight: 800; }
.du-send-driver summary::-webkit-details-marker, .du-version-history summary::-webkit-details-marker { display: none; }
.du-send-driver summary::after, .du-version-history summary::after { content: '+'; float: right; color: var(--du-blue); }
.du-send-driver[open] summary::after, .du-version-history[open] summary::after { content: '−'; }
.du-send-driver .du-document-share-actions { padding: 0 10px 10px; margin: 0; }
.du-version-list { padding: 0 10px 8px; }
.du-version-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid #edf1f5; }
.du-version-row strong { display: inline !important; color: var(--du-navy); font-size: 11px !important; }
.du-version-row small { display: block; margin-top: 2px; color: var(--du-muted); font-size: 9px; }
.du-version-links { display: flex; gap: 8px; }
.du-version-links a { margin: 0 !important; color: var(--du-blue) !important; font-size: 10px !important; }

@media (max-width: 1050px) {
    .du-filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .du-filter-search { grid-column: 1 / -1; }
    .du-filter-actions { grid-column: 1 / -1; }
}

@media (max-width: 850px) {
    .du-account-grid { grid-template-columns: 1fr; }
    .du-document-filters { padding: 16px; }
    .du-filter-grid { grid-template-columns: 1fr 1fr; }
    .du-filter-search { grid-column: 1 / -1; }
    .du-filter-actions { grid-column: 1 / -1; }
    .du-doc-primary-actions, .du-document-core-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
    .du-doc-primary-actions > *, .du-document-core-actions > * { width: 100%; justify-content: center; min-height: 38px; }
    .du-send-driver, .du-version-history { margin-top: 10px; }
    .du-version-row { align-items: flex-start; }
}

@media (max-width: 520px) {
    .du-filter-grid { grid-template-columns: 1fr; }
    .du-filter-search, .du-filter-actions { grid-column: auto; }
    .du-filter-actions { align-items: stretch; flex-direction: column; }
    .du-filter-actions .du-btn { width: 100%; }
    .du-filter-reset { text-align: center; padding: 6px; }
    .du-account-email-row { align-items: flex-start; flex-direction: column; }
    .du-doc-primary-actions, .du-document-core-actions, .du-document-share-actions { grid-template-columns: 1fr 1fr; }
    .du-version-row { flex-direction: column; }
}
.du-audit-meta { padding: 8px 0; color: var(--du-muted); font-size: 9px; line-height: 1.45; border-top: 1px solid #edf1f5; }

/* Anti-bot honeypot: present in the DOM for simple bots, unreachable to users. */
.du-hp-field {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
}

.du-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #e3ebf3;
    color: #617286;
    font-size: 13px;
}

.du-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 13px;
    border: 1px solid #d7e2ec;
    border-radius: 10px;
    background: #fff;
    color: #0b2a45 !important;
    font-weight: 700;
    text-decoration: none !important;
}

.du-page-link:hover {
    border-color: #8dbce8;
    background: #f4f9fe;
}

@media (max-width: 640px) {
    .du-pagination {
        justify-content: space-between;
    }
}

/* DeCA Uno 0.5.5 - acciones empresariales, menús compactos e historial modal */
.du-fa {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    display: inline-block;
    fill: currentColor;
    vertical-align: -2px;
}
.du-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
.du-deca-table th:nth-child(1), .du-deca-table td:nth-child(1) { width: 16%; }
.du-deca-table th:nth-child(2), .du-deca-table td:nth-child(2) { width: 9%; }
.du-deca-table th:nth-child(3), .du-deca-table td:nth-child(3) { width: 14%; }
.du-deca-table th:nth-child(4), .du-deca-table td:nth-child(4) { width: 13%; }
.du-deca-table th:nth-child(5), .du-deca-table td:nth-child(5) { width: 11%; }
.du-deca-table th:nth-child(6), .du-deca-table td:nth-child(6) { width: 10%; }
.du-deca-table th:nth-child(7), .du-deca-table td:nth-child(7) { width: 27%; }
.du-deca-table .du-table-actions { overflow: visible; }
.du-action-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    min-height: 38px;
    white-space: nowrap;
}
.du-action-btn {
    appearance: none;
    box-sizing: border-box;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    margin: 0 !important;
    padding: 8px 12px;
    border: 1px solid #d9e3ec;
    border-radius: 9px;
    background: #fff;
    color: #28445d !important;
    font: inherit;
    font-size: 11px !important;
    line-height: 1;
    font-weight: 800 !important;
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(10,36,58,.04);
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.du-action-btn:hover,
.du-action-menu[open] > .du-action-btn {
    transform: translateY(-1px);
    border-color: #bfd3e5;
    background: #f8fbfe;
    box-shadow: 0 5px 14px rgba(10,36,58,.08);
}
.du-action-btn-view { color: #086cc4 !important; background: #f6fbff; border-color: #d7e9f7; }
.du-action-btn-generate { color: #fff !important; background: #0875e1; border-color: #0875e1; }
.du-action-btn-generate:hover { color: #fff !important; background: #0669cb; border-color: #0669cb; }
.du-action-btn-more { width: 36px; padding-left: 10px; padding-right: 10px; color: #52677a !important; }
.du-action-btn-more .du-fa { width: 12px; height: 16px; flex-basis: 12px; }
.du-action-menu {
    position: relative;
    display: inline-block;
    margin: 0;
}
.du-action-menu > summary { list-style: none; }
.du-action-menu > summary::-webkit-details-marker { display: none; }
.du-action-menu-send > summary::after {
    content: '';
    width: 6px;
    height: 6px;
    margin-left: 1px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    opacity: .7;
}
.du-action-menu-send[open] > summary::after { transform: translateY(1px) rotate(225deg); }
.du-action-dropdown {
    position: absolute;
    z-index: 120;
    top: calc(100% + 8px);
    left: 0;
    box-sizing: border-box;
    min-width: 220px;
    padding: 7px;
    border: 1px solid #dfe7ee;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(7,29,52,.16), 0 3px 10px rgba(7,29,52,.06);
}
.du-action-dropdown-more { left: auto; right: 0; min-width: 235px; }
.du-menu-item {
    appearance: none;
    box-sizing: border-box;
    width: 100%;
    min-height: 38px;
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin: 0 !important;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #294258 !important;
    font: inherit;
    font-size: 11px !important;
    line-height: 1.25;
    font-weight: 730 !important;
    text-align: left;
    text-decoration: none !important;
    cursor: pointer;
}
.du-menu-item:hover { background: #f3f7fa; color: #102c45 !important; }
.du-menu-item .du-fa { width: 14px; height: 14px; color: #64798c; }
.du-menu-item-whatsapp { color: #137a48 !important; }
.du-menu-item-whatsapp .du-fa { color: #18a957; }
.du-menu-item-success { color: #187145 !important; }
.du-menu-item-success .du-fa { color: #1c9a5c; }
.du-menu-item-danger { color: #ad3434 !important; }
.du-menu-item-danger .du-fa { color: #c44949; }
.du-menu-count {
    margin-left: auto;
    min-width: 20px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #eef4f8;
    color: #5d7285;
    font-size: 9px;
    font-weight: 850;
    text-align: center;
}
.du-menu-separator { display: block; height: 1px; margin: 6px 4px; background: #e7edf2; }
.du-share-feedback { margin-top: 0; }

body.du-modal-open { overflow: hidden; }
.du-modal[hidden] { display: none !important; }
.du-modal {
    position: fixed;
    z-index: 9999;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.du-modal-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(4,20,34,.55);
    cursor: default;
    backdrop-filter: blur(2px);
}
.du-modal-dialog {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    width: min(700px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    overflow: hidden;
    border: 1px solid #dfe7ee;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 28px 70px rgba(3,18,32,.28);
    text-align: left;
}
.du-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 26px 20px;
    border-bottom: 1px solid #e7edf2;
}
.du-modal-kicker { display: block; margin-bottom: 5px; color: #0875e1; font-size: 10px; font-weight: 850; letter-spacing: .7px; text-transform: uppercase; }
.du-modal-header h3 { margin: 0 0 5px; color: var(--du-navy); font-size: 22px; line-height: 1.2; }
.du-modal-header p { margin: 0; color: var(--du-muted); font-size: 12px; line-height: 1.5; }
.du-modal-close {
    appearance: none;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border: 1px solid #dfe7ee;
    border-radius: 9px;
    background: #fff;
    color: #5a6f82;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.du-modal-close:hover { background: #f5f8fa; color: #1e3951; }
.du-modal-body { max-height: calc(100vh - 190px); overflow-y: auto; padding: 20px 26px 26px; }
.du-history-meta {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.du-history-meta span { padding: 11px 13px; border: 1px solid #e4ebf1; border-radius: 10px; background: #f8fafc; color: #6d8092; font-size: 10px; }
.du-history-meta strong { display: block; margin-top: 3px; color: #294258; font-size: 11px; }
.du-history-list { display: grid; gap: 10px; }
.du-history-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 14px;
    border: 1px solid #e2e9f0;
    border-radius: 12px;
    background: #fff;
}
.du-history-row.is-current { border-color: #bcdcf5; background: #f7fbff; }
.du-history-version { display: flex; align-items: center; gap: 11px; min-width: 0; }
.du-history-version > div { min-width: 0; }
.du-history-version strong { display: block; color: #1b3349; font-size: 12px; }
.du-history-version small { display: block; margin-top: 2px; color: #75889a; font-size: 10px; }
.du-history-badge { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 9px; background: #edf5fb; color: #0875e1; font-size: 11px; font-weight: 850; }
.du-history-current { padding: 3px 7px; border-radius: 999px; background: #e4f7ed; color: #197348; font-size: 9px; font-weight: 850; }
.du-history-actions { display: flex; align-items: center; gap: 6px; }
.du-history-actions a {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    min-height: 31px;
    margin: 0 !important;
    padding: 6px 8px;
    border: 1px solid #dce5ed;
    border-radius: 8px;
    background: #fff;
    color: #36526a !important;
    font-size: 10px !important;
    font-weight: 780 !important;
    text-decoration: none !important;
}
.du-history-actions a:hover { background: #f4f8fb; }
.du-history-actions .du-fa { width: 12px; height: 12px; flex-basis: 12px; }

@media (max-width: 1050px) {
    .du-action-btn { padding-left: 9px; padding-right: 9px; gap: 5px; }
    .du-action-btn span:not(.du-sr-only) { font-size: 10px; }
}
@media (max-width: 850px) {
    .du-action-bar { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) 42px; gap: 8px; }
    .du-action-bar > .du-action-btn,
    .du-action-bar > .du-action-menu > summary { width: 100%; min-height: 40px; }
    .du-action-menu { min-width: 0; }
    .du-action-menu-more { width: 42px; }
    .du-action-dropdown { min-width: 230px; }
    .du-action-menu-send .du-action-dropdown { left: 0; right: auto; }
    .du-action-menu-more .du-action-dropdown { right: 0; left: auto; }
    .du-table-actions::before { margin-bottom: 10px; }
    .du-modal { padding: 16px; }
    .du-modal-header { padding: 20px 20px 16px; }
    .du-modal-body { padding: 16px 20px 20px; }
}
@media (max-width: 560px) {
    .du-action-bar { grid-template-columns: 1fr 1fr 40px; }
    .du-action-btn { padding-left: 8px; padding-right: 8px; }
    .du-action-dropdown { min-width: 210px; }
    .du-modal { padding: 10px; align-items: flex-end; }
    .du-modal-dialog { width: 100%; max-height: calc(100vh - 20px); border-radius: 16px 16px 0 0; }
    .du-modal-header { padding: 18px 16px 14px; }
    .du-modal-header h3 { font-size: 19px; }
    .du-modal-body { max-height: calc(100vh - 155px); padding: 14px 16px 20px; }
    .du-history-meta { grid-template-columns: 1fr; }
    .du-history-row { align-items: flex-start; flex-direction: column; gap: 12px; }
    .du-history-actions { width: 100%; display: grid; grid-template-columns: repeat(3,1fr); }
    .du-history-actions a { justify-content: center; }
}


/* DeCA Uno 0.5.6 - tarjeta móvil compacta para Mis DeCA */
@media (max-width: 620px) {
    .du-documents-panel .du-table-wrap { overflow: visible; }
    .du-deca-table tbody { gap: 12px; }
    .du-deca-table tr {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 16px;
        row-gap: 0;
        padding: 15px 16px !important;
        border: 1px solid #dde7ef;
        border-radius: 14px;
        box-shadow: 0 7px 22px rgba(7,29,52,.045);
    }
    .du-deca-table td {
        display: block !important;
        width: auto !important;
        min-width: 0;
        padding: 9px 0 !important;
        border: 0 !important;
        text-align: left !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }
    .du-deca-table td::before {
        display: block;
        margin: 0 0 4px;
        color: #7a8da0;
        font-size: 8.5px;
        line-height: 1.2;
        font-weight: 850;
        letter-spacing: .55px;
    }
    .du-deca-table td strong { font-size: 12.5px; line-height: 1.35; }
    .du-deca-table td small { margin-top: 2px; font-size: 10px; line-height: 1.35; }
    .du-deca-table td:nth-child(1) {
        grid-column: 1 / -1;
        padding-bottom: 12px !important;
        margin-bottom: 2px;
        border-bottom: 1px solid #edf2f6 !important;
    }
    .du-deca-table td:nth-child(4),
    .du-deca-table td:nth-child(5) { padding-top: 10px !important; }
    .du-deca-table td:nth-child(6) {
        grid-column: 1 / -1;
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 0 12px !important;
    }
    .du-deca-table td:nth-child(6)::before { margin: 0; }
    .du-deca-table td:nth-child(6) .du-status {
        width: auto;
        max-width: 65%;
        justify-content: center;
        padding-left: 10px;
        padding-right: 10px;
    }
    .du-deca-table td:nth-child(7) {
        grid-column: 1 / -1;
        padding-top: 13px !important;
        border-top: 1px solid #edf2f6 !important;
    }
    .du-deca-table .du-table-actions::before { margin-bottom: 9px; }
    .du-deca-table .du-action-bar {
        grid-template-columns: minmax(0,1fr) minmax(0,1fr) 42px;
        gap: 7px;
    }
    .du-deca-table .du-action-btn { min-height: 40px; }
}

@media (max-width: 380px) {
    .du-deca-table tr { grid-template-columns: 1fr; }
    .du-deca-table td:nth-child(1),
    .du-deca-table td:nth-child(6),
    .du-deca-table td:nth-child(7) { grid-column: 1; }
    .du-deca-table td:nth-child(6) { display: block !important; }
    .du-deca-table td:nth-child(6)::before { margin-bottom: 5px; }
    .du-deca-table td:nth-child(6) .du-status { max-width: 100%; }
}
