/* WNP File Hub — stile pubblico.
   Variabili: --wfh-accent e --wfh-radius (impostazioni), --wfh-area (area), --wfh-type (tipo file) */
.wfh {
    --wfh-accent: #2563eb;
    --wfh-radius: 14px;
    --wfh-text: #0f172a;
    --wfh-muted: #64748b;
    --wfh-border: #e2e8f0;
    --wfh-bg: #ffffff;
    --wfh-soft: #f8fafc;
    --wfh-tint: #ffffff;           /* base per i colori sfumati (bianco in chiaro, scuro in dark) */
    --wfh-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 14px rgba(15, 23, 42, .05);
    --wfh-shadow-hover: 0 8px 28px rgba(15, 23, 42, .13);
    color: var(--wfh-text);
    font-size: 15px;
    line-height: 1.5;
    margin: 1.5em 0;
}
.wfh-theme-dark {
    --wfh-text: #e2e8f0; --wfh-muted: #94a3b8; --wfh-border: #334155;
    --wfh-bg: #111827; --wfh-soft: #1e293b; --wfh-tint: #0b1220;
    --wfh-shadow: 0 1px 2px rgba(0,0,0,.4); --wfh-shadow-hover: 0 8px 28px rgba(0,0,0,.5);
}
@media (prefers-color-scheme: dark) {
    .wfh-theme-auto {
        --wfh-text: #e2e8f0; --wfh-muted: #94a3b8; --wfh-border: #334155;
        --wfh-bg: #111827; --wfh-soft: #1e293b; --wfh-tint: #0b1220;
        --wfh-shadow: 0 1px 2px rgba(0,0,0,.4); --wfh-shadow-hover: 0 8px 28px rgba(0,0,0,.5);
    }
}
.wfh *, .wfh *::before, .wfh *::after { box-sizing: border-box; }
.wfh a { text-decoration: none; }
.wfh .dashicons { line-height: 1; }
.wfh button { font-family: inherit; }

