.noor-tools-panel {
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid rgba(16,17,19,.1);
  border-radius: 22px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 16px 48px rgba(16,17,19,.07);
}
.noor-tools-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.noor-tools-head b { font-size:14px; }
.noor-tools-head span { color:var(--muted); font-size:10px; }
.noor-tools-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.noor-tool-entry {
  position:relative; min-width:0; min-height:92px; display:flex; flex-direction:column; align-items:flex-start; justify-content:space-between;
  gap:10px; padding:14px; border:1px solid var(--line); border-radius:18px; background:#fff; color:var(--ink); text-align:start;
}
.noor-tool-entry:hover { border-color:rgba(219,0,17,.24); transform:translateY(-1px); }
.noor-tool-entry i { width:32px; height:32px; display:grid; place-items:center; border-radius:11px; color:#fff; background:linear-gradient(145deg,#2b1014,#e00018); font-style:normal; font-weight:800; }
.noor-tool-entry strong { display:block; font-size:14px; }
.noor-tool-entry small { display:block; margin-top:3px; color:var(--muted); font-size:9.5px; line-height:1.45; }
.noor-tool-entry[data-tool="lens"] i { background:linear-gradient(145deg,#111317,#4d5360); }
.noor-tool-entry[data-tool="documents"] i { background:linear-gradient(145deg,#3b2510,#a8844e); }
.noor-tool-badge { min-width:20px; height:20px; display:none; place-items:center; position:absolute; top:8px; inset-inline-start:38px; z-index:2; margin:0; padding:0 6px; border-radius:999px; color:#fff; background:#db0011; font-size:9px; font-weight:800; pointer-events:none; }
.noor-tool-badge.show { display:grid; }

.noor-tool-modal {
  z-index:92;
  background:rgba(16,17,19,.58);
  -webkit-backdrop-filter:none !important;
  backdrop-filter:none !important;
  contain:layout style paint;
}
.noor-tool-modal.show { animation:none !important; }
.noor-tool-modal .modal {
  width:min(760px,100%); max-height:min(860px,calc(100dvh - 30px)); padding:0; overflow:hidden; background:#f7f7f5;
  animation:none; transform:none; will-change:auto; contain:content;
}
html.noor-tool-modal-open,body.noor-tool-modal-open { overflow:hidden !important; overscroll-behavior:none; }
.noor-lens-screen[hidden] { display:none !important; }
.noor-lens-screen {
  position:fixed; inset:0; z-index:104; display:grid; place-items:center; padding:18px;
  overflow:hidden; background:rgba(16,17,19,.64); opacity:0; transition:opacity .12s linear;
  contain:layout style paint; isolation:isolate;
}
.noor-lens-screen.is-open { opacity:1; }
html.noor-lens-open,body.noor-lens-open { overflow:hidden !important; overscroll-behavior:none; }
.noor-lens-surface {
  width:min(820px,100%); max-height:calc(100dvh - 36px); display:flex; flex-direction:column;
  overflow:hidden; border:1px solid rgba(255,255,255,.52); border-radius:26px; background:#f7f7f5;
  box-shadow:0 24px 72px rgba(0,0,0,.26); contain:content;
}
.noor-lens-header {
  flex:0 0 auto; display:flex; align-items:flex-start; justify-content:space-between; gap:16px;
  padding:22px 22px 16px; border-bottom:1px solid rgba(16,17,19,.1); background:#fff;
}
.noor-lens-header h3 { margin:0 0 5px; color:#101113; font-size:23px; line-height:1.15; }
.noor-lens-header p { margin:0; color:#6f747d; font-size:11px; line-height:1.55; }
.noor-lens-close {
  width:42px; height:42px; flex:0 0 auto; display:grid; place-items:center; padding:0;
  border:1px solid rgba(16,17,19,.12); border-radius:14px; color:#6f747d; background:#fff;
  font:400 26px/1 system-ui,sans-serif;
}
.noor-lens-body { flex:1 1 auto; min-height:0; overflow:auto; overscroll-behavior:auto; -webkit-overflow-scrolling:touch; padding:18px 22px 28px; }
.noor-lens-action,.noor-lens-copy {
  min-height:42px; padding:10px 15px; border:1px solid #db0011; border-radius:13px;
  color:#fff; background:linear-gradient(120deg,#351015,#db0011); font:750 11px/1.2 system-ui,sans-serif;
}
.noor-lens-copy { min-height:34px; padding:7px 11px; color:#9d0010; background:#fff; }
.noor-lens-result-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.noor-lens-result-head h4 { margin:0; }
.noor-tool-shell { min-height:420px; max-height:min(860px,calc(100dvh - 30px)); display:flex; flex-direction:column; }
.noor-tool-header { position:relative; z-index:4; flex:0 0 auto; display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:22px 22px 16px; border-bottom:1px solid var(--line); background:#fff; }
.noor-tool-header h3 { margin:0 0 5px; font-size:23px; }
.noor-tool-header p { margin:0; color:var(--muted); font-size:11px; line-height:1.55; }
.noor-tool-body { position:relative; z-index:1; flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:auto; -webkit-overflow-scrolling:touch; padding:14px 22px 28px; }
.noor-tool-tabs { position:sticky; top:0; z-index:5; display:flex; gap:6px; min-height:48px; margin:0 0 16px; padding:4px; border:1px solid var(--line); border-radius:14px; background:#fff; box-shadow:0 8px 20px rgba(16,17,19,.06); }
.noor-tool-tabs button { flex:1; min-width:0; min-height:38px; padding:9px 10px; border:0; border-radius:10px; color:#626873; background:transparent; font-size:13px; font-weight:800; line-height:1.2; opacity:1; visibility:visible; }
.noor-tool-tabs button.active { color:#fff; background:linear-gradient(120deg,#351015,#db0011); }
.noor-task-list,.noor-document-list,.noor-notification-list { display:grid; gap:10px; }
.noor-task-card,.noor-document-card,.noor-notification-card { width:100%; display:flex; align-items:flex-start; justify-content:space-between; gap:14px; padding:15px; border:1px solid var(--line); border-radius:17px; background:#fff; text-align:start; }
.noor-task-card button,.noor-document-card button { flex:0 0 auto; }
.noor-task-card b,.noor-document-card b,.noor-notification-card b { display:block; font-size:12px; }
.noor-task-card p,.noor-document-card p,.noor-notification-card p { margin:5px 0 0; color:var(--muted); font-size:10px; line-height:1.55; }
.noor-task-card time,.noor-document-card time,.noor-notification-card time { display:block; margin-top:6px; color:#969ba3; font-size:9px; }
.noor-task-dot { width:9px; height:9px; flex:0 0 auto; margin-top:5px; border-radius:50%; background:#db0011; box-shadow:0 0 0 5px rgba(219,0,17,.08); }
.noor-notification-card.read { opacity:.68; }
.noor-empty { padding:44px 18px; border:1px dashed rgba(16,17,19,.15); border-radius:18px; color:var(--muted); background:rgba(255,255,255,.55); text-align:center; font-size:11px; line-height:1.7; }
.noor-tool-actions { display:flex; justify-content:flex-end; gap:8px; margin-bottom:14px; }
.noor-tool-actions .btn { min-height:38px; }

.noor-lens-intro { padding:16px; border-radius:18px; color:#fff; background:linear-gradient(135deg,#15171b,#64101a 62%,#db0011); }
.noor-lens-intro b { display:block; font-size:14px; }
.noor-lens-intro p { margin:6px 0 0; color:rgba(255,255,255,.76); font-size:10px; line-height:1.6; }
.noor-lens-grid { display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); gap:14px; margin-top:14px; }
.noor-lens-input,.noor-lens-output { min-width:0; padding:15px; border:1px solid var(--line); border-radius:18px; background:#fff; }
.noor-lens-upload { min-height:150px; display:grid; place-items:center; padding:16px; border:1px dashed rgba(219,0,17,.28); border-radius:15px; color:var(--muted); background:#fff8f8; text-align:center; cursor:pointer; overflow:hidden; }
.noor-lens-upload img { width:100%; max-height:220px; object-fit:contain; border-radius:10px; }
.noor-lens-upload input { position:absolute; opacity:0; pointer-events:none; }
.noor-lens-input textarea { width:100%; min-height:104px; margin-top:10px; padding:13px; resize:vertical; border:1px solid var(--line); border-radius:14px; outline:none; background:#fff; font-size:16px; line-height:1.55; }
.noor-lens-input textarea:focus { border-color:rgba(219,0,17,.45); box-shadow:0 0 0 4px rgba(219,0,17,.07); }
.noor-lens-submit { width:100%; margin-top:10px; }
.noor-lens-output h4 { margin:0 0 10px; }
.noor-lens-section { margin-top:12px; padding-top:12px; border-top:1px solid var(--line); }
.noor-lens-section:first-of-type { border-top:0; padding-top:0; }
.noor-lens-section span { display:block; margin-bottom:5px; color:var(--muted); font-size:9px; font-weight:750; text-transform:uppercase; letter-spacing:.08em; }
.noor-lens-section p { margin:0; white-space:pre-wrap; font-size:11px; line-height:1.7; }
.noor-lens-field { display:grid; grid-template-columns:minmax(80px,.36fr) 1fr; gap:10px; padding:8px 0; border-bottom:1px solid rgba(16,17,19,.07); font-size:10px; }
.noor-lens-field b { color:var(--muted); }
.noor-lens-warning { margin-top:12px; padding:11px; border-radius:12px; color:#744d05; background:#fff4d8; font-size:9.5px; line-height:1.6; }

.noor-doc-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-bottom:14px; }
.noor-doc-summary div { padding:12px; border:1px solid var(--line); border-radius:15px; background:#fff; }
.noor-doc-summary b { display:block; font-size:17px; }
.noor-doc-summary span { color:var(--muted); font-size:9px; }
.noor-document-card.expired { border-color:rgba(219,0,17,.35); }
.noor-document-card.soon { border-color:rgba(168,132,78,.42); }
.noor-document-card .noor-doc-meta { flex:1; min-width:0; }
.noor-doc-form { display:grid; gap:12px; }
.noor-doc-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
.noor-doc-field label { display:block; margin:0 0 6px; color:var(--muted); font-size:10px; font-weight:700; }
.noor-doc-field input,.noor-doc-field select,.noor-doc-field textarea { width:100%; min-height:48px; padding:11px 12px; border:1px solid var(--line); border-radius:13px; outline:none; background:#fff; font-size:16px; }
.noor-doc-field textarea { min-height:96px; resize:vertical; line-height:1.5; }
.noor-doc-field input:focus,.noor-doc-field select:focus,.noor-doc-field textarea:focus { border-color:rgba(219,0,17,.42); box-shadow:0 0 0 4px rgba(219,0,17,.06); }
.noor-form-note { padding:11px 13px; border-radius:13px; color:var(--muted); background:#ececea; font-size:9.5px; line-height:1.6; }

@media (max-width:680px) {
  .noor-tools-panel { margin:0 0 14px; padding:11px; border-radius:19px; }
  .noor-tools-grid { gap:6px; }
  .noor-tool-entry { min-height:82px; padding:11px; border-radius:15px; }
  .noor-tool-entry i { width:28px; height:28px; border-radius:9px; }
  .noor-tool-badge { top:6px; inset-inline-start:32px; }
  .noor-tool-entry strong { font-size:12px; }
  .noor-tool-entry small { font-size:8.5px; }
  .noor-tool-modal { --noor-tool-top-inset:max(8px,env(safe-area-inset-top)); padding:var(--noor-tool-top-inset) 0 0; align-items:end; }
  html[data-native-platform="ios"] .noor-tool-modal { --noor-tool-top-inset:max(56px,calc(var(--native-shell-top-inset,0px) + 8px)); }
  .noor-tool-modal .modal { width:100%; max-height:calc(100dvh - var(--noor-tool-top-inset)); border-radius:24px 24px 0 0; }
  .noor-tool-shell { max-height:calc(100dvh - var(--noor-tool-top-inset)); }
  .noor-tool-header { padding:18px 16px 13px; }
  .noor-tool-header h3 { font-size:20px; }
  .noor-tool-body { padding:12px 14px calc(24px + env(safe-area-inset-bottom)); }
  .noor-lens-grid { grid-template-columns:1fr; }
  .noor-lens-screen { place-items:end stretch; padding:max(8px,env(safe-area-inset-top)) 0 0; }
  .noor-lens-surface { width:100%; max-height:calc(100dvh - max(8px,env(safe-area-inset-top))); border-radius:24px 24px 0 0; }
  .noor-lens-header { padding:18px 16px 13px; }
  .noor-lens-header h3 { font-size:20px; }
  .noor-lens-body { padding:14px 14px calc(24px + env(safe-area-inset-bottom)); }
  .noor-doc-form-grid { grid-template-columns:1fr; }
}

html[dir="rtl"] .noor-tool-entry,html[dir="rtl"] .noor-task-card,html[dir="rtl"] .noor-document-card,html[dir="rtl"] .noor-notification-card { text-align:right; }
