/* QuipFiles — التنسيقات. كل القياسات الاتجاهية بخصائص منطقية (inline-start/end) لتعمل عربياً وإنجليزياً */

:root {
  --accent: #0067c0;
  --accent-text: #fff;
  --accent-fg: var(--accent);
  --bg: #f3f3f3;
  --surface: #ffffff;
  --surface-2: #f9f9f9;
  --text: #1b1b1b;
  --text-2: #5d5d5d;
  --border: rgba(0, 0, 0, 0.09);
  --border-strong: rgba(0, 0, 0, 0.18);
  --hover: rgba(0, 0, 0, 0.05);
  --press: rgba(0, 0, 0, 0.09);
  --sel: color-mix(in srgb, var(--accent) 13%, transparent);
  --sel-hover: color-mix(in srgb, var(--accent) 19%, transparent);
  --sel-border: color-mix(in srgb, var(--accent) 40%, transparent);
  --glass: rgba(243, 243, 243, 0.8);
  --shadow-win: 0 20px 56px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.14);
  --shadow-pop: 0 10px 32px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.1);
  --danger: #c42b1c;
  --ok: #0f7b0f;
  --warn: #9d5d00;
  --radius: 8px;
  --taskbar-h: 48px;
  color-scheme: light;
}

:root[data-theme='dark'] {
  --accent-fg: color-mix(in srgb, var(--accent) 55%, #fff);
  --bg: #202020;
  --surface: #2b2b2b;
  --surface-2: #262626;
  --text: #ffffff;
  --text-2: #c6c6c6;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.2);
  --hover: rgba(255, 255, 255, 0.07);
  --press: rgba(255, 255, 255, 0.11);
  --sel: color-mix(in srgb, var(--accent) 34%, transparent);
  --sel-hover: color-mix(in srgb, var(--accent) 44%, transparent);
  --sel-border: color-mix(in srgb, var(--accent) 70%, #fff);
  --glass: rgba(32, 32, 32, 0.8);
  --shadow-win: 0 20px 56px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.12);
  --shadow-pop: 0 10px 32px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.1);
  --danger: #ff8d82;
  --ok: #6ccb5f;
  --warn: #fce100;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font: 13.5px/1.45 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, 'SF Arabic', 'Noto Sans Arabic', Tahoma, sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
}
#app { height: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
input, textarea { user-select: text; -webkit-user-select: text; }
button { cursor: default; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-fg); outline-offset: 1px; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--text-2); }