/* ---------- Pulsanti e piccoli elementi ---------- */
.wfh-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    background: var(--wfh-accent); color: #fff !important; border: 0; border-radius: calc(var(--wfh-radius) * .7);
    padding: 9px 16px; font-weight: 600; font-size: 14px; line-height: 1.3; cursor: pointer; white-space: nowrap;
    transition: transform .15s, box-shadow .15s, filter .15s;
}
.wfh-btn:hover { filter: brightness(1.08); box-shadow: 0 4px 14px color-mix(in srgb, var(--wfh-accent) 40%, transparent); transform: translateY(-1px); }
.wfh-btn:disabled { opacity: .6; cursor: wait; transform: none; }
.wfh-btn .dashicons { font-size: 18px; width: 18px; height: 18px; }
.wfh-btn-ghost { background: var(--wfh-soft); color: var(--wfh-text) !important; border: 1px solid var(--wfh-border); }
.wfh-pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--wfh-soft); color: var(--wfh-muted); border: 1px solid var(--wfh-border); vertical-align: middle; margin-left: 6px; line-height: 1.4; }
.wfh-pill-new { background: color-mix(in srgb, #22c55e 18%, var(--wfh-tint)); color: #16a34a; border-color: color-mix(in srgb, #22c55e 35%, transparent); }
.wfh-badge { display: inline-block; min-width: 38px; padding: 3px 6px; border-radius: 6px; color: #fff; font-size: 10px; font-weight: 700; text-align: center; letter-spacing: .04em; }
.wfh-empty { color: var(--wfh-muted); padding: 24px; text-align: center; background: var(--wfh-soft); border-radius: var(--wfh-radius); border: 1px dashed var(--wfh-border); margin: 0 0 16px; }
.wfh-muted { color: var(--wfh-muted); }

/* ---------- Griglia aree ---------- */
.wfh-area-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin: 0 0 24px; }
.wfh-area-card {
    --wfh-area: var(--wfh-accent);
    display: flex; flex-direction: column; background: var(--wfh-bg); border: 1px solid var(--wfh-border);
    border-radius: var(--wfh-radius); overflow: hidden; box-shadow: var(--wfh-shadow); color: var(--wfh-text) !important;
    transition: transform .2s, box-shadow .2s;
}
.wfh-area-card:hover { transform: translateY(-3px); box-shadow: var(--wfh-shadow-hover); }
.wfh-area-cover {
    position: relative; height: 96px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--wfh-area), color-mix(in srgb, var(--wfh-area) 55%, #000));
    background-size: cover; background-position: center;
}
.has-cover .wfh-area-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.45)); }
.wfh-area-cover .wfh-area-icon { position: relative; z-index: 1; font-size: 40px; width: 40px; height: 40px; color: #fff; opacity: .95; transition: transform .25s; }
.wfh-area-card:hover .wfh-area-cover .wfh-area-icon { transform: scale(1.1) rotate(-4deg); }
.has-cover .wfh-area-cover .wfh-area-icon {
    position: absolute; left: 14px; bottom: -18px; font-size: 22px; width: 40px; height: 40px; padding: 9px;
    border-radius: 12px; background: var(--wfh-area); box-shadow: 0 4px 10px rgba(0,0,0,.2);
}
.wfh-lock { position: absolute; top: 10px; right: 10px; z-index: 1; color: #fff; background: rgba(0,0,0,.35); border-radius: 50%; padding: 5px; width: 28px; height: 28px; font-size: 18px; }
.wfh-area-body { padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.has-cover .wfh-area-body { padding-top: 26px; }
.wfh-area-title { font-size: 17px; font-weight: 700; }
.wfh-area-desc { color: var(--wfh-muted); font-size: 14px; }
.wfh-area-meta { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12.5px; color: var(--wfh-muted); }
.wfh-area-card.is-locked .wfh-area-cover { filter: grayscale(.35); }

/* ---------- Intestazione area ---------- */
.wfh-area-header { --wfh-area: var(--wfh-accent); margin-bottom: 18px; }
.wfh-back { display: inline-block; margin-bottom: 10px; color: var(--wfh-muted) !important; font-size: 14px; }
.wfh-back:hover { color: var(--wfh-area) !important; }
.wfh-area-heading {
    position: relative; overflow: hidden; display: flex; gap: 16px; align-items: center; padding: 20px 22px; border-radius: var(--wfh-radius);
    background: linear-gradient(135deg, color-mix(in srgb, var(--wfh-area) 14%, var(--wfh-tint)), var(--wfh-bg));
    border: 1px solid color-mix(in srgb, var(--wfh-area) 25%, var(--wfh-border));
}
.wfh-area-heading.has-cover { color: #fff; min-height: 140px; align-items: flex-end; background: var(--wfh-cover) center / cover; border: 0; }
.wfh-area-heading.has-cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.65)); }
.wfh-area-heading.has-cover > * { position: relative; }
.wfh-area-heading.has-cover .wfh-area-intro { color: rgba(255,255,255,.85); }
.wfh-area-heading .wfh-area-icon { flex: none; width: 52px; height: 52px; font-size: 28px; padding: 12px; border-radius: 14px; background: var(--wfh-area); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--wfh-area) 40%, transparent); }
.wfh-area-name { margin: 0 !important; font-size: 1.5em; line-height: 1.2; color: inherit; }
.wfh-area-intro { margin: 4px 0 0 !important; color: var(--wfh-muted); }

/* ---------- Barra: ricerca, ordinamento, vista ---------- */
.wfh-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 10px; }
.wfh-search-wrap { position: relative; flex: 1 1 240px; min-width: 0; }
.wfh-search-wrap .dashicons { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--wfh-muted); pointer-events: none; }
.wfh-toolbar input, .wfh-toolbar select {
    border: 1px solid var(--wfh-border); border-radius: calc(var(--wfh-radius) * .7); padding: 9px 12px; font-size: 14px;
    background: var(--wfh-bg); color: var(--wfh-text); margin: 0; height: auto; box-shadow: none;
}
.wfh-toolbar .wfh-search { width: 100%; padding-left: 36px; }

/* Difesa dagli stili del tema: molti temi impostano larghezza, altezza, padding o aspetto
   di input[type=search] e select con selettori più specifici dei nostri. */
