/**
 * Frontend Dashboard – Sidebar + Main layout.
 *
 * Uses the shared LanTech IT `.pmf-*` framework for the sidebar/main shell
 * and `.ds-*` classes for plugin-specific content (tables, modals, badges).
 *
 * @package Client_Document_Signatures
 */

/* ══════════════════════════════════════════════════════════════
   Shared Layout – .pmf-app, .pmf-sidebar, .pmf-main
   (Same patterns as Project Manager for consistency across
   all LanTech IT plugins.)
   ══════════════════════════════════════════════════════════════ */

.pmf-app *, .pmf-login-wrapper * { box-sizing: border-box; }
.pmf-app {
	--sidebar-w: 260px;
	--bg: #f4f6f9;
	--card-bg: #ffffff;
	--border: #e2e8f0;
	--text: #1e293b;
	--text-muted: #64748b;
	--primary: #3b82f6;
	--primary-hover: #2563eb;
	--success: #10b981;
	--warning: #f59e0b;
	--danger: #ef4444;
	--radius: 8px;
	--shadow: 0 1px 3px rgba(0,0,0,.08);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: var(--text);
	display: flex;
	min-height: 100vh;
	background: var(--bg);
	font-size: 14px;
	line-height: 1.5;
}
.pmf-app a { color: var(--primary); text-decoration: none; }
.pmf-app a:hover { color: var(--primary-hover); }
.pmf-app img { max-width: 100%; }

/*
 * Reset for bare <button> elements inside .pmf-app.
 * Only the base state is reset; hover / focus / active are left to
 * the specific .pmf-* and .ds-* class rules so they don't lose
 * padding, border, or shadow on interaction.
 */
