/* Quintaphon: minimal neutral UI */

@font-face {
	font-family: Inter;
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/inter-latin-400-normal.woff2') format('woff2');
}
@font-face {
	font-family: Inter;
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('../fonts/inter-latin-500-normal.woff2') format('woff2');
}
@font-face {
	font-family: Inter;
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('../fonts/inter-latin-600-normal.woff2') format('woff2');
}
@font-face {
	font-family: Inter;
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/inter-latin-700-normal.woff2') format('woff2');
}

:root,
[data-theme="dark"] {
	--bg-main: #0a0a0a;
	--sidebar-bg: #0f0f0f;
	--surface: #141414;
	--surface-hover: #1a1a1a;
	--card-bg: #141414;
	--card-border: rgba(255, 255, 255, 0.08);
	--primary: #fafafa;
	--primary-contrast: #0a0a0a;
	--primary-muted: rgba(250, 250, 250, 0.12);
	--text-main: #f5f5f5;
	--text-muted: #737373;
	--accent: #a3a3a3;
	--danger: #ef4444;
	--success: #22c55e;
	--warning: #eab308;
	--input-bg: #0f0f0f;
	--header-bg: rgba(10, 10, 10, 0.92);
	--shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
	--radius: 10px;
	--transition: 0.2s ease;
}

[data-theme="light"] {
	--bg-main: #f5f5f5;
	--sidebar-bg: #ffffff;
	--surface: #ffffff;
	--surface-hover: #f0f0f0;
	--card-bg: #ffffff;
	--card-border: rgba(0, 0, 0, 0.08);
	--primary: #171717;
	--primary-contrast: #fafafa;
	--primary-muted: rgba(23, 23, 23, 0.08);
	--text-main: #171717;
	--text-muted: #737373;
	--accent: #525252;
	--danger: #dc2626;
	--success: #16a34a;
	--warning: #ca8a04;
	--input-bg: #fafafa;
	--header-bg: rgba(255, 255, 255, 0.92);
	--shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
	-webkit-text-size-adjust: 100%;
}

html, body, input, textarea, select, button, optgroup, table, td, th {
	font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
	background-color: var(--bg-main);
	background-image: radial-gradient(circle, var(--grid-dot) 1px, transparent 1px);
	background-size: 20px 20px;
	color: var(--text-main);
	font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-size: 14px;
	line-height: 1.5;
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
}

[data-theme="dark"] { --grid-dot: rgba(255, 255, 255, 0.06); }
[data-theme="light"] { --grid-dot: rgba(0, 0, 0, 0.07); }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
/* Links styled as buttons never underline */
a.btn-primary:hover, a.btn-secondary:hover { text-decoration: none; }

.nav-item,
.nav-item:hover,
.sidebar-tool-btn,
.sidebar-tool-btn:hover {
	text-decoration: none !important;
}

.rl-app-shell { display: flex; min-height: 100vh; }

/* Sidebar */
.rl-sidebar-backdrop {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	z-index: 999;
	opacity: 0;
	transition: opacity 0.25s ease;
}
.rl-sidebar-backdrop.visible { display: block; opacity: 1; }

.rl-sidebar {
	width: 260px;
	background: var(--sidebar-bg);
	border-right: 1px solid var(--card-border);
	display: flex;
	flex-direction: column;
	padding: 24px 0;
	height: 100vh;
	position: fixed;
	left: 0;
	top: 0;
	z-index: 1100;
	overflow: visible;
	transition: var(--transition);
}
.rl-sidebar.collapsed { width: 80px; }
.rl-sidebar.collapsed .brand-name,
.rl-sidebar.collapsed .nav-item span,
.rl-sidebar.collapsed .sidebar-tool-btn span { display: none; }
.rl-sidebar.collapsed .sidebar-brand { justify-content: center; padding: 0 0 32px; }
.rl-sidebar.collapsed .nav-item { justify-content: center; padding: 14px 0; gap: 0; }
.rl-sidebar.collapsed .sidebar-tool-btn { justify-content: center; padding: 10px 0; gap: 0; }

.sidebar-toggle-btn {
	position: absolute;
	right: -14px;
	top: 28px;
	background: var(--surface);
	border: 1px solid var(--card-border);
	color: var(--text-main);
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 1102;
	box-shadow: var(--shadow);
	pointer-events: auto;
}

.sidebar-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 0 24px 32px;
}
.brand-icon { font-size: 1.75rem; color: var(--primary); }
.brand-name { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.03em; }

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; padding: 0 12px; flex: 1; }
.nav-item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 16px;
	border-radius: 12px;
	color: var(--text-muted);
	font-weight: 600;
	font-size: 0.9rem;
	transition: var(--transition);
}
.nav-item:hover { color: var(--text-main); background: var(--surface-hover); }
.nav-item.active {
	background: var(--primary-muted);
	color: var(--text-main);
}
.nav-item i,
.sidebar-tool-btn i { font-size: 1.15rem; flex-shrink: 0; }

.sidebar-tools {
	padding: 16px 12px 0;
	border-top: 1px solid var(--card-border);
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.sidebar-tool-btn {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	border: 1px solid var(--card-border);
	border-radius: 10px;
	background: transparent;
	color: var(--text-muted);
	font-size: 0.8rem;
	font-weight: 600;
	cursor: pointer;
	transition: var(--transition);
}
.sidebar-tool-btn:hover { color: var(--text-main); border-color: var(--card-border); background: var(--surface-hover); }

/* Main */
.rl-main-wrapper {
	flex: 1;
	margin-left: 260px;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	transition: var(--transition);
	position: relative;
	z-index: 1;
}
.rl-main-wrapper.expanded,
.rl-main-wrapper.sidebar-collapsed { margin-left: 80px; }
/* Set before first paint from localStorage (header.php), so a collapsed sidebar doesn't flash wide */
html.sb-collapsed .rl-sidebar { width: 80px; }
html.sb-collapsed .rl-sidebar .brand-name,
html.sb-collapsed .rl-sidebar .nav-item span,
html.sb-collapsed .rl-sidebar .sidebar-tool-btn span { display: none; }
html.sb-collapsed .rl-main-wrapper { margin-left: 80px; }
html.sb-no-anim .rl-sidebar,
html.sb-no-anim .rl-main-wrapper { transition: none !important; }

.rl-top-header {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 24px;
	border-bottom: 1px solid var(--card-border);
	background: var(--header-bg);
	backdrop-filter: blur(12px);
	position: sticky;
	top: 0;
	z-index: 100;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.theme-toggle-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.theme-toggle-btn svg {
	width: 18px;
	height: 18px;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.75;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.theme-toggle-btn .icon-sun { display: none; }
[data-theme="light"] .theme-toggle-btn .icon-moon { display: none; }
[data-theme="light"] .theme-toggle-btn .icon-sun { display: block; }

.search-container {
	flex: 1;
	max-width: 380px;
	background: var(--input-bg);
	border: 1px solid var(--card-border);
	border-radius: var(--radius);
	padding: 10px 14px;
	display: flex;
	align-items: center;
	gap: 10px;
	transition: var(--transition);
}
.search-container:focus-within {
	border-color: var(--text-muted);
}
.search-container input {
	flex: 1;
	background: none;
	border: none;
	color: var(--text-main);
	font-size: 0.9rem;
	outline: none;
}

.header-right {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-left: auto;
}
.disk-info-header { min-width: 140px; }
.disk-info-label {
	display: flex;
	justify-content: space-between;
	font-size: 0.7rem;
	font-weight: 700;
	color: var(--text-muted);
	margin-bottom: 6px;
}
.disk-pct { color: var(--primary); }
.disk-bar-track {
	height: 4px;
	background: var(--surface-hover);
	border-radius: 2px;
	overflow: hidden;
}
.disk-bar-fill {
	height: 100%;
	background: var(--text-main);
}
.disk-info-sub { font-size: 0.65rem; color: var(--text-muted); margin-top: 4px; }

a.icon-btn {
	text-decoration: none;
	color: inherit;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.icon-btn {
	background: var(--input-bg);
	border: 1px solid var(--card-border);
	width: 38px;
	height: 38px;
	border-radius: var(--radius);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--text-muted);
	cursor: pointer;
	transition: var(--transition);
}
.icon-btn:hover { color: var(--text-main); background: var(--surface-hover); }

.rl-page-content {
	flex: 1;
	padding: 24px 28px 40px;
}

/* Cards & grid */
.dashboard-top-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 20px;
}
.dashboard-stat-body { padding: 4px 0 8px; }
.dashboard-stat-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
	font-size: 0.9rem;
}
.dashboard-stat-label { color: var(--text-muted); }
.dashboard-stat-value { color: var(--text-main); }
.dashboard-stat-bar { margin: 8px 0; }
.dashboard-stat-sub { margin: 0; font-size: 0.8rem; color: var(--text-muted); }
.dashboard-stat-card .card-title { font-size: 1.1rem; }
.files-card-header .card-title { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; }
.files-card-header .card-header-actions { gap: 10px; align-items: center; flex-wrap: wrap; }
.search-container.files-search { flex: 1 1 200px; max-width: 280px; padding: 8px 12px; }
.search-container input::-webkit-search-cancel-button { cursor: pointer; }
.settings-dashboard-grid { margin-top: 0; }

.dashboard-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
	gap: 24px;
	align-items: start;
}
.grid-left { display: flex; flex-direction: column; gap: 24px; }

.rl-card {
	background: var(--card-bg);
	border: 1px solid var(--card-border);
	border-radius: var(--radius);
	padding: 22px;
	box-shadow: var(--shadow);
}
.rl-card-files { display: flex; flex-direction: column; max-height: calc(100vh - 180px); }

.card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}
.card-header-actions {
	min-width: 0;
	flex: 1 1 auto;
	display: flex;
	justify-content: flex-end;
	max-width: 100%;
}
.card-title { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }

/* Transload */
.field-label { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; }
.field-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 12px; }
.transload-input-wrap { position: relative; }
.transload-input-wrap input {
	width: 100%;
	background: var(--input-bg);
	border: 1px solid var(--card-border);
	padding: 14px 130px 14px 16px;
	border-radius: var(--radius);
	color: var(--text-main);
	font-size: 0.95rem;
	transition: var(--transition);
}
.transload-input-wrap input:focus {
	outline: none;
	border-color: var(--text-muted);
}
.btn-transload {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	background: var(--text-main);
	color: var(--primary-contrast);
	border: none;
	padding: 10px 18px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 0.8rem;
	cursor: pointer;
	white-space: nowrap;
	transition: var(--transition);
}
.btn-transload:hover { opacity: 0.9; }

.rl-input,
.rl-input[type="text"],
.rl-input[type="url"],
.rl-input[type="email"],
.rl-input[type="password"],
textarea.rl-input,
select.rl-input {
	width: 100%;
	background: var(--input-bg);
	border: 1px solid var(--card-border);
	padding: 10px 14px;
	border-radius: var(--radius);
	color: var(--text-main);
	margin-bottom: 10px;
}
.rl-textarea { min-height: 120px; resize: vertical; font-family: inherit; }
.settings-stack { display: flex; flex-direction: column; gap: 4px; }

.btn-primary {
	background: var(--text-main);
	color: var(--primary-contrast);
	border: none;
	padding: 10px 20px;
	border-radius: var(--radius);
	font-weight: 600;
	cursor: pointer;
	margin-top: 12px;
}

.lumina-hidden { display: none !important; }
.lumina-hidden.is-visible { display: block !important; }

.lumina-options-details {
	margin-top: 16px;
	border: 1px solid var(--card-border);
	border-radius: 12px;
	padding: 4px 14px 14px;
	background: rgba(0, 0, 0, 0.2);
}
.lumina-options-summary {
	cursor: pointer;
	font-weight: 700;
	color: var(--primary);
	padding: 12px 0;
	list-style: none;
}
.lumina-options-summary::-webkit-details-marker { display: none; }
.lumina-transload-options { margin-top: 8px; }

.toolbar-sep { color: var(--text-muted); opacity: 0.5; }
.flist-match-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
	padding: 10px;
	background: rgba(0, 0, 0, 0.25);
	border-radius: 10px;
}
.flist-match-bar .rl-input { margin: 0; flex: 1; min-width: 120px; }
.btn-sm { padding: 8px 14px; font-size: 0.8rem; margin-top: 0; }
.inline-check { margin: 0; }
.file-name-link { color: var(--text-main); font-weight: 500; }
.file-name-link:hover { color: var(--primary); text-decoration: none; }
.settings-files-hint { padding: 20px; }

