/* TUH Credentials - Frontend Styles */

/* =========================================
   Variables
   ========================================= */
.tuh-credentials {
    --tc-primary: #2563eb;
    --tc-primary-hover: #1d4ed8;
    --tc-success: #16a34a;
    --tc-warning: #f59e0b;
    --tc-danger: #dc2626;
    --tc-text: #1f2937;
    --tc-text-muted: #6b7280;
    --tc-bg: #f9fafb;
    --tc-card-bg: #ffffff;
    --tc-border: #e5e7eb;
    --tc-radius: 8px;
    --tc-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --tc-transition: 0.2s ease;

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--tc-text);
}

/* =========================================
   Plan Badge
   ========================================= */
.tuh-credentials-plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: color-mix(in srgb, var(--plan-color, #6c757d) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--plan-color, #6c757d) 30%, transparent);
    border-radius: 20px;
    margin-bottom: 16px;
}

.tuh-credentials-plan-badge__label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--plan-color, #6c757d);
}

.tuh-credentials-plan-badge__expires {
    font-size: 11px;
    color: var(--tc-text-muted);
}

/* =========================================
   Welcome Card
   ========================================= */
.tuh-credentials-welcome {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--tc-radius);
    margin-bottom: 20px;
    position: relative;
}

.tuh-credentials-welcome__icon {
    flex-shrink: 0;
    color: var(--tc-primary);
    margin-top: 1px;
}

.tuh-credentials-welcome__text {
    flex: 1;
    font-size: 13px;
    line-height: 1.5;
    color: #1e40af;
}

.tuh-credentials-welcome__close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #93c5fd;
    transition: color var(--tc-transition);
    line-height: 1;
}

.tuh-credentials-welcome__close:hover {
    color: #1e40af;
}

/* =========================================
   Error State
   ========================================= */
.tuh-credentials-error {
    padding: 16px 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--tc-radius);
    color: #991b1b;
    font-size: 14px;
}

/* =========================================
   Empty State
   ========================================= */
.tuh-credentials-empty {
    text-align: center;
    padding: 48px 20px;
}

.tuh-credentials-empty__icon {
    margin-bottom: 16px;
    color: var(--tc-text-muted);
}

.tuh-credentials-empty__title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--tc-text);
}

.tuh-credentials-empty__text {
    font-size: 14px;
    color: var(--tc-text-muted);
    margin: 0;
}

.tuh-credentials-empty__text a {
    color: var(--tc-primary);
    text-decoration: none;
}

.tuh-credentials-empty__text a:hover {
    text-decoration: underline;
}

/* =========================================
   Filter Bar
   ========================================= */
.tuh-credentials-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tuh-credentials-filters__platforms {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
}

.tuh-credentials-platform-pill {
    all: unset !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 6px 12px !important;
    border: 1px solid #eae8e4 !important;
    border-radius: 20px !important;
    background: #fff !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #6b7280 !important;
    cursor: pointer !important;
    transition: all .2s !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    line-height: 1.4 !important;
}

.tuh-credentials-platform-pill:hover {
    border-color: #2563eb !important;
    color: #2563eb !important;
    background: #fff !important;
}

.tuh-credentials-platform-pill.active {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #fff !important;
}

.tuh-credentials-platform-pill__count {
    font-size: 11px !important;
    opacity: 0.7;
}

.tuh-credentials-filters__search {
    flex: 0 0 220px;
}

.tuh-credentials-search {
    all: unset !important;
    display: block !important;
    width: 100% !important;
    padding: 8px 14px !important;
    border: 1px solid #eae8e4 !important;
    border-radius: 20px !important;
    background: #fff !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 13px !important;
    color: #1a1a1e !important;
    outline: none !important;
    transition: border-color .2s, box-shadow .2s !important;
    box-sizing: border-box !important;
}

.tuh-credentials-search:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1) !important;
}