.pmf-app button {
    color: inherit !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    text-transform: none !important;
    text-decoration: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font: inherit !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.pmf-sidebar {
    width: var(--sidebar-w);
    background: #1e293b;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
    transition: transform .25s ease;
}
.pmf-sidebar-header {
    padding: 20px 20px 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.pmf-logo {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
}
.pmf-sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.pmf-avatar img { width: 40px; height: 40px; border-radius: 50%; }
.pmf-user-name { font-weight: 600; color: #fff; font-size: 13px; }
.pmf-user-role { font-size: 11px; color: #94a3b8; }

.pmf-nav {
    list-style: none;
    padding: 10px 0;
    margin: 0;
    flex: 1;
}
.pmf-nav-item a {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 10px 20px !important;
    color: #94a3b8;
    font-size: 13px !important;
    font-weight: 500;
    transition: all .15s;
    border-left: 3px solid transparent;
}
.pmf-nav-item a:hover {
    background: rgba(255,255,255,.05);
    color: #e2e8f0;
}
.pmf-nav-item.active a {
    background: rgba(59,130,246,.15);
    color: #60a5fa;
    border-left-color: #3b82f6;
}
.pmf-nav-icon { font-size: 16px; width: 20px; text-align: center; }

/* ── Multi-plugin sidebar accordion ─────────────────────── */
.pmf-nav-group {
    list-style: none;
}
.pmf-app nav.pmf-sidebar .pmf-nav-group-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    min-height: 40px !important;
    padding: 12px 20px !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    border-left: 3px solid transparent !important;
    color: #e2e8f0 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    font-style: normal !important;
    line-height: 1.2 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    cursor: pointer !important;
    text-align: left !important;
    text-decoration: none !important;
    transition: background .15s;
}
.pmf-app nav.pmf-sidebar .pmf-nav-group-toggle:hover {
    background: rgba(255,255,255,.05) !important;
    background-color: rgba(255,255,255,.05) !important;
    color: #e2e8f0 !important;
}
.pmf-app nav.pmf-sidebar .pmf-nav-group-toggle:focus,
.pmf-app nav.pmf-sidebar .pmf-nav-group-toggle:active {
    background: transparent !important;
    color: #e2e8f0 !important;
    outline: none !important;
}
.pmf-app nav.pmf-sidebar .pmf-nav-group-toggle .pmf-nav-label {
    color: inherit !important;
}
.pmf-app nav.pmf-sidebar .pmf-nav-group-toggle .pmf-nav-chevron {
    color: inherit !important;
}
.pmf-nav-chevron {
    font-size: 11px;
    transition: transform .2s;
}
.pmf-nav-group.expanded .pmf-nav-chevron {
    transform: rotate(90deg);
}
.pmf-nav-subitems {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
}
.pmf-nav-group.expanded .pmf-nav-subitems {
    max-height: 600px;
}
.pmf-nav-subitem a {
    padding-left: 36px !important;
    font-size: 12.5px !important;
}

.pmf-sidebar-footer {
    padding: 12px 20px;
    border-top: 1px solid rgba(255,255,255,.08);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pmf-footer-link {
    display: block !important;
    padding: 6px 0 !important;
    color: #94a3b8 !important;
    font-size: 12px !important;
}
.pmf-footer-link:hover { color: #e2e8f0 !important; }

.pmf-app .pmf-sidebar-toggle {
    display: none;
    position: fixed !important;
    top: 12px !important;
    left: 12px !important;
    z-index: 200 !important;
    background: #1e293b !important;
    background-color: #1e293b !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    font-size: 18px;
    cursor: pointer;
}

/* ── Main Content ─────────────────────────────────────────── */
.pmf-main {
	flex: 1;
	margin-left: var(--sidebar-w);
	padding: 30px;
	max-width: 1200px;
}

/* ── Page Header ──────────────────────────────────────────── */
.pmf-page-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 24px;
	flex-wrap: wrap;
	gap: 12px;
}
.pmf-page-header h1 {
	font-size: 24px;
	font-weight: 700;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.pmf-subtitle { color: var(--text-muted); margin: 4px 0 0; font-size: 14px; }

/* ── Stats Row ────────────────────────────────────────────── */
.pmf-stats-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 12px;
	margin-bottom: 24px;
}
.pmf-stat-card {
	background: var(--card-bg);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 16px 20px;
	box-shadow: var(--shadow);
	border-left: 4px solid var(--accent, #3b82f6);
}
.pmf-stat-value { font-size: 28px; font-weight: 700; color: var(--text); }
.pmf-stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── Section titles ───────────────────────────────────────── */
.pmf-section { margin-bottom: 24px; }
.pmf-section-title {
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 12px;
}

/* ── Quick Action Buttons ─────────────────────────────────── */
.pmf-actions-row { display: flex; gap: 12px; flex-wrap: wrap; }
.pmf-app .pmf-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 12px 20px !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    background: var(--card-bg) !important;
    background-color: var(--card-bg) !important;
    color: var(--text) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all .15s;
    box-shadow: var(--shadow) !important;
    cursor: pointer !important;
    text-decoration: none !important;
}
.pmf-app .pmf-action-btn:hover,
.pmf-app .pmf-action-btn:focus,
.pmf-app .pmf-action-btn:active { 
    background: #f8fafc !important; 
    background-color: #f8fafc !important;
    transform: translateY(-1px); 
    color: var(--text) !important; 
}
.pmf-app .pmf-action-primary { 
    background: var(--primary) !important; 
    background-color: var(--primary) !important;
    color: #fff !important; 
    border-color: var(--primary) !important; 
}
.pmf-app .pmf-action-primary:hover,
.pmf-app .pmf-action-primary:focus,
.pmf-app .pmf-action-primary:active { 
    background: var(--primary-hover) !important; 
    background-color: var(--primary-hover) !important;
    color: #fff !important; 
}
.pmf-app .pmf-action-btn svg { width: 18px; height: 18px; }

/* ── Cards ────────────────────────────────────────────────── */
.pmf-card {
	background: var(--card-bg);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 20px;
	margin-bottom: 20px;
	box-shadow: var(--shadow);
}
.pmf-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--border);
}
.pmf-card-header h3 { margin: 0; font-size: 15px; font-weight: 600; }
.pmf-link { font-size: 13px; }

/* ── Grid ─────────────────────────────────────────────────── */
.pmf-grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-bottom: 20px;
}
@media (max-width: 900px) {
	.pmf-grid-2 { grid-template-columns: 1fr; }
}

/* ── Lists ────────────────────────────────────────────────── */
.pmf-list { margin: 0; padding: 0; }
.pmf-list-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 0;
	border-bottom: 1px solid #f1f5f9;
	gap: 12px;
}
.pmf-list-item:last-child { border-bottom: none; }
a.pmf-list-item:hover { background: #f8fafc; margin: 0 -12px; padding: 10px 12px; border-radius: 6px; }
.pmf-list-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.pmf-list-title { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pmf-list-meta { font-size: 12px; color: var(--text-muted); }

/* ── PMF Badges ───────────────────────────────────────────── */
.pmf-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 600;
	white-space: nowrap;
	flex-shrink: 0;
}
.pmf-badge-pending { background: #f1f5f9; color: #475569; }
.pmf-badge-success { background: #d1fae5; color: #065f46; }

/* ── PMF Buttons ──────────────────────────────────────────── */
.pmf-app .pmf-btn {
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
	padding: 8px 16px !important;
	border: 1px solid var(--border) !important;
	border-radius: 6px !important;
	background: var(--card-bg) !important;
	background-color: var(--card-bg) !important;
	color: var(--text) !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	cursor: pointer;
	transition: all .15s;
	text-decoration: none;
}
.pmf-app .pmf-btn:hover { background: #f8fafc !important; background-color: #f8fafc !important; color: var(--text) !important; }
.pmf-app .pmf-btn-primary { background: var(--primary) !important; background-color: var(--primary) !important; color: #fff !important; border-color: var(--primary) !important; }
.pmf-app .pmf-btn-primary:hover { background: var(--primary-hover) !important; background-color: var(--primary-hover) !important; color: #fff !important; }
.pmf-app .pmf-btn-success { background: var(--success) !important; background-color: var(--success) !important; color: #fff !important; border-color: var(--success) !important; }
.pmf-app .pmf-btn-success:hover { background: #059669 !important; background-color: #059669 !important; color: #fff !important; }
.pmf-btn-sm { padding: 5px 10px; font-size: 12px; }

/* ── PMF Notices ──────────────────────────────────────────── */
.pmf-notice {
	padding: 16px 20px;
	border-radius: var(--radius);
	font-size: 14px;
	margin-bottom: 20px;
}
.pmf-notice-warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.pmf-notice-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* ── PMF Empty ────────────────────────────────────────────── */
.pmf-empty { text-align: center; padding: 24px; color: var(--text-muted); font-size: 14px; }

/* ── Login form (PMF shared) ──────────────────────────────── */
.pmf-login-wrapper {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f4f6f9;
	padding: 24px;
}
.pmf-login-box {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 24px rgba(0,0,0,.08);
	padding: 40px;
	width: 100%;
	max-width: 400px;
}
.pmf-login-header { text-align: center; margin-bottom: 24px; }
.pmf-login-header h2 { margin: 0 0 8px; font-size: 22px; font-weight: 700; color: #1e293b; }
.pmf-login-header p { margin: 0; color: #64748b; font-size: 14px; }
#ds-login-form label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
#ds-login-form input[type="text"],
#ds-login-form input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
}
#ds-login-form input[type="submit"] {
    width: 100%;
    padding: 12px;
    background: var(--primary, #3b82f6);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
#ds-login-form input[type="submit"]:hover { background: var(--primary-hover, #2563eb); }

/* ── Date display ─────────────────────────────────────────── */
.ds-date { font-size: 13px; color: var(--text-muted); }


/* ══════════════════════════════════════════════════════════════
   Plugin-Specific Content – .ds-* classes
   ══════════════════════════════════════════════════════════════ */

/* ── Tables ───────────────────────────────────────────────── */
.ds-table-wrap {
	overflow-x: auto;
	margin-bottom: 2rem;
}
.ds-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.ds-table thead { background: #f8f9fa; }
.ds-table th {
	padding: 0.75rem 1rem;
	font-size: 0.8rem;
	font-weight: 700;
	color: #6c6c6c;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	text-align: left;
	border-bottom: 2px solid #e9ecef;
}
.ds-table td {
	padding: 0.75rem 1rem;
	font-size: 0.9rem;
	color: #444;
	border-bottom: 1px solid #f0f0f0;
	vertical-align: middle;
}
.ds-table tbody tr:hover { background: #f8faff; }
.ds-table tbody tr:last-child td { border-bottom: none; }
.ds-empty-row {
	text-align: center;
	color: #999;
	padding: 2rem 1rem !important;
}
.ds-actions { white-space: nowrap; }
.ds-col-docname {
	max-width: 180px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ── Action links ─────────────────────────────────────────── */
.ds-link {
	font-size: 0.85rem;
	font-weight: 600;
	color: #007fff;
	text-decoration: none;
	cursor: pointer;
	transition: color 0.15s;
	white-space: nowrap;
}
.ds-link:hover { color: #0056cc; text-decoration: underline; }
.ds-link + .ds-link { margin-left: 0.65rem; }
.ds-link-primary { color: #007fff; }
.ds-link-primary:hover { color: #0056cc; }
.ds-link-success { color: #28a745; }
.ds-link-success:hover { color: #1e7e34; }
.ds-link-muted { color: #999; }
.ds-link-muted:hover { color: #666; }
.ds-link-danger { color: #dc3545; background: none; border: none; cursor: pointer; font: inherit; padding: 0; }
.ds-link-danger:hover { color: #c82333; text-decoration: underline; }

/* ── Badges (plugin) ──────────────────────────────────────── */
.ds-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	background: #e9ecef;
	color: #6c6c6c;
}
.ds-badge-success { background: #d4edda; color: #155724; }
.ds-badge-warning { background: #fff3cd; color: #856404; }
.ds-badge-danger  { background: #f8d7da; color: #721c24; }
.ds-badge-muted   { background: #e9ecef; color: #6c6c6c; }
.ds-badge-info    { background: #d1ecf1; color: #0c5460; }

/* ── Cards (Clients / Categories) ─────────────────────────── */
.ds-back-link {
	display: inline-block;
	margin-bottom: 0.5rem;
	font-size: 0.9rem;
	color: var(--text-muted);
	text-decoration: none;
	transition: color 0.15s;
}
.ds-back-link:hover { color: var(--primary); }

.ds-section {
	margin-bottom: 2.5rem;
}

/* Combined Requests page: smaller scrollable sections */
.ds-requests-section {
	margin-bottom: 2rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--card-bg);
	box-shadow: var(--shadow);
	overflow: hidden;
}
.ds-requests-section .ds-section-title {
	margin: 0 0 0.75rem;
	padding: 0 1rem;
	padding-top: 1rem;
}
.ds-requests-section-scroll {
	max-height: 320px;
	overflow-y: auto;
	padding: 0 1rem 1rem;
}
.ds-requests-section-scroll .ds-filter-bar {
	margin-bottom: 0.75rem;
}
.ds-requests-section-scroll .ds-table-wrap {
	margin-bottom: 0;
}

.ds-doc-category-cell .ds-doc-category-select {
	max-width: 100%;
	min-width: 8rem;
}

.ds-section-title {
	font-size: 1rem;
	font-weight: 700;
	color: var(--text);
	margin: 0 0 1rem;
	padding: 0;
}
.ds-assigned-list { list-style: none; margin: 0 0 1rem; padding: 0; font-size: 0.95rem; color: var(--text); }
.ds-assigned-item { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.4rem 0; border-bottom: 1px solid var(--border); }
.ds-assigned-item:last-child { border-bottom: none; }
.ds-assigned-name { flex: 1; }
.ds-assigned-email { color: var(--text-muted); font-size: 0.9em; }
.ds-assigned-item-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.ds-assigned-item-actions .ds-assigned-remove-form { margin: 0; }
.ds-assigned-remove { font-size: 0.85rem; }
.ds-assigned-empty { margin: 0 0 1rem; color: var(--text-muted); font-size: 0.95rem; }
.ds-assign-actions { display: flex; flex-direction: column; gap: 1rem; }
.ds-assign-user-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.ds-assign-user-form .ds-assign-user-select { min-width: 220px; width: auto; }
.ds-create-assign-user-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.ds-create-assign-user-form .ds-new-user-input { width: auto; min-width: 160px; }
.ds-create-assign-user-form .ds-new-user-input#ds-new-user-email { min-width: 200px; }
.ds-create-assign-user-form .ds-checkbox-label { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.9rem; color: var(--text); white-space: nowrap; }
.ds-create-assign-user-form .ds-checkbox-label input[type="checkbox"] { margin: 0; }

.ds-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.ds-card {
	display: block;
	background: var(--card-bg);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.25rem;
	text-decoration: none;
	color: inherit;
	transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
	box-shadow: var(--shadow);
}
.ds-card:hover {
	box-shadow: 0 4px 12px rgba(0,0,0,.1);
	border-color: var(--primary);
	transform: translateY(-2px);
}
.ds-card:focus {
	outline: 2px solid var(--primary);
	outline-offset: 2px;
}

.ds-card-title {
	font-size: 1rem;
	font-weight: 700;
	color: var(--text);
	margin: 0 0 0.35rem;
	line-height: 1.3;
}
.ds-card-meta {
	font-size: 0.85rem;
	color: var(--text-muted);
	margin-bottom: 0.5rem;
}
.ds-card-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	margin-bottom: 0.5rem;
	font-size: 0.8rem;
	color: var(--text-muted);
}
.ds-card-stat { display: inline-flex; align-items: center; }
.ds-card-actions {
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--border);
}
.ds-card-actions .ds-link { font-size: 0.8rem; }
.ds-card-actions .ds-open-wizard-btn { cursor: pointer; }

/* Non-clickable category cards (e.g. client detail) */
.ds-cards-categories .ds-card-category:not(a) {
	cursor: default;
}
.ds-cards-categories .ds-card-category:not(a):hover {
	transform: none;
	border-color: var(--border);
}

/* ── Add category form (Documents) ─────────────────────────── */
.ds-section-add-category { margin-bottom: 1.5rem; }
.ds-add-category-form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}
.ds-add-category-form .ds-input {
	width: auto;
	min-width: 200px;
	max-width: 280px;
}
.ds-add-category-form .ds-btn { flex-shrink: 0; }
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ── Buttons (plugin) ─────────────────────────────────────── */
.pmf-app .ds-btn {
	display: inline-block !important;
	padding: 0.45rem 1rem !important;
	font-size: 0.875rem !important;
	font-weight: 600 !important;
	font-family: inherit !important;
	border: none !important;
	border-radius: 6px !important;
	cursor: pointer !important;
	text-decoration: none !important;
	text-align: center !important;
	transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
	line-height: 1.4 !important;
	background: #e2e8f0 !important;
	color: var(--text) !important;
}
.pmf-app .ds-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 2px 6px rgba(0,0,0,0.12) !important;
}
.pmf-app .ds-btn-primary { background: #007fff !important; color: #fff !important; }
.pmf-app .ds-btn-primary:hover { background: #0066cc !important; color: #fff !important; }
.pmf-app .ds-btn-success { background: #28a745 !important; color: #fff !important; }
.pmf-app .ds-btn-success:hover { background: #218838 !important; color: #fff !important; }
.pmf-app .ds-btn-outline {
	background: #fff !important;
	color: #007fff !important;
	border: 1.5px solid #007fff !important;
}
.pmf-app .ds-btn-outline:hover { background: #f0f6ff !important; color: #0066cc !important; border-color: #0066cc !important; }
.pmf-app .ds-btn-sm { padding: 0.3rem 0.75rem !important; font-size: 0.8rem !important; }
.pmf-app .ds-btn:disabled, .pmf-app .ds-btn[disabled] {
	opacity: 0.55 !important;
	cursor: not-allowed !important;
	transform: none !important;
	box-shadow: none !important;
}

/* ── Filter bar ───────────────────────────────────────────── */
.ds-filter-bar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1.25rem;
}
.ds-filter-bar .ds-wizard-type-signature,
.ds-filter-bar .ds-wizard-type-document {
	margin-left: auto;
}
.ds-filter-bar label {
	font-weight: 600;
	font-size: 0.875rem;
	color: #444;
}
.ds-select {
	padding: 0.4rem 0.75rem;
	border: 1px solid #ced4da;
	border-radius: 6px;
	font-size: 0.875rem;
	font-family: inherit;
	background: #fff;
	color: #444;
}
.ds-filter-chip {
	display: inline-block;
	padding: 0.35rem 0.9rem;
	font-size: 0.8rem;
	font-weight: 600;
	border: 1px solid #dee2e6;
	border-radius: 999px;
	color: #6c6c6c;
	text-decoration: none;
	transition: all 0.2s;
}
.ds-filter-chip:hover { border-color: #007fff; color: #007fff; }
.ds-filter-chip.active { background: #007fff; color: #fff; border-color: #007fff; }

/* ── Activity feed ────────────────────────────────────────── */
.ds-activity-list { display: flex; flex-direction: column; gap: 0; }
.ds-activity-item {
	display: flex;
	align-items: flex-start;
	gap: 0.85rem;
	padding: 0.85rem 0;
	border-bottom: 1px solid #f0f0f0;
}
.ds-activity-item:last-child { border-bottom: none; }
.ds-activity-icon {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #f0f6ff;
	color: #007fff;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ds-activity-icon svg { width: 16px; height: 16px; }
.ds-activity-body { flex: 1; display: flex; flex-direction: column; }
.ds-activity-text { font-size: 0.9rem; color: #333; }
.ds-activity-detail { font-size: 0.8rem; color: #888; margin-top: 2px; }
.ds-activity-time { font-size: 0.75rem; color: #aaa; margin-top: 2px; }

/* ── Empty / notice states ────────────────────────────────── */
.ds-empty { text-align: center; padding: 2rem 1rem; color: #999; font-size: 0.95rem; }
.ds-text-muted { color: #999; font-size: 0.85rem; }

/* ══════════════════════════════════════════════════════════════
   WIZARD MODAL
   ══════════════════════════════════════════════════════════════ */
.ds-wizard-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(0,0,0,0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	animation: ds-fade-in 0.2s ease;
}
@keyframes ds-fade-in { from { opacity: 0; } to { opacity: 1; } }
.ds-wizard {
	background: #fff;
	border-radius: 14px;
	width: 100%;
	max-width: 540px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 12px 48px rgba(0,0,0,0.18);
	display: flex;
	flex-direction: column;
	animation: ds-slide-up 0.25s ease;
}
@keyframes ds-slide-up { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.ds-wizard-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid #e9ecef;
}
.ds-wizard-header h3 { margin: 0; font-size: 1.15rem; font-weight: 700; color: #222; }
.ds-wizard-close {
	background: none;
	border: none;
	font-size: 1.5rem;
	color: #999;
	cursor: pointer;
	line-height: 1;
	padding: 0 4px;
	transition: color 0.15s;
}
.ds-wizard-close:hover { color: #333; }
.ds-wizard-steps {
	display: flex;
	gap: 0;
	padding: 0.75rem 1.5rem;
	background: #f8f9fa;
	border-bottom: 1px solid #e9ecef;
}
.ds-step {
	flex: 1;
	text-align: center;
	font-size: 0.78rem;
	font-weight: 600;
	color: #bbb;
	padding: 0.35rem 0;
	position: relative;
	transition: color 0.2s;
}
.ds-step.active { color: #007fff; }
.ds-step.done { color: #28a745; }
.ds-step.active::after {
	content: '';
	position: absolute;
	bottom: -1px;
	left: 20%;
	right: 20%;
	height: 3px;
	background: #007fff;
	border-radius: 2px;
}
.ds-wizard-body { padding: 1.5rem; flex: 1; }
.ds-wiz-panel { animation: ds-fade-in 0.2s ease; }
.ds-wiz-label { display: block; font-size: 0.9rem; font-weight: 600; color: #333; margin-bottom: 0.6rem; }
.ds-wiz-type-choice {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-top: 1rem;
}
.ds-wiz-type-btns {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}
.ds-wiz-type-btn svg {
	vertical-align: middle;
	margin-right: 0.5rem;
}
.ds-wiz-type-btn .ds-wiz-type-desc {
	display: block;
	font-weight: normal;
	font-size: 0.82rem;
	color: #64748b;
	margin-top: 0.25rem;
	margin-left: 1.75rem;
}
.ds-wiz-type-btn {
	display: block;
	width: 100%;
	padding: 1rem 1.25rem;
	font-size: 0.95rem;
	font-weight: 600;
	text-align: left;
	background: #fff;
	border: 2px solid #e9ecef;
	border-radius: 10px;
	color: #333;
	cursor: pointer;
	transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.ds-wiz-type-btn:hover {
	border-color: #007fff;
	background: #f8fbff;
	box-shadow: 0 2px 8px rgba(0,127,255,0.1);
}
.ds-wiz-type-btn:focus {
	outline: none;
	border-color: #007fff;
	box-shadow: 0 0 0 3px rgba(0,127,255,0.15);
}
.ds-wiz-full { width: 100%; }
.ds-wiz-divider {
	text-align: center;
	color: #aaa;
	font-size: 0.82rem;
	margin: 1rem 0;
	position: relative;
}
.ds-wiz-divider::before,
.ds-wiz-divider::after {
	content: '';
	position: absolute;
	top: 50%;
	width: 35%;
	height: 1px;
	background: #dee2e6;
}
.ds-wiz-divider::before { left: 0; }
.ds-wiz-divider::after { right: 0; }
.ds-wiz-inline-form {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-top: 0.5rem;
	padding: 1rem;
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 8px;
}
.ds-input {
	display: block;
	width: 100%;
	padding: 0.5rem 0.75rem;
	font-size: 0.9rem;
	font-family: inherit;
	border: 1px solid #ced4da;
	border-radius: 6px;
	color: #333;
	transition: border-color 0.15s;
	background: #fff;
}
.ds-input:focus { outline: none; border-color: #007fff; box-shadow: 0 0 0 3px rgba(0,127,255,0.1); }
.ds-input[type="file"] { padding: 0.4rem; }
.ds-wiz-checkbox {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 0.75rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: #444;
	cursor: pointer;
}
.ds-wiz-checkbox input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: #007fff;
	cursor: pointer;
	flex-shrink: 0;
}

/* Document request wizard (same overlay) */
.ds-wiz-doc-storage {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-top: 0.25rem;
}
.ds-wiz-radio-label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9rem;
	cursor: pointer;
}
.ds-wiz-radio-label input[type="radio"] {
	accent-color: #007fff;
	cursor: pointer;
}

/* Multi-signer rows */
.ds-wiz-signers-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.ds-wiz-signer-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	background: #f9fbfc;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
}
.ds-wiz-signer-order {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: #007fff;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	flex-shrink: 0;
}
.ds-wiz-signer-row .ds-wiz-signer-sel { flex: 1; min-width: 0; }
.ds-wiz-signer-row .ds-wiz-signer-input { flex: 1; min-width: 0; }
.ds-wiz-remove-signer { flex-shrink: 0; }
.pmf-app .ds-btn-danger { background: #d63638 !important; color: #fff !important; border: none !important; }
.pmf-app .ds-btn-danger:hover { background: #b32d2e !important; }
.ds-wiz-signer-list { margin: 4px 0 0; padding-left: 1.2em; }
.ds-wiz-signer-list li { font-size: 0.9rem; margin-bottom: 2px; }
.ds-wiz-signer-list small { color: #888; }
.ds-wiz-hint { font-size: 0.8rem; color: #888; margin: 0; line-height: 1.4; }
.ds-wiz-upload-area { display: flex; flex-direction: column; gap: 0.5rem; }
.ds-wiz-summary h4 { margin: 0 0 1rem; font-size: 1.05rem; font-weight: 700; color: #222; }
.ds-wiz-dl { display: grid; grid-template-columns: 100px 1fr; gap: 0.4rem 1rem; }
.ds-wiz-dl dt { font-size: 0.85rem; font-weight: 600; color: #6c6c6c; }
.ds-wiz-dl dd { margin: 0; font-size: 0.9rem; color: #222; font-weight: 600; }
.ds-wiz-done { text-align: center; padding: 2rem 0; }
.ds-wiz-done-icon { color: #28a745; margin-bottom: 1rem; }
.ds-wiz-done-icon svg { width: 52px; height: 52px; }
.ds-wiz-done h4 { margin: 0 0 0.5rem; font-size: 1.15rem; font-weight: 700; color: #222; }
.ds-wiz-done p { color: #6c6c6c; margin: 0 0 1rem; }
.ds-wizard-footer {
	display: flex;
	align-items: center;
	padding: 1rem 1.5rem;
	border-top: 1px solid #e9ecef;
	background: #fafbfc;
	border-radius: 0 0 14px 14px;
}
.ds-wiz-spacer { flex: 1; }
body.ds-no-scroll { overflow: hidden; }

/* ══════════════════════════════════════════════════════════════
   SMS Modal
   ══════════════════════════════════════════════════════════════ */
.ds-sms-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(0,0,0,0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	animation: ds-fade-in 0.2s ease;
}
.ds-sms-modal {
	background: #fff;
	border-radius: 14px;
	width: 100%;
	max-width: 420px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 12px 48px rgba(0,0,0,0.18);
	display: flex;
	flex-direction: column;
	animation: ds-slide-up 0.25s ease;
}
.ds-sms-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid #e9ecef;
}
.ds-sms-header h3 { margin: 0; font-size: 1.05rem; font-weight: 700; color: #222; }
.ds-sms-body { padding: 1.25rem; }
.ds-sms-body .ds-wiz-label { margin-top: 0; }
.ds-sms-msg-label { margin-top: 1rem !important; }
.ds-sms-manual-wrap { margin-top: 0.5rem; }
.ds-sms-textarea { resize: vertical; min-height: 80px; font-family: inherit; line-height: 1.5; }
.ds-sms-char-count { display: block; text-align: right; font-size: 0.75rem; color: #888; margin-top: 0.25rem; }
.ds-sms-notice { margin-top: 0.75rem; padding: 0.65rem 0.85rem; border-radius: 6px; font-size: 0.85rem; line-height: 1.5; }
.ds-sms-footer {
	display: flex;
	align-items: center;
	padding: 0.85rem 1.25rem;
	border-top: 1px solid #e9ecef;
	background: #fafbfc;
	border-radius: 0 0 14px 14px;
}
.ds-sms-footer .ds-btn svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 2px; }

/* ══════════════════════════════════════════════════════════════
   Edit Client Modal (client detail page)
   ══════════════════════════════════════════════════════════════ */
.ds-edit-client-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(0,0,0,0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	animation: ds-fade-in 0.2s ease;
}
.ds-edit-client-modal {
	background: #fff;
	border-radius: 14px;
	width: 100%;
	max-width: 480px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 12px 48px rgba(0,0,0,0.18);
	display: flex;
	flex-direction: column;
	animation: ds-slide-up 0.25s ease;
}
.ds-edit-client-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid #e9ecef;
}
.ds-edit-client-header h3 { margin: 0; font-size: 1.05rem; font-weight: 700; color: #222; }
.ds-edit-client-body {
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.ds-edit-client-body .ds-wiz-label { margin-top: 0.25rem; margin-bottom: 0; }
.ds-edit-client-body .ds-wiz-label:first-child { margin-top: 0; }
.ds-edit-client-hint { font-size: 0.8rem; color: var(--text-muted); margin: 0.25rem 0 0; }
.ds-edit-client-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.75rem;
	padding: 0.85rem 1.25rem;
	border-top: 1px solid #e9ecef;
	background: #fafbfc;
	border-radius: 0 0 14px 14px;
}

/* ══════════════════════════════════════════════════════════════
   Edit User Modal (Manage on assigned user row)
   ══════════════════════════════════════════════════════════════ */
.ds-edit-user-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(0,0,0,0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	animation: ds-fade-in 0.2s ease;
}
.ds-edit-user-modal {
	background: #fff;
	border-radius: 14px;
	width: 100%;
	max-width: 420px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 12px 48px rgba(0,0,0,0.18);
	display: flex;
	flex-direction: column;
	animation: ds-slide-up 0.25s ease;
}
.ds-edit-user-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid #e9ecef;
}
.ds-edit-user-header h3 { margin: 0; font-size: 1.05rem; font-weight: 700; color: #222; }
.ds-edit-user-body {
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.ds-edit-user-body .ds-wiz-label { margin-top: 0.25rem; margin-bottom: 0; }
.ds-edit-user-body .ds-wiz-label:first-child { margin-top: 0; }
.ds-edit-user-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.75rem;
	padding: 0.85rem 1.25rem;
	border-top: 1px solid #e9ecef;
	background: #fafbfc;
	border-radius: 0 0 14px 14px;
}

/* ══════════════════════════════════════════════════════════════
   Create Client Modal (Add client button)
   ══════════════════════════════════════════════════════════════ */
.ds-create-client-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(0,0,0,0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	animation: ds-fade-in 0.2s ease;
}
.ds-create-client-modal {
	background: #fff;
	border-radius: 14px;
	width: 100%;
	max-width: 420px;
	box-shadow: 0 12px 48px rgba(0,0,0,0.18);
	display: flex;
	flex-direction: column;
	animation: ds-slide-up 0.25s ease;
}
.ds-create-client-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid #e9ecef;
}
.ds-create-client-header h3 { margin: 0; font-size: 1.05rem; font-weight: 700; color: #222; }
.ds-create-client-body { padding: 1.25rem; }
.ds-create-client-body .ds-wiz-label { margin-top: 0.25rem; margin-bottom: 0; }
.ds-create-client-body .ds-wiz-label:first-child { margin-top: 0; }
.ds-create-client-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.75rem;
	padding: 0.85rem 1.25rem;
	border-top: 1px solid #e9ecef;
	background: #fafbfc;
	border-radius: 0 0 14px 14px;
}

/* Import clients modal – wider for mapping/preview tables */
.ds-import-clients-modal.ds-edit-client-modal {
	max-width: 640px;
}
.ds-import-clients-body .ds-import-step { padding: 0.25rem 0; }
.ds-import-table-wrap {
	overflow-x: auto;
	margin: 0.75rem 0 1rem;
	max-height: 280px;
	overflow-y: auto;
}
.ds-import-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	font-size: 0.9rem;
}
.ds-import-table thead { background: #f8f9fa; position: sticky; top: 0; }
.ds-import-table th {
	padding: 0.6rem 0.75rem;
	font-weight: 600;
	color: var(--text-muted, #64748b);
	text-align: left;
	border-bottom: 2px solid #e9ecef;
}
.ds-import-table td {
	padding: 0.6rem 0.75rem;
	border-bottom: 1px solid #f0f0f0;
	vertical-align: middle;
}
.ds-import-table tbody tr:hover { background: #f8faff; }
.ds-import-table .ds-import-map-select {
	width: 100%;
	min-width: 140px;
	padding: 0.35rem 0.5rem;
	border: 1px solid var(--border, #e2e8f0);
	border-radius: 6px;
	font-size: 0.9rem;
}
.ds-import-hint {
	font-size: 0.85rem;
	color: var(--text-muted, #64748b);
	margin-top: 0.35rem;
}
.ds-import-errors {
	margin-top: 1rem;
	font-size: 0.9rem;
	color: var(--danger, #ef4444);
}
.ds-import-errors ul { margin: 0.5rem 0 0 1.25rem; padding: 0; }
.ds-import-clients-footer {
	flex-wrap: wrap;
	gap: 0.5rem;
}

/* ══════════════════════════════════════════════════════════════
   QR Code Modal
   ══════════════════════════════════════════════════════════════ */
.ds-qr-overlay {
	position: fixed;
	inset: 0;
	z-index: 100001;
	background: rgba(0,0,0,0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
}
.ds-qr-modal {
	background: #fff;
	border-radius: 14px;
	width: 100%;
	max-width: 380px;
	box-shadow: 0 20px 60px rgba(0,0,0,0.25);
	display: flex;
	flex-direction: column;
	animation: ds-slide-up 0.25s ease-out;
}
.ds-qr-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid #e9ecef;
}
.ds-qr-header h3 { margin: 0; font-size: 1.1rem; }
.ds-qr-body {
	padding: 1.5rem 1.25rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}
.ds-qr-doc-title { font-weight: 600; font-size: 0.92rem; margin: 0 0 1rem; color: #333; word-break: break-word; max-width: 100%; }
.ds-qr-canvas { display: flex; align-items: center; justify-content: center; min-height: 220px; min-width: 220px; }
.ds-qr-canvas canvas, .ds-qr-canvas img { border-radius: 8px; border: 3px solid #e9ecef; }
.ds-qr-hint { margin: 1rem 0 0; font-size: 0.82rem; color: #6c6c6c; }
.ds-qr-footer {
	display: flex;
	align-items: center;
	padding: 0.85rem 1.25rem;
	border-top: 1px solid #e9ecef;
	background: #fafbfc;
	border-radius: 0 0 14px 14px;
}
.ds-qr-footer .ds-btn svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 2px; }
@media (max-width: 480px) {
	.ds-qr-modal { max-width: 95%; margin: 0.5rem; }
}

/* ══════════════════════════════════════════════════════════════
   Loading Overlay
   ══════════════════════════════════════════════════════════════ */
.ds-loader-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(255,255,255,0.7);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
}
.ds-loader-spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -20px 0 0 -20px;
	width: 40px;
	height: 40px;
	border: 4px solid #e9ecef;
	border-top-color: #007fff;
	border-radius: 50%;
	animation: ds-spin 0.7s linear infinite;
}
@keyframes ds-spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════
   Animations
   ══════════════════════════════════════════════════════════════ */
.ds-card-anim { opacity: 0; transform: translateY(16px); transition: opacity 0.45s ease, transform 0.45s ease; }
.ds-card-visible { opacity: 1; transform: translateY(0); }
.ds-activity-anim { opacity: 0; transform: translateX(-12px); transition: opacity 0.35s ease, transform 0.35s ease; }
.ds-activity-visible { opacity: 1; transform: translateX(0); }
.ds-action-pulse { animation: ds-pulse 0.6s ease; }
@keyframes ds-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,193,7,0.4); } 70% { box-shadow: 0 0 0 8px rgba(255,193,7,0); } 100% { box-shadow: 0 0 0 0 rgba(255,193,7,0); } }
.ds-sort-arrow { font-size: 0.65rem; margin-left: 2px; color: #007fff; }

/* ══════════════════════════════════════════════════════════════
   Responsive – Sidebar
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
	.pmf-sidebar {
		transform: translateX(-100%);
	}
	.pmf-sidebar.open {
		transform: translateX(0);
	}
	.pmf-app .pmf-sidebar-toggle {
		display: block;
	}
	.pmf-main {
		margin-left: 0;
		padding: 60px 16px 24px;
	}
	.pmf-page-header h1 { font-size: 20px; }
	.pmf-stats-row { grid-template-columns: repeat(2, 1fr); }
	.pmf-grid-2 { grid-template-columns: 1fr; }
	.pmf-actions-row { flex-direction: column; }
	.pmf-action-btn { width: 100%; justify-content: center; }

	.ds-wizard { max-width: 100%; margin: 0.5rem; }
	.ds-sms-modal { max-width: 100%; margin: 0.5rem; }
	.ds-wiz-dl { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
	.pmf-stats-row { grid-template-columns: 1fr; }
	.ds-table th,
	.ds-table td { padding: 0.5rem 0.65rem; font-size: 0.82rem; }
}

/* Client list picker (wizard step 1) */
.ds-wiz-client-list { scrollbar-width: thin; }
.ds-wiz-client-search {
	width: 100%;
	padding: 0.4rem 0.6rem;
	border: none;
	border-bottom: 1px solid #e2e8f0;
	font-size: 0.85rem;
	outline: none;
	background: #f8fafc;
	border-radius: 0.5rem 0.5rem 0 0;
	box-sizing: border-box;
}
.ds-wiz-client-search:focus { border-bottom-color: #3b82f6; background: #fff; }
.ds-wiz-client-item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.45rem 0.6rem;
	cursor: pointer;
	border-radius: 0.35rem;
	font-size: 0.85rem;
	transition: background .12s;
	user-select: none;
}
.ds-wiz-client-item:hover { background: #f1f5f9; }
.ds-wiz-client-item.ds-wiz-client-selected { background: #eff6ff; }
.ds-wiz-client-item input[type="checkbox"],
.ds-wiz-client-item input[type="radio"] { margin: 0; flex-shrink: 0; accent-color: #3b82f6; }
.ds-wiz-client-item-info { display: flex; flex-direction: column; min-width: 0; }
.ds-wiz-client-item-name { font-weight: 500; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-wiz-client-item-email { font-size: 0.78rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-wiz-client-empty { padding: 0.75rem; color: #9ca3af; font-size: 0.85rem; text-align: center; }

/* Per-slot storage picker (doc-request detail) */
.ds-slot-storage-opt {
	cursor: pointer;
	padding: 0.35rem 0.75rem;
	border: 1px solid #d1d5db;
	border-radius: 0.375rem;
	font-size: 0.8rem;
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	background: #fff;
	transition: border-color .15s, box-shadow .15s;
}
.ds-slot-storage-opt:hover { border-color: #94a3b8; }
.ds-slot-storage-opt.ds-slot-opt-sel {
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59,130,246,.15);
	background: #f0f7ff;
}
.ds-slot-storage-opt input[type="radio"] { margin: 0; }