.transload-page {
	max-width: 860px;
	margin: 0 auto;
}
.rl-card-transload .transload-box {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.transload-basic-fields {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding-top: 4px;
}
.dashboard-files-full {
	width: 100%;
}
.dashboard-files-full .rl-card-files {
	min-height: 400px;
}
.section-label {
	margin: 8px 0 4px;
	font-weight: 600;
	color: var(--text-muted);
	text-transform: uppercase;
	font-size: 0.7rem;
	letter-spacing: 0.05em;
}

/* File list */
.custom-select-actions {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	width: 100%;
	max-width: min(220px, 100%);
	box-sizing: border-box;
	background-color: var(--input-bg);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 14px;
	border: 1px solid var(--card-border);
	color: var(--text-main);
	padding: 8px 34px 8px 12px;
	border-radius: var(--radius);
	font-size: 0.85rem;
	cursor: pointer;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.custom-select-actions:focus {
	outline: none;
	border-color: var(--text-muted);
}
.custom-select-actions option {
	background: var(--card-bg);
	color: var(--text-main);
}
.file-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 12px;
	font-size: 0.8rem;
}
.toolbar-link { color: var(--primary); font-weight: 600; }

.file-list-header,
.file-row {
	display: grid;
	grid-template-columns: 36px minmax(0, 1fr) 72px 88px minmax(120px, auto);
	align-items: center;
	gap: 10px;
	padding: 10px 8px;
}
.file-list-header {
	font-size: 0.65rem;
	font-weight: 700;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	border-bottom: 1px solid var(--card-border);
	padding-bottom: 12px;
	margin-bottom: 4px;
}
.file-list { overflow-y: auto; flex: 1; min-height: 120px; }
.file-row {
	border-radius: 12px;
	transition: background 0.15s ease;
}
.file-row:hover { background: var(--surface-hover); }
.file-icon {
	width: 32px;
	height: 32px;
	background: var(--primary-muted);
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--text-muted);
	flex-shrink: 0;
}
.col-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.file-name {
	font-weight: 500;
	font-size: 0.9rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.file-size, .file-date { font-size: 0.8rem; color: var(--text-muted); }
.file-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.action-btn {
	background: none;
	border: none;
	font-size: 0.8rem;
	font-weight: 700;
	cursor: pointer;
	padding: 4px 6px;
}
.action-btn.download { color: var(--primary); }
.action-btn.delete { color: var(--danger); }
.action-btn.rename { color: var(--accent); }

/* Inline Yes/No confirmations (row actions cell and under the file card header) */
.inline-confirm { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.inline-confirm-text { font-size: 0.8rem; font-weight: 600; color: var(--text-main); }
.inline-confirm-btn {
	padding: 6px 12px;
	border-radius: 8px;
	font-size: 0.78rem;
	font-weight: 700;
	cursor: pointer;
	border: 1px solid var(--card-border);
	background: var(--input-bg);
	color: var(--text-muted);
	transition: var(--transition);
}
.inline-confirm-btn:hover { color: var(--text-main); background: var(--surface-hover); }
.inline-confirm-btn.yes { background: var(--text-main); color: var(--primary-contrast); border-color: transparent; }
.inline-confirm-btn.yes.danger { background: var(--danger); color: #fff; }
.inline-confirm-btn:disabled { opacity: 0.6; cursor: default; }
.file-row.is-confirming { background: var(--surface-hover); }
.bulk-confirm-bar {
	margin: -8px 0 14px;
	padding: 10px 12px;
	border: 1px solid var(--card-border);
	border-radius: 10px;
	background: var(--surface-hover);
}
.bulk-confirm-bar .inline-confirm { justify-content: flex-start; }
.bulk-confirm-bar .inline-confirm { flex-wrap: nowrap; }
.bulk-confirm-bar .inline-confirm-text { margin-right: auto; flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bulk-confirm-bar .inline-confirm-btn { flex-shrink: 0; }
.file-row.is-confirming { box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.35); }

/* Inline rename in a file row */
.file-row.is-renaming .file-name { flex: 1; overflow: visible; }
.inline-rename { display: flex; align-items: center; gap: 6px; width: 100%; }
.inline-rename .inline-rename-input { margin: 0; padding: 6px 10px; font-size: 0.85rem; flex: 1; min-width: 120px; }
.inline-rename .inline-rename-input:focus { outline: none; border-color: var(--text-muted); }
.inline-rename-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	flex-shrink: 0;
	border-radius: 8px;
	border: 1px solid var(--card-border);
	background: var(--input-bg);
	color: var(--text-muted);
	cursor: pointer;
	transition: var(--transition);
}
.inline-rename-btn:hover { background: var(--surface-hover); color: var(--text-main); }
.inline-rename-btn.save { color: var(--text-main); }

/* Recent */
.recent-list { display: flex; flex-direction: column; }
.recent-item {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr) 90px;
	align-items: center;
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid var(--card-border);
}
.recent-item:last-child { border-bottom: none; }
.progress-container {
	height: 6px;
	background: var(--surface-hover);
	border-radius: 3px;
	overflow: hidden;
	margin-top: 6px;
}
.progress-bar {
	height: 100%;
	background: var(--text-main);
	border-radius: 3px;
}
.recent-status { font-size: 0.75rem; color: var(--text-muted); text-align: right; }

.section-subtitle {
	font-size: 1rem;
	margin: 24px 0 12px;
	color: var(--primary);
	font-weight: 600;
}

.empty-state {
	padding: 24px;
	text-align: center;
	color: var(--text-muted);
	font-size: 0.9rem;
}

.stats-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}
.stat-mini-card {
	background: var(--surface);
	padding: 16px;
	border-radius: var(--radius);
	border: 1px solid var(--card-border);
}
.stat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }
.stat-value { font-size: 1.25rem; font-weight: 700; color: var(--primary); margin-top: 4px; }

.plugin-scroll {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	max-height: 160px;
	overflow-y: auto;
}
.plugin-chip {
	font-size: 0.75rem;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--surface-hover);
	border: 1px solid var(--card-border);
	color: var(--text-muted);
}

.custom-checkbox {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	margin: 8px 0;
}
.custom-checkbox input { width: 18px; height: 18px; accent-color: var(--primary); }
.custom-checkbox span { color: var(--text-muted); font-size: 0.9rem; }

.checker-options {
	display: flex;
	gap: 20px;
	margin: 12px 0;
	font-size: 0.85rem;
	color: var(--text-muted);
}

.lumina-action-output {
	margin-bottom: 20px;
	padding: 16px;
	background: var(--surface);
	border: 1px solid var(--card-border);
	border-radius: var(--radius);
	overflow-x: auto;
}
.lumina-action-output table { width: 100%; }

.htmlerror {
	display: inline-block;
	padding: 12px 16px;
	background: linear-gradient(135deg, #fde68a, #fcd34d);
	color: #1a1a1a;
	border-radius: 10px;
	font-weight: 600;
}

.rl-page-message {
	max-width: 420px;
	margin: 40px auto;
	padding: 28px;
	text-align: center;
	background: var(--card-bg);
	border: 1px solid var(--card-border);
	border-radius: 20px;
}

.rl-footer {
	padding: 20px 28px;
	border-top: 1px solid var(--card-border);
	text-align: center;
	font-size: 0.75rem;
	color: var(--text-muted);
}
.rl-footer .rev-dev { color: var(--primary); }

.btn-secondary {
	background: var(--surface);
	border: 1px solid var(--card-border);
	color: var(--text-main);
	padding: 8px 14px;
	border-radius: var(--radius);
	font-size: 0.8rem;
	font-weight: 600;
	cursor: pointer;
	transition: var(--transition);
}
.btn-secondary:hover { background: var(--surface-hover); }

.lumina-cancel-wrap {
	display: flex;
	justify-content: center;
	margin: 16px 0 8px;
}
.lumina-cancel-btn {
	min-width: 160px;
}
.lumina-cancel-btn:disabled {
	opacity: 0.65;
	cursor: wait;
}

.rl-card-notes { max-width: 960px; margin: 0 auto; }
.rl-card-notes .rl-textarea.notes {
	width: 100%;
	min-height: 220px;
	resize: vertical;
	box-sizing: border-box;
}
.rl-notes-actions { margin-top: 16px; }
.rl-notes-saved {
	margin: 0 0 12px;
	padding: 10px 14px;
	border-radius: 8px;
	background: var(--surface-hover);
	color: var(--text-main);
	font-size: 14px;
}

/* Modal overlay */
.lumina-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 2000;
	background: rgba(0, 0, 0, 0.55);
	align-items: center;
	justify-content: center;
	padding: 20px;
	pointer-events: none;
}
.lumina-overlay.is-open {
	display: flex;
	pointer-events: auto;
}
.lumina-modal {
	width: 100%;
	max-width: 420px;
	background: var(--card-bg);
	border: 1px solid var(--card-border);
	border-radius: var(--radius);
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
	padding: 22px;
}
.lumina-modal-title {
	font-size: 1.1rem;
	font-weight: 700;
	margin-bottom: 10px;
}
.lumina-modal-body {
	color: var(--text-muted);
	font-size: 0.9rem;
	margin-bottom: 18px;
	line-height: 1.5;
}
.lumina-modal-body .rl-input { margin-top: 10px; margin-bottom: 0; }
.lumina-modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	flex-wrap: wrap;
}
.lumina-modal-actions .btn-primary,
.lumina-modal-actions .btn-secondary { margin: 0; }
.lumina-modal-actions .btn-danger {
	background: var(--danger);
	color: #fff;
	border: none;
	padding: 10px 18px;
	border-radius: var(--radius);
	font-weight: 600;
	cursor: pointer;
}

/* Progress (transload download) */
.transload-progress-wrap { margin: 16px 0; }
.progressouter {
	border: 1px solid var(--card-border);
	border-radius: 999px;
	height: 12px;
	background: var(--surface-hover);
	overflow: hidden;
	max-width: 100%;
}
.progressdown, .progressup {
	height: 8px;
	margin: 2px;
	background: var(--text-main);
	border-radius: 999px;
	width: 0%;
}
.transloadui { width: 100%; color: var(--text-muted); font-size: 0.85rem; }
.transloadui td { padding: 6px 4px; }

#linkchecker-results { margin-top: 16px; max-height: 400px; overflow-y: auto; }
#linkchecker-results .g { color: #4cd137; }
#linkchecker-results .r { color: var(--danger); }
#linkchecker-results .y { color: #feca57; }

.rl-limit-notice, .autodel { color: #feca57; font-size: 0.85rem; margin-top: 8px; }

.lumina-download-output {
	margin-top: 16px;
	font-size: 0.9rem;
	line-height: 1.6;
	color: var(--text-muted);
}
.lumina-download-output a { color: var(--primary); }
.lumina-download-output form { margin-top: 16px; }
.lumina-download-output .custom-select-actions { max-width: 100%; }

.lumina-download-page {
	max-width: 720px;
	margin: 0 auto;
	padding: 24px;
	text-align: center;
}
.lumina-download-page .rl-card,
.lumina-download-page form {
	margin-top: 20px;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--card-border); border-radius: 8px; }

/* Responsive */
@media (max-width: 1100px) {
	.dashboard-grid { grid-template-columns: 1fr; }
	.dashboard-top-grid { grid-template-columns: 1fr; }
	/* File rows adapt to the card's width instead (see "Server Files card" container queries) */
}

@media (max-width: 900px) {
	.rl-sidebar,
	.rl-sidebar.collapsed,
	html.sb-collapsed .rl-sidebar {
		width: 72px;
	}
	.rl-sidebar .brand-name,
	.rl-sidebar .nav-item span,
	.rl-sidebar .sidebar-tool-btn span { display: none; }
	.rl-sidebar .sidebar-brand { justify-content: center; padding-bottom: 24px; }
	.rl-sidebar .nav-item { justify-content: center; padding: 12px 0; gap: 0; }
	.rl-sidebar .sidebar-tool-btn { justify-content: center; padding: 10px 0; gap: 0; }
	.sidebar-toggle-btn { display: none; }
	.rl-main-wrapper,
	.rl-main-wrapper.expanded,
	.rl-main-wrapper.sidebar-collapsed,
	html.sb-collapsed .rl-main-wrapper { margin-left: 72px; }
	.search-container.files-search { max-width: none; }
	.rl-top-header { flex-wrap: wrap; padding: 12px 16px; }
	.search-container { max-width: none; order: 2; width: 100%; }
	.header-right { width: 100%; justify-content: space-between; order: 1; }
	.theme-toggle-btn span { display: none; }
	.rl-page-content { padding: 16px; }
}

/* Only on phones does the Transload button move under the URL; elsewhere it stays on the right. */
@media (max-width: 480px) {
	.transload-input-wrap input { padding-right: 16px; padding-bottom: 52px; }
	.btn-transload {
		right: 6px;
		left: 6px;
		top: auto;
		bottom: 6px;
		transform: none;
		width: calc(100% - 12px);
	}
}

/* Long URLs scroll inside the field (no wrapping) and never run under the button. */
.transload-input-wrap input { white-space: nowrap; overflow-x: auto; text-overflow: clip; }