.muted { color: var(--text-2); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.start { text-align: start; }

/* ───────────── الأيقونات ───────────── */
.ic { display: inline-flex; width: 20px; height: 20px; flex: none; }
.ic svg, .gl svg { width: 100%; height: 100%; display: block; }
.gl { display: inline-flex; width: 16px; height: 16px; flex: none; }

/* ───────────── عناصر التحكم ───────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 32px; padding: 5px 14px; border-radius: 5px;
  background: var(--surface); border: 1px solid var(--border-strong); border-bottom-color: color-mix(in srgb, var(--border-strong) 160%, transparent);
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:active { background: var(--press); }
.btn:disabled { opacity: 0.5; pointer-events: none; }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 90%, #fff); }
.btn.primary:active { background: color-mix(in srgb, var(--accent) 82%, #000); }
.btn.danger { background: #c42b1c; color: #fff; border-color: transparent; }
.btn.danger:hover { background: #b3271a; }
.btn.danger-ghost { color: var(--danger); background: transparent; }
.btn.block { width: 100%; }
.btn.lg { min-height: 38px; font-weight: 600; }
.btn.sm { min-height: 28px; padding: 3px 10px; font-size: 12.5px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 32px; height: 32px; border: 0; border-radius: 5px; background: transparent; color: var(--text);
}
.icon-btn:hover { background: var(--hover); }
.icon-btn:active { background: var(--press); }
.icon-btn:disabled { opacity: 0.35; pointer-events: none; }
.icon-btn.sm { width: 24px; height: 24px; }
.icon-btn.sm .gl { width: 14px; height: 14px; }
.icon-btn.danger { color: var(--danger); }
.lang-code { font-weight: 700; font-size: 12px; }
.link-btn { border: 0; background: none; padding: 0 4px; color: var(--accent-fg); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 20px;
  font-size: 11.5px; white-space: nowrap; background: var(--hover); color: var(--text-2); border: 1px solid var(--border);
}
.badge .gl { width: 12px; height: 12px; }
.badge.accent { background: var(--sel); color: var(--accent-fg); border-color: var(--sel-border); }
.badge.ok { background: color-mix(in srgb, var(--ok) 13%, transparent); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.badge.bad { background: color-mix(in srgb, var(--danger) 13%, transparent); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.badges { display: flex; flex-wrap: wrap; gap: 4px; }

.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 600; font-size: 12px;
}
.avatar.sq { border-radius: 8px; width: 36px; height: 36px; }

.spinner { width: 16px; height: 16px; flex: none; border: 2px solid var(--border-strong); border-top-color: var(--accent-fg); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

input[type='text'], input[type='password'], input[type='number'], input[type='search'], select, textarea {
  width: 100%; min-height: 32px; padding: 5px 10px; border-radius: 5px;
  background: var(--surface); border: 1px solid var(--border-strong); border-bottom-color: var(--text-2); outline: none;
}
input:focus, select:focus, textarea:focus { border-bottom-color: var(--accent-fg); box-shadow: 0 1px 0 0 var(--accent-fg); }
input:disabled, select:disabled { opacity: 0.6; }
input[type='checkbox'] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }

.form { display: flex; flex-direction: column; gap: 12px; }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-title { font-weight: 600; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--border); }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field-label { font-size: 12.5px; color: var(--text-2); }
.field-hint { font-size: 12px; color: var(--text-2); }
.form-msg { font-size: 12.5px; min-height: 0; }
.form-msg:empty { display: none; }
.form-msg.err { color: var(--danger); }
.form-msg.ok { color: var(--ok); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { position: relative; width: 40px; height: 20px; flex: none; border-radius: 20px; border: 1px solid var(--text-2); transition: background 0.15s; }
.switch-track::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--text-2); transition: inset-inline-start 0.15s; }
.switch input:checked + .switch-track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .switch-track::after { inset-inline-start: 23px; background: #fff; }
.switch input:disabled + .switch-track { opacity: 0.5; }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent-fg); outline-offset: 2px; }

.seg { display: inline-flex; padding: 2px; border-radius: 6px; background: var(--hover); gap: 2px; }
.seg-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 4px 12px; border-radius: 4px; }
.seg-btn.on { background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; outline: 1px solid var(--border); }
.swatch.on { border-color: var(--surface); outline: 2px solid var(--text); }

.note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 9px 12px; border-radius: 6px; background: var(--sel); border: 1px solid var(--sel-border); font-size: 12.5px; }
.note.warn { background: color-mix(in srgb, #f7b500 16%, transparent); border-color: color-mix(in srgb, #f7b500 50%, transparent); }
kbd { font: 12px ui-monospace, Consolas, monospace; padding: 2px 7px; border-radius: 4px; background: var(--hover); border: 1px solid var(--border); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.card.pad { padding: 16px; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 16px; min-height: 54px; }
.card-row + .card-row { border-top: 1px solid var(--border); }
.card-row.slim { min-height: 38px; padding-block: 7px; }
.card-row b, .us-item b { display: block; font-weight: 600; }
.card-row small, .us-item small, .stat small, .about small, .pf-brand small, .usage small, .start-head small { display: block; color: var(--text-2); font-size: 12px; }
.card-empty { padding: 26px; text-align: center; color: var(--text-2); }
.row-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row-main > .ic { width: 30px; height: 30px; }
.row-glyph { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; background: var(--hover); flex: none; }
.row-actions { display: flex; align-items: center; gap: 4px; flex: none; }

.table-wrap { overflow: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: start; font-weight: 600; font-size: 12px; color: var(--text-2); padding: 9px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; background: var(--surface); }
.table td { padding: 9px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table th.center, .table td.center { text-align: center; }
.table td.pad { padding: 30px; }
.table tr.off td { opacity: 0.6; }
.table.perms td:first-child { min-width: 150px; }
.table.perms th, .table.perms td { padding-inline: 8px; }

/* ───────────── القوائم ───────────── */
.menu {
  position: fixed; z-index: 9000; min-width: 210px; max-width: 320px; padding: 4px;
  background: var(--glass); backdrop-filter: blur(30px) saturate(1.6); -webkit-backdrop-filter: blur(30px) saturate(1.6);
  border-radius: var(--radius); box-shadow: var(--shadow-pop); animation: pop 0.11s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 4px; min-height: 30px; }
.menu-item:hover { background: var(--hover); }
.menu-item.disabled { opacity: 0.4; pointer-events: none; }
.menu-item.danger { color: var(--danger); }
.mi-ic { width: 16px; height: 16px; flex: none; display: inline-flex; }
.mi-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi-key { color: var(--text-2); font-size: 12px; }
.mi-sub { width: 12px; height: 12px; color: var(--text-2); }
.menu-sep { height: 1px; margin: 4px 6px; background: var(--border); }

/* ───────────── مربعات الحوار ───────────── */
.overlay { position: fixed; inset: 0; z-index: 8000; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, 0.32); animation: fade 0.12s; }
.overlay.closing { opacity: 0; transition: opacity 0.12s; }
@keyframes fade { from { opacity: 0; } }
.dlg { max-width: 100%; max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-win); animation: dlg-in 0.16s cubic-bezier(0.2, 0.9, 0.3, 1); }
@keyframes dlg-in { from { transform: scale(0.95); opacity: 0; } }
.dlg-head { display: flex; align-items: center; gap: 10px; padding: 20px 22px 6px; }
.dlg-title { font-size: 17px; font-weight: 600; }
.dlg-body { padding: 8px 22px 16px; overflow: auto; }
.dlg-text { line-height: 1.6; white-space: pre-line; }
.dlg-list { margin: 4px 0 10px; padding-inline-start: 20px; max-height: 160px; overflow: auto; }
.dlg-list li { overflow-wrap: anywhere; }
.dlg-err { padding: 0 22px 12px; color: var(--danger); font-size: 12.5px; }
.dlg-err:empty { display: none; }
.dlg-foot { display: flex; gap: 8px; padding: 14px 22px; background: var(--surface-2); border-top: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); flex-wrap: wrap; }
.dlg-foot .btn { flex: 1; min-width: 96px; }