.tuh-credentials-search::placeholder {
    color: #b8b8be !important;
    font-weight: 400 !important;
}

/* =========================================
   Game Cards Grid
   ========================================= */
.tuh-credentials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 640px) {
    .tuh-credentials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .tuh-credentials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =========================================
   Game Card (v2 — inline field, span actions)
   ========================================= */
.tc-card{
    background:#fff;
    border:1px solid #eae8e4;
    border-radius:10px;
    overflow:hidden;
    transition:box-shadow .2s,border-color .2s;
}
.tc-card:hover{
    box-shadow:0 2px 12px rgba(0,0,0,.06);
    border-color:#d4d0cb;
}

.tc-card-hdr{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:10px 14px;
    background:#f2f0ec;
    border-bottom:1px solid #eae8e4;
    gap:8px;
}

.tc-card-row{
    display:flex;
    align-items:flex-start;
}
.tc-card-img{
    flex-shrink:0;
    width:80px;
    padding:10px 0 10px 10px;
}
.tc-card-img img{
    display:block;
    width:80px;
    height:110px;
    object-fit:cover;
    border-radius:6px;
    box-shadow:0 2px 6px rgba(0,0,0,.12);
}
.tc-card-content{
    flex:1;
    min-width:0;
}
@media(max-width:480px){
    .tc-card-img{width:60px;padding:8px 0 8px 8px}
    .tc-card-img img{width:60px;height:82px}
}

.tc-card-name{
    font-size:13px;
    font-weight:600;
    color:#1a1a1e;
    flex:1;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.tc-card-plat{
    display:inline-flex;
    padding:2px 8px;
    border-radius:10px;
    font-size:10px;
    font-weight:600;
    color:#fff;
    text-transform:uppercase;
    letter-spacing:.5px;
    white-space:nowrap;
    flex-shrink:0;
}

.tc-card-body{
    padding:12px 14px;
}

/* — Inline field — */
.tc-field{
    margin-bottom:8px;
}
.tc-field:last-of-type{
    margin-bottom:0;
}

.tc-field-lbl{
    font-size:10px;
    font-weight:700;
    color:#b8b8be;
    text-transform:uppercase;
    letter-spacing:.06em;
    margin-bottom:4px;
}

.tc-field-box{
    display:flex;
    align-items:center;
    background:#f7f5f2;
    border:1px solid #eae8e4;
    border-radius:7px;
    overflow:hidden;
}
.tc-field-box:hover{
    border-color:#d4d0cb;
    box-shadow:0 1px 4px rgba(0,0,0,.04);
}

.tc-field-val{
    flex:1;
    font-family:'Fira Code','Cascadia Code','SF Mono',monospace;
    font-size:12px;
    font-weight:600;
    color:#1a1a1e;
    letter-spacing:.02em;
    padding:8px 12px;
    user-select:all;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.tc-field-val--masked{
    letter-spacing:2px;
    color:#8a8a92;
    user-select:none;
}

.tc-field-val--masked.revealed{
    letter-spacing:normal;
    color:#1a1a1e;
}

/* Separator line (span, not border) */
.tc-field-sep{
    width:1px;
    align-self:stretch;
    background:#eae8e4;
    flex-shrink:0;
}

/* Action span (NOT button — avoids theme reset) */
.tc-field-act{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:4px;
    padding:0 11px;
    height:34px;
    font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
    font-size:10px;
    font-weight:700;
    color:#8a8a92;
    cursor:pointer;
    transition:background .12s,color .12s;
    white-space:nowrap;
    line-height:1;
    user-select:none;
    -webkit-user-select:none;
}
.tc-field-act:hover{
    background:#f2f0ec;
    color:#1a1a1e;
}
.tc-field-act:active{
    transform:scale(.97);
}
.tc-field-act.copied{
    color:#059669;
    background:#ecfdf5;
}
.tc-field-act[data-disabled="true"]{
    opacity:.35;
    cursor:not-allowed;
    pointer-events:none;
}
.tc-field-act svg{
    flex-shrink:0;
}

/* — Linked Accounts — */
.tc-linked{
    margin-top:10px;
    padding-top:10px;
    border-top:1px solid #eae8e4;
}

.tc-linked-hdr{
    display:flex;
    align-items:center;
    gap:5px;
    font-size:10px;
    font-weight:800;
    color:#8a8a92;
    text-transform:uppercase;
    letter-spacing:.08em;
    margin-bottom:10px;
}
.tc-linked-hdr svg{opacity:.5}

.tc-linked-item{
    margin-bottom:8px;
    padding:8px 10px;
    background:#faf9f8;
    border:1px solid #f2f0ec;
    border-radius:8px;
}
.tc-linked-item:last-child{margin-bottom:0}

.tc-linked-name{
    display:flex;
    align-items:center;
    gap:6px;
    font-size:11px;
    font-weight:700;
    color:#4a4a52;
    margin-bottom:6px;
}

.tc-linked-dot{
    width:8px;
    height:8px;
    border-radius:50%;
    flex-shrink:0;
}

.tc-linked-item .tc-field{
    margin-bottom:0;
}

.tc-linked-item .tc-field-lbl{
    font-size:9px;
}

.tc-linked-item .tc-field-box{
    background:#fff;
}

.tc-linked-item .tc-field-val{
    font-size:11px;
    padding:6px 10px;
}

.tc-linked-item .tc-field-act{
    height:30px;
    padding:0 9px;
    font-size:9px;
}

/* — PDF Download — */
.tc-card-pdf{
    margin-top:8px;
    padding-top:8px;
    border-top:1px solid #f2f0ec;
}

.tc-pdf-btn{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:7px 14px;
    background:#f7f5f2;
    border:1px solid #eae8e4;
    border-radius:7px;
    font-size:11px;
    font-weight:700;
    color:#4a4a52;
    text-decoration:none;
    transition:all .15s;
    cursor:pointer;
}
.tc-pdf-btn:hover{
    background:#eeedea;
    border-color:#d4d0cb;
    color:#1a1a1e;
    text-decoration:none;
}
.tc-pdf-btn:active{
    transform:scale(.97);
}
.tc-pdf-btn svg{
    flex-shrink:0;
    color:#8a8a92;
}

/* — Notes — */
.tc-card-notes{
    margin-top:6px;
    padding-top:6px;
    border-top:1px solid #f2f0ec;
}
.tc-card-notes-tog{
    display:inline-flex;
    align-items:center;
    gap:4px;
    font-size:11px;
    color:#8a8a92;
    cursor:pointer;
    padding:2px 0;
    transition:color .2s;
    user-select:none;
}
.tc-card-notes-tog:hover{color:#4a4a52}
.tc-card-notes-tog svg{transition:transform .2s}
.tc-card-notes-tog.open svg{transform:rotate(180deg)}

.tuh-credentials-card__notes-content{
    font-size:12px;
    color:#8a8a92;
    line-height:1.5;
    padding:6px 0 0;
}

/* =========================================
   Ver Todos (Modal Trigger)
   ========================================= */
.tc-open-modal-wrap{
    text-align:center;
    padding:20px 0;
}
.tc-open-modal-btn{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:10px 24px;
    border:1px solid #eae8e4;
    border-radius:20px;
    background:#fff;
    font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
    font-size:13px;
    font-weight:600;
    color:#1a1a1e;
    cursor:pointer;
    transition:all .2s;
    user-select:none;
}
.tc-open-modal-btn:hover{
    border-color:#2563eb;
    color:#2563eb;
    box-shadow:0 2px 8px rgba(37,99,235,.1);
}
.tc-open-modal-btn svg{flex-shrink:0;opacity:.5}

/* =========================================
   Modal
   ========================================= */
.tc-modal{
    display:none;
    position:fixed;
    inset:0;
    z-index:100000;
}
.tc-modal.tc-modal--open{
    display:flex;
    align-items:center;
    justify-content:center;
}
.tc-modal-backdrop{
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.5);
    animation:tc-fade-in .2s ease;
}
@keyframes tc-fade-in{from{opacity:0}to{opacity:1}}

.tc-modal-container{
    position:relative;
    width:90vw;
    max-width:920px;
    max-height:85vh;
    background:#fff;
    border-radius:14px;
    display:flex;
    flex-direction:column;
    box-shadow:0 20px 60px rgba(0,0,0,.2);
    animation:tc-slide-up .25s ease;
    overflow:hidden;
}
@keyframes tc-slide-up{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:none}}

/* — Header — */
.tc-modal-header{
    display:flex;
    align-items:center;
    gap:8px;
    padding:16px 20px;
    border-bottom:1px solid #eae8e4;
    flex-shrink:0;
}
.tc-modal-title{
    font-size:1rem;
    font-weight:800;
    color:#1a1a1e;
    margin:0;
    letter-spacing:-.02em;
}
.tc-modal-count{
    font-size:.75rem;
    font-weight:600;
    color:#8a8a92;
    background:#f2f0ec;
    padding:2px 10px;
    border-radius:20px;
}
.tc-modal-close{
    margin-left:auto;
    display:flex;
    align-items:center;
    justify-content:center;
    width:32px;
    height:32px;
    border-radius:8px;
    color:#8a8a92;
    cursor:pointer;
    transition:all .15s;
    user-select:none;
}
.tc-modal-close:hover{
    background:#f2f0ec;
    color:#1a1a1e;
}

/* — Toolbar — */
.tc-modal-toolbar{
    padding:12px 20px;
    border-bottom:1px solid #eae8e4;
    flex-shrink:0;
}
.tc-modal-search-wrap{
    display:flex;
    align-items:center;
    gap:8px;
    padding:8px 14px;
    background:#f7f5f2;
    border:1px solid #eae8e4;
    border-radius:8px;
    margin-bottom:10px;
}
.tc-modal-search-wrap svg{color:#b8b8be;flex-shrink:0}
.tc-modal-search{
    all:unset !important;
    flex:1 !important;
    font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif !important;
    font-size:13px !important;
    color:#1a1a1e !important;
    box-sizing:border-box !important;
}
.tc-modal-search::placeholder{color:#b8b8be !important}
.tc-modal-platforms{
    display:flex;
    gap:6px;
    flex-wrap:wrap;
}

/* — Body — */
.tc-modal-body{
    flex:1;
    overflow-y:auto;
    padding:16px 20px;
    min-height:200px;
}
.tc-modal-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:12px;
}
@media(max-width:560px){.tc-modal-grid{grid-template-columns:1fr}}

/* Skeleton */
.tc-modal-loading{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:12px;
}
@media(max-width:560px){.tc-modal-loading{grid-template-columns:1fr}}

/* Compact actions inside modal cards */
.tc-modal-grid .tc-field-act{
    font-size:9px;
    padding:0 8px;
    height:30px;
}
.tc-modal-grid .tc-field-val{
    font-size:11px;
    padding:6px 8px;
}
.tc-modal-grid .tc-card-img{width:70px}
.tc-modal-grid .tc-card-img img{width:70px}
.tc-skel{
    height:140px;
    border-radius:10px;
    background:linear-gradient(90deg,#f2f0ec 25%,#eae8e4 50%,#f2f0ec 75%);
    background-size:200% 100%;
    animation:tc-shimmer 1.5s infinite;
}
@keyframes tc-shimmer{0%{background-position:-200% 0}100%{background-position:200% 0}}

/* Empty */
.tc-modal-empty{
    text-align:center;
    padding:40px 20px;
    color:#8a8a92;
    font-size:14px;
}

/* — Footer — */
.tc-modal-footer{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:12px 20px;
    border-top:1px solid #eae8e4;
    flex-shrink:0;
}
.tc-modal-page-info{
    font-size:12px;
    color:#8a8a92;
    font-weight:500;
}
.tc-modal-page-btns{
    display:flex;
    gap:6px;
}
.tc-modal-prev,
.tc-modal-next{
    display:inline-flex;
    align-items:center;
    gap:4px;
    padding:6px 14px;
    border:1px solid #eae8e4;
    border-radius:7px;
    font-size:12px;
    font-weight:600;
    color:#4a4a52;
    cursor:pointer;
    transition:all .15s;
    user-select:none;
}
.tc-modal-prev:hover,
.tc-modal-next:hover{
    border-color:#2563eb;
    color:#2563eb;
    background:#f7f9ff;
}
.tc-modal-prev[data-disabled="true"],
.tc-modal-next[data-disabled="true"]{
    opacity:.35;
    pointer-events:none;
}
.tc-modal-prev svg,
.tc-modal-next svg{flex-shrink:0}

/* — Mobile fullscreen — */
@media(max-width:560px){
    .tc-modal-container{
        width:100%;
        max-width:100%;
        max-height:100%;
        height:100%;
        border-radius:0;
    }
    .tc-modal-header{padding:12px 16px}
    .tc-modal-toolbar{padding:10px 16px}
    .tc-modal-body{padding:12px 16px}
    .tc-modal-footer{padding:10px 16px}
}

/* Restore Cards */
.tuh-credentials-restore {
    text-align: center;
    padding: 12px 0 0;
}

.tuh-credentials-restore__btn {
    background: none;
    border: none;
    font-size: 11px;
    color: var(--tc-text-muted);
    cursor: pointer;
    text-decoration: underline;
    opacity: 0.6;
    transition: opacity var(--tc-transition);
}

.tuh-credentials-restore__btn:hover {
    opacity: 1;
}

/* =========================================
   Denuvo Tab
   ========================================= */
.tuh-credentials-denuvo__section {
    margin-bottom: 24px;
}

.tuh-credentials-denuvo__section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--tc-border);
    color: var(--tc-text);
}

.tuh-credentials-denuvo__card {
    background: var(--tc-card-bg);
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius);
    margin-bottom: 10px;
    overflow: hidden;
}

.tuh-credentials-denuvo__card--waiting {
    border-left: 3px solid var(--tc-warning);
}

.tuh-credentials-denuvo__card--activated {
    border-left: 3px solid var(--tc-success);
}

.tuh-credentials-denuvo__card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: var(--tc-bg);
    border-bottom: 1px solid var(--tc-border);
}