.wfh .wfh-toolbar input.wfh-search,
.wfh .wfh-toolbar select.wfh-sort {
    box-sizing: border-box !important;
    height: 40px !important; min-height: 40px !important; max-height: none !important;
    margin: 0 !important; line-height: 1.3 !important; font-size: 14px !important;
    font-family: inherit; text-indent: 0 !important; letter-spacing: normal;
    border: 1px solid var(--wfh-border) !important; border-radius: calc(var(--wfh-radius) * .7) !important;
    background-color: var(--wfh-bg) !important; color: var(--wfh-text) !important; box-shadow: none !important;
}
.wfh .wfh-toolbar input.wfh-search {
    display: block !important; width: 100% !important; max-width: 100% !important; min-width: 0 !important;
    padding: 0 12px 0 36px !important; -webkit-appearance: none; appearance: none;
}
.wfh .wfh-toolbar select.wfh-sort {
    flex: 0 0 auto; width: auto !important; min-width: 150px; max-width: 100%;
    padding: 0 30px 0 12px !important; -webkit-appearance: none; appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M2 4l4 4 4-4z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important; background-position: right 10px center !important; background-size: 12px !important;
}
.wfh .wfh-toolbar input.wfh-search:focus, .wfh .wfh-toolbar select.wfh-sort:focus {
    outline: 2px solid color-mix(in srgb, var(--wfh-accent) 35%, transparent) !important; border-color: var(--wfh-accent) !important;
}
.wfh .wfh-toolbar .wfh-view-toggle { flex: 0 0 auto; height: 40px; }
.wfh .wfh-toolbar .wfh-view-toggle button { height: 100%; min-height: 0; margin: 0; padding: 0 11px; border-radius: 0; box-shadow: none; font-size: inherit; }
.wfh .wfh-toolbar .wfh-view-toggle button .dashicons { vertical-align: middle; }
.wfh-toolbar input:focus, .wfh-toolbar select:focus { outline: 2px solid color-mix(in srgb, var(--wfh-accent) 35%, transparent); border-color: var(--wfh-accent); }
.wfh-view-toggle { display: inline-flex; border: 1px solid var(--wfh-border); border-radius: calc(var(--wfh-radius) * .7); overflow: hidden; }
.wfh-view-toggle button { background: var(--wfh-bg); border: 0; padding: 8px 10px; cursor: pointer; color: var(--wfh-muted); line-height: 1; }
.wfh-view-toggle button + button { border-left: 1px solid var(--wfh-border); }
.wfh-view-toggle button.is-active { background: var(--wfh-accent); color: #fff; }
.wfh-results-meta { color: var(--wfh-muted); font-size: 13px; min-height: 1.2em; margin: 0 0 8px; }
.wfh-global-search { margin-bottom: 22px; }
.wfh-global-search .wfh-results:empty, .wfh-global-search .wfh-chips-slot:empty { display: none; }

/* ---------- Filtri per tipo (chip) ---------- */
.wfh-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.wfh-chip {
    --wfh-type: var(--wfh-accent);
    display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--wfh-border); background: var(--wfh-bg); color: var(--wfh-text);
    border-radius: 99px; padding: 5px 12px; font-size: 13px; cursor: pointer; transition: all .15s;
}
.wfh-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--wfh-type); }
.wfh-chip span { color: var(--wfh-muted); font-size: 12px; }
.wfh-chip:hover { border-color: var(--wfh-type); }
.wfh-chip.is-active { background: var(--wfh-type); border-color: var(--wfh-type); color: #fff; }
.wfh-chip.is-active i { background: #fff; }
.wfh-chip.is-active span { color: rgba(255,255,255,.85); }

/* ---------- Elenco file ---------- */
.wfh-results { transition: opacity .2s; }
.wfh-browser.is-loading .wfh-results { opacity: .45; pointer-events: none; }
.wfh-files { display: grid; gap: 12px; }
.wfh-file {
    --wfh-type: #64748b;
    display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
    padding: 14px 16px; background: var(--wfh-bg); border: 1px solid var(--wfh-border); border-radius: var(--wfh-radius);
    box-shadow: var(--wfh-shadow); transition: box-shadow .2s, border-color .2s, transform .2s;
    animation: wfh-in .25s ease both;
}
@keyframes wfh-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.wfh-file:hover { box-shadow: var(--wfh-shadow-hover); border-color: color-mix(in srgb, var(--wfh-type) 40%, var(--wfh-border)); }
.wfh-file-icon {
    width: 52px; height: 56px; border-radius: calc(var(--wfh-radius) * .8); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    background: color-mix(in srgb, var(--wfh-type) 14%, var(--wfh-tint)); color: var(--wfh-type);
}
.wfh-file-icon .dashicons { font-size: 24px; width: 24px; height: 24px; }
.wfh-file-ext { font-size: 9.5px; font-weight: 800; letter-spacing: .05em; }
.wfh-file-body { min-width: 0; }
.wfh-file-title { margin: 0 !important; font-size: 16px !important; line-height: 1.35; font-weight: 700; }
.wfh-file-title a { color: var(--wfh-text) !important; }
.wfh-file-title a:hover { color: var(--wfh-accent) !important; }
.wfh-file-desc { color: var(--wfh-muted); font-size: 14px; margin-top: 4px; }
.wfh-file-desc p { margin: 0 0 .4em !important; }
.wfh-file-desc p:last-child { margin-bottom: 0 !important; }
.wfh-file-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 12.5px; color: var(--wfh-muted); align-items: center; }
.wfh-file-meta > span + span::before { content: "•"; margin-right: 14px; margin-left: -8px; opacity: .5; }
.wfh-meta-area { --wfh-area: var(--wfh-accent); color: var(--wfh-area); font-weight: 600; }

/* Vista a griglia */
.wfh-view-grid .wfh-files { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.wfh-view-grid .wfh-file { grid-template-columns: auto 1fr; align-content: start; }
.wfh-view-grid .wfh-file-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wfh-view-grid .wfh-file-btn { grid-column: 1 / -1; align-self: end; }
.wfh-view-grid .wfh-file-meta { gap: 2px 10px; }
.wfh-view-grid .wfh-file-meta > span + span::before { content: none; }
.wfh-single .wfh-files { max-width: 760px; }

/* ---------- Upload ---------- */
.wfh-upload { margin: 0 0 18px; border: 1px solid var(--wfh-border); border-radius: var(--wfh-radius); background: var(--wfh-soft); }
.wfh-upload > summary { cursor: pointer; padding: 12px 16px; font-weight: 600; list-style: none; display: flex; gap: 8px; align-items: center; }
.wfh-upload > summary::-webkit-details-marker { display: none; }
.wfh-upload > summary::after { content: "+"; margin-left: auto; font-size: 20px; color: var(--wfh-muted); transition: transform .2s; }
.wfh-upload[open] > summary::after { transform: rotate(45deg); }
.wfh-upload[open] > summary { border-bottom: 1px solid var(--wfh-border); }
.wfh-upload form { padding: 16px; }
.wfh-fields { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; margin-bottom: 12px; }
.wfh-fields label { display: block; font-size: 14px; font-weight: 600; }
.wfh-fields em { font-weight: 400; color: var(--wfh-muted); font-style: normal; }
.wfh-fields input, .wfh-fields textarea { display: block; width: 100%; margin-top: 4px; border: 1px solid var(--wfh-border); border-radius: calc(var(--wfh-radius) * .7); padding: 8px 12px; font-weight: 400; background: var(--wfh-bg); color: var(--wfh-text); }
.wfh-drop {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 20px; margin-bottom: 14px; cursor: pointer;
    border: 2px dashed color-mix(in srgb, var(--wfh-accent) 45%, var(--wfh-border)); border-radius: var(--wfh-radius); background: var(--wfh-bg); text-align: center;
    transition: background .15s, border-color .15s, transform .15s;
}
.wfh-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.wfh-drop:hover, .wfh-drop.is-over { background: color-mix(in srgb, var(--wfh-accent) 7%, var(--wfh-bg)); border-color: var(--wfh-accent); }
.wfh-drop.is-over { transform: scale(1.01); }
.wfh-drop-icon { font-size: 40px; width: 40px; height: 40px; color: var(--wfh-accent); }
.wfh-drop-title { font-weight: 600; }
.wfh-drop-file { font-weight: 600; color: var(--wfh-accent); }
.wfh-drop-file:empty { display: none; }
.wfh-drop.has-file { border-style: solid; }
.wfh-drop small { color: var(--wfh-muted); }
.wfh-upload-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wfh-progress { position: relative; height: 26px; border-radius: 99px; background: var(--wfh-bg); border: 1px solid var(--wfh-border); overflow: hidden; margin-bottom: 12px; }
.wfh-progress[hidden] { display: none; }
.wfh-progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--wfh-accent), color-mix(in srgb, var(--wfh-accent) 60%, #fff)); transition: width .2s; }
.wfh-progress-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 600; color: var(--wfh-text); }
.wfh-upload-msg:empty { display: none; }
.wfh-upload-msg { padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; font-weight: 500; }
.wfh-upload-msg.is-ok, .wfh-notice.is-ok { background: color-mix(in srgb, #22c55e 16%, var(--wfh-tint)); color: #15803d; }
.wfh-upload-msg.is-error, .wfh-notice.is-error { background: color-mix(in srgb, #ef4444 14%, var(--wfh-tint)); color: #b91c1c; }
.wfh-upload-login { padding: 12px 16px; color: var(--wfh-muted); }
.wfh-upload-login a { color: var(--wfh-accent) !important; font-weight: 600; }
.wfh-notice { padding: 12px 16px; border-radius: 10px; margin: 0 0 16px; font-weight: 500; }

.wfh-locked-box { text-align: center; padding: 36px 20px; background: var(--wfh-soft); border-radius: var(--wfh-radius); border: 1px solid var(--wfh-border); }
.wfh-locked-box .dashicons { font-size: 40px; width: 40px; height: 40px; color: var(--wfh-muted); }

/* ---------- Paginazione ---------- */
.wfh-pagination { margin-top: 18px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.wfh-page { min-width: 36px; text-align: center; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--wfh-border); color: var(--wfh-text) !important; background: var(--wfh-bg); }
.wfh-page:hover { border-color: var(--wfh-accent); }
.wfh-page.is-current { background: var(--wfh-accent); border-color: var(--wfh-accent); color: #fff !important; }
.wfh-page-gap { padding: 6px 4px; color: var(--wfh-muted); }

/* ---------- Più scaricati ---------- */
.wfh-top-title { margin: 0 0 10px !important; color: var(--wfh-text); }
.wfh-top { list-style: none !important; margin: 0 !important; padding: 0 !important; display: grid; gap: 6px; }
.wfh-top li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--wfh-bg); border: 1px solid var(--wfh-border); border-radius: calc(var(--wfh-radius) * .7); margin: 0 !important; }
.wfh-top li a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--wfh-text) !important; font-weight: 600; }
.wfh-top-rank { width: 24px; height: 24px; border-radius: 50%; background: var(--wfh-soft); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--wfh-muted); flex: none; }
.wfh-top li:nth-child(1) .wfh-top-rank { background: #fef3c7; color: #92400e; }
.wfh-top li:nth-child(2) .wfh-top-rank { background: #e5e7eb; color: #374151; }
.wfh-top li:nth-child(3) .wfh-top-rank { background: #fde2cf; color: #9a3412; }
.wfh-top-count { color: var(--wfh-muted); font-size: 12.5px; white-space: nowrap; }

/* ---------- Barra utente collegato ---------- */
.wfh-userbar-slot:empty { display: none; }
.wfh-userbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; font-size: 13.5px; color: var(--wfh-muted); margin: 0 0 12px; }
.wfh-userbar > .dashicons { color: var(--wfh-accent); }
.wfh-userbar strong { color: var(--wfh-text); }
.wfh-userbar form { margin: 0; display: inline; }
.wfh .wfh-userbar-out {
    display: inline-flex; align-items: center; gap: 4px; margin: 0 0 0 4px; padding: 4px 12px !important; line-height: 1.4;
    font-size: 13px; font-weight: 600; cursor: pointer; border-radius: 99px;
    background: var(--wfh-soft) !important; color: var(--wfh-text) !important; border: 1px solid var(--wfh-border) !important; box-shadow: none;
}
.wfh .wfh-userbar-out:hover { border-color: #dc2626 !important; color: #dc2626 !important; }
.wfh-userbar-out .dashicons { font-size: 16px; width: 16px; height: 16px; }
.wfh-upload-foot { padding: 0 16px 12px; }
.wfh-upload-foot:empty { display: none; }
.wfh-upload-foot .wfh-userbar { margin: 0; padding-top: 10px; border-top: 1px dashed var(--wfh-border); }

/* ---------- Accesso utenti [wfh_login] ---------- */
.wfh-login-box {
    max-width: 420px; margin: 0 auto; padding: 28px; background: var(--wfh-bg); border: 1px solid var(--wfh-border);
    border-radius: var(--wfh-radius); box-shadow: var(--wfh-shadow-hover);
}
.wfh-login-title { margin: 0 0 18px !important; font-size: 1.35em !important; display: flex; align-items: center; gap: 8px; color: var(--wfh-text); }
.wfh-login-title .dashicons { color: var(--wfh-accent); font-size: 26px; width: 26px; height: 26px; }
.wfh-login-form label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 14px; color: var(--wfh-text); }
.wfh .wfh-login-form input[type=text], .wfh .wfh-login-form input[type=password],
.wfh .wfh-login-form input[type=email], .wfh .wfh-login-form input[type=date] {
    display: block !important; width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; margin: 6px 0 0 !important;
    height: 44px !important; padding: 0 14px !important; font-size: 15px !important; font-weight: 400;
    border: 1px solid var(--wfh-border) !important; border-radius: calc(var(--wfh-radius) * .7) !important;
    background: var(--wfh-bg) !important; color: var(--wfh-text) !important; box-shadow: none !important;
}
.wfh .wfh-login-form input:focus { outline: 2px solid color-mix(in srgb, var(--wfh-accent) 35%, transparent) !important; border-color: var(--wfh-accent) !important; }
.wfh-login-form .wfh-check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.wfh-login-form .wfh-check input { margin: 0; }
.wfh-login-btn { width: 100%; padding: 12px; font-size: 15px; }
.wfh-login-box.is-wide { max-width: 580px; }
.wfh-login-intro { color: var(--wfh-muted); font-size: 14px; margin: -8px 0 16px !important; }
.wfh-field-hint { display: block; font-weight: 400; font-size: 12.5px; color: var(--wfh-muted); margin-top: 4px; }
.wfh-login-form em { font-weight: 400; font-style: normal; color: var(--wfh-muted); }
.wfh-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.wfh-login-links { margin: 16px 0 0 !important; font-size: 13.5px; color: var(--wfh-muted); text-align: center; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.wfh-login-links a { color: var(--wfh-accent) !important; }
.wfh-login-form .wfh-check a { color: var(--wfh-accent) !important; text-decoration: underline; }
.wfh-errors { margin: 0 !important; padding-left: 18px !important; }
.wfh-errors li { margin: 2px 0; }
.wfh-btn-ok { background: #16a34a; }
.wfh-btn-danger { background: #dc2626; }
.wfh-reg-table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 14.5px; }
.wfh-reg-table th, .wfh-reg-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--wfh-border); vertical-align: top; }
.wfh-reg-table th { color: var(--wfh-muted); font-weight: 600; width: 38%; }
@media (max-width: 520px) { .wfh-grid-2 { grid-template-columns: 1fr; } }
.wfh-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.wfh-login-box.is-logged { text-align: center; }
.wfh-login-avatar {
    display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%;
    background: var(--wfh-accent); color: #fff; font-weight: 700; font-size: 20px; letter-spacing: .02em;
}
.wfh-mydata { margin-top: 20px; text-align: left; border-top: 1px solid var(--wfh-border); padding-top: 12px; font-size: 14px; }
.wfh-mydata > summary { cursor: pointer; color: var(--wfh-muted); font-weight: 600; }
.wfh-mydata p { color: var(--wfh-muted); margin: 10px 0 !important; }
.wfh-mydata-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.wfh-mydata-actions form { margin: 0; }
.wfh .wfh-link-btn { background: none !important; border: 0 !important; padding: 0 !important; color: var(--wfh-accent) !important; cursor: pointer; font-size: 14px; text-decoration: underline; box-shadow: none; }
.wfh .wfh-link-btn.is-danger { color: #dc2626 !important; }
.wfh-mydata a { color: var(--wfh-accent) !important; }
.wfh-login-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.wfh-login-actions form { margin: 0; }

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
    .wfh-file { grid-template-columns: auto 1fr; }
    .wfh-file-btn { grid-column: 1 / -1; }
    .wfh-area-heading { padding: 14px; }
    .wfh-fields { grid-template-columns: 1fr; }
    .wfh-toolbar .wfh-sort { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .wfh *, .wfh *::before, .wfh *::after { animation: none !important; transition: none !important; }
}