/* Spinner used by the link checker and the cancel button */
.ph-spin { display: inline-block; animation: lumina-spin 0.9s linear infinite; }
@keyframes lumina-spin { to { transform: rotate(360deg); } }

/* Auto Upload (auul.php) */
.auul-page { display: flex; flex-direction: column; gap: 16px; max-width: 1200px; margin: 0 auto; }
.auul-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; align-items: start; }
.auul-card .card-header { margin-bottom: 14px; }
.auul-card .card-title { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; }
.auul-meta { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.auul-head-side { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.auul-gdrive-btn,
.auul-gdrive-btn:hover { margin: 0; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.auul-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; font-size: 0.85rem; }
.search-container.auul-search { flex: 1 1 160px; max-width: none; padding: 8px 12px; }
.auul-host-list,
.auul-file-list {
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-height: 420px;
	overflow-y: auto;
	padding-right: 4px;
}
.auul-host,
.auul-file {
	display: grid;
	align-items: center;
	gap: 12px;
	padding: 9px 12px;
	border: 1px solid transparent;
	border-radius: 10px;
	cursor: pointer;
	transition: var(--transition);
}
.auul-host { grid-template-columns: 18px minmax(0, 1fr) auto; }
.auul-file,
.auul-file-head { grid-template-columns: 18px minmax(0, 1fr) 90px; }
.auul-host:hover,
.auul-file:hover { background: var(--surface-hover); }
.auul-host.is-checked,
.auul-file.is-checked { background: var(--primary-muted); border-color: var(--card-border); }
.auul-host-name,
.auul-file-name { font-size: 0.88rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auul-file-name i { color: var(--text-muted); margin-right: 4px; }
.auul-badge {
	font-size: 0.7rem;
	font-weight: 700;
	color: var(--text-muted);
	background: var(--input-bg);
	border: 1px solid var(--card-border);
	border-radius: 999px;
	padding: 2px 8px;
	white-space: nowrap;
}
/* Auto Upload: account login saved (tick) or not (cross), in place of the size badge */
.auul-login { display: inline-flex; font-size: 1.15rem; color: var(--danger); opacity: 0.8; }
.auul-login.is-set { color: var(--success); opacity: 1; }
.auul-gdrive-disconnect { display: flex; align-items: center; gap: 4px; margin: 4px 0 0; padding: 0; border: 0; background: none; color: var(--text-muted); font: inherit; font-size: 0.75rem; font-weight: 600; cursor: pointer; }
.auul-gdrive-disconnect:hover { color: var(--danger); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.auul-file-head {
	display: grid;
	gap: 12px;
	padding: 0 12px 8px;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--text-muted);
	border-bottom: 1px solid var(--card-border);
	margin-bottom: 4px;
}
.auul-file-size { font-size: 0.8rem; color: var(--text-muted); text-align: right; }
.auul-fields { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.auul-field { flex: 1 1 260px; }
.auul-field-small { flex: 0 0 140px; }
.auul-field .rl-input { margin-bottom: 0; }
.auul-field .field-label { display: block; }
.auul-submit .btn-primary { margin-top: 0; display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; }
.auul-submit .btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.auul-hint { margin-top: 10px; }
.auul-legend { margin-top: 14px; font-size: 0.85rem; color: var(--text-muted); }
.auul-legend summary { cursor: pointer; font-weight: 600; color: var(--text-main); }
.auul-legend ul { margin: 10px 0 8px 18px; display: flex; flex-direction: column; gap: 4px; }
.auul-legend code { background: var(--input-bg); border: 1px solid var(--card-border); border-radius: 6px; padding: 1px 6px; color: var(--text-main); }
.auul-frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.auul-frame { width: 100%; height: 320px; border: 1px solid var(--card-border); border-radius: 12px; background: var(--input-bg); }
.auul-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.auul-actions .btn-secondary { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.auul-empty { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; max-width: 440px; width: 100%; margin: 40px auto 0; padding: 32px 24px; }
.auul-empty p { margin: 0; color: var(--text-main); font-size: 0.95rem; }
.auul-empty .btn-primary { margin-top: 0; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
@media (max-width: 1100px) {
	.auul-grid { grid-template-columns: 1fr; }
	.auul-frames { grid-template-columns: 1fr; }
}

/* Content-only view inside Auto Upload / Auto Transload frames */
.rl-embedded .rl-sidebar,
.rl-embedded .rl-sidebar-backdrop,
.rl-embedded .rl-top-header { display: none !important; }
.rl-embedded .rl-main-wrapper,
html.sb-collapsed .rl-embedded .rl-main-wrapper { margin-left: 0 !important; }
.rl-embedded .rl-page-content { padding: 12px; }
.rl-embedded { background-image: none; }
/* Plugin login/option forms inside the frames (each upload plugin prints its own markup) */
.rl-embedded .rl-page-content table { border-collapse: separate; border-spacing: 0 8px; margin: 0 auto; }
.rl-embedded .rl-page-content td { color: var(--text-muted); font-size: 0.85rem; padding-right: 10px; vertical-align: middle; }
.rl-embedded .rl-page-content input[type="text"],
.rl-embedded .rl-page-content input[type="password"],
.rl-embedded .rl-page-content input[type="email"],
.rl-embedded .rl-page-content select {
	background: var(--input-bg);
	border: 1px solid var(--card-border);
	border-radius: 8px;
	color: var(--text-main);
	padding: 8px 10px;
	font: inherit;
	font-size: 0.85rem;
	min-width: 200px;
}
.rl-embedded .rl-page-content input[type="submit"],
.rl-embedded .rl-page-content input[type="button"],
.rl-embedded .rl-page-content button:not(.icon-btn):not(.inline-confirm-btn) {
	background: var(--text-main);
	color: var(--primary-contrast);
	border: none;
	padding: 9px 20px;
	border-radius: var(--radius);
	font: inherit;
	font-weight: 600;
	font-size: 0.85rem;
	cursor: pointer;
	margin-top: 6px;
}

/* Auto Transload (audl.php) input page */
.audl-page { max-width: 1200px; margin: 0 auto; text-align: left; }
.audl-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.audl-card .card-header { margin-bottom: 14px; }
.audl-card .card-title { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; }
.audl-links {
	min-height: 380px;
	margin-bottom: 0;
	font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
	font-size: 0.85rem;
	line-height: 1.7;
	white-space: pre;
	overflow-x: auto;
}
.audl-links:focus { outline: none; border-color: var(--text-muted); }
.audl-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 14px; }
.audl-hint { margin: 0; }
.audl-start { margin-top: 0; display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; }
.audl-start:disabled { opacity: 0.45; cursor: not-allowed; }
.audl-options { display: flex; flex-direction: column; gap: 4px; }
.audl-opt { border-bottom: 1px solid var(--card-border); padding: 4px 0 8px; }
.audl-opt:last-child { border-bottom: none; }
.audl-opt > .custom-checkbox { margin: 6px 0; }
.audl-sub { display: none; padding: 6px 0 4px 28px; }
.audl-sub.is-open { display: block; }
.audl-sub .rl-input { margin-bottom: 8px; }
.audl-sub .field-hint { margin-top: 0; }
.audl-sub .audl-sub { padding-left: 0; }
.audl-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 1100px) {
	.audl-grid { grid-template-columns: 1fr; }
	.audl-links { min-height: 240px; }
}
.auul-empty-icon { font-size: 2rem; color: var(--text-muted); }

/* Transload card header: icon and title on one line */
.rl-card-transload .header-main { display: flex; align-items: center; gap: 10px; }
.rl-card-transload .header-main i { font-size: 1.3rem; }
.rl-card-transload .header-main h3 { margin: 0; font-size: 1.1rem; }
.rl-card-transload .header-desc { margin: 0; font-size: 0.85rem; color: var(--text-muted); }

/* Action popup (forms/results from the file Action menu) */
html.js .lumina-action-output { display: none; }
body.has-action-modal { overflow: hidden; }
.action-overlay {
	position: fixed;
	inset: 0;
	z-index: 2100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(3px);
	animation: lumina-fade 0.15s ease-out;
}
.action-modal {
	width: 100%;
	max-width: 640px;
	max-height: calc(100vh - 40px);
	display: flex;
	flex-direction: column;
	background: var(--card-bg);
	border: 1px solid var(--card-border);
	border-radius: var(--radius);
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
	animation: lumina-pop 0.18s ease-out;
}
.action-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--card-border);
}
.action-modal-head h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.action-modal-close { width: 32px; height: 32px; }
.action-modal-body {
	padding: 20px;
	overflow: auto;
	font-size: 0.9rem;
	line-height: 1.6;
	color: var(--text-main);
}
.action-modal-body > center, .action-modal-body center { text-align: left; }
.action-modal-body table { border-collapse: collapse; margin: 0 auto 0 0; max-width: 100%; }
.action-modal-body td, .action-modal-body th { padding: 6px 10px 6px 0; vertical-align: middle; text-align: left; color: var(--text-main); }
.action-modal-body th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.action-modal-body input[type="text"],
.action-modal-body input[type="password"],
.action-modal-body input[type="email"],
.action-modal-body input[type="number"],
.action-modal-body input:not([type]),
.action-modal-body select,
.action-modal-body textarea {
	background: var(--input-bg);
	border: 1px solid var(--card-border);
	border-radius: 8px;
	color: var(--text-main);
	padding: 8px 10px;
	font: inherit;
	font-size: 0.85rem;
	max-width: 100%;
}
.action-modal-body textarea { width: 100%; min-height: 120px; }
.action-modal-body input[type="submit"],
.action-modal-body input[type="button"],
.action-modal-body button {
	background: var(--text-main);
	color: var(--primary-contrast);
	border: none;
	padding: 9px 18px;
	border-radius: var(--radius);
	font: inherit;
	font-weight: 600;
	font-size: 0.85rem;
	cursor: pointer;
	width: auto !important;
	height: auto !important;
	margin: 4px 6px 4px 0;
}
.action-modal-body input[name="no"] { background: var(--input-bg); color: var(--text-main); border: 1px solid var(--card-border); }
.action-modal-body input[type="checkbox"], .action-modal-body input[type="radio"] { accent-color: var(--primary); }
.action-modal-body a { color: var(--primary); }

/* Toast for one-line action results */
.lumina-toast {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 2200;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	max-width: min(420px, calc(100vw - 40px));
	padding: 14px 14px 14px 16px;
	background: var(--card-bg);
	border: 1px solid var(--card-border);
	border-radius: var(--radius);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
	font-size: 0.88rem;
	animation: lumina-pop 0.18s ease-out;
	transition: opacity 0.25s, transform 0.25s;
}
.lumina-toast.is-leaving { opacity: 0; transform: translateY(8px); }
.lumina-toast-body { flex: 1; color: var(--text-main); }
.lumina-toast-body br:last-child { display: none; }
.lumina-toast-close { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 2px; font-size: 1rem; }
.lumina-toast-close:hover { color: var(--text-main); }
@keyframes lumina-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lumina-pop { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) {
	.action-overlay { padding: 10px; align-items: flex-end; }
	.action-modal { max-height: calc(100vh - 20px); }
}

/* Live transload card (index.php while downloading) */
.transload-live .header-main { display: flex; align-items: center; gap: 10px; }
.transload-live .header-main i { font-size: 1.3rem; }
.transload-live .header-main h3 { margin: 0; font-size: 1.1rem; }
.transload-live-status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 700;
	border: 1px solid var(--card-border);
	background: var(--input-bg);
	color: var(--text-muted);
}
.transload-live-status.is-done { color: #4ade80; border-color: rgba(74, 222, 128, 0.35); background: rgba(74, 222, 128, 0.08); }
.transload-live-status.is-failed { color: var(--danger); border-color: rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.08); }
.transload-live-body { font-size: 0.88rem; line-height: 1.7; color: var(--text-muted); word-break: break-word; }
.transload-live-body b { color: var(--text-main); }
.transload-live-body p { margin: 0 0 4px; }
.transload-live-body a { color: var(--text-main); text-decoration: underline; text-underline-offset: 3px; }
.transload-live .transload-progress-wrap {
	margin: 16px 0 8px;
	padding: 16px;
	border: 1px solid var(--card-border);
	border-radius: var(--radius);
	background: var(--input-bg);
}
.transload-live .progressouter { height: 10px; border: none; }
.transload-live .progressdown { height: 10px; margin: 0; transition: width 0.3s ease; }
.transload-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.transload-stat { display: flex; flex-direction: column; gap: 2px; }
.transload-stat:nth-child(2) { align-items: center; }
.transload-stat:nth-child(3) { align-items: flex-end; }
.transload-stat-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.transload-stat-value { font-size: 1rem; font-weight: 700; color: var(--text-main); font-variant-numeric: tabular-nums; }
.transload-live .lumina-cancel-wrap { justify-content: flex-end; margin: 4px 0 12px; }
.transload-live .lumina-cancel-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.transload-live .rl-page-message { max-width: none; margin: 12px 0 0; padding: 16px; border-radius: var(--radius); background: var(--input-bg); text-align: left; }
.transload-live .custom-select-actions { margin: 12px 0 0; }
.transload-live form[name="flist"] > div { text-align: left !important; }
.transload-live .htmlerror b { color: inherit; }

/* 404 page (same card as Notes) */
.rl-404-text { margin: 0; color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
.rl-404-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.rl-404-actions .btn-primary,
.rl-404-actions .btn-secondary { margin-top: 0; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; padding: 10px 18px; }

/* Tidied action forms shown in the popup (e.g. ZIP) */
.action-form { display: flex; flex-direction: column; gap: 8px; }
.action-form-intro { margin: 0 0 6px; color: var(--text-muted); }
.action-form-label { margin: 8px 0 0; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
.action-modal-body .action-form input[type="text"] { width: 100%; }
.action-form-check { display: flex; align-items: center; gap: 8px; color: var(--text-main); }
.action-form-files { margin: 0; padding: 10px 14px 10px 30px; border: 1px solid var(--card-border); border-radius: 10px; background: var(--input-bg); max-height: 180px; overflow: auto; }
.action-form-files li { padding: 2px 0; word-break: break-all; }
.action-form-actions { display: flex; justify-content: flex-end; margin-top: 8px; }

/* File row actions as small SVG icon buttons */
.file-actions { gap: 4px; align-items: center; }
.file-actions .action-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border-radius: 8px;
	border: 1px solid transparent;
	background: transparent;
	color: var(--text-muted);
	transition: var(--transition);
}
.file-actions .action-btn svg { display: block; }
.file-actions .action-btn:hover,
.file-actions .action-btn:focus-visible { background: var(--surface-hover); border-color: var(--card-border); color: var(--text-main); outline: none; }
.file-actions .action-btn.delete:hover,
.file-actions .action-btn.delete:focus-visible { color: var(--danger); border-color: rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.08); }

/* One content width for every page, matching the Transload box. Change --page-width to resize them all. */
:root { --page-width: 860px; }
.transload-page,
.dashboard-page,
.settings-page,
.rl-card-notes,
.audl-page,
.auul-page,
.auul-empty,
.rl-page-message {
	max-width: var(--page-width);
	width: 100%;
	margin-left: auto;
	margin-right: auto;
}
.dashboard-top-grid { grid-template-columns: 1fr; }

/* Auto Transload: both cards share one height; the Links box grows to fill its card */
.audl-grid { align-items: stretch; }
.audl-card { display: flex; flex-direction: column; }
.audl-card > .audl-links { flex: 1 1 auto; min-height: 320px; resize: none; }
.audl-card > .audl-actions { margin-top: 14px; }

/* Dropdowns: custom arrow with reserved space, long option text is cut with an ellipsis */
select.rl-input {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	box-sizing: border-box;
	max-width: 100%;
	padding-right: 36px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a3a3a3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	cursor: pointer;
}
.audl-sub select.rl-input { width: 100%; }
select.rl-input option { background: var(--card-bg); color: var(--text-main); }

/* Auto Transload links: one URL per line, long ones scroll sideways instead of wrapping */
.audl-links { white-space: pre; overflow-wrap: normal; word-wrap: normal; word-break: normal; overflow-x: auto; overflow-y: auto; }

/* Google Drive setup page */
.gdrive-card .card-header { flex-wrap: nowrap; }
.gdrive-error { margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.35); color: var(--text-main); font-size: 0.9rem; }
.gdrive-card code { background: var(--input-bg); border: 1px solid var(--card-border); border-radius: 6px; padding: 1px 6px; font-size: 0.85em; }
.gdrive-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 18px; color: var(--text-muted); }
.gdrive-steps li::marker { color: var(--text-main); font-weight: 700; }
.gdrive-steps p { margin: 0 0 10px; line-height: 1.6; }
.gdrive-steps b { color: var(--text-main); }
.gdrive-form { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.gdrive-form .rl-input { margin: 0; }
.gdrive-form .btn-primary,
.gdrive-link .btn-primary { margin-top: 0; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.gdrive-code { min-height: 80px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.8rem; }
.gdrive-facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0 0 18px; font-size: 0.9rem; }
.gdrive-facts dt { color: var(--text-muted); }
.gdrive-facts dd { margin: 0; color: var(--text-main); word-break: break-all; }

/* Footer: credit on the right */
.rl-footer { display: flex; justify-content: flex-end; align-items: center; padding: 14px 28px; text-align: right; }
.rl-footer-credit a { color: var(--text-main); font-weight: 600; text-decoration: none; }
.rl-footer-credit a:hover { text-decoration: underline; text-underline-offset: 3px; }
.rl-embedded .rl-footer { display: none; }
.auul-links { display: flex; gap: 18px; flex-wrap: wrap; }
.gdrive-steps .gdrive-link { margin-top: 14px; }

/* Tooltips: sidebar items show theirs only while the sidebar is icon-only; header icon buttons always. */
[data-tooltip]:not(.sidebar-toggle-btn) { position: relative; }
.rl-sidebar.collapsed [data-tooltip]::after,
html.sb-collapsed .rl-sidebar [data-tooltip]::after,
.sidebar-toggle-btn[data-tooltip]::after,
.header-actions [data-tooltip]::after {
	content: attr(data-tooltip);
	position: absolute;
	z-index: 1200;
	padding: 6px 10px;
	border-radius: 8px;
	background: var(--text-main);
	color: var(--primary-contrast);
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.12s ease, transform 0.12s ease;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}
/* Sidebar: to the right of the icon */
.rl-sidebar.collapsed [data-tooltip]::after,
html.sb-collapsed .rl-sidebar [data-tooltip]::after,
.sidebar-toggle-btn[data-tooltip]::after {
	left: calc(100% + 12px);
	top: 50%;
	transform: translate(-4px, -50%);
}
/* Header buttons: below, aligned to the right edge so they stay on screen */
.header-actions [data-tooltip]::after {
	top: calc(100% + 8px);
	right: 0;
	transform: translateY(-4px);
}
.rl-sidebar.collapsed [data-tooltip]:hover::after,
.rl-sidebar.collapsed [data-tooltip]:focus-visible::after,
html.sb-collapsed .rl-sidebar [data-tooltip]:hover::after,
html.sb-collapsed .rl-sidebar [data-tooltip]:focus-visible::after,
.sidebar-toggle-btn[data-tooltip]:hover::after,
.sidebar-toggle-btn[data-tooltip]:focus-visible::after {
	opacity: 1;
	visibility: visible;
	transform: translate(0, -50%);
}
.header-actions [data-tooltip]:hover::after,
.header-actions [data-tooltip]:focus-visible::after {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
/* Narrow screens always show the icon-only sidebar, so its tooltips apply there too */
@media (max-width: 900px) and (hover: hover) {
	.rl-sidebar [data-tooltip]::after {
		content: attr(data-tooltip);
		position: absolute; z-index: 1200; padding: 6px 10px; border-radius: 8px;
		background: var(--text-main); color: var(--primary-contrast); font-size: 0.75rem; font-weight: 600; white-space: nowrap;
		pointer-events: none; opacity: 0; visibility: hidden; left: calc(100% + 12px); top: 50%; transform: translate(-4px, -50%);
		transition: opacity 0.12s ease, transform 0.12s ease;
	}
	.rl-sidebar [data-tooltip]:hover::after { opacity: 1; visibility: visible; transform: translate(0, -50%); }
}
@media (prefers-reduced-motion: reduce) { [data-tooltip]::after { transition: none !important; } }

/* Google Drive: connected accounts list */
.gdrive-settings { margin: 0 0 12px; color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; }
.gdrive-settings b { color: var(--text-main); }
.gdrive-account-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gdrive-account { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--card-border); border-radius: var(--radius); background: var(--input-bg); }
.gdrive-avatar { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; background: var(--surface-hover); color: var(--text-main); }
.gdrive-account-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gdrive-account-email { font-weight: 600; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gdrive-account-meta { font-size: 0.75rem; color: var(--text-muted); }
.gdrive-account-actions { display: flex; gap: 6px; flex-shrink: 0; }
.gdrive-account-actions .btn-secondary { display: inline-flex; align-items: center; gap: 6px; }
.gdrive-disconnect:hover { color: var(--danger); border-color: rgba(239, 68, 68, 0.35); }
.gdrive-accounts .rl-input { margin-bottom: 0; }
.gdrive-add { margin-top: 18px; border-top: 1px solid var(--card-border); padding-top: 16px; }
.gdrive-add > summary { cursor: pointer; font-weight: 700; color: var(--text-main); margin-bottom: 14px; }
.gdrive-card > .gdrive-add:first-of-type:not([open]) { border-top: none; }
@media (max-width: 600px) {
	.gdrive-account { flex-wrap: wrap; }
	.gdrive-account-actions { width: 100%; justify-content: flex-end; }
}
.auul-host-name { white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }

/* Reload button next to the Server Files title */
.files-card-title { display: flex; align-items: center; gap: 8px; }
.files-reload-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 8px;
	border: 1px solid transparent;
	color: var(--text-muted);
	text-decoration: none !important;
	transition: var(--transition);
}
.files-reload-btn:hover,
.files-reload-btn:focus-visible { color: var(--text-main); background: var(--surface-hover); border-color: var(--card-border); outline: none; }
.files-reload-btn svg { display: block; }
.files-reload-btn.is-loading svg { animation: lumina-spin 0.8s linear infinite; }
.files-reload-btn[data-tooltip]::after {
	content: attr(data-tooltip);
	position: absolute; z-index: 1200; left: 50%; top: calc(100% + 8px);
	padding: 6px 10px; border-radius: 8px; background: var(--text-main); color: var(--primary-contrast);
	font-size: 0.75rem; font-weight: 600; white-space: nowrap; pointer-events: none;
	opacity: 0; visibility: hidden; transform: translate(-50%, -4px); transition: opacity 0.12s ease, transform 0.12s ease;
}
.files-reload-btn[data-tooltip]:hover::after,
.files-reload-btn[data-tooltip]:focus-visible::after { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* Long names in popups/toasts: one line, overflow hidden, scrolls sideways (see wrapLongText in quintaphon.js) */
.rl-scroll-line {
	display: inline-block;
	max-width: min(380px, 62vw);
	overflow-x: auto;
	overflow-y: hidden;
	white-space: nowrap;
	vertical-align: bottom;
	scrollbar-width: thin;
}
.rl-scroll-line::-webkit-scrollbar { height: 4px; }
.rl-scroll-line::-webkit-scrollbar-thumb { background: var(--card-border); border-radius: 4px; }
.lumina-toast .rl-scroll-line { max-width: min(300px, 70vw); }
.action-modal-body .action-form-files li .rl-scroll-line { max-width: 100%; }

/* Upload action popup: one block per file */
.upload-items { display: flex; flex-direction: column; gap: 12px; }
.upload-item { padding: 14px; border: 1px solid var(--card-border); border-radius: var(--radius); background: var(--input-bg); min-width: 0; }
.upload-item-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; min-width: 0; }
.upload-item-name { flex: 1 1 auto; min-width: 0; display: block; overflow-x: auto; white-space: nowrap; scrollbar-width: thin; }
.upload-item-name .rl-scroll-line { max-width: none; overflow: visible; }
.upload-item-size { flex-shrink: 0; color: var(--text-muted); font-size: 0.8rem; }
.upload-item-row { display: flex; gap: 8px; align-items: center; min-width: 0; }
.action-modal-body .upload-item-row select { flex: 1 1 auto; min-width: 0; width: 100%; }
.action-modal-body .upload-item-row input[type="submit"] { margin: 0; flex-shrink: 0; }
.upload-item-proxy { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 0.85rem; color: var(--text-muted); cursor: pointer; }
.upload-item-proxyfields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.action-modal-body .upload-item-proxyfields input { width: 100%; min-width: 0; }
@media (max-width: 600px) { .upload-item-proxyfields { grid-template-columns: 1fr; } }

/* Popups never scroll sideways as a whole; long content scrolls in its own line */
.action-modal-body { overflow-x: hidden; }
.action-modal-body select { max-width: 100%; }
/* Thin, theme-coloured scrollbars for the one-line strips */
.rl-scroll-line, .upload-item-name { scrollbar-color: var(--card-border) transparent; }
.upload-item-name::-webkit-scrollbar { height: 4px; }
.upload-item-name::-webkit-scrollbar-thumb { background: var(--card-border); border-radius: 4px; }
.rl-scroll-line::-webkit-scrollbar-track, .upload-item-name::-webkit-scrollbar-track { background: transparent; }
/* Host picker, Upload and the proxy toggle share one line (wraps only on narrow screens) */
.upload-item-row { flex-wrap: nowrap; }
.upload-item-row .upload-item-proxy { margin-top: 0; flex-shrink: 0; white-space: nowrap; }
@media (max-width: 600px) { .upload-item-row { flex-wrap: wrap; } }

/* Archive (rar/unrar) error card: replaces the old draggable "Plusrar Debug Window" */
.rar-error-card {
	margin: 0 0 14px;
	padding: 14px 16px;
	border: 1px solid rgba(239, 68, 68, 0.35);
	border-radius: var(--radius);
	background: rgba(239, 68, 68, 0.07);
	text-align: left;
	color: var(--text-main);
}
.rar-error-head { display: flex; align-items: flex-start; gap: 12px; }
.rar-error-icon {
	flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--danger); color: #fff; font-weight: 800; font-size: 0.9rem;
}
.rar-error-text { flex: 1 1 auto; min-width: 0; }
.rar-error-text strong { display: block; font-size: 0.95rem; margin-bottom: 2px; }
.rar-error-text p { margin: 0; color: var(--text-muted); font-size: 0.85rem; line-height: 1.55; overflow-wrap: anywhere; }
.rar-error-close { background: none; border: none; color: var(--text-muted); font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 0 2px; }
.rar-error-close:hover { color: var(--text-main); }
.rar-error-details { margin-top: 12px; }
.rar-error-details > summary { cursor: pointer; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }
.rar-error-details > summary:hover { color: var(--text-main); }
.rar-error-details textarea {
	display: block; width: 100%; box-sizing: border-box; margin: 10px 0 8px; padding: 10px 12px;
	min-height: 180px; resize: vertical;
	background: var(--input-bg); color: var(--text-main);
	border: 1px solid var(--card-border); border-radius: 8px;
	font: 0.78rem/1.6 ui-monospace, SFMono-Regular, Consolas, monospace;
	white-space: pre; overflow: auto;
}
.action-modal-body .rar-error-card button.rar-error-close { background: none; color: var(--text-muted); padding: 0 2px; margin: 0; }
.action-modal-body .rar-error-card .rar-error-copy { background: var(--surface); color: var(--text-main); border: 1px solid var(--card-border); margin: 0; }