.tuh-credentials-denuvo__card-icon {
    color: var(--tc-warning);
    flex-shrink: 0;
    display: flex;
}

.tuh-credentials-denuvo__card-icon--success {
    color: var(--tc-success);
}

.tuh-credentials-denuvo__card-title {
    font-size: 14px;
    font-weight: 600;
    flex: 1;
}

.tuh-credentials-denuvo__card-body {
    padding: 12px 14px;
}

.tuh-credentials-denuvo__info {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    font-size: 13px;
}

.tuh-credentials-denuvo__label {
    font-weight: 500;
    color: var(--tc-text-muted);
    flex-shrink: 0;
}

.tuh-credentials-denuvo__status--waiting {
    color: var(--tc-warning);
    font-weight: 600;
}

.tuh-credentials-denuvo__message {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fffbeb;
    border: 1px solid #fef3c7;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.5;
    color: #92400e;
}

.tuh-credentials-denuvo__message--global {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

/* =========================================
   Skeleton Loading
   ========================================= */
.tuh-credentials-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: tuh-credentials-shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes tuh-credentials-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* =========================================
   Toast
   ========================================= */
.tuh-credentials-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 16px;
    background: #1f2937;
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    z-index: 99999;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.tuh-credentials-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 639px) {
    .tuh-credentials-filters {
        flex-direction: column;
    }

    .tuh-credentials-filters__search {
        flex: 1;
        width: 100%;
    }

    .tuh-credentials-card__title {
        font-size: 12px;
    }
}

