/* =========================================
   WVF MODERN THEME (Isolated)
   ========================================= */
:root {
    --wvf-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    --wvf-primary: #0f172a;   /* Slate 900 */
    --wvf-secondary: #475569; /* Slate 600 */
    --wvf-accent: #2563eb;    /* Blue 600 */
    --wvf-accent-h: #1d4ed8;  /* Blue 700 */
    --wvf-success: #10b981;   /* Emerald 500 */
    --wvf-danger: #ef4444;    /* Red 500 */
    --wvf-border: #e2e8f0;    /* Slate 200 */
    --wvf-bg: #ffffff;
    --wvf-surface: #f8fafc;   /* Slate 50 */
}

/* SCOPED RESET (Prevents Theme Conflict) */
.wvf-wrapper {
    all: initial; /* Resets inheritance */
    font-family: var(--wvf-font);
    display: block;
    width: 100%;
    max-width: 600px; /* Optimal reading width */
    margin: 30px auto;
    box-sizing: border-box;
    color: var(--wvf-primary);
    line-height: 1.5;
}

.wvf-wrapper * {
    box-sizing: border-box;
    font-family: inherit;
}

/* CARD CONTAINER */
.wvf-card {
    background: var(--wvf-bg);
    border: 1px solid var(--wvf-border);
    border-radius: 8px; /* Sharp but friendly */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.wvf-hidden { display: none !important; }

/* HEADER SECTION */
.wvf-header {
    padding: 24px 24px 0 24px;
    margin-bottom: 20px;
}

.wvf-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--wvf-primary);
    margin: 0 0 4px 0;
    letter-spacing: -0.025em;
    display: block;
}

.wvf-subtitle {
    font-size: 13px;
    color: var(--wvf-secondary);
    display: block;
    margin: 0;
}

/* FORM ELEMENTS */
.wvf-body { padding: 0 24px 24px 24px; }

.wvf-field { margin-bottom: 16px; }

.wvf-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--wvf-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wvf-input, .wvf-select {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    color: var(--wvf-primary);
    background: var(--wvf-bg);
    border: 1px solid var(--wvf-border);
    border-radius: 6px;
    outline: none;
    transition: all 0.2s ease;
    appearance: none; /* Removes native UI */
}

.wvf-input:focus, .wvf-select:focus {
    border-color: var(--wvf-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* BUTTONS */
.wvf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 20px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: var(--wvf-primary);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    width: 100%;
}

.wvf-btn:hover { background: #1e293b; }
.wvf-btn:active { transform: translateY(1px); }
.wvf-btn:disabled { opacity: 0.7; cursor: not-allowed; }

.wvf-btn-primary { background: var(--wvf-accent); }
.wvf-btn-primary:hover { background: var(--wvf-accent-h); }

/* RESULT BOX */
.wvf-result {
    margin-top: 20px;
    padding: 16px;
    background: var(--wvf-surface);
    border: 1px solid var(--wvf-border);
    border-radius: 6px;
}

.wvf-result-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--wvf-secondary);
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.wvf-copy-group {
    display: flex;
    gap: 8px;
}

.wvf-input-readonly {
    background: #fff;
    color: var(--wvf-secondary);
    font-family: monospace;
    font-size: 13px;
}

.wvf-btn-copy {
    width: auto;
    background: var(--wvf-primary);
    padding: 0 16px;
}

/* TABLE SECTION */
.wvf-divider {
    height: 1px;
    background: var(--wvf-border);
    margin: 24px 0;
}

.wvf-dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.wvf-dash-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--wvf-primary);
    text-transform: uppercase;
    margin: 0;
}

.wvf-dash-tools { display: flex; gap: 8px; }

.wvf-search {
    height: 32px;
    font-size: 12px;
    padding: 0 10px;
    width: 140px;
}

.wvf-btn-icon {
    height: 32px;
    width: 32px;
    padding: 0;
    background: #fff;
    border: 1px solid var(--wvf-border);
    color: var(--wvf-secondary);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.wvf-btn-icon:hover { border-color: var(--wvf-secondary); color: var(--wvf-primary); }

/* ISOLATED TABLE */
.wvf-table-wrap {
    border: 1px solid var(--wvf-border);
    border-radius: 6px;
    overflow: hidden;
}

.wvf-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.wvf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    background: #fff;
    min-width: 500px; /* Ensure structure on mobile */
}

.wvf-table th {
    background: var(--wvf-surface);
    color: var(--wvf-secondary);
    font-weight: 600;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--wvf-border);
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.05em;
}

.wvf-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--wvf-border);
    color: var(--wvf-primary);
    vertical-align: middle;
}

.wvf-table tr:last-child td { border-bottom: none; }

/* Status Rows */
.wvf-row-pending td { background-color: #fffbeb; } /* Amber-50 */
.wvf-row-done td { background-color: #f0fdf4; }   /* Emerald-50 */

/* Action Button in Table */
.wvf-btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 26px;
    padding: 0 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--wvf-primary);
    background: #fff;
    border: 1px solid var(--wvf-border);
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
}
.wvf-btn-sm:hover { border-color: var(--wvf-secondary); }

/* PAGINATION */
.wvf-pager {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}
.wvf-page-info { font-size: 11px; color: var(--wvf-secondary); }

/* MESSAGES */
.wvf-msg { margin-top: 12px; font-size: 13px; text-align: center; }
.wvf-err { color: var(--wvf-danger); font-weight: 500; }
.wvf-success { color: var(--wvf-success); font-weight: 500; }

/* RESPONSIVE */
@media (max-width: 480px) {
    .wvf-wrapper { margin: 10px auto; width: 96%; }
    .wvf-copy-group { flex-direction: column; }
    .wvf-btn-copy { width: 100%; }
}
/* (Add this to your existing CSS file) */

.wvf-btn-secondary {
    background: #64748b; /* Slate 500 */
    color: #fff;
    border: 1px solid #475569;
}
.wvf-btn-secondary:hover { background: #475569; }
.wvf-btn-secondary:disabled { opacity: 0.7; cursor: default; }

.wvf-no-paste {
    /* Optional: visual cue that paste is disabled if desired, otherwise standard input style */
}