/* Whole file row toggles its checkbox */
.file-row { cursor: pointer; user-select: none; }
.file-row .file-name-link, .file-row .file-actions, .file-row .inline-rename, .file-row .inline-confirm { cursor: auto; }
.file-row .file-name-link { cursor: pointer; user-select: text; }
.file-row input[type="checkbox"] { cursor: pointer; }
.file-row.is-selected { background: var(--primary-muted); }
/* Space between file rows so selected rows read as separate items */
.file-list { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; }
/* Checkbox centred in its column */
.file-row .col-check,
.file-list-header .col-check { display: flex; align-items: center; justify-content: center; }
.file-row .col-check input[type="checkbox"] { margin: 0; }
/* Copy-link button feedback */
.file-actions .action-btn.copy-link.is-copied { color: #4ade80; border-color: rgba(74, 222, 128, 0.35); background: rgba(74, 222, 128, 0.08); }

/* ---- Upload popup: minimal card per file ---- */
.action-modal-body .upload-items { gap: 10px; }
.action-modal-body .upload-item { padding: 14px; background: var(--input-bg); border: 1px solid var(--card-border); border-radius: 14px; }
.action-modal-body .upload-item-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.action-modal-body .upload-item-icon {
	flex: 0 0 32px; width: 32px; height: 32px; border-radius: 9px;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--surface-hover); color: var(--text-muted); font-size: 1rem;
}
/* Name: one line, no visible scrollbar, fades out at the right edge; still scrolls with wheel/trackpad/drag */
.action-modal-body .upload-item-name {
	flex: 1 1 auto; min-width: 0;
	font-weight: 600; font-size: 0.9rem; color: var(--text-main);
	white-space: nowrap; overflow-x: auto; overflow-y: hidden;
	scrollbar-width: none;
	-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
	mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
}
.action-modal-body .upload-item-name::-webkit-scrollbar { display: none; }
.action-modal-body .upload-item-name .rl-scroll-line { display: inline; max-width: none; overflow: visible; }
.action-modal-body .upload-item-size {
	flex-shrink: 0; padding: 3px 9px; border-radius: 999px;
	background: var(--surface-hover); color: var(--text-muted);
	font-size: 0.72rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.action-modal-body .upload-item-row { display: flex; align-items: stretch; gap: 8px; flex-wrap: nowrap; }
.action-modal-body .upload-item-row select.upload-item-host {
	flex: 1 1 auto; min-width: 0; height: 40px; padding: 0 36px 0 12px;
	appearance: none; -webkit-appearance: none;
	background-color: var(--card-bg);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a3a3a3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 12px center;
	border: 1px solid var(--card-border); border-radius: 10px;
	color: var(--text-main); font-size: 0.85rem; cursor: pointer;
	text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
}
.action-modal-body .upload-item-row select.upload-item-host:focus { outline: none; border-color: var(--text-muted); }
/* Proxy as a small icon toggle */
.action-modal-body .upload-proxy-toggle {
	flex: 0 0 40px; width: 40px; height: 40px; margin: 0;
	display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid var(--card-border); border-radius: 10px;
	background: var(--card-bg); color: var(--text-muted); cursor: pointer;
	transition: var(--transition); position: relative;
}
.action-modal-body .upload-proxy-toggle:hover { color: var(--text-main); background: var(--surface-hover); }
.action-modal-body .upload-proxy-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.action-modal-body .upload-proxy-toggle:has(input:checked) { color: var(--primary-contrast); background: var(--text-main); border-color: transparent; }
.action-modal-body .upload-proxy-toggle:has(input:focus-visible) { outline: 2px solid var(--text-muted); outline-offset: 2px; }
.action-modal-body .upload-item-row button.upload-go {
	flex: 0 0 auto; height: 40px; margin: 0; padding: 0 18px;
	display: inline-flex; align-items: center; gap: 7px;
	border-radius: 10px; font-weight: 700; font-size: 0.85rem;
}
.action-modal-body .upload-item-proxyfields { margin-top: 10px; gap: 8px; }
.action-modal-body .upload-item-proxyfields input { height: 38px; border-radius: 10px; background: var(--card-bg); }
@media (max-width: 600px) {
	.action-modal-body .upload-item-row { flex-wrap: wrap; }
	.action-modal-body .upload-item-row select.upload-item-host { flex-basis: 100%; }
	.action-modal-body .upload-item-row button.upload-go { flex: 1 1 auto; justify-content: center; }
}

/* ===== Action popup forms (.af): one consistent layout for FTP, Mail, Split, Merge, Pack, Rar, Unrar, Rename and more ===== */
.action-modal-body .af { display: flex; flex-direction: column; gap: 16px; text-align: left; }
.action-modal-body .af-intro { margin: 0; color: var(--text-muted); font-size: 0.88rem; line-height: 1.55; }
.action-modal-body .af-section { display: flex; flex-direction: column; gap: 10px; }
.action-modal-body .af-heading { margin: 0; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }

/* Selected files */
.action-modal-body .af-files { display: flex; flex-direction: column; gap: 6px; max-height: 190px; overflow-y: auto; }
.action-modal-body .af-file { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--card-border); border-radius: 12px; background: var(--input-bg); }
.action-modal-body .af-file-icon { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-hover); color: var(--text-muted); }
.action-modal-body .af-file-name {
	flex: 1 1 auto; min-width: 0; font-weight: 600; font-size: 0.88rem; color: var(--text-main);
	white-space: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
	-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
	mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
}
.action-modal-body .af-file-name::-webkit-scrollbar { display: none; }
.action-modal-body .af-file-name .rl-scroll-line { display: inline; max-width: none; overflow: visible; }
.action-modal-body .af-file-size { flex-shrink: 0; padding: 3px 9px; border-radius: 999px; background: var(--surface-hover); color: var(--text-muted); font-size: 0.72rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Fields: 6-column grid; .af-w2/.af-w3/.af-w4 set the span (default: full width) */
.action-modal-body .af-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.action-modal-body .af-field { grid-column: span 6; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.action-modal-body .af-w2 { grid-column: span 2; }
.action-modal-body .af-w3 { grid-column: span 3; }
.action-modal-body .af-w4 { grid-column: span 4; }
.action-modal-body .af-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
.action-modal-body .af input[type="text"],
.action-modal-body .af input[type="password"],
.action-modal-body .af input[type="email"],
.action-modal-body .af input[type="number"],
.action-modal-body .af select,
.action-modal-body .af textarea {
	width: 100%; min-width: 0; box-sizing: border-box; height: 40px; padding: 0 12px; margin: 0;
	background: var(--card-bg); color: var(--text-main);
	border: 1px solid var(--card-border); border-radius: 10px; font: inherit; font-size: 0.88rem;
}
.action-modal-body .af textarea { height: auto; min-height: 120px; padding: 10px 12px; resize: vertical; }
.action-modal-body .af select {
	appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a3a3a3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 11px center;
}
.action-modal-body .af input:focus, .action-modal-body .af select:focus, .action-modal-body .af textarea:focus { outline: none; border-color: var(--text-muted); }
.action-modal-body .af-inline { display: flex; align-items: center; gap: 8px; }
.action-modal-body .af-inline > input, .action-modal-body .af-inline > select { flex: 1 1 auto; }
.action-modal-body .af-inline > .af-unit { flex: 0 0 auto; color: var(--text-muted); font-size: 0.85rem; font-weight: 600; }
.action-modal-body .af-inline > select.af-narrow { flex: 0 0 130px; }

/* Checkboxes / radios as neat rows; .af-cols puts them in two columns */
.action-modal-body .af-checks { display: flex; flex-direction: column; gap: 10px; }
.action-modal-body .af-checks.af-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; align-items: start; }
.action-modal-body .af-check { display: flex; align-items: flex-start; gap: 10px; font-size: 0.88rem; color: var(--text-main); cursor: pointer; line-height: 1.4; }
.action-modal-body .af-check input { flex: 0 0 auto; width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--text-main); cursor: pointer; }
.action-modal-body .af-check input:disabled + span { opacity: 0.5; }
/* Options revealed by a checkbox (the original inline scripts toggle style.display) */
.action-modal-body .af-sub { margin: 2px 0 0 26px; display: flex; flex-direction: column; gap: 8px; }