/* =========================================
   Denuvo Tab (v2)
   ========================================= */

.tdn{max-width:680px}

.tdn-empty{text-align:center;padding:40px 20px;color:#8a8a92}
.tdn-empty-t{font-size:1rem;font-weight:600;margin:12px 0 4px;color:#4a4a52}
.tdn-empty-s{font-size:.85rem}

.tdn-card{
  background:#fff;
  border:1px solid #eae8e4;
  border-radius:16px;
  margin-bottom:16px;
  overflow:hidden;
  transition:box-shadow .25s;
}
.tdn-card:hover{box-shadow:0 4px 20px rgba(0,0,0,.04)}
.tdn-card--active{border-left:4px solid #059669}
.tdn-card--wait{border-left:4px solid #d97706}
.tdn-card--revoked{border-left:4px solid #dc2626;opacity:.6}

.tdn-card-top{display:flex;align-items:center;gap:14px;padding:20px 22px 14px}

.tdn-cover{
  width:50px;height:66px;border-radius:9px;flex-shrink:0;
  background:linear-gradient(145deg,#1e293b,#334155);
  display:grid;place-items:center;
  box-shadow:0 3px 10px rgba(0,0,0,.18);overflow:hidden;
}
.tdn-cover img{width:100%;height:100%;object-fit:cover}

.tdn-info{flex:1;min-width:0}
.tdn-name-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:3px}
.tdn-name{font-size:1.02rem;font-weight:700;letter-spacing:-.02em;color:#1a1a1e}

.tdn-tag{
  display:inline-flex;align-items:center;gap:3px;
  font-size:.58rem;font-weight:800;
  letter-spacing:.08em;text-transform:uppercase;
  padding:3px 8px;border-radius:5px;line-height:1;
}
.tdn-tag--g{background:#ecfdf5;color:#059669;border:1px solid #a7f3d0}
.tdn-tag--a{background:#fffbeb;color:#d97706;border:1px solid #fde68a}
.tdn-tag--r{background:#fef2f2;color:#dc2626;border:1px solid #fecaca}

.tdn-meta{font-size:.76rem;color:#8a8a92;display:flex;align-items:center;gap:4px}
.tdn-meta svg{opacity:.45;flex-shrink:0}

.tdn-card-body{padding:0 22px 18px}

.tdn-alert{
  display:flex;gap:10px;align-items:flex-start;
  padding:11px 14px;border-radius:10px;
  margin-bottom:12px;font-size:.78rem;line-height:1.55;
}
.tdn-alert svg{flex-shrink:0;margin-top:1px}
.tdn-alert strong{font-weight:700}
.tdn-alert--warn{background:#fffbeb;border:1px solid #fde68a;color:#92400e}
.tdn-alert--warn strong{color:#78350f}
.tdn-alert--red{background:#fef2f2;border:1px solid #fecaca;color:#dc2626}

.tdn-vault{
  border:1px solid #eae8e4;border-radius:10px;
  overflow:hidden;background:#f7f5f2;
}

.tdn-vault-hdr{
  padding:9px 14px;
  background:#eeedea;border-bottom:1px solid #eae8e4;
  font-size:.63rem;font-weight:800;color:#8a8a92;
  letter-spacing:.1em;text-transform:uppercase;
  display:flex;align-items:center;gap:6px;
}

.tdn-field{
  padding:10px 14px;
  border-bottom:1px solid #eae8e4;
}
.tdn-field:last-child{border-bottom:none}

.tdn-label{
  font-size:.6rem;font-weight:700;color:#b8b8be;
  text-transform:uppercase;letter-spacing:.06em;
  margin-bottom:6px;
}

.tdn-input{
  display:flex;align-items:center;
  background:#fff;
  border:1px solid #eae8e4;
  border-radius:8px;
  overflow:hidden;
  transition:border-color .15s,box-shadow .15s;
}
.tdn-input:hover{
  border-color:#d4d0cb;
  box-shadow:0 1px 4px rgba(0,0,0,.04);
}

.tdn-text{
  flex:1;
  font-family:'Fira Code','Cascadia Code',monospace;
  font-size:.86rem;font-weight:600;
  color:#1a1a1e;
  letter-spacing:.02em;
  padding:10px 14px;
  user-select:all;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
}
.tdn-dots{letter-spacing:.18em;color:#8a8a92;user-select:none}
.tdn-dots .tdn-r{letter-spacing:.02em;color:#1a1a1e}
.tdn-text i{font-style:normal}

.tdn-actions{
  display:flex !important;
  flex-shrink:0;
  border-left:1px solid #eae8e4 !important;
  margin-left:auto;
}

.tdn-vault .tdn-ab{
  all:unset !important;
  display:flex !important;align-items:center !important;justify-content:center !important;
  gap:5px !important;
  padding:0 14px !important;
  height:42px !important;
  background:transparent !important;
  border-left:1px solid #eae8e4 !important;
  font-family:'Plus Jakarta Sans',system-ui,sans-serif !important;
  font-size:.68rem !important;font-weight:700 !important;
  color:#8a8a92 !important;
  cursor:pointer !important;
  transition:all .12s !important;
  white-space:nowrap !important;
  line-height:1 !important;
  box-sizing:border-box !important;
}
.tdn-vault .tdn-ab:first-child{border-left:none !important}
.tdn-vault .tdn-ab:hover{background:#f2f0ec !important;color:#1a1a1e !important}
.tdn-vault .tdn-ab:active{transform:scale(.97)}
.tdn-vault .tdn-ab.tdn-ok{color:#059669 !important;background:#ecfdf5 !important}
.tdn-vault .tdn-ab:disabled{opacity:.35;cursor:not-allowed}
.tdn-vault .tdn-ab svg{flex-shrink:0}

@media(max-width:520px){
  .tdn-field{padding:8px 12px}
  .tdn-text{font-size:.8rem;padding:8px 10px}
  .tdn-ab{padding:0 10px;height:38px;font-size:.64rem}
}

.tdn-card-foot{
  padding:10px 22px;
  border-top:1px solid #eae8e4;
  display:flex;align-items:center;justify-content:space-between;
  font-size:.7rem;color:#b8b8be;
}

.tdn-oid{
  font-family:'Fira Code',monospace;font-size:.66rem;
  color:#8a8a92;background:#f2f0ec;
  padding:3px 9px;border-radius:5px;border:1px solid #eae8e4;
}

.tdn-wait-box{
  text-align:center;padding:24px 16px;
  border-radius:10px;background:#fffbeb;
  border:1px solid #fde68a;
}

.tdn-wait-date{
  display:inline-flex;align-items:center;gap:5px;
  font-size:.82rem;font-weight:600;color:#92400e;
  margin-bottom:10px;
}

.tdn-wait-msg{
  font-size:.78rem;color:#8a8a92;
  font-style:italic;max-width:340px;margin:0 auto;
}

@media(max-width:520px){
  .tdn-card-top{padding:16px 16px 12px;gap:10px}
  .tdn-card-body{padding:0 16px 14px}
  .tdn-card-foot{padding:9px 16px}
  .tdn-cover{width:42px;height:54px;border-radius:7px}
  .tdn-name{font-size:.92rem}
  .tdn-vault-row{padding:11px 12px;flex-wrap:wrap;gap:6px}
  .tdn-vault-lbl{width:100%}
  .tdn-vault-btns{margin-left:auto}
  .tdn-ib{width:28px;height:28px;border-radius:6px}
}