.toasts { position: fixed; z-index: 9500; bottom: calc(var(--taskbar-h) + 14px); inset-inline: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding-inline: 12px; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: min(560px, 100%); padding: 9px 14px; border-radius: 6px; background: var(--surface); box-shadow: var(--shadow-pop); animation: toast-in 0.18s ease-out; }
.toast.out { opacity: 0; transform: translateY(6px); transition: 0.18s; }
.toast.error .gl { color: var(--danger); }
.toast.success .gl { color: var(--ok); }
.toast.info .gl { color: var(--accent-fg); }
.toast-act { border: 0; background: none; color: var(--accent-fg); font-weight: 600; padding: 2px 6px; border-radius: 4px; cursor: pointer; }
.toast-act:hover { background: var(--hover); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ───────────── خلفيات سطح المكتب ───────────── */
.wallpaper { position: absolute; inset: 0; background-size: cover; }
:root[data-wallpaper='azure'] .wallpaper, .wp-azure { background: radial-gradient(90% 70% at 85% 8%, #8fd4ff 0%, transparent 55%), radial-gradient(80% 80% at 8% 95%, #1b3fbf 0%, transparent 60%), radial-gradient(60% 60% at 55% 62%, #3fb0f7 0%, transparent 62%), linear-gradient(135deg, #0a3aa6, #0a86de); }
:root[data-wallpaper='aurora'] .wallpaper, .wp-aurora { background: radial-gradient(70% 60% at 20% 15%, #46e0c0 0%, transparent 60%), radial-gradient(70% 70% at 90% 80%, #7b4dff 0%, transparent 60%), radial-gradient(50% 50% at 60% 30%, #2fa8ff 0%, transparent 60%), linear-gradient(160deg, #0b2a4a, #132057); }
:root[data-wallpaper='sunset'] .wallpaper, .wp-sunset { background: radial-gradient(80% 70% at 85% 12%, #ffd27a 0%, transparent 55%), radial-gradient(80% 80% at 10% 95%, #7a2ea8 0%, transparent 60%), radial-gradient(60% 60% at 50% 60%, #ff7a59 0%, transparent 62%), linear-gradient(135deg, #b0306a, #f08a3c); }
:root[data-wallpaper='forest'] .wallpaper, .wp-forest { background: radial-gradient(80% 70% at 80% 10%, #b9f08a 0%, transparent 55%), radial-gradient(80% 80% at 10% 95%, #0b5a55 0%, transparent 60%), radial-gradient(60% 60% at 50% 60%, #2fb98a 0%, transparent 62%), linear-gradient(135deg, #0d5c3f, #3aa76d); }
:root[data-wallpaper='lavender'] .wallpaper, .wp-lavender { background: radial-gradient(80% 70% at 82% 10%, #ffc8ec 0%, transparent 55%), radial-gradient(80% 80% at 10% 95%, #4b3fc4 0%, transparent 60%), radial-gradient(60% 60% at 52% 60%, #a98bff 0%, transparent 62%), linear-gradient(135deg, #5b3fb8, #c57be0); }
:root[data-wallpaper='graphite'] .wallpaper, .wp-graphite { background: radial-gradient(80% 70% at 82% 10%, #6f7f95 0%, transparent 55%), radial-gradient(80% 80% at 10% 95%, #11151c 0%, transparent 60%), radial-gradient(60% 60% at 52% 60%, #3c4a5e 0%, transparent 62%), linear-gradient(135deg, #1b2230, #3a4558); }
.wallpapers { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.wp-thumb { position: relative; aspect-ratio: 16 / 10; border-radius: 8px; border: 2px solid transparent; outline: 1px solid var(--border); overflow: hidden; }
.wp-thumb.on { border-color: var(--surface); outline: 2px solid var(--accent-fg); }
.wp-thumb span { position: absolute; inset-inline: 0; bottom: 0; padding: 3px 8px; font-size: 11.5px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, 0.5)); text-align: start; }

/* ───────────── شاشة الدخول ───────────── */
.auth { position: relative; height: 100%; display: grid; place-items: center; padding: 20px; overflow: auto; }
.auth-card { position: relative; width: min(400px, 100%); padding: 30px 30px 26px; border-radius: 12px; background: var(--glass); backdrop-filter: blur(40px) saturate(1.5); -webkit-backdrop-filter: blur(40px) saturate(1.5); box-shadow: var(--shadow-win); text-align: center; }
.auth-card .form { text-align: start; margin-top: 20px; }
.auth-logo .ic { width: 64px; height: 64px; }
.auth-card h1 { font-size: 22px; font-weight: 600; margin-top: 10px; }
.auth-sub { color: var(--text-2); margin-top: 4px; line-height: 1.7; }
.auth-lang { position: absolute; top: 16px; inset-inline-end: 16px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 6px 12px; border-radius: 20px; background: rgba(0, 0, 0, 0.3); color: #fff; backdrop-filter: blur(10px); cursor: pointer; }
.auth-lang:hover { background: rgba(0, 0, 0, 0.45); }

/* ───────────── سطح المكتب وشريط المهام ───────────── */
.desktop { position: relative; height: 100%; overflow: hidden; }
.desk-icons { position: absolute; inset: 0 0 var(--taskbar-h) 0; padding: 12px; display: flex; flex-flow: column wrap; align-content: flex-start; gap: 4px; }
.desk-icon { width: 92px; padding: 8px 4px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; border: 1px solid transparent; border-radius: 6px; background: none; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75); font-size: 12.5px; line-height: 1.3; }
.desk-icon .ic { width: 46px; height: 46px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); }
.desk-icon span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; text-align: center; }
.desk-icon:hover { background: rgba(255, 255, 255, 0.14); }
.desk-icon.sel { background: rgba(255, 255, 255, 0.24); border-color: rgba(255, 255, 255, 0.4); }

.win-layer { position: absolute; inset: 0 0 var(--taskbar-h) 0; pointer-events: none; }
.win-layer > * { pointer-events: auto; }

.taskbar { position: absolute; inset: auto 0 0 0; height: var(--taskbar-h); z-index: 7000; display: flex; align-items: center; gap: 8px; padding-inline: 8px; background: var(--glass); backdrop-filter: blur(30px) saturate(1.7); -webkit-backdrop-filter: blur(30px) saturate(1.7); border-top: 1px solid var(--border); }
.task-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; }
.task-start { width: 40px; height: 40px; flex: none; border: 0; border-radius: 6px; background: none; display: grid; place-items: center; }
.task-start .ic { width: 26px; height: 26px; transition: transform 0.12s; }
.task-start:hover, .task-start.on { background: var(--hover); }
.task-start:active .ic { transform: scale(0.88); }
.task-apps { display: flex; gap: 3px; min-width: 0; overflow: hidden; }
.task-app { position: relative; display: flex; align-items: center; gap: 8px; height: 40px; max-width: 190px; min-width: 44px; padding-inline: 10px; border: 0; border-radius: 6px; background: none; }
.task-app .ic { width: 22px; height: 22px; }
.task-app span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.task-app::after { content: ''; position: absolute; bottom: 2px; inset-inline: calc(50% - 4px); height: 3px; border-radius: 3px; background: var(--text-2); transition: inset-inline 0.15s, background 0.15s; }
.task-app:hover { background: var(--hover); }
.task-app.active { background: var(--hover); }
.task-app.active::after { inset-inline: calc(50% - 9px); background: var(--accent-fg); }
.task-tray { display: flex; align-items: center; gap: 2px; flex: none; }
.task-clock { display: flex; flex-direction: column; align-items: flex-end; border: 0; background: none; padding: 3px 10px; border-radius: 5px; font-size: 12px; line-height: 1.35; direction: ltr; }
.task-clock:hover { background: var(--hover); }

.start-menu { position: absolute; z-index: 7100; bottom: calc(var(--taskbar-h) + 10px); inset-inline-start: 10px; width: min(360px, calc(100vw - 20px)); border-radius: 10px; background: var(--glass); backdrop-filter: blur(40px) saturate(1.7); -webkit-backdrop-filter: blur(40px) saturate(1.7); box-shadow: var(--shadow-win); animation: start-in 0.18s cubic-bezier(0.2, 0.9, 0.3, 1); overflow: hidden; }
@keyframes start-in { from { opacity: 0; transform: translateY(16px); } }
.start-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 6px; }
.start-head .ic { width: 34px; height: 34px; }
.start-head b { font-size: 15px; }
.start-apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 12px 14px 18px; }
.start-app { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border: 0; border-radius: 6px; background: none; font-size: 12.5px; text-align: center; }
.start-app .ic { width: 36px; height: 36px; }
.start-app:hover { background: var(--hover); }
.start-foot { display: flex; align-items: center; gap: 4px; padding: 10px 14px; border-top: 1px solid var(--border); background: var(--hover); }
.start-user { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 5px 8px; border-radius: 6px; text-align: start; }
.start-user:hover { background: var(--hover); }
.start-user span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ───────────── النوافذ ───────────── */
.win { position: absolute; display: flex; flex-direction: column; min-width: 0; background: var(--bg); border-radius: 9px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18), 0 0 0 1px var(--border-strong); outline: none; overflow: hidden; transition: opacity 0.14s, transform 0.14s; }
.win.active { box-shadow: var(--shadow-win); }
.win.opening { animation: win-in 0.17s cubic-bezier(0.2, 0.9, 0.3, 1); }
@keyframes win-in { from { opacity: 0; transform: scale(0.94); } }
.win.closing { opacity: 0; transform: scale(0.95); pointer-events: none; }
.win.min { opacity: 0; transform: translateY(60px) scale(0.85); pointer-events: none; visibility: hidden; transition: opacity 0.14s, transform 0.14s, visibility 0s 0.14s; }
.win.max { inset: 0 !important; width: auto !important; height: auto !important; border-radius: 0; }
.win.dragging { transition: none; }
.win.dragging iframe, .win.dragging .ex-content { pointer-events: none; }
.win-bar { display: flex; align-items: center; height: 36px; flex: none; padding-inline-start: 12px; gap: 8px; touch-action: none; }
.win:not(.active) .win-bar { color: var(--text-2); }
.win-icon { display: inline-flex; }
.win-icon .ic { width: 16px; height: 16px; }
.win-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.win-ctl { display: flex; height: 100%; flex: none; }
.wc { width: 46px; height: 100%; border: 0; background: none; display: grid; place-items: center; color: inherit; }
.wc .gl { width: 14px; height: 14px; }
.wc:hover { background: var(--hover); }
.wc.close:hover { background: #c42b1c; color: #fff; }
.win-body { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--surface); }
.rz { position: absolute; z-index: 5; }
.rz-n, .rz-s { inset-inline: 10px; height: 6px; cursor: ns-resize; }
.rz-n { top: -1px; } .rz-s { bottom: -1px; }
.rz-e, .rz-w { top: 10px; bottom: 10px; width: 6px; cursor: ew-resize; }
.rz-e { right: -1px; } .rz-w { left: -1px; }
.rz-ne, .rz-nw, .rz-se, .rz-sw { width: 12px; height: 12px; }
.rz-ne { top: -1px; right: -1px; cursor: nesw-resize; } .rz-nw { top: -1px; left: -1px; cursor: nwse-resize; }
.rz-se { bottom: -1px; right: -1px; cursor: nwse-resize; } .rz-sw { bottom: -1px; left: -1px; cursor: nesw-resize; }
.win.max .rz { display: none; }

/* ───────────── المستكشف ───────────── */
.ex { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--bg); }
.ex-nav { display: flex; align-items: center; gap: 4px; padding: 4px 8px 6px; }
.ex-address { flex: 1; min-width: 0; height: 32px; display: flex; align-items: center; border-radius: 5px; background: var(--surface); border: 1px solid var(--border); cursor: text; }
.ex-address:hover { border-color: var(--border-strong); }
.crumbs { flex: 1; display: flex; align-items: center; height: 100%; padding-inline: 4px; overflow: hidden; white-space: nowrap; }
.crumb { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding-inline: 6px; border: 0; border-radius: 4px; background: none; flex: none; max-width: 220px; cursor: default; }
.crumb span { overflow: hidden; text-overflow: ellipsis; }
.crumb .ic { width: 16px; height: 16px; }
.crumb:hover:not(.static) { background: var(--hover); }
.crumb.static { color: var(--text-2); }
.crumb-sep { width: 11px; height: 11px; color: var(--text-2); flex: none; }
.ex-address-input { border: 0 !important; box-shadow: none !important; background: transparent !important; height: 100%; min-height: 0 !important; }
.ex-search { display: flex; align-items: center; gap: 6px; width: 210px; flex: none; height: 32px; padding-inline: 10px; border-radius: 5px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }
.ex-search.wide { width: min(360px, 100%); }
.ex-search:focus-within { border-bottom-color: var(--accent-fg); }
.ex-search input { border: 0 !important; box-shadow: none !important; background: transparent !important; padding: 0 !important; min-height: 0 !important; color: var(--text); }

.ex-cmd { display: flex; align-items: center; gap: 2px; padding: 4px 8px; border-block: 1px solid var(--border); background: var(--surface-2); overflow-x: auto; scrollbar-width: none; }
.ex-cmd::-webkit-scrollbar { display: none; }
.cmd { display: inline-flex; align-items: center; gap: 7px; height: 32px; min-width: 34px; justify-content: center; padding-inline: 8px; border: 0; border-radius: 5px; background: none; white-space: nowrap; flex: none; }
.cmd .gl { color: var(--accent-fg); }
.cmd .caret { width: 10px; height: 10px; color: var(--text-2); }
.cmd:hover { background: var(--hover); }
.cmd:active { background: var(--press); }
.cmd:disabled { opacity: 0.38; pointer-events: none; }
.cmd:disabled .gl { color: inherit; }
.cmd-sep { width: 1px; height: 20px; margin-inline: 5px; background: var(--border-strong); flex: none; }
.cmd-space { flex: 1; }

.ex-main { flex: 1; min-height: 0; display: flex; }
.ex-tree { width: 215px; flex: none; overflow: auto; padding: 6px 4px; border-inline-end: 1px solid var(--border); }
.tn-row { display: flex; align-items: center; gap: 6px; height: 28px; padding-inline-end: 8px; border-radius: 4px; white-space: nowrap; }
.tn-row .ic { width: 16px; height: 16px; }
.tn-row:hover { background: var(--hover); }
.tn-row.cur { background: var(--sel); }
.tn-row.drop-target { background: var(--sel-hover); outline: 1px solid var(--sel-border); }
.tn-label { overflow: hidden; text-overflow: ellipsis; }
.tw { width: 16px; height: 16px; flex: none; display: grid; place-items: center; color: var(--text-2); border-radius: 3px; }
.tw .gl { width: 10px; height: 10px; transition: transform 0.12s; }
.tn.open > .tn-row .tw .gl { transform: rotate(90deg); }
[dir='rtl'] .tn.open > .tn-row .tw .gl { transform: rotate(-90deg); }

.ex-content { position: relative; flex: 1; min-width: 0; overflow: auto; background: var(--surface); outline: none; padding: 8px; }
.ex-content.drop-target { box-shadow: inset 0 0 0 2px var(--accent-fg); background: var(--sel); }
.ex-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 70px 20px; color: var(--text-2); text-align: center; pointer-events: none; }
.ex-empty .ic { width: 56px; height: 56px; opacity: 0.6; }
.ex-empty > .gl { width: 30px; height: 30px; }
.ex-empty.small { padding: 30px; }
.band { position: absolute; z-index: 3; background: var(--sel); border: 1px solid var(--sel-border); pointer-events: none; }

.items { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 2px; }
.it { border: 1px solid transparent; border-radius: 4px; }
.it:hover { background: var(--hover); }
.it.sel { background: var(--sel); border-color: var(--sel-border); }
.it.sel:hover { background: var(--sel-hover); }
.it.drop-target { background: var(--sel-hover); border-color: var(--accent-fg); }
.it.is-cut .it-ic { opacity: 0.45; }
.it-ic { display: grid; place-items: center; flex: none; }
.it-name { overflow-wrap: anywhere; }
.thumb-wrap { width: 100%; height: 100%; display: grid; place-items: center; }
.thumb { max-width: 100%; max-height: 100%; border-radius: 2px; box-shadow: 0 0 0 1px var(--border), 0 1px 4px rgba(0, 0, 0, 0.18); background: #fff; }

.it.tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px 5px; text-align: center; }
.tile .it-name { font-size: 12.5px; line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; max-width: 100%; }
.tile.sel .it-name { -webkit-line-clamp: 4; }
.v-xl .tile { width: 168px; } .v-xl .it-ic { width: 128px; height: 112px; } .v-xl .it-ic .ic { width: 104px; height: 104px; }
.v-large .tile { width: 112px; } .v-large .it-ic { width: 84px; height: 68px; } .v-large .it-ic .ic { width: 64px; height: 64px; }
.v-medium .tile { width: 88px; } .v-medium .it-ic { width: 60px; height: 46px; } .v-medium .it-ic .ic { width: 42px; height: 42px; }
.v-xl .it-ic .thumb-wrap, .v-large .it-ic .thumb-wrap, .v-medium .it-ic .thumb-wrap { width: 100%; height: 100%; }

.v-list { display: block; columns: 230px; column-gap: 8px; }
.v-list .tile { flex-direction: row; gap: 8px; padding: 3px 8px; text-align: start; break-inside: avoid; }
.v-list .it-ic, .v-list .it-ic .ic { width: 18px; height: 18px; }
.v-list .it-name { -webkit-line-clamp: 1; white-space: nowrap; text-overflow: ellipsis; display: block; }

.v-details { display: block; min-width: 520px; }
.row { display: grid; grid-template-columns: minmax(180px, 1fr) 160px 150px 96px; align-items: center; min-height: 30px; }
.row .col { padding-inline: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row .c-name { display: flex; align-items: center; gap: 8px; }
.row .it-ic, .row .it-ic .ic { width: 18px; height: 18px; }
.row .it-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .col:not(.c-name) { color: var(--text-2); font-size: 12.5px; }
.row .c-size { text-align: end; }
.row .c-location { direction: ltr; text-align: start; }
[dir='rtl'] .row .c-location { text-align: end; }
.row.head { position: sticky; top: -8px; z-index: 2; background: var(--surface); margin-top: -8px; padding-top: 4px; min-height: 30px; border-bottom: 1px solid var(--border); }
.row.head .col { display: flex; align-items: center; gap: 4px; height: 26px; color: var(--text-2); font-size: 12.5px; border-inline-end: 1px solid var(--border); }
.row.head .col:hover { background: var(--hover); color: var(--text); }
.row.head .sort-ind { width: 10px; height: 10px; }
.rename-input { min-height: 22px !important; padding: 1px 4px !important; font-size: 12.5px; border-radius: 2px !important; border: 1px solid var(--accent-fg) !important; box-shadow: none !important; text-align: inherit; }
.tile .rename-input { width: 100%; text-align: center; }
.v-list .rename-input, .row .rename-input { flex: 1; min-width: 60px; text-align: start; }
.drag-ghost { position: fixed; top: -200px; left: -200px; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-pop); font-size: 12.5px; max-width: 220px; white-space: nowrap; overflow: hidden; }
.drag-ghost .ic { width: 28px; height: 28px; }
.drag-ghost b { min-width: 20px; height: 20px; padding-inline: 6px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 11.5px; }

.pc-view { padding: 6px 8px; }
.pc-group { display: flex; align-items: center; gap: 8px; padding: 4px 0 10px; color: var(--text-2); font-size: 12.5px; }
.pc-group::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.pc-group .gl { width: 11px; height: 11px; }
.drives { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; }
.it.drive { display: flex; align-items: center; gap: 10px; padding: 9px 10px; }
.drive .it-ic, .drive .it-ic .ic { width: 50px; height: 50px; }
.drive-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.drive .it-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drive-bar { height: 14px; background: var(--hover); border: 1px solid var(--border-strong); overflow: hidden; }
.drive-bar i { display: block; height: 100%; background: var(--accent); transition: width 0.3s; }
.drive-bar.full i { background: #c42b1c; }
.drive-bar.open i { background: repeating-linear-gradient(-45deg, var(--sel-hover) 0 6px, transparent 6px 12px); }
.drive-bar.big { height: 18px; margin-top: 8px; }
.drive-usage { font-size: 12px; color: var(--text-2); }

.ex-status { display: flex; align-items: center; justify-content: space-between; height: 26px; flex: none; padding-inline: 12px 6px; font-size: 12px; color: var(--text-2); border-top: 1px solid var(--border); background: var(--bg); }
.ex-status-text { white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.ex-status-views { display: flex; gap: 2px; }

/* ───────────── لوحة الرفع ───────────── */
.uploads { position: fixed; z-index: 7500; bottom: calc(var(--taskbar-h) + 12px); inset-inline-end: 12px; width: min(380px, calc(100vw - 24px)); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-win); overflow: hidden; animation: toast-in 0.2s ease-out; }
.up-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 8px 14px; }
[dir='rtl'] .up-head { padding: 10px 14px 8px 10px; }
.up-head > .gl { width: 20px; height: 20px; color: var(--accent-fg); }
.up-heading { flex: 1; min-width: 0; }
.up-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-sub { font-size: 12px; color: var(--text-2); }
.up-total { height: 4px; background: var(--hover); }
.up-total i { display: block; height: 100%; background: var(--accent); transition: width 0.2s; }
.uploads.done .up-total i { background: var(--ok); }
.uploads.failed .up-total i { background: var(--danger); }
.up-list { max-height: 240px; overflow: auto; padding: 4px 6px 6px; }
.uploads.collapsed .up-list { display: none; }
.uploads.collapsed .up-head .icon-btn:first-of-type .gl { transform: rotate(180deg); }
.up-row { display: flex; align-items: center; gap: 9px; padding: 5px 6px; border-radius: 5px; }
.up-row .ic { width: 26px; height: 26px; }
.up-info { flex: 1; min-width: 0; }
.up-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.up-bar { height: 3px; margin-top: 4px; border-radius: 3px; background: var(--hover); overflow: hidden; }
.up-bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.up-stat { font-size: 11.5px; color: var(--text-2); max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-row[data-status='done'] .up-bar i { background: var(--ok); }
.up-row[data-status='error'] .up-stat { color: var(--danger); }
.up-row[data-status='error'] .up-bar i { background: var(--danger); width: 100% !important; }
.up-row[data-status='canceled'] { opacity: 0.55; }

/* ───────────── العارض والخصائص ───────────── */
.vw { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.vw-bar { display: flex; align-items: center; gap: 4px; padding: 4px 8px; background: var(--surface-2); border-bottom: 1px solid var(--border); flex: none; min-height: 41px; }
.vw-counter { font-size: 12px; color: var(--text-2); padding-inline: 8px; }
.vw-stage { flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.vw-stage.dark { background: #161616; }
.vw-stage.audio { gap: 14px; align-content: center; padding: 16px; }
.vw-stage.audio .ic { width: 72px; height: 72px; }
.vw-img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform 0.12s; }
.vw-video { width: 100%; height: 100%; background: #000; }
.vw-audio { width: min(440px, 100%); }
.vw-frame { flex: 1; border: 0; width: 100%; background: #fff; }
.vw-text { flex: 1; resize: none; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; padding: 14px 16px !important; font: 13.5px/1.7 ui-monospace, 'Cascadia Mono', Consolas, 'SF Mono', monospace; background: var(--surface); }

.props { flex: 1; overflow: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 9px; }
.prop-head { display: flex; align-items: center; gap: 12px; }
.prop-head .ic { width: 42px; height: 42px; }
.prop-name { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; user-select: text; }
.prop-sep { height: 1px; background: var(--border); margin-block: 3px; }
.prop-row { display: flex; gap: 12px; }
.prop-label { width: 120px; flex: none; color: var(--text-2); }
.prop-value { flex: 1; min-width: 0; overflow-wrap: anywhere; user-select: text; }
.prop-foot { margin-top: auto; padding-top: 12px; display: flex; justify-content: flex-end; }
.prop-foot .btn { min-width: 90px; }
.copy-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; background: var(--hover); }
.copy-row code { flex: 1; min-width: 0; overflow-wrap: anywhere; user-select: all; font: 12.5px ui-monospace, Consolas, monospace; }

/* ───────────── الإعدادات والمستخدمون ───────────── */
.st { flex: 1; min-height: 0; display: flex; background: var(--bg); }
.st-nav { width: 220px; flex: none; padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; overflow: auto; }
.st-nav.wide { width: 262px; gap: 8px; }
.st-nav-item { position: relative; display: flex; align-items: center; gap: 12px; height: 36px; padding-inline: 12px; border: 0; border-radius: 5px; background: none; text-align: start; }
.st-nav-item:hover { background: var(--hover); }
.st-nav-item.on { background: var(--hover); }
.st-nav-item.on::before { content: ''; position: absolute; inset-inline-start: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--accent-fg); }
.st-main { flex: 1; min-width: 0; overflow: auto; }
.st-panel { max-width: 940px; padding: 18px 26px 30px; display: flex; flex-direction: column; gap: 12px; }
.st-panel h2, .pf-page h1 { font-size: 24px; font-weight: 600; }
.st-panel h3, .pf-page h3 { font-size: 14px; font-weight: 600; margin-top: 10px; display: flex; align-items: center; gap: 10px; }
.st-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.st-loading { display: grid; place-items: center; padding: 60px; }
.st-actions { display: flex; gap: 8px; position: sticky; bottom: 0; padding-block: 10px; background: linear-gradient(transparent, var(--bg) 30%); }
.st-actions .btn { min-width: 130px; }
.about { display: flex; align-items: center; gap: 16px; }
.about .ic { width: 52px; height: 52px; }
.us-list { display: flex; flex-direction: column; gap: 2px; }
.us-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 0; border-radius: 6px; background: none; text-align: start; min-width: 0; }
.us-item:hover { background: var(--hover); }
.us-item.on { background: var(--sel); }
.us-item.off .avatar { background: var(--text-2); }
.us-item-text { flex: 1; min-width: 0; }
.us-item-text b, .us-item-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ───────────── لوحة المنصة ───────────── */
.pf { height: 100%; display: flex; flex-direction: column; background: var(--bg); }
.pf-top { display: flex; align-items: center; gap: 8px; height: 56px; flex: none; padding-inline: 18px; background: var(--surface); border-bottom: 1px solid var(--border); }
.pf-brand { display: flex; align-items: center; gap: 12px; }
.pf-brand .ic { width: 34px; height: 34px; }
.pf-brand b { font-size: 16px; display: block; line-height: 1.2; }
.pf-user { display: flex; align-items: center; gap: 8px; padding-inline: 8px; }
.pf-body { flex: 1; min-height: 0; display: flex; }
.pf-side { width: 230px; flex: none; display: flex; flex-direction: column; border-inline-end: 1px solid var(--border); }
.pf-nav { flex: 1; padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; overflow: auto; }
.pf-nav-item { position: relative; display: flex; align-items: center; gap: 12px; height: 38px; padding-inline: 14px; border: 0; border-radius: 6px; background: none; text-align: start; }
.pf-nav-item:hover { background: var(--hover); }
.pf-nav-item.on { background: var(--sel); color: var(--accent-fg); font-weight: 600; }
.pf-main { flex: 1; min-width: 0; overflow: auto; }
.pf-page { max-width: 1180px; margin-inline: auto; padding: 24px 28px 40px; display: flex; flex-direction: column; gap: 14px; }
.pf-page.narrow { max-width: 780px; }
.pf-page.narrow .st-panel { padding: 0; max-width: none; }
.pf-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.pf-head p { margin-top: 4px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.stat-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--sel); color: var(--accent-fg); flex: none; }
.stat-ic .gl { width: 20px; height: 20px; }
.stat b { font-size: 20px; display: block; line-height: 1.25; }
.pf-tools { display: flex; gap: 10px; }
.co-link { display: block; color: var(--accent-fg); font-size: 12px; text-decoration: none; text-align: start; }
[dir='rtl'] .co-link { text-align: end; }
.co-link:hover { text-decoration: underline; }
.usage { display: flex; flex-direction: column; gap: 3px; min-width: 130px; }
.usage .drive-bar { height: 6px; border: 0; border-radius: 6px; }
.table.companies td { white-space: nowrap; }

/* ───────────── توقيع النظام ───────────── */
.made-by { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px; font-size: 12px; color: var(--text-2); }
.made-by b { font-weight: 600; color: var(--text); }
.made-by a { color: var(--accent-fg); font-weight: 600; text-decoration: none; }
.made-by a:hover { text-decoration: underline; }
.made-by .heart { color: #e5484d; }
.made-by.on-wallpaper { color: rgba(255, 255, 255, 0.86); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55); }
.made-by.on-wallpaper b, .made-by.on-wallpaper a { color: #fff; }
.auth > .made-by { position: absolute; inset-inline: 0; bottom: 16px; }
.desk-brand { position: absolute; bottom: calc(var(--taskbar-h) + 10px); inset-inline-end: 16px; pointer-events: none; }
.desk-brand a { pointer-events: auto; }
.made-by.in-menu { padding: 8px 14px 10px; font-size: 11.5px; }
.made-by.in-side { padding: 14px 10px; border-top: 1px solid var(--border); }
.made-by.inline { justify-content: flex-start; margin-top: 6px; }

/* ───────────── مصغرات الفيديو ومعاينة المستندات ───────────── */
.thumb-wrap.video { position: relative; }
.thumb-wrap.video video { display: none; object-fit: cover; }
.thumb-wrap.video.ready video { display: block; }
.thumb-wrap.video.ready > .ic { display: none; }
.play-badge { position: absolute; inset: 0; margin: auto; width: 26px; height: 26px; border-radius: 50%; display: none; place-items: center; background: rgba(0, 0, 0, 0.55); color: #fff; }
.play-badge .gl { width: 13px; height: 13px; }
.thumb-wrap.video.ready .play-badge { display: grid; }
.v-medium .play-badge { width: 18px; height: 18px; }
.v-medium .play-badge .gl { width: 9px; height: 9px; }

.vw-tools { display: flex; align-items: center; gap: 4px; }
.vw-stage.scroll { display: block; overflow: auto; background: var(--bg); }
.vw-stage.scroll > .spinner { position: absolute; inset: 0; margin: auto; }
.vw-stage { position: relative; }
.vw-docx { min-height: 100%; }
.vw-docx .docx-wrapper { background: var(--bg) !important; padding: 20px !important; }
.vw-docx .docx-wrapper > section.docx { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18) !important; margin-bottom: 18px !important; color: #000; }
.vw-stage.sheet { display: flex; flex-direction: column; align-items: stretch; overflow: hidden; background: var(--surface); }
.vw-sheet { flex: 1; overflow: auto; }
.vw-sheet table { border-collapse: collapse; font-size: 12.5px; }
.vw-sheet th, .vw-sheet td { border: 1px solid var(--border); padding: 3px 8px; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; user-select: text; }
.vw-sheet th { background: var(--surface-2); color: var(--text-2); font-weight: 500; text-align: center; position: sticky; top: 0; z-index: 1; min-width: 40px; }
.vw-sheet tbody th { position: sticky; left: 0; top: auto; z-index: 0; }
.vw-sheet thead th:first-child { left: 0; z-index: 2; }
.vw-tabs { display: flex; gap: 2px; padding: 4px 8px; border-top: 1px solid var(--border); background: var(--surface-2); overflow-x: auto; flex: none; }
.vw-tab { border: 0; background: none; padding: 4px 14px; border-radius: 4px; white-space: nowrap; }
.vw-tab:hover { background: var(--hover); }
.vw-tab.on { background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); color: var(--accent-fg); font-weight: 600; }
.vw-slides { max-width: 880px; margin: 0 auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.slide { position: relative; aspect-ratio: 16 / 9; background: #fff; color: #1b1b1b; border-radius: 6px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18); overflow: auto; padding: 34px 44px; }
.slide-num { position: absolute; top: 10px; inset-inline-end: 14px; font-size: 12px; color: #8a8a8a; }
.slide h4 { margin: 0 0 14px; font-size: 24px; font-weight: 600; line-height: 1.3; }
.slide ul { margin: 0; padding-inline-start: 22px; font-size: 15px; line-height: 1.8; }
.slide-imgs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.slide-imgs img { max-height: 190px; max-width: 48%; border-radius: 4px; }
.vw-zip { background: var(--surface); min-height: 100%; }
.vw-zip .row-main > .ic { width: 22px; height: 22px; }

.vw-office { flex: 1; min-height: 0; background: var(--bg); }
.vw-office iframe { display: block; border: 0; }
.code-line { display: block; width: 100%; padding: 6px 8px; border-radius: 4px; background: var(--hover); font: 12px ui-monospace, Consolas, monospace; overflow-wrap: anywhere; user-select: all; }

/* ───────────── صلاحيات المجلدات ───────────── */
.table.perms th.center { font-size: 11.5px; padding-inline: 6px; }
.table.perms td.center { padding-inline: 6px; }
.table.perms select { min-height: 28px; padding: 2px 6px; font-size: 12.5px; min-width: 104px; }
.fp-table { max-height: 46vh; }
.block { display: block; }

/* ───────────── الشاشات الصغيرة ───────────── */
@media (max-width: 760px) {
  .win { inset: 0 !important; width: auto !important; height: auto !important; border-radius: 0; }
  .rz { display: none; }
  .ex-tree { display: none; }
  .ex-search { width: 120px; }
  .cmd.with-text span:not(.gl) { display: none; }
  .st, .pf-body { flex-direction: column; }
  .st-nav, .st-nav.wide, .pf-nav { width: auto; flex-direction: row; overflow-x: auto; padding: 6px 8px; border-inline-end: 0; border-bottom: 1px solid var(--border); flex: none; }
  .pf-side { width: auto; border-inline-end: 0; }
  .pf-side .made-by { display: none; }
  .st-nav-item, .pf-nav-item { flex: none; }
  .st-nav.wide { flex-direction: column; max-height: 190px; }
  .st-panel { padding: 14px; }
  .pf-page { padding: 16px 14px 30px; }
  .form-2 { grid-template-columns: 1fr; }
  .task-app span:last-child { display: none; }
  .pf-user span:last-child, .pf-brand small { display: none; }
  .desk-icon { width: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