.action-modal-body .af-note { margin: 0; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--card-border); background: var(--input-bg); color: var(--text-muted); font-size: 0.86rem; line-height: 1.55; }
.action-modal-body .af-note.is-warning { border-color: rgba(250, 204, 21, 0.35); background: rgba(250, 204, 21, 0.07); color: var(--text-main); }

/* Footer: secondary links on the left, main button(s) on the right */
.action-modal-body .af-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--card-border); }
.action-modal-body .af-links { margin-right: auto; display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.82rem; }
.action-modal-body .af-links a { color: var(--text-muted) !important; text-decoration: none; }
.action-modal-body .af-links a:hover { color: var(--text-main) !important; text-decoration: underline; text-underline-offset: 3px; }
.action-modal-body .af-actions input[type="submit"],
.action-modal-body .af-actions button { height: 40px; margin: 0; padding: 0 20px; border-radius: 10px; font-weight: 700; font-size: 0.86rem; width: auto !important; }
.action-modal-body .af-actions .af-secondary,
.action-modal-body .af-actions input[name="no"] { background: var(--card-bg) !important; color: var(--text-main) !important; border: 1px solid var(--card-border) !important; }

/* Long check lists (archive contents) */
.action-modal-body .af-list { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--card-border); border-radius: 12px; background: var(--input-bg); }
.action-modal-body .af-list .af-check { font-size: 0.82rem; }
.action-modal-body .af-list .af-check span { min-width: 0; overflow-wrap: anywhere; }
.action-modal-body .af-toolbar { display: flex; gap: 14px; font-size: 0.8rem; }
.action-modal-body .af-toolbar a { color: var(--text-muted) !important; text-decoration: none; }
.action-modal-body .af-toolbar a:hover { color: var(--text-main) !important; }

@media (max-width: 600px) {
	.action-modal-body .af-w2, .action-modal-body .af-w3, .action-modal-body .af-w4 { grid-column: span 6; }
	.action-modal-body .af-checks.af-cols { grid-template-columns: 1fr; }
}

/* Result tables (MD5 / CRC32 / SHA1 / List) */
.action-modal-body .md5table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0; table-layout: fixed; }
.action-modal-body .md5table th { padding: 0 10px 10px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); text-align: left !important; border-bottom: 1px solid var(--card-border); }
.action-modal-body .md5table td { padding: 10px; border-bottom: 1px solid var(--card-border); color: var(--text-main); font-size: 0.85rem; vertical-align: middle; overflow: hidden; }
.action-modal-body .md5table tr:last-child td { border-bottom: none; }
.action-modal-body .md5table td b { font-weight: 600; }
.action-modal-body .md5table .af-name { display: block; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.action-modal-body .md5table .af-name::-webkit-scrollbar { display: none; }
.action-modal-body .md5table .af-hash { display: block; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.8rem; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.action-modal-body .md5table .af-hash::-webkit-scrollbar { display: none; }
.action-modal-body .md5table .af-name .rl-scroll-line, .action-modal-body .md5table .af-hash .rl-scroll-line { display: inline; max-width: none; overflow: visible; }
.action-modal-body .md5table .af-col-size { width: 90px; }
.action-modal-body .md5table td.af-size { color: var(--text-muted); white-space: nowrap; }

/* Result tables: columns and CRC match colours */
.action-modal-body .md5table col:first-child { width: 42%; }
.action-modal-body .md5table .af-hash-ok { color: #4ade80; }
.action-modal-body .md5table .af-hash-bad { color: var(--danger); }
.action-modal-body .af textarea.af-links-box { min-height: 90px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.78rem; white-space: pre; overflow: auto; cursor: text; }
.action-modal-body .af-actions .af-danger { background: var(--danger) !important; color: #fff !important; border: none !important; }
.action-modal-body .af-unit { color: var(--text-muted); font-size: 0.82rem; font-weight: 600; }
.action-modal-body .af input[type="password"][name="passwords[]"] { margin-top: 2px; }
.action-modal-body .af input[type="submit"]:disabled { opacity: 0.45; cursor: not-allowed; }

/* Rar / Unrar progress tables (shown while archiving or extracting) */
.action-modal-body .rar-main-td, .action-modal-body .unrar-main-td { padding: 0 0 6px; color: var(--text-main); font-weight: 600; text-align: left; }
.action-modal-body .rar-options-left-td, .action-modal-body .unrar-lb-td { color: var(--text-muted); font-size: 0.85rem; padding: 4px 12px 4px 0; }
.action-modal-body .rar-rb-td, .action-modal-body .unrar-rb-td { color: var(--text-main); font-size: 0.85rem; font-weight: 600; padding: 4px 0; }
.action-modal-body .rar-space-td, .action-modal-body .unrar-space-td { height: 10px; }
/* Override the older catch-all popup button rule (height/width auto !important) for the new forms */
.action-modal-body .af-actions input[type="submit"],
.action-modal-body .af-actions button,
.action-modal-body .upload-item-row button.upload-go { height: 40px !important; padding: 0 20px !important; display: inline-flex; align-items: center; justify-content: center; }
.action-modal-body .md5table .af-name { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent); }
/* Dark, thin scrollbars inside popups (text boxes, lists) */
.action-modal-body, .action-modal-body textarea, .action-modal-body .af-list, .action-modal-body .af-files { scrollbar-width: thin; scrollbar-color: var(--card-border) transparent; }
.action-modal-body ::-webkit-scrollbar { width: 8px; height: 8px; }
.action-modal-body ::-webkit-scrollbar-thumb { background: var(--card-border); border-radius: 8px; }
.action-modal-body ::-webkit-scrollbar-track, .action-modal-body ::-webkit-scrollbar-corner { background: transparent; }

/* List Links popup: one row per file with its link and a copy button */
.action-modal-body .af-linklist { display: flex; flex-direction: column; gap: 6px; max-height: 400px; overflow-y: auto; }
.action-modal-body .af-linkrow { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border: 1px solid var(--card-border); border-radius: 12px; background: var(--input-bg); transition: border-color 0.15s ease; }
.action-modal-body .af-linkrow:hover { border-color: var(--text-muted); }
.action-modal-body .af-linkmain { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.action-modal-body .af-linkname, .action-modal-body .af-linkurl {
	display: block; white-space: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
	-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
	mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
}
.action-modal-body .af-linkname::-webkit-scrollbar, .action-modal-body .af-linkurl::-webkit-scrollbar { display: none; }
.action-modal-body .af-linkname .rl-scroll-line, .action-modal-body .af-linkurl .rl-scroll-line { display: inline; max-width: none; overflow: visible; }
.action-modal-body .af-linkname { font-weight: 600; font-size: 0.88rem; color: var(--text-main); }
.action-modal-body .af-linkurl { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.74rem; color: var(--text-muted); text-decoration: none; }
.action-modal-body .af-linkurl:hover { color: var(--text-main); }
.action-modal-body .af-linkrow .af-iconbtn { flex: 0 0 34px; width: 34px !important; height: 34px !important; padding: 0 !important; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; border: 1px solid var(--card-border); background: var(--surface-hover); color: var(--text-muted); cursor: pointer; transition: color 0.15s ease, background 0.15s ease; }
.action-modal-body .af-linkrow .af-iconbtn:hover { color: var(--text-main); }
.action-modal-body .af-linkrow .af-iconbtn.is-copied { color: #4ade80; }
.action-modal-body .af-plain summary { cursor: pointer; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.action-modal-body .af-plain summary::-webkit-details-marker { display: none; }
.action-modal-body .af-plain summary::before { content: ''; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform 0.15s ease; }
.action-modal-body .af-plain[open] summary::before { transform: rotate(45deg); }
.action-modal-body .af-plain summary:hover { color: var(--text-main); }
.action-modal-body .af-plain textarea { margin-top: 10px; width: 100%; box-sizing: border-box; }
.action-modal-body .af-actions .af-count { margin-right: auto; color: var(--text-muted); font-size: 0.82rem; font-weight: 600; }
.action-modal-body .af-actions .af-copy-all { display: inline-flex; align-items: center; gap: 8px; }
.action-modal-body .af-actions .af-copy-all.is-copied { color: #16a34a; }

/* Sign-in (login.php) and Setup (setup.php): a single centred card, no sidebar or top bar */
body.rl-bare .rl-main-wrapper, html.sb-collapsed body.rl-bare .rl-main-wrapper { margin-left: 0; }
body.rl-bare .rl-page-content { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 16px; }
body.rl-bare .rl-footer { border-top: none; justify-content: center; text-align: center; }
.rl-auth-card, .rl-setup-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; padding: 32px 28px; }
.rl-setup-card { max-width: 640px; gap: 16px; }
.rl-auth-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.rl-auth-logo { width: 52px; height: 52px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 26px; background: var(--surface-hover); border: 1px solid var(--card-border); color: var(--text-main); margin-bottom: 6px; }
.rl-auth-title { margin: 0; font-size: 1.35rem; font-weight: 700; color: var(--text-main); letter-spacing: -0.01em; }
.rl-auth-sub { margin: 0; color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }
.rl-setup-head { flex-direction: row; align-items: center; text-align: left; gap: 16px; padding-bottom: 6px; }
.rl-setup-head .rl-auth-logo { flex: 0 0 52px; margin: 0; }
.rl-auth-form, .rl-setup-form { display: flex; flex-direction: column; gap: 14px; }
.rl-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rl-field .field-label { margin-bottom: 0; font-weight: 600; }
.rl-field .field-hint { margin-top: 0; }
.rl-field .rl-input { margin-bottom: 0; }
.rl-auth-card .rl-input, .rl-setup-card .rl-input { height: 42px; box-sizing: border-box; font-size: 0.92rem; }
.rl-auth-card .rl-input:focus, .rl-setup-card .rl-input:focus { outline: none; border-color: var(--text-muted); }
.rl-auth-card .rl-input:disabled { opacity: 0.5; }
.rl-check { display: inline-flex; align-items: center; gap: 10px; font-size: 0.88rem; color: var(--text-muted); cursor: pointer; user-select: none; }
.rl-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--text-main); }
.rl-captcha { display: flex; justify-content: center; min-height: 78px; }
.rl-auth-submit { margin-top: 4px; height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.95rem; }
.rl-auth-submit:disabled { opacity: 0.45; cursor: not-allowed; }
.rl-note { margin: 0; padding: 11px 14px; border-radius: 12px; font-size: 0.86rem; line-height: 1.5; border: 1px solid var(--card-border); background: var(--input-bg); color: var(--text-main); }
.rl-note.is-error { border-color: rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.08); color: #fca5a5; }
.rl-note.is-ok { border-color: rgba(74, 222, 128, 0.3); background: rgba(74, 222, 128, 0.08); color: #86efac; }
.rl-note.is-warning { border-color: rgba(250, 204, 21, 0.3); background: rgba(250, 204, 21, 0.07); color: #fde68a; }
[data-theme="light"] .rl-note.is-error { color: #b91c1c; }
[data-theme="light"] .rl-note.is-ok { color: #15803d; }
[data-theme="light"] .rl-note.is-warning { color: #92400e; }

.rl-setup-section { display: flex; flex-direction: column; gap: 14px; padding: 20px; border: 1px solid var(--card-border); border-radius: 14px; background: var(--input-bg); }
.rl-setup-h { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 0.98rem; font-weight: 700; color: var(--text-main); }
.rl-setup-h i { font-size: 1.1rem; color: var(--text-muted); }
.rl-tag { margin-left: 4px; padding: 2px 8px; border-radius: 999px; background: var(--surface-hover); color: var(--text-muted); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.rl-setup-intro { margin: -4px 0 0; line-height: 1.55; }
.rl-setup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; transition: opacity 0.15s ease; }
.rl-setup-grid .rl-span-2 { grid-column: 1 / -1; }
.rl-setup-grid.rl-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rl-cols-3 .rl-input-unit .rl-input { width: 76px; flex-basis: 76px; }
.rl-setup-grid.is-off { opacity: 0.45; }
.rl-setup-card .rl-input, .rl-setup-card .rl-input:focus { background: var(--card-bg); }
.rl-mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.82rem !important; }
.rl-input-unit { display: flex; align-items: center; gap: 10px; }
.rl-input-unit .rl-input { width: 90px; flex: 0 0 90px; }
.rl-input-unit span { color: var(--text-muted); font-size: 0.82rem; white-space: nowrap; }
.rl-switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: 0.9rem; font-weight: 600; color: var(--text-main); user-select: none; }
.rl-switch input { position: absolute; opacity: 0; pointer-events: none; }
.rl-switch-track { position: relative; flex: 0 0 40px; width: 40px; height: 22px; border-radius: 999px; background: var(--surface-hover); border: 1px solid var(--card-border); transition: background 0.15s ease; }
.rl-switch-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-muted); transition: transform 0.15s ease, background 0.15s ease; }
.rl-switch input:checked + .rl-switch-track { background: var(--text-main); border-color: var(--text-main); }
.rl-switch input:checked + .rl-switch-track::after { transform: translateX(18px); background: var(--card-bg); }
.rl-switch input:focus-visible + .rl-switch-track { outline: 2px solid var(--text-muted); outline-offset: 2px; }
.rl-setup-help { font-size: 0.86rem; color: var(--text-muted); }
.rl-setup-help summary { cursor: pointer; font-weight: 600; color: var(--text-main); }
.rl-setup-help ol { margin: 10px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; line-height: 1.55; }
.rl-setup-help a { color: var(--text-main); }
.rl-setup-help code { padding: 1px 6px; border-radius: 6px; background: var(--surface-hover); color: var(--text-main); }
.rl-setup-inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rl-setup-inline .field-hint { margin: 0; }
.rl-setup-actions { display: flex; justify-content: flex-end; }
.rl-setup-actions .btn-primary { margin-top: 0; height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 22px; }
.rl-setup-danger { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border: 1px solid rgba(239, 68, 68, 0.3); border-radius: 14px; background: rgba(239, 68, 68, 0.05); }
.rl-setup-danger strong { display: block; color: var(--text-main); font-size: 0.92rem; margin-bottom: 3px; }
.rl-setup-danger .field-hint { margin: 0; display: block; }
.btn-danger { flex-shrink: 0; height: 40px; padding: 0 18px; display: inline-flex; align-items: center; gap: 8px; border: none; border-radius: var(--radius); background: var(--danger); color: #fff; font-weight: 600; cursor: pointer; }
.btn-danger:hover { filter: brightness(1.1); }
.rl-setup-back { align-self: center; display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 0.86rem; text-decoration: none; }
.rl-setup-back:hover { color: var(--text-main); }
@media (max-width: 560px) {
	.rl-setup-grid { grid-template-columns: minmax(0, 1fr); }
	.rl-setup-head { flex-direction: column; text-align: center; }
	.rl-setup-danger { flex-direction: column; align-items: stretch; }
	.rl-auth-card, .rl-setup-card { padding: 24px 18px; }
}

/* Dashboard notice while setup.php is on the server without a password */
.rl-setup-notice { display: flex; align-items: center; gap: 10px; max-width: var(--page-width, 860px); margin: 0 auto 18px; padding: 11px 16px; border-radius: 12px; border: 1px solid rgba(250, 204, 21, 0.3); background: rgba(250, 204, 21, 0.07); color: #fde68a; font-size: 0.86rem; }
.rl-setup-notice a { color: inherit; font-weight: 700; margin-left: auto; white-space: nowrap; }
[data-theme="light"] .rl-setup-notice { color: #92400e; }

/* Header CPU meter (same look as Disk usage) */
.cpu-info-header { min-width: 120px; }
.cpu-info-header .disk-bar-fill { transition: width 0.6s ease, background 0.3s ease; }
.cpu-info-header.is-high .cpu-pct { color: var(--danger); }
.cpu-info-header.is-high .disk-bar-fill { background: var(--danger); }
@media (max-width: 720px) { .cpu-info-header { display: none; } }

/* Auto-delete: setup unit picker, dashboard notice and per-file time left */
.rl-input-unit select.rl-unit-select { width: 120px; flex: 0 0 120px; height: 42px; margin: 0; }
.rl-switch-hint { margin: -6px 0 0 52px; line-height: 1.5; }
.files-autodelete { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(250, 204, 21, 0.28); background: rgba(250, 204, 21, 0.07); color: #fde68a; font-size: 0.86rem; }
.files-autodelete i { font-size: 1.05rem; }
.files-autodelete strong { font-weight: 700; }
[data-theme="light"] .files-autodelete { color: #92400e; }
.file-date .file-expiry { display: flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 0.72rem; font-weight: 600; color: #fbbf24; white-space: nowrap; }
[data-theme="light"] .file-date .file-expiry { color: #b45309; }

/* Dashboard: Active downloads card (hidden while nothing is running) */
/* Live bar under the header: running transloads and uploads (header.php, quintaphon.js initActiveDownloads) */
.rl-live { padding: 18px 28px 0; }
.rl-live[hidden] { display: none; }
.rl-live-inner { max-width: var(--page-width, 860px); margin: 0 auto; }
.rl-live .active-list { display: flex; flex-direction: column; gap: 8px; }
.rl-live .active-row { padding: 10px 12px 10px 14px; border: 1px solid var(--card-border); border-radius: 12px; background: var(--card-bg); display: flex; flex-direction: column; gap: 8px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18); }
.rl-live .active-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rl-live .active-icon { flex: 0 0 auto; font-size: 1.1rem; color: #60a5fa; }
.rl-live .is-upload .active-icon { color: #4ade80; }
.rl-live .active-label { flex: 0 0 auto; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
.rl-live .active-name { flex: 1 1 auto; min-width: 0; font-weight: 600; font-size: 0.86rem; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-live .active-meta { flex: 0 1 auto; font-size: 0.74rem; color: var(--text-muted); white-space: pre; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.rl-live .active-pct { flex: 0 0 auto; min-width: 44px; text-align: right; font-size: 0.82rem; font-weight: 700; color: var(--text-main); font-variant-numeric: tabular-nums; }
.rl-live .active-cancel { flex: 0 0 auto; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--card-border); background: transparent; color: var(--text-muted); cursor: pointer; transition: var(--transition); }
.rl-live .active-cancel:hover:not(:disabled) { color: var(--danger); border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.08); }
.rl-live .active-cancel:disabled { opacity: 0.6; cursor: default; }
.rl-live .active-track { height: 4px; border-radius: 3px; background: var(--surface-hover); overflow: hidden; }
.rl-live .active-fill { height: 100%; background: #60a5fa; transition: width 0.8s ease; }
.rl-live .is-upload .active-fill { background: #4ade80; }
.rl-live .active-fill.is-indeterminate { width: 30%; animation: rl-active-slide 1.4s ease-in-out infinite; }
@keyframes rl-active-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }
[data-theme="light"] .rl-live .active-icon, [data-theme="light"] .rl-live .active-fill { color: #2563eb; }
[data-theme="light"] .rl-live .active-fill { background: #2563eb; }
[data-theme="light"] .rl-live .is-upload .active-icon { color: #15803d; }
[data-theme="light"] .rl-live .is-upload .active-fill { background: #16a34a; }
@media (max-width: 900px) { .rl-live { padding: 14px 16px 0; } }
@media (max-width: 720px) {
	.rl-live .active-top { flex-wrap: wrap; row-gap: 4px; }
	.rl-live .active-label { display: none; }
	.rl-live .active-name { flex: 1 1 0; }
	.rl-live .active-meta { order: 5; flex: 1 1 100%; padding-left: 28px; }
}

/* Admin panel (admin.php) */
.rl-admin { max-width: var(--page-width, 860px); margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.rl-admin .rl-card { display: flex; flex-direction: column; gap: 14px; }
.rl-admin .card-header { margin-bottom: 0; }
.rl-admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.rl-admin-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--card-border); color: var(--text-muted); font-size: 0.85rem; font-weight: 600; text-decoration: none; transition: var(--transition); }
.rl-admin-tabs a:hover { color: var(--text-main); background: var(--surface-hover); }
.rl-admin-tabs a.is-active { color: var(--primary-contrast); background: var(--text-main); border-color: transparent; }
.rl-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rl-stat { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--card-border); border-radius: 12px; background: var(--input-bg); min-width: 0; }
.rl-stat-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
.rl-stat-value { font-size: 1.05rem; font-weight: 700; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-stat-sub { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-admin-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.rl-chip { padding: 4px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; border: 1px solid var(--card-border); }
.rl-chip.is-ok { color: #4ade80; border-color: rgba(74, 222, 128, 0.3); background: rgba(74, 222, 128, 0.07); }
.rl-chip.is-bad { color: var(--text-muted); text-decoration: line-through; opacity: 0.7; }
[data-theme="light"] .rl-chip.is-ok { color: #15803d; }
.rl-admin-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.rl-admin-actions form { margin: 0; }
.rl-admin-actions .btn-secondary, .rl-admin-actions .btn-primary, .rl-admin-actions .btn-danger { margin: 0; height: 40px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.rl-admin-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.rl-admin-table th { text-align: left; font-size: 0.7rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); padding: 6px 8px; border-bottom: 1px solid var(--card-border); }
.rl-admin-table td { padding: 8px; border-bottom: 1px solid var(--card-border); color: var(--text-main); white-space: nowrap; }
.rl-admin-table .rl-cell-name { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.rl-admin-pre { white-space: pre-wrap; word-break: break-all; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.78rem; margin: 8px 0 0; }
.rl-admin-intro { margin: 0; line-height: 1.55; }
.rl-acc-list { display: flex; flex-direction: column; gap: 8px; }
.rl-acc-list + .rl-admin-actions { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--card-border); }
.rl-acc-row { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1.6fr; gap: 8px; }
.rl-acc-row .rl-input { margin: 0; height: 38px; }
.rl-acc-head span { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
.rl-log-filter { display: flex; gap: 8px; flex-wrap: wrap; }
.rl-log-filter .rl-input { margin: 0; height: 40px; width: auto; flex: 1 1 180px; }
.rl-log-filter select.rl-input { flex: 0 0 160px; }
.rl-log-filter .btn-secondary { height: 40px; }
.rl-log-list { display: flex; flex-direction: column; max-height: 560px; overflow-y: auto; border: 1px solid var(--card-border); border-radius: 12px; }
.rl-log-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--card-border); }
.rl-log-row:last-child { border-bottom: none; }
.rl-log-level { flex: 0 0 86px; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.04em; padding: 3px 0; text-align: center; border-radius: 6px; background: var(--surface-hover); color: var(--text-muted); }
.rl-log-level.is-complete { color: #4ade80; }
.rl-log-level.is-error { color: var(--danger); }
.rl-log-level.is-warn, .rl-log-level.is-login { color: #fbbf24; }
.rl-log-level.is-download { color: #60a5fa; }
.rl-log-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rl-log-msg { font-size: 0.86rem; font-weight: 600; color: var(--text-main); }
.rl-log-ctx { font-size: 0.75rem; color: var(--text-muted); word-break: break-all; }
.rl-log-when { flex: 0 0 auto; font-size: 0.72rem; color: var(--text-muted); text-align: right; font-variant-numeric: tabular-nums; }
.cookie-remember { margin-top: 8px; }
.rl-stats.is-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.rl-stats.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rl-update-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.rl-update-form .btn-primary { margin: 0; height: 44px; padding: 0 18px; display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.rl-update-file { flex: 1 1 260px; min-width: 0; height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px dashed var(--card-border); border-radius: 12px; background: var(--input-bg); color: var(--text-muted); font-size: 0.86rem; cursor: pointer; position: relative; transition: var(--transition); }
.rl-update-file:hover, .rl-update-file:focus-within { color: var(--text-main); border-color: var(--text-muted); }
.rl-update-file i { font-size: 1.15rem; flex: 0 0 auto; }
.rl-update-file span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-update-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.rl-note .rl-admin-pre { max-height: 260px; overflow-y: auto; }
.rl-setup-help .rl-admin-pre { max-height: 260px; overflow-y: auto; padding: 10px 12px; border-radius: 10px; background: var(--input-bg); border: 1px solid var(--card-border); }
.rl-update-row-actions { text-align: right; }
.rl-update-row-actions form { display: inline-block; margin: 0 0 0 6px; }
.rl-update-row-actions .btn-secondary { margin: 0; height: 34px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; }
@media (max-width: 720px) {
	.rl-stats, .rl-stats.is-five, .rl-stats.is-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.rl-admin-table { display: block; overflow-x: auto; }
	.rl-acc-row { grid-template-columns: 1fr 1fr; }
	.rl-acc-head { display: none; }
	.rl-log-when { display: none; }
}

/* Header Donate button (Buy Me a Coffee) */
.header-actions .donate-btn { height: 38px; padding: 0 14px; display: inline-flex; align-items: center; gap: 7px; border-radius: var(--radius); background: #ffdd00; color: #1a1a1a; font-size: 0.84rem; font-weight: 700; text-decoration: none; border: 1px solid transparent; transition: var(--transition); white-space: nowrap; }
.header-actions .donate-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.header-actions .donate-btn i { font-size: 1.05rem; }
@media (max-width: 720px) { .header-actions .donate-btn { padding: 0; width: 38px; justify-content: center; } .header-actions .donate-btn span { display: none; } }

/* Dashboard: DMCA contact line under the Server Files card */
.rl-dmca-note { max-width: var(--page-width, 860px); margin: 14px auto 0; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--text-muted); font-size: 0.82rem; text-align: center; }
.rl-dmca-note i { font-size: 1rem; }
.rl-dmca-note a { color: var(--text-main); font-weight: 600; text-decoration: none; }
.rl-dmca-note a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Server Files card: the layout follows the card's own width (it changes with the sidebar), not the window's */
.rl-card-files { container-type: inline-size; container-name: files; }
.rl-card-files > .file-list-form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.files-card-header .card-header-actions { flex-wrap: nowrap; }
.files-card-header .card-header-actions .search-container.files-search { flex: 1 1 160px; min-width: 0; max-width: 280px; }
.files-card-header .card-header-actions select { flex: 0 0 auto; }
@container files (max-width: 620px) {
	/* Title on its own line, filter and Action menu share the line below */
	.files-card-header .card-header-actions { flex: 1 1 100%; }
	.files-card-header .card-header-actions .search-container.files-search { max-width: none; }
	/* Each file: name on the first line; size, date and buttons on the second */
	.file-list-header { display: none; }
	.file-row {
		grid-template-columns: 28px auto minmax(0, 1fr) auto;
		grid-template-areas: "check name name name" "check size date actions";
		row-gap: 4px;
		column-gap: 12px;
		padding: 10px 8px;
	}
	.file-row .col-check { grid-area: check; align-self: start; padding-top: 10px; }
	.file-row .col-name { grid-area: name; }
	.file-row .col-size { grid-area: size; padding-left: 42px; font-size: 0.75rem; }
	.file-row .col-date { grid-area: date; font-size: 0.75rem; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
	.file-row .col-date br { display: none; }
	.file-row .file-date .file-expiry { margin-top: 0; }
	.file-row .col-actions { grid-area: actions; justify-content: flex-end; flex-wrap: nowrap; }
}
@container files (max-width: 380px) {
	.file-row { grid-template-areas: "check name name" "check size date" "check actions actions"; grid-template-columns: 28px auto minmax(0, 1fr); }
	.file-row .col-actions { justify-content: flex-start; padding-left: 34px; }
}
/* The header search rule for small windows (order 2, full width) is not meant for the card's filter box */
.files-card-header .card-header-actions .search-container.files-search { order: 0; width: auto; }
@container files (max-width: 420px) {
	.files-card-header .card-header-actions { flex-wrap: wrap; }
	.files-card-header .card-header-actions .search-container.files-search,
	.files-card-header .card-header-actions select { flex: 1 1 100%; width: 100%; max-width: none; }
}
/* Very small phones: the header meter shrinks instead of pushing the page wider than the screen */
@media (max-width: 420px) {
	.rl-main-wrapper { min-width: 0; }
	.header-right { gap: 10px; }
	.header-right .disk-info-header { min-width: 0; flex: 1 1 auto; }
	.header-actions { gap: 6px; }
}
@media (max-width: 350px) { .header-right .disk-info-header { display: none; } .header-right { justify-content: flex-end; } }
.files-card-header .search-container.files-search input { min-width: 0; width: 100%; }

/* Themed confirm/alert dialog (rlDialog in quintaphon.js); replaces the browser's own popups */
.action-overlay.rl-dialog-overlay { z-index: 2300; }
.action-modal.rl-dialog { max-width: 440px; }
.rl-dialog .action-modal-body .rl-dialog-text { margin: 0; color: var(--text-main); font-size: 0.92rem; line-height: 1.55; }
.rl-dialog .action-modal-body input[type="text"] { width: 100%; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.8rem; }

/* Settings page: plugin and premium account counts */
.settings-stats { margin-bottom: 20px; }
.settings-stats .rl-stat-value { font-size: 1.35rem; }
@media (max-width: 1100px) { .settings-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Settings form switches for file actions and features (setup.php and admin Settings) */
.rl-toggle-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.rl-toggle-grid .rl-switch { font-weight: 500; font-size: 0.86rem; }
@media (max-width: 560px) { .rl-toggle-grid { grid-template-columns: minmax(0, 1fr); } }
.rl-admin-settings .rl-setup-form { gap: 16px; }
.rl-admin-head .card-header { display: flex; align-items: center; justify-content: space-between; }
.rl-admin-signout { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 0.85rem; font-weight: 600; text-decoration: none; }
.rl-admin-signout:hover { color: var(--text-main); }

/* Settings: text field with fixed text before/after it (admin page address) */
.rl-input-affix { display: flex; align-items: center; border: 1px solid var(--card-border); border-radius: var(--radius); background: var(--card-bg); overflow: hidden; }
.rl-input-affix > span { padding: 0 10px; color: var(--text-muted); font-size: 0.85rem; white-space: nowrap; }
.rl-input-affix .rl-input { border: none !important; border-radius: 0; padding-left: 0; padding-right: 0; flex: 1 1 auto; min-width: 0; }
.rl-input-affix .rl-input:focus { box-shadow: none; }
.rl-input-affix:focus-within { border-color: var(--text-muted); }
/* Transload card: max file size note */
.transload-limit { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; }

/* Settings tiles open their list */
.rl-stat-btn { position: relative; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; }
.rl-stat-btn:hover, .rl-stat-btn:focus-visible { border-color: var(--text-muted); background: var(--surface-hover); outline: none; }
.rl-stat-btn .rl-stat-open { position: absolute; top: 12px; right: 12px; color: var(--text-muted); font-size: 1rem; opacity: 0.6; }
.rl-stat-btn:hover .rl-stat-open { opacity: 1; }
/* List dialog */
.action-modal.rl-dialog.rl-dialog-list { max-width: 560px; }
.rl-dialog-list .rl-dialog-filter { width: 100%; box-sizing: border-box; margin-bottom: 10px; }
.rl-dialog-items { list-style: none; margin: 0; padding: 4px; max-height: 50vh; overflow-y: auto; border: 1px solid var(--card-border); border-radius: 12px; background: var(--input-bg); scrollbar-width: thin; scrollbar-color: var(--card-border) transparent; }
.rl-dialog-items li { padding: 8px 10px; border-radius: 8px; font-size: 0.85rem; color: var(--text-main); display: flex; flex-direction: column; gap: 2px; word-break: break-word; }
.rl-dialog-items li:nth-child(odd) { background: rgba(255, 255, 255, 0.02); }
.rl-dialog-items li strong { font-weight: 600; }
.rl-dialog-items li span { font-size: 0.78rem; color: var(--text-muted); }
.rl-dialog-empty { margin: 10px 0 0; }
/* Back button at the top of a card (gdrive_auth.php) */
.rl-back-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin: 0 0 14px; text-decoration: none; }
.rl-dialog-list input.rl-dialog-filter { height: 40px; padding: 0 12px; border: 1px solid var(--card-border); border-radius: 10px; background: var(--input-bg); color: var(--text-main); font: inherit; font-size: 0.88rem; outline: none; }
.rl-dialog-list input.rl-dialog-filter:focus { border-color: var(--text-muted); }
.rl-dialog-list input.rl-dialog-filter::-webkit-search-cancel-button { cursor: pointer; filter: invert(0.6); }

/* Server check page (checker.php) */
.rl-servercheck { width: 100%; max-width: var(--page-width, 860px); margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.rl-servercheck > .rl-card { width: 100%; box-sizing: border-box; margin: 0; }
.rl-check-head { display: flex; align-items: center; gap: 16px; }
.rl-check-icon { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.9rem; background: var(--input-bg); border: 1px solid var(--card-border); }
.rl-check-head.is-ok .rl-check-icon { color: #4ade80; background: rgba(74, 222, 128, 0.08); border-color: rgba(74, 222, 128, 0.3); }
.rl-check-head.is-warn .rl-check-icon { color: #fbbf24; background: rgba(250, 204, 21, 0.07); border-color: rgba(250, 204, 21, 0.3); }
.rl-check-head.is-bad .rl-check-icon { color: var(--danger); background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.35); }
.rl-check-summary { flex: 1 1 auto; min-width: 0; }
.rl-check-summary .card-title { margin: 0 0 4px; }
.rl-check-summary p { margin: 0; font-size: 0.85rem; color: var(--text-muted); overflow-wrap: anywhere; }
.rl-check-again { flex: 0 0 auto; margin: 0; height: 40px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; text-decoration: none; }
.rl-check-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--card-border); border-radius: 12px; overflow: hidden; }
.rl-check-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--card-border); }
.rl-check-row:last-child { border-bottom: none; }
.rl-check-row:hover { background: var(--surface-hover); }
.rl-check-mark { flex: 0 0 auto; font-size: 1.3rem; }
.rl-check-mark.is-ok { color: #4ade80; }
.rl-check-mark.is-warn { color: #fbbf24; }
.rl-check-mark.is-bad { color: var(--danger); }
.rl-check-text { flex: 0 0 34%; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rl-check-name { font-size: 0.9rem; font-weight: 700; color: var(--text-main); }
.rl-check-for { font-size: 0.75rem; color: var(--text-muted); }
.rl-check-detail { flex: 1 1 auto; min-width: 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-check-badge { flex: 0 0 auto; min-width: 58px; text-align: center; padding: 4px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.03em; border: 1px solid var(--card-border); }
.rl-check-badge.is-ok { color: #4ade80; border-color: rgba(74, 222, 128, 0.3); background: rgba(74, 222, 128, 0.07); }
.rl-check-badge.is-warn { color: #fbbf24; border-color: rgba(250, 204, 21, 0.3); background: rgba(250, 204, 21, 0.07); }
.rl-check-badge.is-bad { color: var(--danger); border-color: rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.08); }
[data-theme="light"] .rl-check-mark.is-ok, [data-theme="light"] .rl-check-badge.is-ok, [data-theme="light"] .rl-check-head.is-ok .rl-check-icon { color: #15803d; }
[data-theme="light"] .rl-check-mark.is-warn, [data-theme="light"] .rl-check-badge.is-warn, [data-theme="light"] .rl-check-head.is-warn .rl-check-icon { color: #b45309; }
@media (max-width: 720px) {
	.rl-check-head { flex-wrap: wrap; }
	.rl-check-again { width: 100%; justify-content: center; }
	.rl-check-row { flex-wrap: wrap; gap: 8px 12px; }
	.rl-check-text { flex: 1 1 calc(100% - 120px); }
	.rl-check-detail { order: 3; flex: 1 1 100%; padding-left: 34px; white-space: normal; overflow-wrap: anywhere; }
}

/* Auto Transload run page (audl.php?GO=GO): queue list, download frame, add more links */
.audl-run { max-width: var(--page-width, 860px); margin: 0 auto; display: flex; flex-direction: column; gap: 16px; text-align: left; }
.audl-run > .rl-card { width: 100%; box-sizing: border-box; margin: 0; }
.audl-run .card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.audl-run .card-title { display: flex; align-items: center; gap: 10px; margin: 0; }
.audl-q-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.audl-q-start { margin: 0; height: 40px; padding: 0 18px; display: inline-flex; align-items: center; gap: 8px; font-size: 0.86rem; }
.audl-q { list-style: none; margin: 0; padding: 0; border: 1px solid var(--card-border); border-radius: 12px; overflow: hidden; max-height: 360px; overflow-y: auto; }
.audl-q-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--card-border); transition: background 0.15s ease; }
.audl-q-row:last-child { border-bottom: none; }
.audl-q-num { flex: 0 0 auto; min-width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; color: var(--text-muted); background: var(--input-bg); border: 1px solid var(--card-border); font-variant-numeric: tabular-nums; }
.audl-q-link { flex: 1 1 auto; min-width: 0; font-size: 0.84rem; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.audl-q-status { flex: 0 1 auto; max-width: 45%; padding: 4px 11px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-muted); border: 1px solid var(--card-border); }
.audl-q-row.is-running { background: var(--surface-hover); }
.audl-q-row.is-running .audl-q-num { color: var(--primary-contrast); background: var(--text-main); border-color: transparent; }
.audl-q-row.is-running .audl-q-status { color: #60a5fa; border-color: rgba(96, 165, 250, 0.35); background: rgba(96, 165, 250, 0.08); }
.audl-q-row.is-running .audl-q-status::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 1px; animation: audl-pulse 1.2s ease-in-out infinite; }
.audl-q-row.is-done .audl-q-status { color: #4ade80; border-color: rgba(74, 222, 128, 0.3); background: rgba(74, 222, 128, 0.07); }
.audl-q-row.is-done .audl-q-link { color: var(--text-muted); }
.audl-q-row.is-failed .audl-q-status { color: var(--danger); border-color: rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.08); }
[data-theme="light"] .audl-q-row.is-done .audl-q-status { color: #15803d; }
[data-theme="light"] .audl-q-row.is-running .audl-q-status { color: #1d4ed8; }
@keyframes audl-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.audl-frame-wrap[hidden] { display: none; }
.audl-frame { display: block; width: calc(100% + 24px); margin: -12px; height: 260px; border: 0; background: transparent; color-scheme: normal; }
.audl-more .audl-more-links { min-height: 96px; resize: vertical; }
.audl-add { margin: 0; height: 40px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.audl-live { display: flex; flex-direction: column; gap: 12px; }
/* The download page inside the frame: no page padding or centering box of its own */
.rl-embedded .rl-page-content > .transloadui, .rl-embedded .rl-page-content > div > .transloadui { max-width: none; }
@media (max-width: 720px) {
	.audl-q-row { flex-wrap: wrap; gap: 8px 10px; }
	.audl-q-link { flex: 1 1 calc(100% - 40px); white-space: normal; overflow-wrap: anywhere; }
	.audl-q-status { max-width: none; margin-left: 36px; }
	.audl-q-start, .audl-add { width: 100%; justify-content: center; }
	.audl-q-head { width: 100%; }
}

/* File action results in the popup (rl_af_results): summary line and one row per file with a status badge */
.action-modal-body .af-done { display: flex; flex-direction: column; gap: 12px; }
.action-modal-body .af-summary { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 0.92rem; font-weight: 600; color: var(--text-main); }
.action-modal-body .af-summary i { font-size: 1.25rem; }
.action-modal-body .af-summary.is-ok i { color: #4ade80; }
.action-modal-body .af-summary.is-warn i { color: #fbbf24; }
.action-modal-body .af-summary.is-bad i { color: var(--danger); }
.action-modal-body .af-results { max-height: 340px; }
.action-modal-body .af-status { flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 7px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; border: 1px solid var(--card-border); white-space: nowrap; }
.action-modal-body .af-status i { font-size: 0.9rem; }
.action-modal-body .af-status.is-ok { color: #4ade80; border-color: rgba(74, 222, 128, 0.3); background: rgba(74, 222, 128, 0.07); }
.action-modal-body .af-status.is-warn { color: #fbbf24; border-color: rgba(250, 204, 21, 0.3); background: rgba(250, 204, 21, 0.07); }
.action-modal-body .af-status.is-bad { color: var(--danger); border-color: rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.08); }
[data-theme="light"] .action-modal-body .af-status.is-ok, [data-theme="light"] .action-modal-body .af-summary.is-ok i { color: #15803d; }
[data-theme="light"] .action-modal-body .af-status.is-warn, [data-theme="light"] .action-modal-body .af-summary.is-warn i { color: #b45309; }

/* Plugin pages (DownloadClass): progress messages and the plugin's own forms, centred in the page width */
.rl-plugin-page { max-width: var(--page-width, 860px); margin: 0 auto; text-align: center; }
.rl-plugin-mesg { margin: 8px auto 4px; color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; }
.rl-plugin-page > .rl-page-message { margin-top: 20px; }
