/* =========================================================
   demos.css — Styles specific to interactive demos
   Loaded via BaseLayout when needed (or globally here)
   ========================================================= */

/* ===== Task App ===== */
.task-app { width: 100%; }

.task-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }

.task-stat {
    background: white; padding: 12px 10px; border: 1px solid var(--border);
    border-radius: 10px; text-align: center;
    transition: border-color 0.2s var(--ease);
}
.task-stat.active    { border-color: rgba(99, 102, 241, 0.4); }
.task-stat.completed { border-color: rgba(34, 197, 94, 0.4); }

.task-stat-label { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; letter-spacing: 0.02em; }

.task-stat-value {
    display: block; font-size: 22px; font-weight: 800; color: var(--text);
    font-family: var(--font-sans); font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em; line-height: 1;
}

.task-add-form { display: flex; gap: 8px; margin-bottom: 14px; }

.task-add-form input {
    flex: 1; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px;
    font-size: 14px; font-family: var(--font-sans); background: white; color: var(--text);
    outline: none; transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.task-add-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15); }

.task-add-form button {
    width: 42px; height: 42px; background: var(--bg-dark); color: white;
    border: none; border-radius: 10px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 14px;
    transition: transform 0.2s var(--ease), background 0.2s var(--ease); flex-shrink: 0;
}
.task-add-form button:hover { transform: scale(1.05); }
.task-add-form button:active { transform: scale(0.95); }

.task-filters { display: flex; gap: 6px; margin-bottom: 14px; padding: 4px; background: var(--bg-alt); border-radius: 10px; }

.task-filter {
    flex: 1; padding: 7px 10px; background: transparent; border: none;
    border-radius: 7px; font-size: 12.5px; font-weight: 600;
    color: var(--text-muted); cursor: pointer; font-family: var(--font-sans);
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.task-filter.active { background: white; color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06); }

.task-list { list-style: none; display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; padding-left: 4px; }

.task-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    background: white; border: 1px solid var(--border); border-radius: 10px;
    transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
    animation: taskSlideIn 0.3s var(--ease-out);
}

@keyframes taskSlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.task-item:hover { border-color: var(--border-strong); }
.task-item.completed .task-text { text-decoration: line-through; color: var(--text-subtle); }

.task-checkbox { position: relative; width: 20px; height: 20px; cursor: pointer; flex-shrink: 0; }

.task-checkbox input {
    position: absolute; opacity: 0; width: 100%; height: 100%;
    cursor: pointer; z-index: 2;
}

.task-checkbox-custom {
    position: absolute; inset: 0; border: 1.5px solid var(--border-strong);
    border-radius: 6px; background: white;
    transition: all 0.2s var(--ease);
}

.task-checkbox input:checked + .task-checkbox-custom { background: var(--accent); border-color: var(--accent); }

.task-checkbox input:checked + .task-checkbox-custom::after {
    content: ''; position: absolute; left: 5px; top: 1px;
    width: 5px; height: 10px; border: solid white;
    border-width: 0 2px 2px 0; transform: rotate(45deg);
}

.task-text { flex: 1; font-size: 14px; color: var(--text); line-height: 1.4; }

.task-delete {
    background: none; border: none; color: var(--text-subtle);
    cursor: pointer; padding: 6px; border-radius: 6px;
    transition: color 0.2s var(--ease), background 0.2s var(--ease); font-size: 13px;
}
.task-delete:hover { color: #ef4444; background: rgba(239, 68, 68, 0.08); }

.task-empty { text-align: center; padding: 40px 16px; color: var(--text-muted); }
.task-empty i { font-size: 32px; margin-bottom: 10px; opacity: 0.4; }
.task-empty p { font-size: 13px; }

/* ===== Base Demo Frame ===== */
.demo-frame {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 400px;
}

/* ===== Shop ===== */
.shop-frame { padding: 24px; }

.shop-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }

.shop-search {
    flex: 1; min-width: 180px; padding: 10px 14px; border: 1px solid var(--border);
    border-radius: 10px; font-family: var(--font-sans); font-size: 14px;
    background: white; outline: none; transition: border-color 0.2s var(--ease);
}
.shop-search:focus { border-color: var(--accent); }

.shop-cart {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px;
    background: var(--bg-dark); color: white; border-radius: 10px;
    font-family: var(--font-sans); font-size: 14px; font-weight: 600;
    cursor: pointer; position: relative; transition: transform 0.2s var(--ease);
}
.shop-cart:hover { transform: scale(1.03); }

.shop-cart-badge {
    background: #ec4899; color: white; font-size: 11px; font-weight: 700;
    padding: 2px 7px; border-radius: 999px; min-width: 20px; text-align: center;
}

.shop-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }

.shop-product {
    background: white; border: 1px solid var(--border); border-radius: 12px;
    padding: 14px; transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
    text-align: center;
}
.shop-product:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.shop-product-emoji { font-size: 36px; margin-bottom: 8px; display: block; }
.shop-product-name { font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.shop-product-price { font-size: 14px; color: var(--accent); font-weight: 700; margin-bottom: 10px; font-family: var(--font-sans); font-variant-numeric: tabular-nums; }

.shop-add-btn {
    width: 100%; padding: 7px 10px; background: var(--bg-dark); color: white;
    border: none; border-radius: 8px; font-size: 12px; font-weight: 600;
    cursor: pointer; font-family: var(--font-sans); transition: background 0.2s var(--ease);
}
.shop-add-btn:hover { background: var(--accent); }

.shop-cart-panel { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.shop-cart-panel h4 { font-family: var(--font-ar); font-size: 16px; font-weight: 700; margin-bottom: 12px; color: var(--text); display: flex; justify-content: space-between; align-items: center; }

.shop-cart-empty { text-align: center; padding: 20px; color: var(--text-muted); font-size: 13px; }

.shop-cart-items { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }

.shop-cart-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px;
    background: var(--bg-alt); border-radius: 8px; font-size: 13.5px;
}
.shop-cart-item-emoji { font-size: 22px; }
.shop-cart-item-name { flex: 1; }

.shop-cart-item-qty { display: inline-flex; align-items: center; gap: 6px; }
.shop-cart-item-qty button {
    width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--border);
    background: white; cursor: pointer; font-size: 11px;
    display: flex; align-items: center; justify-content: center; color: var(--text);
}
.shop-cart-item-qty span { font-family: var(--font-sans); font-weight: 700; color: var(--text); min-width: 16px; text-align: center; }

.shop-cart-item-price { font-family: var(--font-sans); font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; min-width: 50px; text-align: left; }

.shop-cart-total {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 12px; border-top: 1px dashed var(--border);
    font-size: 14px; font-weight: 700; color: var(--text);
}
.shop-cart-total-value { font-family: var(--font-sans); color: var(--accent); font-size: 18px; font-variant-numeric: tabular-nums; }

/* ===== Booking ===== */
.booking-frame { padding: 24px; }

.booking-app { display: flex; flex-direction: column; gap: 20px; }

.booking-header { display: flex; justify-content: space-between; align-items: center; }
.booking-month { font-family: var(--font-ar); font-size: 20px; font-weight: 800; color: var(--text); }

.booking-nav { display: flex; gap: 6px; }
.booking-nav button {
    width: 36px; height: 36px; border: 1px solid var(--border);
    background: white; border-radius: 10px; cursor: pointer;
    color: var(--text); font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.booking-nav button:hover { background: var(--bg-alt); border-color: var(--border-strong); }

.booking-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.booking-weekday { text-align: center; font-size: 11px; font-weight: 700; color: var(--text-muted); font-family: var(--font-sans); padding: 4px; letter-spacing: 0.04em; }

.booking-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }

.booking-day {
    aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
    background: white; border: 1px solid var(--border); border-radius: 10px;
    font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer;
    font-family: var(--font-sans); font-variant-numeric: tabular-nums;
    transition: all 0.2s var(--ease);
}
.booking-day:hover:not(.disabled) { border-color: var(--accent); transform: scale(1.04); }
.booking-day.disabled { color: var(--text-subtle); cursor: not-allowed; opacity: 0.4; background: transparent; border-color: transparent; }
.booking-day.today { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.booking-day.selected { background: var(--accent); border-color: var(--accent); color: white; }

.booking-slots { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.booking-slots h4 { font-family: var(--font-ar); font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }

.booking-slots-empty { text-align: center; color: var(--text-muted); font-size: 13px; padding: 16px; }

.booking-slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }

.booking-slot {
    padding: 10px; border: 1px solid var(--border); background: white;
    border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text);
    cursor: pointer; font-family: var(--font-sans); text-align: center;
    transition: all 0.2s var(--ease);
}
.booking-slot:hover:not(.booked) { border-color: var(--accent); background: var(--accent-soft); }
.booking-slot.selected { background: var(--accent); border-color: var(--accent); color: white; }
.booking-slot.booked { background: var(--bg-alt); color: var(--text-subtle); cursor: not-allowed; text-decoration: line-through; opacity: 0.6; }

.booking-confirm { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

.booking-info { font-size: 13.5px; color: var(--text-muted); }
.booking-info strong { color: var(--text); font-weight: 700; }

.booking-confirm-btn {
    padding: 9px 18px; background: var(--bg-dark); color: white;
    border: none; border-radius: 8px; font-size: 13px; font-weight: 600;
    cursor: pointer; font-family: var(--font-sans);
    transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.booking-confirm-btn:hover { background: var(--accent); transform: translateY(-1px); }

.booking-success {
    background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.3);
    color: #16a34a; padding: 14px; border-radius: 10px;
    text-align: center; font-size: 14px; font-weight: 600; margin-top: 10px;
}

/* ===== Dashboard ===== */
.dashboard-frame { padding: 0; overflow: hidden; }

.dashboard-app {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 680px;
    background: #fafafa;
    border-radius: 16px;
    overflow: hidden;
    direction: rtl;
}

/* ----- Sidebar ----- */
.dashboard-sidebar {
    background: white;
    border-left: 1px solid var(--border);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dashboard-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 20px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.dashboard-sidebar-logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.dashboard-sidebar-logo-text {
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 15px;
    color: var(--text);
    line-height: 1.2;
}

.dashboard-sidebar-logo-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.dashboard-sidebar-section {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 12px 12px 4px;
    font-family: var(--font-sans);
}

.dashboard-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dashboard-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.2s var(--ease);
    font-family: var(--font-sans);
}

.dashboard-nav-item:hover {
    background: var(--bg-alt);
    color: var(--text);
}

.dashboard-nav-item.active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.dashboard-nav-item i {
    width: 16px;
    text-align: center;
    font-size: 13px;
}

.dashboard-nav-item span { flex: 1; }

.dashboard-nav-badge {
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
    min-width: 18px;
    text-align: center;
}

.dashboard-sidebar-footer {
    margin-top: auto;
    padding-top: 12px;
}

.dashboard-upgrade-card {
    background: linear-gradient(135deg, #0a0a0a, #1c1c2e);
    border-radius: 12px;
    padding: 16px;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.dashboard-upgrade-card::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.4), transparent);
}

.dashboard-upgrade-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.dashboard-upgrade-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dashboard-upgrade-text strong {
    font-size: 13px;
    font-weight: 700;
}

.dashboard-upgrade-text span {
    font-size: 11px;
    opacity: 0.7;
}

.dashboard-upgrade-btn {
    background: white;
    color: var(--text);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s var(--ease);
}

.dashboard-upgrade-btn:hover {
    transform: translateX(2px);
}

/* ----- Main content ----- */
.dashboard-main {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dashboard-topbar {
    height: 64px;
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    gap: 16px;
    flex-shrink: 0;
}

.dashboard-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-alt);
    border-radius: 8px;
    padding: 8px 12px;
    flex: 1;
    max-width: 360px;
}

.dashboard-search i {
    color: var(--text-muted);
    font-size: 13px;
}

.dashboard-search input {
    border: none;
    background: none;
    outline: none;
    font-size: 13px;
    color: var(--text);
    flex: 1;
    font-family: var(--font-sans);
}

.dashboard-search input::placeholder {
    color: var(--text-subtle);
}

.dashboard-search-shortcut {
    font-size: 11px;
    color: var(--text-subtle);
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border);
    font-family: var(--font-sans);
}

.dashboard-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-icon-btn {
    width: 36px;
    height: 36px;
    background: var(--bg-alt);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background 0.2s var(--ease);
}

.dashboard-icon-btn:hover {
    background: var(--bg);
    border: 1px solid var(--border);
}

.dashboard-icon-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
}

.dashboard-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 4px;
}

.dashboard-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-user-info {
    text-align: left;
    line-height: 1.2;
}

.dashboard-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    font-family: var(--font-sans);
}

.dashboard-user-role {
    font-size: 11px;
    color: var(--text-muted);
}

.dashboard-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    font-family: var(--font-ar);
}

.dashboard-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.dashboard-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.dashboard-page-title {
    font-family: var(--font-ar);
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.dashboard-page-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

.dashboard-range {
    display: inline-flex;
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}

.dashboard-range button {
    padding: 7px 14px;
    background: transparent;
    border: none;
    border-radius: 7px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font-sans);
    transition: all 0.2s var(--ease);
}

.dashboard-range button.active {
    background: var(--text);
    color: white;
}

/* Stats cards with sparklines */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.dashboard-stat {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.dashboard-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.dashboard-stat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.dashboard-stat-label {
    font-size: 12.5px;
    color: var(--text-muted);
    font-weight: 500;
    font-family: var(--font-sans);
}

.dashboard-stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.dashboard-stat-icon.purple { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.dashboard-stat-icon.pink   { background: rgba(236, 72, 153, 0.12); color: #ec4899; }
.dashboard-stat-icon.cyan   { background: rgba(6, 182, 212, 0.12);  color: #06b6d4; }
.dashboard-stat-icon.green  { background: rgba(16, 185, 129, 0.12); color: #10b981; }

.dashboard-stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    font-family: var(--font-sans);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 8px;
}

.dashboard-stat-suffix {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
    margin-right: 4px;
}

.dashboard-stat-sparkline {
    height: 36px;
    margin: 8px -20px -20px;
    padding: 0;
    overflow: hidden;
}

.dashboard-sparkline-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.dashboard-stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-sans);
    margin-top: 12px;
}

.dashboard-stat-change.up   { color: #10b981; }
.dashboard-stat-change.down { color: #ef4444; }

.dashboard-stat-period {
    color: var(--text-subtle);
    font-weight: 400;
    margin-right: 4px;
}

/* Charts row */
.dashboard-charts-row {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

.dashboard-chart-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
}

.dashboard-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.dashboard-chart-header h4 {
    font-family: var(--font-ar);
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.dashboard-chart-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.dashboard-chart-action {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}

.dashboard-chart-action:hover {
    background: var(--bg-alt);
}

.dashboard-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 160px;
    gap: 6px;
    padding-top: 12px;
}

.dashboard-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    height: 100%;
    justify-content: flex-end;
    position: relative;
}

.dashboard-bar {
    width: 100%;
    max-width: 32px;
    background: linear-gradient(180deg, #8b5cf6, #6366f1);
    border-radius: 6px 6px 0 0;
    min-height: 4px;
    transition: all 0.4s var(--ease);
    cursor: pointer;
    position: relative;
}

.dashboard-bar:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
}

.dashboard-bar-value {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 600;
    color: var(--text);
    opacity: 0;
    transition: opacity 0.2s var(--ease);
    font-family: var(--font-sans);
    background: var(--text);
    color: white;
    padding: 1px 5px;
    border-radius: 4px;
    white-space: nowrap;
}

.dashboard-bar:hover .dashboard-bar-value {
    opacity: 1;
}

.dashboard-bar-label {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-weight: 500;
}

/* Traffic sources / donut */
.dashboard-donut-wrap {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 16px;
    align-items: center;
}

.dashboard-donut-svg {
    width: 110px;
    height: 110px;
}

.dashboard-traffic-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dashboard-traffic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.dashboard-traffic-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
}

.dashboard-traffic-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
}

.dashboard-traffic-name {
    color: var(--text-muted);
}

.dashboard-traffic-value {
    font-weight: 700;
    color: var(--text);
    font-family: var(--font-sans);
    font-variant-numeric: tabular-nums;
}

/* Recent orders table */
.dashboard-orders-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
}

.dashboard-orders-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.dashboard-orders-header h4 {
    font-family: var(--font-ar);
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.dashboard-view-all {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-sans);
    transition: gap 0.2s var(--ease);
}

.dashboard-view-all:hover {
    gap: 10px;
}

.dashboard-table-wrap {
    overflow-x: auto;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-sans);
}

.dashboard-table thead th {
    text-align: right;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

.dashboard-table tbody tr {
    transition: background 0.2s var(--ease);
}

.dashboard-table tbody tr:hover {
    background: var(--bg-alt);
}

.dashboard-table td {
    padding: 12px;
    font-size: 13.5px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

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

.dashboard-table-id {
    font-weight: 600;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

.dashboard-table-customer {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.dashboard-customer-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: white;
    font-family: var(--font-ar);
    flex-shrink: 0;
}

.dashboard-customer-avatar.avatar-green  { background: linear-gradient(135deg, #10b981, #14b8a6); }
.dashboard-customer-avatar.avatar-orange { background: linear-gradient(135deg, #f97316, #fb923c); }
.dashboard-customer-avatar.avatar-red    { background: linear-gradient(135deg, #ef4444, #f87171); }
.dashboard-customer-avatar.avatar-purple { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }

.dashboard-table-amount {
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.dashboard-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
}

.dashboard-status-badge.status-green  { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.dashboard-status-badge.status-orange { background: rgba(249, 115, 22, 0.12); color: #f97316; }
.dashboard-status-badge.status-red    { background: rgba(239, 68, 68, 0.12);  color: #ef4444; }

.dashboard-table-actions {
    text-align: left;
    width: 40px;
}

.dashboard-icon-btn-sm {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
}

.dashboard-icon-btn-sm:hover {
    background: var(--bg-alt);
    color: var(--text);
}

@media (max-width: 1024px) {
    .dashboard-app { grid-template-columns: 200px 1fr; }
    .dashboard-stats { grid-template-columns: repeat(2, 1fr); }
    .dashboard-charts-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .dashboard-app {
        grid-template-columns: 1fr;
    }
    .dashboard-sidebar { display: none; }
    .dashboard-stats { grid-template-columns: repeat(2, 1fr); }
    .dashboard-charts-row { grid-template-columns: 1fr; }
    .dashboard-topbar { padding: 0 16px; }
    .dashboard-content { padding: 16px; }
    .dashboard-user-info { display: none; }
}

@media (max-width: 480px) {
    .dashboard-stats { grid-template-columns: 1fr; }
    .dashboard-page-header { flex-direction: column; }
    .dashboard-range { width: 100%; }
    .dashboard-table { font-size: 12px; }
}

/* =========================================================
   QUIZ
   ========================================================= */
.quiz-frame { padding: 24px; }
.quiz-app { max-width: 700px; margin: 0 auto; }

.quiz-header { margin-bottom: 20px; }

.quiz-progress {
    height: 6px;
    background: var(--bg-alt);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 12px;
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
    transition: width 0.4s var(--ease);
}

.quiz-stats {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

.quiz-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.quiz-stat.warning { color: #ef4444; font-weight: 700; }

.quiz-question-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
}

.quiz-question {
    font-family: var(--font-ar);
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 24px;
    line-height: 1.4;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-alt);
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 14.5px;
    color: var(--text);
    cursor: pointer;
    text-align: right;
    font-family: var(--font-sans);
    transition: all 0.2s var(--ease);
}

.quiz-option:hover:not(:disabled) {
    border-color: var(--accent);
    background: rgba(139, 92, 246, 0.05);
}

.quiz-option.correct {
    background: rgba(16, 185, 129, 0.12);
    border-color: #10b981;
    color: #10b981;
    font-weight: 600;
}

.quiz-option.wrong {
    background: rgba(239, 68, 68, 0.10);
    border-color: #ef4444;
    color: #ef4444;
}

.quiz-option:disabled { cursor: default; }

.quiz-option-letter {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.quiz-option-text { flex: 1; }

.quiz-option-icon { font-size: 16px; }

.quiz-result { text-align: center; padding: 40px 20px; }

.quiz-result-emoji { font-size: 64px; margin-bottom: 16px; }

.quiz-result-title {
    font-family: var(--font-ar);
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 24px;
}

.quiz-result-score {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.quiz-result-value {
    font-size: 56px;
    font-weight: 800;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: var(--font-sans);
    line-height: 1;
}

.quiz-result-of { font-size: 18px; color: var(--text-muted); font-family: var(--font-sans); }

.quiz-result-percent {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    font-family: var(--font-sans);
}

.quiz-result-bar {
    max-width: 320px;
    height: 8px;
    background: var(--bg-alt);
    border-radius: 999px;
    margin: 0 auto 28px;
    overflow: hidden;
}

.quiz-result-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
    transition: width 0.6s var(--ease);
}

.quiz-restart-btn {
    background: var(--bg-dark);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
}

.quiz-restart-btn:hover { transform: scale(1.04); }


/* =========================================================
   QUERY OPTIMIZER
   ========================================================= */
.opt-frame { padding: 24px; }

.opt-app { display: flex; flex-direction: column; gap: 20px; }

.opt-input-section, .opt-results {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
}

.opt-input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.opt-input-header h3 {
    font-family: var(--font-ar);
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.opt-input-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.opt-presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.opt-preset-btn {
    padding: 7px 14px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 12.5px;
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font-sans);
    transition: all 0.2s var(--ease);
}

.opt-preset-btn:hover {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.opt-editor {
    display: flex;
    gap: 12px;
}

.opt-textarea {
    flex: 1;
    background: #1e293b;
    color: #e2e8f0;
    border: none;
    border-radius: 10px;
    padding: 14px 16px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    min-height: 70px;
    outline: none;
    direction: ltr;
    text-align: left;
}

.opt-analyze-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
}

.opt-analyze-btn:hover { filter: brightness(1.08); }

.opt-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.opt-metric-card {
    background: var(--bg-alt);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.opt-metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.opt-metric-value {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.1;
}

.opt-metric-unit {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    margin-right: 4px;
}

.opt-metric-label {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

.opt-section {
    margin-bottom: 20px;
}

.opt-section:last-child { margin-bottom: 0; }

.opt-section h4 {
    font-family: var(--font-ar);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.opt-plan {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.opt-plan-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-alt);
    border-radius: 8px;
    border-right: 3px solid var(--accent);
    transition: all 0.2s var(--ease);
}

.opt-plan-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    flex-shrink: 0;
}

.opt-plan-good { background: #10b981; }
.opt-plan-bad  { background: #ef4444; }

.opt-plan-label {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
    font-family: var(--font-sans);
}

.opt-plan-detail {
    font-size: 11.5px;
    color: var(--text-muted);
    font-family: var(--font-ar);
}

.opt-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    background: var(--bg-alt);
    border-radius: 8px;
    font-size: 13px;
}

.opt-empty-good {
    text-align: center;
    padding: 24px;
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.opt-suggestions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.opt-suggestion {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border-right: 3px solid;
}

.opt-suggestion-good { background: rgba(16, 185, 129, 0.06); border-color: #10b981; }
.opt-suggestion-warn { background: rgba(245, 158, 11, 0.06); border-color: #f59e0b; }
.opt-suggestion-error { background: rgba(239, 68, 68, 0.06); border-color: #ef4444; }

.opt-suggestion-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    font-size: 11px;
}

.opt-suggestion-good  .opt-suggestion-icon { background: #10b981; }
.opt-suggestion-warn  .opt-suggestion-icon { background: #f59e0b; }
.opt-suggestion-error .opt-suggestion-icon { background: #ef4444; }

.opt-suggestion-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.opt-suggestion-text {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .opt-metrics { grid-template-columns: repeat(2, 1fr); }
    .opt-editor { flex-direction: column; }
}

/* =========================================================
   POMODORO
   ========================================================= */
.pomodoro-frame { padding: 32px 24px; }
.pomodoro-app { max-width: 600px; margin: 0 auto; text-align: center; }

.pomodoro-mode-tabs {
    display: inline-flex;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
    margin-bottom: 28px;
}

.pomodoro-mode-tab {
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-sans);
    transition: all 0.2s var(--ease);
}

.pomodoro-mode-tab.active {
    background: var(--text);
    color: white;
}

.pomodoro-clock {
    position: relative;
    width: 240px;
    height: 240px;
    margin: 0 auto 32px;
}

.pomodoro-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.pomodoro-ring-track {
    fill: none;
    stroke: var(--bg-alt);
    stroke-width: 10;
}

.pomodoro-ring-fill {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dasharray 0.5s var(--ease);
}

.pomodoro-clock.work .pomodoro-ring-fill { stroke: #ef4444; }
.pomodoro-clock.short .pomodoro-ring-fill { stroke: #10b981; }
.pomodoro-clock.long .pomodoro-ring-fill { stroke: #3b82f6; }

.pomodoro-time {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.pomodoro-time-value {
    font-size: 56px;
    font-weight: 800;
    color: var(--text);
    font-family: var(--font-sans);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    line-height: 1;
}

.pomodoro-time-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
    font-family: var(--font-sans);
}

.pomodoro-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 32px;
}

.pomodoro-btn-primary {
    background: var(--text);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    transition: transform 0.2s var(--ease);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.pomodoro-btn-primary:hover { transform: scale(1.04); }

.pomodoro-btn-secondary {
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    transition: background 0.2s var(--ease);
}

.pomodoro-btn-secondary:hover { background: var(--bg-alt); }

.pomodoro-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 24px;
}

.pomodoro-stat {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: right;
}

.pomodoro-stat i {
    font-size: 18px;
    color: var(--accent);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pomodoro-stat > div { display: flex; flex-direction: column; }

.pomodoro-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    font-family: var(--font-sans);
    font-variant-numeric: tabular-nums;
}

.pomodoro-stat-label {
    font-size: 11px;
    color: var(--text-muted);
}

/* =========================================================
   CHAT APP
   ========================================================= */
.chat-frame { padding: 0; overflow: hidden; }
.chat-app {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: 600px;
    background: white;
}

.chat-sidebar {
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    background: #fafafa;
}

.chat-sidebar-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.chat-sidebar-header h3 {
    font-family: var(--font-ar);
    font-size: 16px;
    font-weight: 700;
}

.chat-icon-btn-sm {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: white;
    border: 1px solid var(--border);
    cursor: pointer;
    color: var(--text);
}

.chat-search {
    margin: 12px 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-search i { color: var(--text-muted); font-size: 12px; }

.chat-search input {
    border: none;
    background: none;
    outline: none;
    flex: 1;
    font-size: 13px;
    font-family: var(--font-sans);
}

.chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 8px 12px;
}

.chat-list-item {
    display: flex;
    gap: 10px;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s var(--ease);
}

.chat-list-item:hover { background: white; }

.chat-list-item.active {
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: white;
    font-family: var(--font-ar);
    flex-shrink: 0;
    position: relative;
}

.chat-avatar.avatar-purple { background: linear-gradient(135deg, #8b5cf6, #6366f1); }
.chat-avatar.avatar-pink   { background: linear-gradient(135deg, #ec4899, #f97316); }
.chat-avatar.avatar-cyan   { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.chat-avatar.avatar-green  { background: linear-gradient(135deg, #10b981, #14b8a6); }
.chat-avatar.avatar-orange { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.chat-avatar.avatar-blue   { background: linear-gradient(135deg, #3b82f6, #06b6d4); }

.chat-avatar.online::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid white;
}

.chat-list-content { flex: 1; min-width: 0; }

.chat-list-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.chat-list-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    font-family: var(--font-sans);
}

.chat-list-time {
    font-size: 11px;
    color: var(--text-subtle);
    font-family: var(--font-sans);
    flex-shrink: 0;
    margin-right: 8px;
}

.chat-list-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.chat-list-preview > span:first-child {
    font-size: 12.5px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.chat-unread-badge {
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    min-width: 18px;
    text-align: center;
}

.chat-main {
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-info { flex: 1; }

.chat-header-info h3 {
    font-family: var(--font-ar);
    font-size: 15px;
    font-weight: 700;
}

.chat-status {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

.chat-status.online { color: #22c55e; }

.chat-header-actions {
    display: flex;
    gap: 8px;
}

.chat-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
}

.chat-icon-btn:hover { background: var(--bg-alt); color: var(--text); }

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fafafa;
}

.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 70%;
}

.chat-message.sent { align-self: flex-end; align-items: flex-end; }
.chat-message.received { align-self: flex-start; align-items: flex-start; }

.chat-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.chat-message.sent .chat-bubble {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.received .chat-bubble {
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.chat-bubble.typing {
    display: flex;
    gap: 4px;
    padding: 14px 16px;
}

.chat-typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-subtle);
    animation: typing 1.4s ease-in-out infinite;
}

.chat-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

.chat-message-time {
    font-size: 10.5px;
    color: var(--text-subtle);
    margin-top: 4px;
    padding: 0 4px;
    font-family: var(--font-sans);
}

.chat-quick-replies {
    padding: 8px 20px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    background: white;
    border-top: 1px solid var(--border);
}

.chat-quick-reply {
    padding: 6px 12px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 12.5px;
    cursor: pointer;
    white-space: nowrap;
    font-family: var(--font-sans);
    color: var(--text);
    transition: all 0.2s var(--ease);
}

.chat-quick-reply:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.chat-input-area {
    padding: 12px 16px;
    background: white;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
    font-family: var(--font-sans);
    background: var(--bg-alt);
}

.chat-input:focus { border-color: var(--accent); background: white; }

.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s var(--ease);
}

.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.chat-send-btn:not(:disabled):hover { transform: scale(1.05); }

/* =========================================================
   KANBAN
   ========================================================= */
.kanban-frame { padding: 24px; }

.kanban-app { width: 100%; }

.kanban-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.kanban-header h3 {
    font-family: var(--font-ar);
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
}

.kanban-header p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.kanban-stats {
    display: flex;
    gap: 12px;
}

.kanban-stat {
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    text-align: center;
    min-width: 90px;
}

.kanban-stat.orange { border-bottom: 3px solid #f59e0b; }
.kanban-stat.blue   { border-bottom: 3px solid #3b82f6; }
.kanban-stat.green  { border-bottom: 3px solid #10b981; }

.kanban-stat-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    font-family: var(--font-sans);
    display: block;
}

.kanban-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.kanban-column {
    background: var(--bg-alt);
    border-radius: 12px;
    padding: 16px;
    min-height: 400px;
    transition: background 0.2s var(--ease);
}

.kanban-column.drag-over {
    background: rgba(139, 92, 246, 0.08);
    box-shadow: inset 0 0 0 2px var(--accent);
}

.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.kanban-column-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 14px;
    font-family: var(--font-sans);
    color: var(--text);
}

.kanban-column-title.orange i { color: #f59e0b; }
.kanban-column-title.blue i   { color: #3b82f6; }
.kanban-column-title.green i  { color: #10b981; }

.kanban-column-count {
    background: white;
    color: var(--text-muted);
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 999px;
    font-weight: 600;
}

.kanban-add-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: white;
    border: 1px solid var(--border);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 12px;
    transition: all 0.2s var(--ease);
}

.kanban-add-btn:hover {
    background: var(--text);
    color: white;
}

.kanban-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kanban-card {
    background: white;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    cursor: grab;
    transition: all 0.2s var(--ease);
}

.kanban-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.kanban-card.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.kanban-card-tag {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    font-family: var(--font-sans);
    letter-spacing: 0.02em;
}

.tag-purple { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.tag-pink   { background: rgba(236, 72, 153, 0.12); color: #ec4899; }
.tag-cyan   { background: rgba(6, 182, 212, 0.12);  color: #06b6d4; }
.tag-green  { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.tag-orange { background: rgba(249, 115, 22, 0.12); color: #f97316; }
.tag-blue   { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }

.kanban-card-title {
    font-size: 13.5px;
    color: var(--text);
    line-height: 1.5;
    margin-bottom: 10px;
    font-family: var(--font-sans);
}

.kanban-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kanban-card-priority {
    font-size: 11px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-sans);
}

.priority-high   { color: #ef4444; }
.priority-medium { color: #f59e0b; }
.priority-low    { color: #6b7280; }

.kanban-card-delete {
    background: none;
    border: none;
    color: var(--text-subtle);
    cursor: pointer;
    font-size: 11px;
    padding: 4px 6px;
    border-radius: 4px;
}

.kanban-card-delete:hover { color: #ef4444; background: rgba(239, 68, 68, 0.08); }

.kanban-add-form {
    background: white;
    border: 2px solid var(--accent);
    border-radius: 10px;
    padding: 12px;
}

.kanban-add-form textarea {
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    font-family: var(--font-sans);
    font-size: 13px;
    padding: 4px;
}

.kanban-add-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.kanban-add-save {
    background: var(--accent);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-sans);
}

.kanban-add-cancel {
    background: var(--bg-alt);
    color: var(--text-muted);
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    font-family: var(--font-sans);
}

.kanban-empty {
    text-align: center;
    padding: 30px 16px;
    color: var(--text-subtle);
}

.kanban-empty i { font-size: 28px; opacity: 0.4; margin-bottom: 8px; }

.kanban-empty p { font-size: 12px; }

/* =========================================================
   MUSIC PLAYER
   ========================================================= */
.music-frame { padding: 0; overflow: hidden; }

.music-app {
    display: grid;
    grid-template-columns: 1fr 320px;
    min-height: 600px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: white;
}

.music-main {
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.music-cover {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    margin-bottom: 28px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.6s var(--ease);
}

.music-cover-disc {
    width: 90px;
    height: 90px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.15);
    position: relative;
}

.music-cover-disc.spinning {
    animation: spin 8s linear infinite;
}

@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

.music-cover-inner {
    position: absolute;
    inset: 50%;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.music-visualizer {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 3px;
    align-items: flex-end;
    height: 30px;
}

.music-bar {
    width: 4px;
    background: white;
    border-radius: 2px;
    animation: visualizer 0.8s ease-in-out infinite alternate;
}

@keyframes visualizer {
    0%   { height: 20%; }
    100% { height: 100%; }
}

.music-info { margin-bottom: 24px; }

.music-title {
    font-family: var(--font-ar);
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
}

.music-artist {
    font-size: 14px;
    opacity: 0.7;
}

.music-progress-wrap {
    width: 100%;
    max-width: 360px;
    margin-bottom: 16px;
    cursor: pointer;
    direction: ltr;  /* اجبار LTR لسلوك طبيعي */
}

.music-progress {
    height: 5px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    overflow: visible;
    position: relative;
}

.music-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
    border-radius: 999px;
    position: relative;
}

.music-progress-dot {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
    opacity: 0;
    transition: opacity 0.2s var(--ease);
}

.music-progress-wrap:hover .music-progress-dot { opacity: 1; }

.music-times {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    opacity: 0.7;
    margin-top: 6px;
    font-family: var(--font-sans);
}

.music-controls {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
}

.music-control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.7;
    transition: opacity 0.2s var(--ease);
}

.music-control-btn.active,
.music-control-btn:hover { opacity: 1; }

.music-play-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: white;
    color: var(--text);
    border: none;
    cursor: pointer;
    font-size: 20px;
    transition: transform 0.2s var(--ease);
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.2);
}

.music-play-btn:hover { transform: scale(1.06); }

.music-volume {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 360px;
    color: rgba(255, 255, 255, 0.7);
}

.music-volume-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    outline: none;
}

.music-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}

.music-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.music-playlist {
    background: rgba(0, 0, 0, 0.3);
    padding: 24px 16px;
    overflow-y: auto;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.music-playlist h3 {
    font-family: var(--font-ar);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    opacity: 0.8;
}

.music-playlist-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.music-playlist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s var(--ease);
}

.music-playlist-item:hover { background: rgba(255, 255, 255, 0.06); }

.music-playlist-item.active { background: rgba(255, 255, 255, 0.12); }

.music-playlist-thumb {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.music-playlist-num { font-family: var(--font-sans); }

.music-playlist-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.music-playlist-title {
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--font-sans);
}

.music-playlist-artist {
    font-size: 11px;
    opacity: 0.6;
    font-family: var(--font-sans);
}

.music-playlist-duration {
    font-size: 11px;
    opacity: 0.6;
    font-family: var(--font-sans);
}

/* =========================================================
   PORTFOLIO
   ========================================================= */
.portfolio-frame { padding: 0; overflow: hidden; }

.portfolio-app {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    min-height: 600px;
}

.portfolio-hero {
    background: linear-gradient(135deg, #0a0a0a, #1c1c2e);
    padding: 48px 32px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.portfolio-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.25), transparent 60%),
                radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.20), transparent 60%);
}

.portfolio-hero-content { position: relative; z-index: 1; }

.portfolio-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 800;
    font-family: var(--font-ar);
    border: 4px solid rgba(255, 255, 255, 0.15);
}

.portfolio-name {
    font-family: var(--font-ar);
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 4px;
}

.portfolio-role {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 16px;
}

.portfolio-bio {
    max-width: 480px;
    margin: 0 auto 24px;
    line-height: 1.7;
    opacity: 0.85;
    font-size: 14px;
}

.portfolio-hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.portfolio-btn-primary {
    background: white;
    color: var(--text);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    transition: transform 0.2s var(--ease);
}

.portfolio-btn-primary:hover { transform: translateY(-1px); }

.portfolio-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    transition: background 0.2s var(--ease);
}

.portfolio-btn-secondary:hover { background: rgba(255, 255, 255, 0.15); }

.portfolio-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: white;
}

.portfolio-tab {
    flex: 1;
    padding: 14px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-sans);
    transition: all 0.2s var(--ease);
}

.portfolio-tab:hover { color: var(--text); background: var(--bg-alt); }

.portfolio-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: var(--accent-soft);
}

.portfolio-content { padding: 28px 32px; }

.portfolio-content h3 {
    font-family: var(--font-ar);
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 14px;
}

.portfolio-content p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 16px;
}

.portfolio-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 24px 0;
}

.portfolio-stat {
    background: var(--bg-alt);
    padding: 18px;
    border-radius: 12px;
    text-align: center;
}

.portfolio-stat-value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: var(--font-sans);
    margin-bottom: 4px;
}

.portfolio-stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.portfolio-contact {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.portfolio-contact h4 {
    font-family: var(--font-ar);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text);
}

.portfolio-contact-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.portfolio-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-alt);
    border-radius: 8px;
    font-size: 13.5px;
    color: var(--text);
    font-family: var(--font-sans);
}

.portfolio-contact-item i {
    color: var(--accent);
    width: 16px;
    text-align: center;
}

.portfolio-skills-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.portfolio-skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 13.5px;
}

.portfolio-skill-name { font-weight: 600; color: var(--text); }

.portfolio-skill-percent {
    font-weight: 700;
    color: var(--text);
    font-family: var(--font-sans);
}

.portfolio-skill-bar {
    height: 8px;
    background: var(--bg-alt);
    border-radius: 999px;
    overflow: hidden;
}

.portfolio-skill-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.6s var(--ease);
}

.portfolio-projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.portfolio-project {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s var(--ease);
}

.portfolio-project:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.portfolio-project-cover {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
}

.portfolio-project-body { padding: 16px; }

.portfolio-project-category {
    font-size: 10.5px;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: var(--font-sans);
}

.portfolio-project-body h4 {
    font-family: var(--font-ar);
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin: 6px 0 8px;
}

.portfolio-project-body p {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}

.portfolio-project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.portfolio-project-tags span {
    font-size: 10px;
    padding: 2px 8px;
    background: var(--bg-alt);
    color: var(--text-muted);
    border-radius: 4px;
    font-family: var(--font-sans);
    font-weight: 500;
}

/* =========================================================
   RESPONSIVE UPDATES
   ========================================================= */
@media (max-width: 1024px) {
    .music-app { grid-template-columns: 1fr 280px; }
}

@media (max-width: 768px) {
    .chat-app { grid-template-columns: 1fr; }
    .chat-sidebar { display: none; }

    .kanban-board { grid-template-columns: 1fr; }

    .music-app { grid-template-columns: 1fr; }
    .music-playlist { border-left: none; border-top: 1px solid rgba(255, 255, 255, 0.05); }

    .portfolio-stats { grid-template-columns: repeat(2, 1fr); }
    .portfolio-projects-grid { grid-template-columns: 1fr; }

    .pomodoro-stats { grid-template-columns: 1fr; }
    .pomodoro-clock { width: 200px; height: 200px; }
    .pomodoro-time-value { font-size: 44px; }

    .quran-app { grid-template-columns: 1fr; }
    .quran-surah-panel { max-height: 400px; }
}

/* =========================================================
   QURAN PLAYER
   ========================================================= */
.quran-frame { padding: 0; overflow: hidden; }

.quran-app {
    display: grid;
    grid-template-columns: 1fr 360px;
    min-height: 700px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.quran-app::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -80px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.10), transparent 70%);
    pointer-events: none;
}

.quran-main {
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.quran-decoration {
    margin-bottom: 28px;
}

.quran-bismillah {
    font-family: var(--font-ar);
    font-size: 22px;
    color: #059669;
    font-weight: 600;
    letter-spacing: 0;
    text-shadow: 0 1px 2px rgba(5, 150, 105, 0.1);
}

.quran-now-playing {
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: 0 4px 24px rgba(16, 185, 129, 0.08);
    margin-bottom: 24px;
    min-width: 320px;
}

.quran-surah-number {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: white;
    font-family: var(--font-sans);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.30);
    flex-shrink: 0;
}

.quran-surah-info {
    text-align: right;
    flex: 1;
}

.quran-surah-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}

.quran-surah-name {
    font-family: var(--font-ar);
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 8px;
}

.quran-surah-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    font-size: 12.5px;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

.quran-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 600;
}

.quran-badge-makkah  { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.quran-badge-madinah { background: rgba(16, 185, 129, 0.12); color: #059669; }

.quran-reciter-btn {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 12px;
    width: 100%;
    max-width: 360px;
    transition: all 0.2s var(--ease);
}

.quran-reciter-btn:hover {
    border-color: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08);
}

.quran-reciter-btn > i:first-child {
    color: #10b981;
    font-size: 16px;
}

.quran-reciter-info {
    flex: 1;
    text-align: right;
    display: flex;
    flex-direction: column;
}

.quran-reciter-label {
    font-size: 11px;
    color: var(--text-muted);
}

.quran-reciter-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    font-family: var(--font-ar);
}

.quran-chevron {
    color: var(--text-muted);
    font-size: 12px;
}

.quran-dropdown {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 16px;
    width: 100%;
    max-width: 360px;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.quran-dropdown-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 6px 12px 10px;
    font-family: var(--font-sans);
}

.quran-dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: right;
    transition: background 0.2s var(--ease);
}

.quran-dropdown-item:hover { background: var(--bg-alt); }

.quran-dropdown-item.active {
    background: rgba(16, 185, 129, 0.08);
}

.quran-dropdown-item > i {
    color: var(--text-subtle);
    font-size: 14px;
}

.quran-dropdown-item.active > i { color: #10b981; }

.quran-dropdown-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    font-family: var(--font-ar);
}

.quran-dropdown-country {
    font-size: 11px;
    color: var(--text-muted);
}

.quran-progress-wrap {
    width: 100%;
    max-width: 360px;
    margin-bottom: 8px;
    cursor: pointer;
    direction: ltr;  /* اجبار LTR: يمين=forward، يسار=backward */
}

.quran-progress {
    height: 6px;
    background: rgba(16, 185, 129, 0.15);
    border-radius: 999px;
    overflow: visible;
    position: relative;
}

.quran-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 999px;
    position: relative;
    transition: width 0.1s linear;
}

.quran-progress-dot {
    position: absolute;
    right: -6px;  /* دائماً على الطرف الأيمن (نهاية التقدم) */
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: white;
    border: 2px solid #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
    opacity: 0;
    transition: opacity 0.2s var(--ease);
}

.quran-progress-wrap:hover .quran-progress-dot { opacity: 1; }

.quran-times {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-family: var(--font-sans);
    direction: ltr;
}

.quran-controls {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
}

.quran-control-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--border);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 16px;
    transition: all 0.2s var(--ease);
}

.quran-control-btn:hover:not(:disabled) {
    border-color: #10b981;
    color: #10b981;
}

.quran-control-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.quran-play-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 22px;
    transition: transform 0.2s var(--ease);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.30);
}

.quran-play-btn:hover:not(:disabled) { transform: scale(1.06); }
.quran-play-btn:disabled { opacity: 0.6; }

.quran-volume {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 360px;
    color: var(--text-muted);
}

.quran-volume-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: var(--bg-alt);
    border-radius: 999px;
    outline: none;
}

.quran-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #10b981;
    border-radius: 50%;
    cursor: pointer;
}

.quran-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #10b981;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.quran-volume-value {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-sans);
    min-width: 32px;
    text-align: left;
}

.quran-error {
    background: rgba(239, 68, 68, 0.10);
    color: #ef4444;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Surah panel */
.quran-surah-panel {
    background: white;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.quran-surah-panel-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quran-surah-panel-header h3 {
    font-family: var(--font-ar);
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.quran-surah-count {
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(16, 185, 129, 0.10);
    color: #059669;
    padding: 2px 10px;
    border-radius: 999px;
    font-weight: 600;
}

.quran-surah-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.quran-surah-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 2px;
    transition: background 0.2s var(--ease);
    position: relative;
}

.quran-surah-item:hover { background: var(--bg-alt); }

.quran-surah-item.active {
    background: rgba(16, 185, 129, 0.10);
    box-shadow: inset 3px 0 0 #10b981;
}

.quran-surah-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    font-family: var(--font-sans);
}

.quran-surah-num.makkah  { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.quran-surah-num.madinah { background: linear-gradient(135deg, #10b981, #14b8a6); }

.quran-surah-details { flex: 1; min-width: 0; }

.quran-surah-title {
    font-family: var(--font-ar);
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.quran-surah-info-row {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 11px;
}

.quran-surah-verse-count { color: var(--text-muted); }

.quran-surah-type-pill {
    background: var(--bg-alt);
    color: var(--text-muted);
    padding: 1px 7px;
    border-radius: 4px;
    font-family: var(--font-sans);
}

.quran-playing-indicator {
    display: flex;
    gap: 2px;
    align-items: flex-end;
    height: 16px;
    width: 16px;
}

.quran-playing-indicator span {
    width: 3px;
    background: #10b981;
    border-radius: 2px;
    animation: quranBars 0.8s ease-in-out infinite alternate;
}

.quran-playing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.quran-playing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes quranBars {
    0%   { height: 30%; }
    100% { height: 100%; }
}

@media (max-width: 1024px) {
    .quran-app { grid-template-columns: 1fr 320px; }
    .quran-surah-num { width: 32px; height: 32px; font-size: 12px; }
    .quran-cover { width: 200px; height: 200px; font-size: 50px; }
    .quran-cover-disc { width: 76px; height: 76px; }
    .quran-time-value { font-size: 44px; }
    .quran-reciter-btn,
    .quran-code-editor,
    .quran-cli-box { padding: 12px 14px; }
    .quran-main { padding: 24px 20px; }
}

@media (max-width: 768px) {
    .quran-app {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .quran-app::before {
        width: 280px;
        height: 280px;
        top: -80px;
        right: -60px;
    }
    .quran-main {
        padding: 20px 16px;
    }
    .quran-decoration {
        margin-bottom: 16px;
    }
    .quran-bismillah {
        font-size: 17px;
    }
    .quran-now-playing {
        flex-direction: column;
        text-align: center;
        padding: 18px 20px;
        gap: 14px;
        min-width: 0;
        width: 100%;
    }
    .quran-surah-number {
        width: 56px;
        height: 56px;
        font-size: 22px;
    }
    .quran-surah-info {
        text-align: center;
    }
    .quran-surah-name {
        font-size: 22px;
    }
    .quran-surah-meta {
        justify-content: center;
    }
    .quran-editor-version-badge {
        align-self: center;
    }
    .quran-reciter-btn {
        padding: 10px 12px;
        gap: 8px;
        width: 100%;
    }
    .quran-reciter-name {
        font-size: 12.5px;
    }
    .quran-dropdown {
        max-height: 200px;
    }
    .quran-cover {
        width: 180px;
        height: 180px;
        font-size: 42px;
    }
    .quran-cover-disc {
        width: 64px;
        height: 64px;
    }
    .quran-time-value {
        font-size: 38px;
    }
    .quran-progress-wrap {
        max-width: 100%;
    }
    .quran-controls {
        gap: 12px;
    }
    .quran-play-btn {
        width: 54px;
        height: 54px;
        font-size: 18px;
    }
    .quran-volume {
        max-width: 100%;
    }
    .quran-surah-panel-header {
        padding: 16px;
    }
    .quran-surah-panel-header h3 {
        font-size: 14px;
    }
    .quran-surah-count {
        font-size: 10.5px;
        padding: 2px 8px;
    }
    .quran-surah-list {
        padding: 8px;
        max-height: 300px;
    }
    .quran-surah-title {
        font-size: 13px;
    }
    .quran-surah-info-row {
        font-size: 10.5px;
    }
    .quran-surah-verse-count,
    .quran-surah-type-pill {
        font-size: 10px;
        padding: 1px 6px;
    }
}

@media (max-width: 480px) {
    .quran-frame { padding: 0; }
    .quran-main { padding: 16px 12px; }
    .quran-bismillah { font-size: 15px; }
    .quran-surah-name { font-size: 19px; }
    .quran-surah-label { font-size: 10.5px; }
    .quran-surah-number { width: 48px; height: 48px; font-size: 19px; }
    .quran-surah-badge { font-size: 9.5px; padding: 1px 6px; }
    .quran-surah-verse-count { font-size: 10px; }
    .quran-surah-type-pill { font-size: 9.5px; padding: 1px 5px; }
    .quran-cover { width: 150px; height: 150px; font-size: 36px; }
    .quran-cover-disc { width: 54px; height: 54px; }
    .quran-time-value { font-size: 32px; }
    .quran-progress-wrap { padding: 0 8px; }
    .quran-controls { gap: 10px; }
    .quran-control-btn { width: 38px; height: 38px; font-size: 14px; }
    .quran-play-btn { width: 50px; height: 50px; font-size: 16px; }
    .quran-reciter-btn { padding: 8px 10px; }
    .quran-reciter-name { font-size: 11.5px; }
    .quran-surah-panel-header { padding: 14px; }
}

/* =========================================================
   DATABASE EXPLORER
   ========================================================= */
.db-frame { padding: 24px; }

.db-app {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    min-height: 600px;
}

.db-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.db-header-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.db-header-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.db-header-info h3 {
    font-family: var(--font-ar);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.db-header-info p {
    font-size: 12.5px;
    opacity: 0.8;
}

.db-header-stats {
    display: flex;
    gap: 8px;
}

.db-stat {
    background: rgba(255, 255, 255, 0.12);
    padding: 8px 14px;
    border-radius: 8px;
    text-align: center;
    min-width: 70px;
}

.db-stat-value {
    display: block;
    font-size: 18px;
    font-weight: 800;
    font-family: var(--font-sans);
}

.db-stat-label {
    font-size: 11px;
    opacity: 0.8;
    font-family: var(--font-sans);
}

.db-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: var(--bg-alt);
}

.db-tab {
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    transition: all 0.2s var(--ease);
}

.db-tab:hover { color: var(--text); background: white; }

.db-tab.active {
    color: #1e40af;
    border-bottom-color: #1e40af;
    background: white;
}

/* ER Diagram */
.db-diagram-view {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.db-tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.db-table-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.db-table-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.db-table-card.active {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.db-table-purple { border-color: rgba(139, 92, 246, 0.3); }
.db-table-orange { border-color: rgba(249, 115, 22, 0.3); }
.db-table-cyan   { border-color: rgba(6, 182, 212, 0.3); }
.db-table-pink   { border-color: rgba(236, 72, 153, 0.3); }
.db-table-green  { border-color: rgba(16, 185, 129, 0.3); }

.db-table-card.active.db-table-purple { border-color: #8b5cf6; }
.db-table-card.active.db-table-orange { border-color: #f97316; }
.db-table-card.active.db-table-cyan   { border-color: #06b6d4; }
.db-table-card.active.db-table-pink   { border-color: #ec4899; }
.db-table-card.active.db-table-green  { border-color: #10b981; }

.db-table-card-header {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
}

.db-table-purple .db-table-card-header { background: rgba(139, 92, 246, 0.08); color: #8b5cf6; }
.db-table-orange .db-table-card-header { background: rgba(249, 115, 22, 0.08); color: #f97316; }
.db-table-cyan   .db-table-card-header { background: rgba(6, 182, 212, 0.08);  color: #06b6d4; }
.db-table-pink   .db-table-card-header { background: rgba(236, 72, 153, 0.08); color: #ec4899; }
.db-table-green  .db-table-card-header { background: rgba(16, 185, 129, 0.08); color: #10b981; }

.db-table-card-header i { font-size: 16px; }

.db-table-name {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.db-table-label {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 2px;
    font-family: var(--font-ar);
}

.db-table-card-body {
    padding: 8px 14px;
}

.db-table-col {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 12px;
    color: var(--text);
    border-bottom: 1px dashed var(--border);
}

.db-table-col:last-child { border-bottom: none; }

.db-col-icon { font-size: 11px; width: 14px; flex-shrink: 0; }
.db-col-icon.pk { color: #f59e0b; }
.db-col-icon.fk { color: #3b82f6; }

.db-col-name { flex: 1; font-family: var(--font-sans); }

.db-col-type {
    font-size: 10.5px;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

.db-table-card-footer {
    padding: 8px 14px;
    background: var(--bg-alt);
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}

.db-table-view { color: #3b82f6; font-weight: 600; }

/* Data view */
.db-data-view {
    background: var(--bg-alt);
    border-radius: 12px;
    padding: 16px;
}

.db-data-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 12px;
}

.db-data-header h4 {
    font-family: var(--font-ar);
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.db-color-purple { color: #8b5cf6; }
.db-color-orange { color: #f97316; }
.db-color-cyan   { color: #06b6d4; }
.db-color-pink   { color: #ec4899; }
.db-color-green  { color: #10b981; }

.db-data-count {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

.db-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
    min-width: 220px;
}

.db-search i {
    color: var(--text-muted);
    font-size: 12px;
}

.db-search input {
    border: none;
    background: none;
    outline: none;
    font-size: 13px;
    flex: 1;
    font-family: var(--font-sans);
}

.db-table-wrap {
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow-x: auto;
}

.db-data-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-sans);
}

.db-data-table thead th {
    text-align: right;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text);
    padding: 10px 14px;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.db-data-table thead th .db-col-icon {
    margin-left: 4px;
}

.db-col-type-inline {
    margin-right: 4px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 10.5px;
}

.db-data-table tbody tr {
    transition: background 0.2s var(--ease);
    border-bottom: 1px solid var(--border);
}

.db-data-table tbody tr:hover { background: var(--bg-alt); }
.db-data-table tbody tr:last-child { border-bottom: none; }

.db-data-table td {
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text);
}

.db-no-data {
    text-align: center;
    color: var(--text-muted);
    padding: 30px;
    font-size: 13px;
}

/* Query view */
.db-query-view {
    padding: 24px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
}

.db-query-samples h4 {
    font-family: var(--font-ar);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 12px;
}

.db-query-sample {
    width: 100%;
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    text-align: right;
    cursor: pointer;
    margin-bottom: 8px;
    font-family: var(--font-sans);
    transition: all 0.2s var(--ease);
}

.db-query-sample:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.04);
}

.db-query-sample-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.db-query-sample-desc {
    font-size: 11px;
    color: var(--text-muted);
}

.db-query-input-wrap {
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.db-query-label {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-family: var(--font-sans);
    display: flex;
    align-items: center;
    gap: 8px;
}

.db-query-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #e2e8f0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    padding: 16px;
    min-height: 100px;
    resize: vertical;
}

.db-query-input:focus {
    background: rgba(255, 255, 255, 0.02);
}

.db-query-run {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    border: none;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-sans);
}

.db-query-run:hover {
    filter: brightness(1.1);
}

.db-query-error {
    background: rgba(239, 68, 68, 0.10);
    color: #ef4444;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.db-query-result-header {
    background: rgba(16, 185, 129, 0.10);
    color: #059669;
    padding: 10px 14px;
    border-radius: 8px 8px 0 0;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
}

.db-query-table-wrap {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-top: -1px;
}

.db-query-table-wrap .db-data-table {
    border-radius: 0;
}

/* DDL view */
.db-ddl-view {
    padding: 24px;
}

.db-ddl-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.db-ddl-header h4 {
    font-family: var(--font-ar);
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.db-ddl-header p {
    font-size: 13px;
    color: var(--text-muted);
}

.db-ddl-copy {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-sans);
}

.db-ddl-code {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.7;
    overflow-x: auto;
    direction: ltr;
    text-align: left;
    white-space: pre;
}

@media (max-width: 768px) {
    .db-query-view { grid-template-columns: 1fr; }
    .db-header-stats { width: 100%; justify-content: space-between; }
    .db-search { width: 100%; min-width: 0; }
}
/* =========================================================
   MIGRATION TOOL — Modern Redesign
   ========================================================= */

/* ----- Hero Header ----- */
.mg-hero {
    position: relative;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(239, 68, 68, 0.95)),
        radial-gradient(circle at 20% 30%, rgba(251, 191, 36, 0.4), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(239, 68, 68, 0.4), transparent 50%);
    color: white;
    padding: 40px 36px 0;
    overflow: hidden;
}

.mg-hero-bg {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.mg-hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: center;
    margin-bottom: 32px;
}

.mg-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    font-family: var(--font-sans);
    width: fit-content;
}

.mg-hero-title {
    font-family: var(--font-ar);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 8px;
}

.mg-hero-desc {
    font-size: 14px;
    opacity: 0.85;
    max-width: 500px;
    line-height: 1.5;
}

.mg-progress-card {
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 16px;
    padding: 20px 24px;
    min-width: 360px;
}

.mg-progress-info { color: white; }

.mg-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 13px;
    margin-bottom: 8px;
    font-family: var(--font-sans);
}

.mg-progress-percent {
    font-size: 18px;
    font-weight: 800;
    font-family: var(--font-sans);
    font-variant-numeric: tabular-nums;
}

.mg-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.20);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 16px;
}

.mg-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #fde68a, #fff);
    border-radius: 999px;
    transition: width 0.6s var(--ease);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.mg-progress-stats {
    display: flex;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.mg-progress-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    font-family: var(--font-sans);
}

.mg-progress-stat i {
    font-size: 16px;
    margin-bottom: 6px;
    opacity: 0.9;
}

.mg-progress-stat-value {
    font-size: 22px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    margin-bottom: 2px;
}

.mg-progress-stat-label {
    font-size: 11px;
    opacity: 0.75;
}

.mg-progress-stat.applied  i { color: #86efac; }
.mg-progress-stat.pending  i { color: #fcd34d; }
.mg-progress-stat.total    i { color: #93c5fd; }

/* ----- View Toggle ----- */
.mg-view-toggle {
    display: flex;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    padding: 6px;
    border-radius: 12px;
    gap: 6px;
    width: fit-content;
    margin: 0 auto 32px;
    position: relative;
    z-index: 2;
}

.mg-toggle {
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-ar);
    transition: all 0.2s var(--ease);
}

.mg-toggle:hover { color: white; }

.mg-toggle.active {
    background: white;
    color: #b45309;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ----- GUI View Layout ----- */
.mg-gui-view {
    display: grid;
    grid-template-columns: 380px 1fr;
    background: white;
}

.mg-gui-view .mg-timeline {
    border-right: 1px solid var(--border);
    border-left: none;
}

/* ----- Timeline ----- */
.mg-timeline {
    padding: 28px 24px;
    background: linear-gradient(180deg, #fafafa, white);
}

.mg-timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.mg-timeline-header h3 {
    font-family: var(--font-ar);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mg-timeline-count {
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-alt);
    padding: 3px 10px;
    border-radius: 999px;
    font-family: var(--font-sans);
}

.mg-timeline-list {
    display: flex;
    flex-direction: column;
}

.mg-item {
    display: flex;
    gap: 14px;
    cursor: pointer;
    position: relative;
    border-radius: 12px;
    transition: background 0.2s var(--ease);
    padding: 8px;
    margin: -4px;
}

.mg-item:hover { background: rgba(245, 158, 11, 0.05); }

.mg-item.is-selected {
    background: rgba(245, 158, 11, 0.10);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.20);
}

.mg-item-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.mg-item-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
    z-index: 1;
}

.mg-item-dot.applied {
    background: linear-gradient(135deg, #10b981, #059669);
}

.mg-item-dot.pending {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.15);
}

.mg-item-line {
    width: 2px;
    flex: 1;
    min-height: 20px;
    background: linear-gradient(180deg, var(--border), transparent);
    margin-top: 4px;
}

.mg-item-content {
    flex: 1;
    min-width: 0;
    padding-bottom: 14px;
}

.mg-item:last-child .mg-item-content { padding-bottom: 0; }

.mg-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    gap: 8px;
}

.mg-item-version {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    background: var(--text);
    color: white;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.mg-item-status {
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    font-family: var(--font-sans);
}

.mg-item-status.applied  { background: rgba(16, 185, 129, 0.12); color: #059669; }
.mg-item-status.pending  { background: rgba(245, 158, 11, 0.12); color: #d97706; }

.mg-item-name {
    font-family: var(--font-ar);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.3;
}

.mg-item-desc {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 8px;
}

.mg-item-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

.mg-item-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.mg-item-meta i {
    font-size: 10px;
    opacity: 0.7;
}

/* ----- Editor ----- */
.mg-editor {
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
}

.mg-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
    gap: 16px;
}

.mg-editor-eyebrow {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    font-family: var(--font-sans);
    display: block;
    margin-bottom: 4px;
}

.mg-editor-title {
    font-family: var(--font-ar);
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.mg-editor-version-badge {
    background: var(--text);
    color: white;
    padding: 8px 14px;
    border-radius: 10px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.mg-editor-state {
    font-size: 10.5px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.mg-editor-state.applied  { background: rgba(16, 185, 129, 0.25); color: #86efac; }
.mg-editor-state.pending  { background: rgba(251, 191, 36, 0.25); color: #fde68a; }

/* Direction tabs */
.mg-direction-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.mg-direction-tab {
    padding: 12px 14px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-sans);
    transition: all 0.2s var(--ease);
}

.mg-direction-tab i {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    background: var(--bg-alt);
    color: var(--text-muted);
    transition: all 0.2s var(--ease);
}

.mg-direction-tab strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.mg-direction-tab span {
    font-size: 11px;
    color: var(--text-muted);
}

.mg-direction-tab.up.active   { border-color: #10b981; background: rgba(16, 185, 129, 0.04); }
.mg-direction-tab.up.active   i { background: #10b981; color: white; }
.mg-direction-tab.up.active   strong { color: #059669; }

.mg-direction-tab.down.active { border-color: #ef4444; background: rgba(239, 68, 68, 0.04); }
.mg-direction-tab.down.active i { background: #ef4444; color: white; }
.mg-direction-tab.down.active strong { color: #dc2626; }

/* Code Editor */
.mg-code-editor {
    background: #0f172a;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid #1e293b;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.20);
}

.mg-code-header {
    background: #1e293b;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mg-code-dots {
    display: flex;
    gap: 5px;
}

.mg-code-dots .dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.mg-code-dots .red    { background: #ef4444; }
.mg-code-dots .yellow { background: #eab308; }
.mg-code-dots .green  { background: #22c55e; }

.mg-code-filename {
    color: #94a3b8;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    flex: 1;
    direction: ltr;
    text-align: left;
}

.mg-code-copy {
    background: transparent;
    border: 1px solid #334155;
    color: #94a3b8;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 11px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-sans);
    transition: all 0.2s var(--ease);
}

.mg-code-copy:hover {
    background: #334155;
    color: white;
    border-color: #475569;
}

.mg-code-body {
    color: #e2e8f0;
    padding: 18px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.7;
    margin: 0;
    white-space: pre;
    overflow-x: auto;
    direction: ltr;
    text-align: left;
    max-height: 280px;
    overflow-y: auto;
}

/* CLI box */
.mg-cli-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.20);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.mg-cli-box-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #4f46e5;
    margin-bottom: 12px;
    font-family: var(--font-ar);
}

.mg-cli-box-commands {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mg-cli-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-sans);
}

.mg-cli-row-label {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    min-width: 60px;
}

.mg-cli-row code {
    flex: 1;
    background: rgba(15, 23, 42, 0.85);
    color: #c4b5fd;
    padding: 5px 10px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 11.5px;
    direction: ltr;
    text-align: left;
    overflow-x: auto;
    white-space: nowrap;
}

/* Actions */
.mg-actions {
    display: flex;
    justify-content: flex-end;
}

.mg-run-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    transition: all 0.2s var(--ease);
    color: white;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.mg-run-btn.apply {
    background: linear-gradient(135deg, #10b981, #059669);
}

.mg-run-btn.rollback {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.mg-run-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.mg-run-btn:disabled {
    background: var(--bg-alt);
    color: var(--text-subtle);
    cursor: not-allowed;
    box-shadow: none;
}

.mg-run-btn:disabled:hover { transform: none; }

/* ----- CLI Reference View ----- */
.mg-cli-view {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: white;
}

.mg-cli-intro {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: white;
    border-radius: 14px;
}

.mg-cli-intro-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

.mg-cli-intro h3 {
    font-family: var(--font-ar);
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 4px;
}

.mg-cli-intro p {
    font-size: 13px;
    opacity: 0.8;
    line-height: 1.5;
}

.mg-cli-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.mg-cli-group {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

.mg-cli-group-header {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.mg-cli-color-blue   .mg-cli-group-header { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.mg-cli-color-green  .mg-cli-group-header { background: linear-gradient(135deg, #10b981, #059669); }
.mg-cli-color-orange .mg-cli-group-header { background: linear-gradient(135deg, #f59e0b, #d97706); }
.mg-cli-color-purple .mg-cli-group-header { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

.mg-cli-group-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.20);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.mg-cli-group-header h4 {
    font-family: var(--font-ar);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

.mg-cli-group-header span {
    font-size: 11px;
    opacity: 0.85;
}

.mg-cli-group-commands {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mg-cli-cmd {
    background: var(--bg-alt);
    border-radius: 8px;
    padding: 8px 10px 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.mg-cli-cmd code {
    flex: 1;
    background: #1e293b;
    color: #94a3b8;
    padding: 6px 10px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 11.5px;
    direction: ltr;
    text-align: left;
    overflow-x: auto;
    white-space: nowrap;
}

.mg-cli-cmd-copy {
    background: white;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all 0.2s var(--ease);
    flex-shrink: 0;
}

.mg-cli-cmd-copy:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.mg-cli-cmd-desc {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-sans);
    flex-shrink: 0;
    min-width: 130px;
    text-align: right;
}

/* Setup section */
.mg-cli-setup {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(59, 130, 246, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.20);
    border-radius: 14px;
    padding: 20px;
}

.mg-cli-setup-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.mg-cli-setup-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.mg-cli-setup h4 {
    font-family: var(--font-ar);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.mg-cli-setup-header p {
    font-size: 12px;
    color: var(--text-muted);
}

.mg-cli-setup-steps {
    list-style: none;
    counter-reset: step;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mg-cli-setup-steps li {
    counter-increment: step;
    background: white;
    padding: 10px 14px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mg-cli-setup-steps li::before {
    content: counter(step);
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-sans);
    flex-shrink: 0;
}

.mg-cli-setup-steps li code {
    flex: 1;
    background: #1e293b;
    color: #94a3b8;
    padding: 6px 10px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 11.5px;
    direction: ltr;
    text-align: left;
    overflow-x: auto;
    white-space: nowrap;
}

.mg-cli-setup-steps li > span {
    font-size: 11.5px;
    color: var(--text-muted);
    font-family: var(--font-sans);
    min-width: 160px;
    text-align: right;
}

/* ----- Responsive ----- */
@media (max-width: 1024px) {
    .mg-gui-view { grid-template-columns: 340px 1fr; }
    .mg-hero-content { grid-template-columns: 1fr; }
    .mg-progress-card { min-width: 0; }
}

@media (max-width: 768px) {
    .mg-hero { padding: 24px 16px 0; }
    .mg-hero-content { grid-template-columns: 1fr; gap: 20px; margin-bottom: 24px; }
    .mg-progress-card { padding: 16px; }
    .mg-progress-stats { gap: 8px; }
    .mg-progress-stat-value { font-size: 18px; }
    .mg-hero-title { font-size: 22px; }
    .mg-view-toggle { margin: 0 auto 20px; padding: 4px; }
    .mg-toggle { padding: 8px 12px; font-size: 12px; }
    .mg-gui-view { grid-template-columns: 1fr; }
    .mg-gui-view .mg-timeline { border-right: none; border-bottom: 1px solid var(--border); }
    .mg-cli-grid { grid-template-columns: 1fr; }
    .mg-cli-cmd { flex-wrap: wrap; }
    .mg-cli-cmd-desc { width: 100%; text-align: right; margin-top: 4px; }
    .mg-cli-setup-steps li { flex-wrap: wrap; }
    .mg-cli-setup-steps li > span { width: 100%; min-width: 0; }
    .mg-editor { padding: 18px; }
    .mg-editor-header { flex-direction: column; align-items: flex-start; }
    .mg-editor-version-badge { flex-direction: row; gap: 8px; }
    .mg-direction-tabs { grid-template-columns: 1fr; }
    .mg-cli-intro { padding: 16px; }
}

@media (max-width: 480px) {
    .mg-progress-stats { gap: 4px; }
    .mg-progress-stat-value { font-size: 15px; }
    .mg-progress-stat-label { font-size: 10px; }
    .mg-progress-stat i { font-size: 13px; }
    .mg-hero-title { font-size: 20px; }
    .mg-item-dot { width: 28px; height: 28px; font-size: 11px; }
    .mg-editor-title { font-size: 18px; }
    .mg-direction-tab { padding: 10px 12px; gap: 10px; }
    .mg-direction-tab i { width: 28px; height: 28px; font-size: 12px; }
    .mg-direction-tab strong { font-size: 12px; }
    .mg-direction-tab span { font-size: 10px; }
    .mg-code-body { font-size: 11.5px; padding: 14px; }
    .mg-cli-box { padding: 12px; }
    .mg-cli-row { flex-direction: column; align-items: flex-start; gap: 4px; }
    .mg-cli-row code { width: 100%; font-size: 10.5px; white-space: pre-wrap; word-break: break-all; }
    .mg-run-btn { padding: 12px 20px; font-size: 13px; width: 100%; justify-content: center; }
    .mg-cli-view { padding: 18px; }
    .mg-cli-intro h3 { font-size: 15px; }
    .mg-cli-group-commands { padding: 10px; }
    .mg-cli-cmd code { font-size: 10.5px; }
    .mg-cli-setup { padding: 14px; }
    .mg-cli-setup-steps li { padding: 8px 10px; gap: 8px; }
    .mg-cli-setup-steps li code { font-size: 10.5px; }
}

/* =========================================================
   FIX: Missing styles for DatabaseApp
   ========================================================= */
.db-query-editor {
    background: #1e293b;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

.db-table-rows {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

/* =========================================================
   FIX: Missing styles for ShopApp
   ========================================================= */
.shop-app {
    width: 100%;
}

/* =========================================================
   FIX: Missing styles for PortfolioApp
   ========================================================= */
.portfolio-about h3 {
    font-family: var(--font-ar);
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 14px;
}

/* =========================================================
   FIX: Missing styles for PerfMonitor (full section)
   ========================================================= */
.perf-app {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    min-height: 600px;
    border: 1px solid var(--border);
}

.perf-header {
    background: linear-gradient(135deg, #1e3a8a, #06b6d4);
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.perf-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}

.perf-metric {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-alt);
    border-radius: 10px;
}

.perf-metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.perf-metric-green { background: #10b981; }
.perf-metric-blue  { background: #3b82f6; }
.perf-metric-orange { background: #f59e0b; }
.perf-metric-purple { background: #8b5cf6; }

.perf-metric-value {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.1;
}

.perf-metric-unit {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    margin-right: 2px;
}

.perf-metric-label {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

.perf-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.perf-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
    animation: perfPulseAnim 1.5s ease-in-out infinite;
}

@keyframes perfPulseAnim {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(0.85); }
}

.perf-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
}

.perf-chart-card {
    background: white;
    padding: 18px;
}

.perf-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 14px;
}

.perf-chart-header h4 {
    font-family: var(--font-ar);
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.perf-chart-avg {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-weight: 600;
}

.perf-line-chart {
    height: 120px;
    display: flex;
    align-items: flex-end;
    gap: 2px;
}

.perf-bar {
    flex: 1;
    background: #10b981;
    border-radius: 3px 3px 0 0;
    min-height: 4px;
    transition: height 0.6s var(--ease);
}

.perf-bar-blue { background: #3b82f6; }

.perf-qps-chart { /* specific override if needed */ }

.perf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
}

.perf-section {
    background: white;
    padding: 18px;
}

.perf-section h4 {
    font-family: var(--font-ar);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.perf-table-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.perf-table-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.perf-table-info {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
}

.perf-table-name {
    font-family: var(--font-sans);
    font-weight: 700;
    color: var(--text);
}

.perf-table-bar-wrap {
    height: 8px;
    background: var(--bg-alt);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.perf-table-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 6px;
    min-width: 60px;
    transition: width 0.6s var(--ease);
}

.perf-table-size {
    font-size: 9.5px;
    color: white;
    font-weight: 600;
    font-family: var(--font-sans);
}

.perf-total {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
}

.perf-total strong { color: var(--text); font-family: var(--font-sans); }

.perf-query-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.perf-query-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    background: rgba(239, 68, 68, 0.06);
    border-radius: 8px;
    border-right: 3px solid #ef4444;
}

.perf-query-status {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 11px;
}

.perf-query-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.perf-query-text {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: ltr;
}

.perf-query-time {
    font-size: 12px;
    font-weight: 700;
    color: #ef4444;
    font-family: var(--font-sans);
    flex-shrink: 0;
}

.perf-empty-good {
    text-align: center;
    padding: 20px;
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.perf-query-item.slow {
    background: rgba(239, 68, 68, 0.06);
}

/* =========================================================
   FIX: Missing styles for MigrationTool
   ========================================================= */
.mg-app {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    min-height: 600px;
    border: 1px solid var(--border);
}

.mg-hero-title-area {
    /* already in hero but explicit here */
}


/* =========================================================
   ADDITIONAL FIXES
   ========================================================= */
.perf-table-rows {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

.opt-plan-content {
    flex: 1;
    min-width: 0;
}

/* =========================================================
   CODE FIRST STEPS VIEW
   ========================================================= */
.mg-steps-view {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: white;
}

.mg-steps-intro {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 26px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-radius: 14px;
    position: relative;
    overflow: hidden;
}

.mg-steps-intro::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.10), transparent);
}

.mg-steps-intro-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.mg-steps-intro h3 {
    font-family: var(--font-ar);
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.mg-steps-intro p {
    font-size: 13px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    line-height: 1.5;
}

.mg-steps-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mg-step-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.mg-step-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.08);
}

.mg-step-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: linear-gradient(90deg, var(--bg-alt), white);
    border-bottom: 1px solid var(--border);
}

.mg-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    font-family: var(--font-sans);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.mg-step-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.mg-step-info {
    flex: 1;
    min-width: 0;
}

.mg-step-info h4 {
    font-family: var(--font-ar);
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
}

.mg-step-info p {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.5;
}

.mg-step-codes {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mg-step-code-block {
    background: #0f172a;
    border-radius: 10px;
    overflow: hidden;
}

.mg-step-code-header {
    background: #1e293b;
    padding: 6px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mg-step-lang {
    font-size: 10px;
    font-weight: 700;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: var(--font-sans);
}

.mg-step-copy {
    background: transparent;
    border: 1px solid #334155;
    color: #94a3b8;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 11px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-sans);
    transition: all 0.2s var(--ease);
}

.mg-step-copy:hover {
    background: #334155;
    color: white;
    border-color: #475569;
}

.mg-step-code {
    color: #e2e8f0;
    padding: 14px 16px;
    font-family: 'Courier New', 'Cascadia Code', monospace;
    font-size: 12.5px;
    line-height: 1.6;
    margin: 0;
    white-space: pre;
    overflow-x: auto;
    direction: ltr;
    text-align: left;
}

    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .mg-step-header { flex-wrap: wrap; gap: 10px; }
    .mg-step-info { width: 100%; }
    .mg-step-codes { padding: 14px; }
    .mg-step-code { font-size: 11.5px; padding: 12px; }
    .mg-steps-intro { padding: 16px; }
}

@media (max-width: 480px) {
    .mg-step-number { width: 32px; height: 32px; font-size: 14px; }
    .mg-step-icon { width: 36px; height: 36px; font-size: 14px; }
    .mg-step-info h4 { font-size: 14px; }
    .mg-step-info p { font-size: 12px; }
    .mg-step-code { font-size: 11px; padding: 10px; }
    .mg-steps-intro h3 { font-size: 16px; }
}

/* =========================================================
   SQL SERVER ON DOCKER + DBEAVER
   ========================================================= */
.sqldocker-frame { padding: 24px; }

.sqldocker-app {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    min-height: 600px;
}

/* Hero */
.sqldocker-hero {
    position: relative;
    background: linear-gradient(135deg, #0a0e29 0%, #1a1f4d 50%, #2d1b69 100%);
    color: white;
    padding: 48px 36px;
    overflow: hidden;
}

.sqldocker-hero-bg {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(36, 150, 237, 0.15), transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(204, 41, 39, 0.15), transparent 50%);
    pointer-events: none;
}

.sqldocker-hero-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}

.sqldocker-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(10px);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 14px;
    font-family: var(--font-sans);
}

.sqldocker-hero-badge i { color: #2496ed; }

.sqldocker-hero-title {
    font-family: var(--font-ar);
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    line-height: 1.2;
}

.sqldocker-hero-desc {
    font-size: 15px;
    opacity: 0.85;
    margin-bottom: 28px;
    max-width: 600px;
    line-height: 1.6;
}

.sqldocker-tools {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.sqldocker-tool-card {
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sqldocker-tool-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
}

.sqldocker-tool-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.sqldocker-tool-name {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 14px;
}

.sqldocker-tool-version {
    font-size: 11px;
    opacity: 0.7;
    font-family: var(--font-sans);
}

.sqldocker-tool-desc {
    font-size: 12px;
    opacity: 0.7;
    line-height: 1.4;
}

/* Flow Diagram */
.sqldocker-flow {
    padding: 32px 36px;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
}

.sqldocker-flow h3 {
    font-family: var(--font-ar);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sqldocker-flow-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.sqldocker-flow-node {
    background: white;
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
    min-width: 120px;
    justify-content: center;
}

.sqldocker-flow-node.sql {
    border-color: #cc2927;
    background: rgba(204, 41, 39, 0.04);
}

.sqldocker-flow-node i {
    font-size: 18px;
    color: var(--text-muted);
}

.sqldocker-flow-node.sql i { color: #cc2927; }

.sqldocker-flow-arrow {
    color: var(--text-muted);
    font-size: 14px;
}

/* Steps */
.sqldocker-steps {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 500px;
}

.sqldocker-steps-tabs {
    background: var(--bg-alt);
    border-left: 1px solid var(--border);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sqldocker-step-tab {
    background: white;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: right;
    font-family: var(--font-ar);
    transition: all 0.2s var(--ease);
}

.sqldocker-step-tab:hover {
    border-color: var(--border);
    background: white;
}

.sqldocker-step-tab.active {
    background: white;
    border-color: #2496ed;
    box-shadow: 0 0 0 3px rgba(36, 150, 237, 0.08);
}

.sqldocker-step-tab-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--text);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-sans);
    flex-shrink: 0;
}

.sqldocker-step-tab.active .sqldocker-step-tab-num {
    background: #2496ed;
}

.sqldocker-step-tab-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--bg-alt);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.sqldocker-step-tab.active .sqldocker-step-tab-icon {
    background: rgba(36, 150, 237, 0.12);
    color: #2496ed;
}

.sqldocker-step-tab-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    flex: 1;
}

/* Step Content */
.sqldocker-step-content {
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sqldocker-step-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.sqldocker-step-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.sqldocker-step-icon.color-blue   { background: rgba(36, 150, 237, 0.12); color: #2496ed; }
.sqldocker-step-icon.color-red    { background: rgba(204, 41, 39, 0.12); color: #cc2927; }
.sqldocker-step-icon.color-green  { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.sqldocker-step-icon.color-purple { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.sqldocker-step-icon.color-orange { background: rgba(249, 115, 22, 0.12); color: #f97316; }
.sqldocker-step-icon.color-cyan   { background: rgba(6, 182, 212, 0.12); color: #06b6d4; }
.sqldocker-step-icon.color-pink   { background: rgba(236, 72, 153, 0.12); color: #ec4899; }

.sqldocker-step-eyebrow {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    font-family: var(--font-sans);
    margin-bottom: 4px;
}

.sqldocker-step-title {
    font-family: var(--font-ar);
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.sqldocker-step-desc {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.6;
}

.sqldocker-step-code {
    background: #0f172a;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #1e293b;
}

.sqldocker-step-code-header {
    background: #1e293b;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sqldocker-step-code-dots {
    display: flex;
    gap: 5px;
}

.sqldocker-step-code-dots span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.sqldocker-step-code-dots span:nth-child(1) { background: #ef4444; }
.sqldocker-step-code-dots span:nth-child(2) { background: #eab308; }
.sqldocker-step-code-dots span:nth-child(3) { background: #22c55e; }

.sqldocker-step-code-label {
    flex: 1;
    color: #94a3b8;
    font-size: 12px;
    font-family: var(--font-sans);
}

.sqldocker-step-copy {
    background: transparent;
    border: 1px solid #334155;
    color: #94a3b8;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 11px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-sans);
    transition: all 0.2s var(--ease);
}

.sqldocker-step-copy:hover {
    background: #334155;
    color: white;
    border-color: #475569;
}

.sqldocker-step-code-body {
    color: #e2e8f0;
    padding: 18px;
    font-family: 'Courier New', 'Cascadia Code', monospace;
    font-size: 12.5px;
    line-height: 1.7;
    margin: 0;
    white-space: pre;
    overflow-x: auto;
    direction: ltr;
    text-align: left;
    max-height: 300px;
    overflow-y: auto;
}

/* Notes */
.sqldocker-step-notes {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(249, 115, 22, 0.05));
    border: 1px solid rgba(245, 158, 11, 0.20);
    border-radius: 12px;
    padding: 14px 18px;
}

.sqldocker-step-notes-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #d97706;
    margin-bottom: 8px;
    font-family: var(--font-ar);
}

.sqldocker-step-notes ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sqldocker-step-notes li {
    font-size: 12.5px;
    color: var(--text-muted);
    padding: 4px 0;
    padding-right: 18px;
    position: relative;
    line-height: 1.5;
}

.sqldocker-step-notes li::before {
    content: '•';
    position: absolute;
    right: 0;
    color: #f59e0b;
    font-weight: 700;
}

/* Navigation */
.sqldocker-step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.sqldocker-step-btn {
    padding: 10px 18px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-sans);
    transition: all 0.2s var(--ease);
    color: var(--text);
}

.sqldocker-step-btn:hover:not(:disabled) {
    border-color: #2496ed;
    color: #2496ed;
}

.sqldocker-step-btn.primary {
    background: #2496ed;
    color: white;
    border-color: #2496ed;
}

.sqldocker-step-btn.primary:hover:not(:disabled) {
    background: #1d7ec4;
    border-color: #1d7ec4;
    color: white;
}

.sqldocker-step-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.sqldocker-step-counter {
    font-size: 13px;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-weight: 600;
}

/* Summary */
.sqldocker-summary {
    margin: 0 32px 32px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(36, 150, 237, 0.06));
    border: 1px solid rgba(16, 185, 129, 0.20);
    border-radius: 14px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.sqldocker-summary-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
}

.sqldocker-summary h4 {
    font-family: var(--font-ar);
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
}

.sqldocker-summary p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

@media (max-width: 1024px) {
    .sqldocker-tools { grid-template-columns: 1fr; }
    .sqldocker-steps { grid-template-columns: 220px 1fr; }
}

@media (max-width: 768px) {
    .sqldocker-hero { padding: 28px 20px; }
    .sqldocker-hero-title { font-size: 22px; }
    .sqldocker-flow { padding: 24px 16px; }
    .sqldocker-flow-diagram { gap: 8px; }
    .sqldocker-flow-node { min-width: 0; padding: 8px 12px; font-size: 11px; }
    .sqldocker-steps { grid-template-columns: 1fr; }
    .sqldocker-steps-tabs {
        flex-direction: row;
        overflow-x: auto;
        border-left: none;
        border-bottom: 1px solid var(--border);
    }
    .sqldocker-step-tab { min-width: 140px; }
    .sqldocker-step-content { padding: 18px; }
    .sqldocker-step-header { flex-direction: column; }
    .sqldocker-step-code-body { font-size: 11px; padding: 14px; }
    .sqldocker-summary { margin: 0 16px 24px; padding: 16px; flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .sqldocker-hero-title { font-size: 18px; }
    .sqldocker-tool-card { padding: 14px; }
    .sqldocker-step-title { font-size: 17px; }
    .sqldocker-step-nav { flex-direction: column; gap: 10px; }
}

/* =========================================================
   SENTIMENT ANALYZER (NLP Demo)
   ========================================================= */
.sentiment-frame { padding: 24px; }

.sentiment-app {
    background: linear-gradient(135deg, #faf5ff 0%, #fdf2f8 100%);
    border-radius: 16px;
    overflow: hidden;
    min-height: 600px;
    border: 1px solid #e9d5ff;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Header */
.sentiment-header {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: white;
    padding: 16px 20px;
    border-radius: 14px;
}

.sentiment-header-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.20);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.sentiment-header h3 {
    font-family: var(--font-ar);
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 2px;
}

.sentiment-header p {
    font-size: 12.5px;
    opacity: 0.85;
}

.sentiment-lang-toggle {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.20);
    border-radius: 10px;
    padding: 3px;
    margin-right: auto;
    flex-shrink: 0;
}

.sentiment-lang-toggle button {
    padding: 6px 14px;
    background: transparent;
    border: none;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    font-family: var(--font-ar);
    transition: all 0.2s var(--ease);
}

.sentiment-lang-toggle button.active {
    background: white;
    color: #8b5cf6;
}

/* Input */
.sentiment-input-section {
    background: white;
    border: 1px solid #e9d5ff;
    border-radius: 14px;
    padding: 16px;
}

.sentiment-input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.sentiment-counter {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

.sentiment-clear-btn {
    background: white;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-sans);
    transition: all 0.2s var(--ease);
}

.sentiment-clear-btn:hover:not(:disabled) {
    background: #fee2e2;
    color: #ef4444;
    border-color: #ef4444;
}

.sentiment-clear-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.sentiment-textarea {
    width: 100%;
    border: 2px solid #e9d5ff;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    font-family: var(--font-ar);
    resize: vertical;
    min-height: 90px;
    outline: none;
    transition: border-color 0.2s var(--ease);
    background: #fafafa;
    color: var(--text);
}

.sentiment-textarea:focus {
    border-color: #8b5cf6;
    background: white;
}

.sentiment-textarea::placeholder {
    color: var(--text-subtle);
}

.sentiment-samples {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 12px;
}

.sentiment-samples-label {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-weight: 600;
}

.sentiment-sample-btn {
    padding: 5px 10px;
    background: #faf5ff;
    border: 1px solid #e9d5ff;
    border-radius: 999px;
    font-size: 11.5px;
    color: #6b21a8;
    cursor: pointer;
    font-family: var(--font-ar);
    transition: all 0.2s var(--ease);
}

.sentiment-sample-btn:hover {
    background: #8b5cf6;
    color: white;
    border-color: #8b5cf6;
}

/* Score Section */
.sentiment-score-section {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 18px;
    background: white;
    border: 1px solid #e9d5ff;
    border-radius: 14px;
    padding: 20px;
}

.sentiment-gauge {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sentiment-gauge-svg {
    width: 100%;
    max-width: 200px;
}

.sentiment-gauge-label {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.sentiment-emoji {
    font-size: 28px;
    line-height: 1;
}

.sentiment-score-value {
    font-size: 32px;
    font-weight: 800;
    font-family: var(--font-sans);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    margin: 4px 0 2px;
}

.sentiment-score-label {
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-ar);
}

/* Stats Cards */
.sentiment-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.sentiment-stat-card {
    background: var(--bg-alt);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
    transition: border-color 0.2s var(--ease);
}

.sentiment-stat-card:hover {
    border-color: currentColor;
}

.sentiment-stat-card.positive { color: #10b981; }
.sentiment-stat-card.negative { color: #ef4444; }
.sentiment-stat-card.neutral  { color: #6b7280; }
.sentiment-stat-card.total    { color: #8b5cf6; }

.sentiment-stat-icon {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    color: currentColor;
}

.sentiment-stat-value {
    font-size: 22px;
    font-weight: 800;
    font-family: var(--font-sans);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    color: var(--text);
}

.sentiment-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

/* Words Cloud */
.sentiment-words-section {
    background: white;
    border: 1px solid #e9d5ff;
    border-radius: 14px;
    padding: 16px;
}

.sentiment-words-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    font-family: var(--font-ar);
}

.sentiment-words-count {
    background: var(--bg-alt);
    color: var(--text-muted);
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-family: var(--font-sans);
    font-weight: 600;
    margin-right: auto;
}

.sentiment-words-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sentiment-word {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    font-family: var(--font-ar);
    cursor: help;
    transition: transform 0.2s var(--ease);
}

.sentiment-word:hover { transform: scale(1.05); }

.sentiment-word-positive {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.sentiment-word-negative {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.sentiment-word-neutral {
    background: var(--bg-alt);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* Algorithm Info */
.sentiment-algo-info {
    display: flex;
    gap: 12px;
    align-items: center;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(236, 72, 153, 0.05));
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 12px;
    padding: 14px 18px;
}

.sentiment-algo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

.sentiment-algo-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    font-family: var(--font-ar);
}

.sentiment-algo-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    font-family: var(--font-sans);
}

/* Empty */
.sentiment-empty {
    background: white;
    border: 2px dashed #e9d5ff;
    border-radius: 14px;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.sentiment-empty i {
    font-size: 36px;
    margin-bottom: 12px;
    opacity: 0.4;
    display: block;
}

.sentiment-empty p {
    font-size: 13px;
    font-family: var(--font-sans);
}

@media (max-width: 768px) {
    .sentiment-frame { padding: 14px; }
    .sentiment-app { padding: 14px; }
    .sentiment-header { flex-wrap: wrap; padding: 14px; }
    .sentiment-header h3 { font-size: 15px; }
    .sentiment-header p { font-size: 11.5px; }
    .sentiment-lang-toggle { margin: 0; }
    .sentiment-score-section { grid-template-columns: 1fr; gap: 16px; }
    .sentiment-gauge-svg { max-width: 180px; }
    .sentiment-stats { grid-template-columns: 1fr 1fr; }
    .sentiment-words-cloud { gap: 4px; }
    .sentiment-word { font-size: 11px; padding: 4px 9px; }
    .sentiment-algo-info { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .sentiment-header { flex-direction: column; text-align: center; }
    .sentiment-lang-toggle { margin: 0; }
    .sentiment-score-value { font-size: 26px; }
    .sentiment-emoji { font-size: 24px; }
    .sentiment-stats { grid-template-columns: 1fr; }
    .sentiment-textarea { font-size: 13px; }
}

/* =========================================================
   DOCUMENTATION SECTIONS (used in all portfolio pages)
   ========================================================= */
.project-docs {
    max-width: 1200px;
    margin: 32px auto 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
}

.project-docs-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.project-docs-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    flex-shrink: 0;
}

.project-docs-header h2 {
    font-family: var(--font-ar);
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
}

.project-docs-header p {
    font-size: 13px;
    color: var(--text-muted);
}

.project-docs-steps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 28px;
}

.docs-step {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    position: relative;
    transition: all 0.2s var(--ease);
}

.docs-step:hover {
    border-color: #8b5cf6;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.08);
    transform: translateY(-2px);
}

.docs-step-num {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    font-family: var(--font-sans);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.docs-step-icon {
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b5cf6;
    font-size: 16px;
    margin-bottom: 12px;
}

.docs-step-content h3 {
    font-family: var(--font-ar);
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.docs-step-content p {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 10px;
}

.docs-step-content code {
    display: block;
    background: #0f172a;
    color: #c4b5fd;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 11.5px;
    direction: ltr;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-all;
}

.project-docs-tech {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04), rgba(139, 92, 246, 0.04));
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 14px;
    padding: 22px 24px;
}

.project-docs-tech h3 {
    font-family: var(--font-ar);
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.docs-tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.docs-tech-item {
    background: white;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.docs-tech-item strong {
    font-size: 13px;
    font-weight: 700;
    color: #4f46e5;
    font-family: var(--font-sans);
}

.docs-tech-item span {
    font-size: 11.5px;
    color: var(--text-muted);
}

@media (max-width: 1024px) {
    .project-docs { padding: 18px; }
    .project-docs-steps { grid-template-columns: 1fr; gap: 14px; }
    .docs-tech-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .project-docs { padding: 14px; }
    .project-docs-header { flex-direction: column; text-align: center; gap: 12px; padding-bottom: 16px; }
    .project-docs-header h2 { font-size: 18px; }
    .docs-tech-grid { grid-template-columns: 1fr; }
    .docs-step { padding: 14px; }
}

@media (max-width: 480px) {
    .docs-step-content h3 { font-size: 13px; }
    .docs-step-content p { font-size: 11.5px; }
    .docs-step-content code { font-size: 10.5px; }
}

/* =========================================================
   NEURAL NETWORK PLAYGROUND
   ========================================================= */
.nn-frame { padding: 20px; }

.nn-app {
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
    border-radius: 16px;
    overflow: hidden;
    min-height: 700px;
    border: 1px solid #312e81;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    color: white;
}

/* Header */
.nn-header {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 14px;
    padding: 16px 20px;
}

.nn-header-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.nn-header h3 {
    font-family: var(--font-sans);
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 2px;
}

.nn-header p {
    font-size: 12.5px;
    opacity: 0.7;
    color: #cbd5e1;
}

.nn-status {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.10);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: #a5f3fc;
    margin-right: auto;
}

.nn-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22d3ee;
    box-shadow: 0 0 6px #22d3ee;
    animation: nnPulse 1.5s infinite;
}

@keyframes nnPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

/* Controls */
.nn-controls {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 18px;
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 1fr;
    gap: 18px;
    align-items: end;
}

.nn-control {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nn-control label {
    font-size: 11.5px;
    color: #cbd5e1;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: var(--font-sans);
}

.nn-control input[type="range"] {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    appearance: none;
    outline: none;
}

.nn-control input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.nn-control input[type="number"] {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 6px 10px;
    color: white;
    font-size: 13px;
    font-family: var(--font-sans);
    outline: none;
    width: 100%;
}

.nn-control input[type="number"]:focus {
    border-color: #8b5cf6;
}

.nn-control-value {
    font-size: 12px;
    color: #a78bfa;
    font-weight: 700;
    font-family: var(--font-sans);
}

.nn-buttons {
    display: flex;
    gap: 8px;
}

.nn-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: white;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-sans);
    transition: all 0.2s ease;
    flex: 1;
    justify-content: center;
}

.nn-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.nn-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.nn-btn.primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.nn-btn.primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    transform: translateY(-1px);
}

/* Main grid */
.nn-main {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
}

.nn-network-section, .nn-loss-section, .nn-truth-section, .nn-stats {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 16px;
}

.nn-stats {
    grid-column: 2;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-self: start;
}

.nn-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: var(--font-sans);
}

.nn-section-header i {
    color: #a78bfa;
}

.nn-epoch-counter {
    margin-right: auto;
    background: rgba(167, 139, 250, 0.2);
    color: #c4b5fd;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.nn-canvas {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.nn-stat-card {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nn-stat-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.nn-stat-value {
    font-size: 17px;
    font-weight: 800;
    color: white;
    font-family: var(--font-sans);
    line-height: 1;
}

.nn-stat-label {
    font-size: 10.5px;
    color: #cbd5e1;
    margin-top: 2px;
}

.nn-loss-section {
    grid-column: 1;
}

/* Truth table */
.nn-truth-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-sans);
    font-size: 12.5px;
}

.nn-truth-table th {
    text-align: center;
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 600;
    padding: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nn-truth-table td {
    text-align: center;
    padding: 8px 6px;
    color: #e2e8f0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-variant-numeric: tabular-nums;
}

.nn-truth-table tr.correct td { color: #86efac; }
.nn-truth-table tr.incorrect td { color: #fca5a5; }

.nn-status-ok, .nn-status-fail {
    font-size: 14px;
    font-weight: 800;
}

.nn-status-ok { color: #22c55e; }
.nn-status-fail { color: #ef4444; }

/* Info */
.nn-info {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.08));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.nn-info-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.nn-info-title {
    font-size: 13px;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
    font-family: var(--font-sans);
}

.nn-info-desc {
    font-size: 12px;
    color: #cbd5e1;
    line-height: 1.6;
    font-family: var(--font-sans);
}

.nn-info-desc strong { color: #a78bfa; }

@media (max-width: 900px) {
    .nn-main { grid-template-columns: 1fr; }
    .nn-stats { grid-column: 1; grid-row: auto; flex-direction: row; }
    .nn-stats .nn-stat-card { flex: 1; }
}

@media (max-width: 768px) {
    .nn-frame { padding: 12px; }
    .nn-app { padding: 14px; }
    .nn-controls { grid-template-columns: 1fr; }
    .nn-stats { flex-direction: column; }
    .nn-stat-value { font-size: 15px; }
    .nn-canvas { max-width: 100%; height: auto; }
}

@media (max-width: 480px) {
    .nn-header { flex-direction: column; text-align: center; gap: 10px; padding: 12px; }
    .nn-status { margin: 0; }
    .nn-header h3 { font-size: 15px; }
}

/* Info list in NeuralNet */
.nn-info-list {
    margin: 0;
    padding-right: 20px;
    list-style: none;
    counter-reset: nn-step;
}

.nn-info-list li {
    position: relative;
    padding: 4px 0 4px 0;
    counter-increment: nn-step;
    color: #cbd5e1;
    line-height: 1.6;
}

.nn-info-list li::before {
    content: counter(nn-step);
    position: absolute;
    right: -22px;
    top: 4px;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    font-family: var(--font-sans);
}

.nn-info-list li strong {
    color: #a78bfa;
    margin-right: 4px;
}

/* =========================================================
   K-MEANS COLOR CLUSTERING
   ========================================================= */
.km-frame { padding: 20px; }

.km-app {
    background: linear-gradient(135deg, #fef3c7 0%, #fce7f3 100%);
    border-radius: 16px;
    overflow: hidden;
    min-height: 700px;
    border: 1px solid #fbbf24;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.km-header {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #f59e0b, #ec4899);
    color: white;
    padding: 16px 20px;
    border-radius: 14px;
}

.km-header-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.20);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.km-header h3 {
    font-family: var(--font-ar);
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 2px;
}

.km-header p {
    font-size: 12.5px;
    opacity: 0.9;
}

.km-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.km-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.km-image-box {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
}

.km-image-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: var(--font-sans);
}

.km-image-label i {
    color: #f59e0b;
}

.km-canvas {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    background: #f3f4f6;
    display: block;
    cursor: pointer;
}

.km-canvas:hover {
    background: #e5e7eb;
}

.km-controls {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 12px;
    align-items: end;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
}

.km-control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.km-control-group label {
    font-size: 10.5px;
    color: #6b7280;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: var(--font-sans);
}

.km-samples {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.km-sample-btn {
    padding: 6px 10px;
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 6px;
    font-size: 11px;
    color: #92400e;
    cursor: pointer;
    font-family: var(--font-sans);
    font-weight: 600;
    transition: all 0.2s ease;
}

.km-sample-btn:hover {
    background: #fbbf24;
    color: white;
}

.km-sample-btn.active {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

.km-upload-btn {
    padding: 8px 12px;
    background: linear-gradient(135deg, #f59e0b, #ec4899);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-sans);
    transition: all 0.2s ease;
}

.km-upload-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.km-k-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.km-k-control input[type="range"] {
    flex: 1;
    height: 4px;
    background: #e5e7eb;
    border-radius: 999px;
    appearance: none;
    outline: none;
}

.km-k-control input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #f59e0b, #ec4899);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.km-k-value {
    font-size: 13px;
    font-weight: 800;
    color: #f59e0b;
    font-family: var(--font-sans);
    min-width: 18px;
    text-align: center;
}

.km-run-btn {
    padding: 10px 14px;
    background: linear-gradient(135deg, #f59e0b, #ec4899);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-sans);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.km-run-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.km-run-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.km-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.km-results {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
}

.km-results-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: var(--font-sans);
}

.km-results-header i {
    color: #f59e0b;
}

.km-results-count {
    margin-right: auto;
    background: #fef3c7;
    color: #92400e;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.km-palette {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.km-color-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.km-color-swatch {
    height: 50px;
    width: 100%;
}

.km-color-info {
    padding: 10px 12px;
}

.km-color-hex {
    font-size: 12px;
    font-weight: 700;
    color: #1f2937;
    font-family: var(--font-sans);
    margin-bottom: 4px;
}

.km-color-rgb {
    font-size: 10.5px;
    color: #6b7280;
    font-family: var(--font-sans);
    margin-bottom: 4px;
}

.km-color-percent {
    font-size: 11px;
    font-weight: 700;
    color: #f59e0b;
    font-family: var(--font-sans);
}

.km-info {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(236, 72, 153, 0.05));
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.km-info-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #f59e0b, #ec4899);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

.km-info-title {
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 6px;
    font-family: var(--font-sans);
}

.km-info-desc {
    font-size: 12px;
    color: #4b5563;
    line-height: 1.6;
    font-family: var(--font-sans);
}

.km-info-list {
    margin: 0;
    padding-right: 20px;
    list-style: none;
    counter-reset: km-step;
}

.km-info-list li {
    position: relative;
    padding: 3px 0 3px 0;
    color: #4b5563;
    line-height: 1.5;
    counter-increment: km-step;
}

.km-info-list li::before {
    content: counter(km-step);
    position: absolute;
    right: -22px;
    top: 3px;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #f59e0b, #ec4899);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    font-family: var(--font-sans);
}

.km-info-list li strong {
    color: #d97706;
    margin-right: 4px;
}

@media (max-width: 768px) {
    .km-frame { padding: 12px; }
    .km-app { padding: 14px; }
    .km-images { grid-template-columns: 1fr; }
    .km-controls { grid-template-columns: 1fr; }
    .km-palette { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

@media (max-width: 480px) {
    .km-header { flex-direction: column; text-align: center; }
    .km-info { flex-direction: column; }
    .km-info-list { padding-right: 20px; }
}

/* ==========================================================
   IMAGE CLASSIFIER (CNN-style)
   ========================================================== */
.ic-frame { padding: 20px; }

.ic-app {
    background: linear-gradient(135deg, #ede9fe 0%, #cffafe 100%);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #a78bfa;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ic-header {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    color: white;
    padding: 16px 20px;
    border-radius: 14px;
}

.ic-header-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.20);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.ic-header h3 {
    font-family: var(--font-ar);
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 2px;
}

.ic-header p {
    font-size: 12.5px;
    opacity: 0.9;
}

.ic-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ic-tabs {
    display: flex;
    gap: 6px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 6px;
}

.ic-tab {
    flex: 1;
    padding: 9px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    color: #6b7280;
    cursor: pointer;
    font-family: var(--font-sans);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s var(--ease);
}

.ic-tab:hover { background: #f3f4f6; color: #1f2937; }

.ic-tab.active {
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    color: white;
    box-shadow: 0 2px 8px rgba(139,92,246,0.25);
}

/* --- Predict pane --- */
.ic-predict-pane {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ic-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.ic-image-box {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
}

.ic-image-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: var(--font-sans);
}

.ic-image-label i { color: #8b5cf6; }

.ic-canvas-display {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    background: #f3f4f6;
    display: block;
    cursor: pointer;
    image-rendering: pixelated;
}

.ic-canvas-display:hover { background: #e5e7eb; }

.ic-pred-box {
    display: flex;
    flex-direction: column;
}

.ic-pred-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.ic-pred-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    margin: 6px auto 0;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    animation: icPop 0.5s var(--ease);
}

@keyframes icPop {
    0% { transform: scale(0.6); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.ic-pred-name {
    text-align: center;
    font-size: 18px;
    font-weight: 800;
    color: #1f2937;
    font-family: var(--font-sans);
}

.ic-pred-conf {
    text-align: center;
    font-size: 12px;
    color: #8b5cf6;
    font-weight: 700;
    margin-top: -4px;
    margin-bottom: 6px;
    font-family: var(--font-sans);
}

.ic-pred-bars {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: auto;
}

.ic-pred-bar-row {
    display: grid;
    grid-template-columns: 22px 50px 1fr 42px;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
}

.ic-pred-bar-icon { font-size: 16px; text-align: center; }

.ic-pred-bar-label {
    font-weight: 600;
    color: #4b5563;
    font-family: var(--font-sans);
}

.ic-pred-bar-track {
    height: 9px;
    background: #f3f4f6;
    border-radius: 999px;
    overflow: hidden;
}

.ic-pred-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.6s var(--ease);
}

.ic-pred-bar-pct {
    font-size: 10.5px;
    font-weight: 700;
    color: #6b7280;
    text-align: right;
    font-family: var(--font-sans);
    font-variant-numeric: tabular-nums;
}

.ic-pred-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #9ca3af;
    font-size: 13px;
    font-family: var(--font-sans);
    min-height: 200px;
}

.ic-pred-empty i { font-size: 32px; }

/* --- Controls --- */
.ic-controls {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 12px;
    align-items: end;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
}

.ic-control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ic-control-group label {
    font-size: 10.5px;
    color: #6b7280;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: var(--font-sans);
}

.ic-samples {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.ic-sample-btn {
    padding: 6px 10px;
    background: #ede9fe;
    border: 1px solid #a78bfa;
    border-radius: 6px;
    font-size: 11px;
    color: #6d28d9;
    cursor: pointer;
    font-family: var(--font-sans);
    font-weight: 600;
    transition: all 0.2s ease;
}

.ic-sample-btn:hover { background: #a78bfa; color: white; }

.ic-sample-btn.active {
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    color: white;
    border-color: #8b5cf6;
}

.ic-upload-btn {
    padding: 8px 12px;
    background: white;
    color: #6d28d9;
    border: 1px dashed #a78bfa;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-sans);
    transition: all 0.2s ease;
}

.ic-upload-btn:hover { background: #ede9fe; }

.ic-run-btn {
    padding: 10px 14px;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-sans);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(139,92,246,0.25);
}

.ic-run-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139,92,246,0.35);
}

.ic-run-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.ic-error {
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.2);
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ic-info {
    background: linear-gradient(135deg, rgba(139,92,246,0.05), rgba(6,182,212,0.05));
    border: 1px solid rgba(139,92,246,0.2);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.ic-info-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

.ic-info-title {
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 6px;
    font-family: var(--font-sans);
}

.ic-info-list {
    margin: 0;
    padding-right: 20px;
    list-style: none;
    counter-reset: ic-step;
}

.ic-info-list li {
    position: relative;
    padding: 3px 0;
    color: #4b5563;
    line-height: 1.5;
    counter-increment: ic-step;
    font-size: 12.5px;
    font-family: var(--font-sans);
}

.ic-info-list li::before {
    content: counter(ic-step);
    position: absolute;
    right: -22px;
    top: 3px;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    font-family: var(--font-sans);
}

.ic-info-list li strong { color: #6d28d9; margin-right: 4px; }

/* --- Features pane --- */
.ic-features-pane,
.ic-network-pane {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ic-empty {
    background: white;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    color: #94a3b8;
    font-family: var(--font-sans);
}

.ic-empty i {
    font-size: 36px;
    margin-bottom: 10px;
    display: block;
    color: #cbd5e1;
}

.ic-empty p { margin: 0; font-size: 13px; }

.ic-features-summary {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.ic-feat-stat {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 8px;
    text-align: center;
}

.ic-feat-stat-label {
    display: block;
    font-size: 10px;
    color: #6b7280;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
    font-family: var(--font-sans);
}

.ic-feat-stat-value {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: #8b5cf6;
    font-family: var(--font-sans);
    font-variant-numeric: tabular-nums;
}

.ic-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.ic-feat-group {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
}

.ic-feat-group-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 12px;
    font-family: var(--font-sans);
}

.ic-feat-group-header span {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 600;
}

.ic-feat-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ic-feat-bar-row {
    display: grid;
    grid-template-columns: 50px 1fr 42px;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.ic-feat-bar-label {
    font-family: var(--font-sans);
    font-weight: 700;
    color: #4b5563;
    font-variant-numeric: tabular-nums;
}

.ic-feat-bar-track {
    height: 8px;
    background: #f3f4f6;
    border-radius: 999px;
    overflow: hidden;
}

.ic-feat-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.5s var(--ease);
    opacity: 0.85;
}

.ic-feat-bar-val {
    font-family: var(--font-sans);
    font-size: 10.5px;
    color: #6b7280;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.ic-features-note {
    background: rgba(139,92,246,0.05);
    border: 1px solid rgba(139,92,246,0.2);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    color: #4b5563;
    font-family: var(--font-sans);
}

.ic-features-note i { color: #8b5cf6; }

/* --- Network pane --- */
.ic-net-arch {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    overflow-x: auto;
}

.ic-net-layer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.ic-net-layer-label {
    font-size: 11px;
    font-weight: 800;
    color: #1f2937;
    text-align: center;
    font-family: var(--font-sans);
    line-height: 1.3;
}

.ic-net-layer-label span {
    display: block;
    font-size: 10px;
    color: #6b7280;
    font-weight: 600;
    margin-top: 2px;
}

.ic-net-nodes {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.ic-net-nodes-sep {
    font-size: 9px;
    color: #94a3b8;
    font-weight: 600;
    padding: 2px 6px;
    background: #f3f4f6;
    border-radius: 999px;
    font-family: var(--font-sans);
}

.ic-net-node {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e5e7eb;
    border: 1px solid #d1d5db;
    transition: opacity 0.3s var(--ease);
}

.ic-net-node.input { background: linear-gradient(135deg, #8b5cf6, #06b6d4); border-color: #8b5cf6; }
.ic-net-node.output {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    border: none;
    transition: all 0.3s var(--ease);
}

.ic-net-arrow {
    color: #8b5cf6;
    font-size: 16px;
    flex-shrink: 0;
}

.ic-net-info {
    background: linear-gradient(135deg, rgba(139,92,246,0.05), rgba(6,182,212,0.05));
    border: 1px solid rgba(139,92,246,0.2);
    border-radius: 12px;
    padding: 16px 18px;
}

.ic-net-info h4 {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 800;
    color: #1f2937;
    font-family: var(--font-sans);
    display: flex;
    align-items: center;
    gap: 6px;
}

.ic-net-info h4 i { color: #8b5cf6; }

.ic-net-params {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.ic-net-param {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 10px;
    text-align: center;
}

.ic-net-param strong {
    display: block;
    font-size: 16px;
    font-weight: 800;
    color: #8b5cf6;
    font-family: var(--font-sans);
}

.ic-net-param span {
    display: block;
    font-size: 10px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
    font-family: var(--font-sans);
}

.ic-net-desc {
    margin: 0;
    font-size: 12.5px;
    color: #4b5563;
    line-height: 1.6;
    font-family: var(--font-sans);
}

/* --- Training Stats --- */
.ic-stats {
    background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(6,182,212,0.08));
    border: 1px solid rgba(139,92,246,0.25);
    border-radius: 12px;
    padding: 14px 16px;
}

.ic-stats-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #1f2937;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: var(--font-sans);
    margin-bottom: 10px;
}

.ic-stats-header i { color: #8b5cf6; }

.ic-stats-badge {
    margin-right: auto;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    color: white;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.ic-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.ic-stat-cell {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.ic-stat-cell-label {
    font-size: 10px;
    color: #6b7280;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: var(--font-sans);
}

.ic-stat-cell-value {
    font-size: 16px;
    font-weight: 800;
    color: #1f2937;
    font-family: var(--font-sans);
    font-variant-numeric: tabular-nums;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .ic-frame { padding: 12px; }
    .ic-app { padding: 14px; }
    .ic-images { grid-template-columns: 1fr; }
    .ic-controls { grid-template-columns: 1fr; }
    .ic-features-summary { grid-template-columns: repeat(3, 1fr); }
    .ic-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .ic-net-arch { flex-wrap: wrap; justify-content: center; }
    .ic-net-arrow { transform: rotate(90deg); }
}

@media (max-width: 480px) {
    .ic-header { flex-direction: column; text-align: center; }
    .ic-info { flex-direction: column; }
    .ic-features-summary { grid-template-columns: repeat(2, 1fr); }
    .ic-tabs { flex-direction: column; }
}

/* ==========================================================
   AUDIO CLASSIFIER (Voice Sentiment)
   ========================================================== */
.ac-frame { padding: 20px; }

.ac-app {
    background: linear-gradient(135deg, #cffafe 0%, #ede9fe 100%);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #22d3ee;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ac-header {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
    color: white;
    padding: 16px 20px;
    border-radius: 14px;
}

.ac-header-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.20);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.ac-header h3 {
    font-family: var(--font-ar);
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 2px;
}

.ac-header p {
    font-size: 12.5px;
    opacity: 0.9;
}

.ac-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* --- Visualizations --- */
.ac-visual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.ac-visual-box {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
}

.ac-visual-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: var(--font-sans);
}

.ac-visual-label i { color: #06b6d4; }

.ac-badge {
    margin-right: auto;
    background: #cffafe;
    color: #0e7490;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
}

.ac-badge.live {
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: white;
    animation: acPulse 1.5s ease-in-out infinite;
}

@keyframes acPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.ac-waveform,
.ac-spectrogram {
    width: 100%;
    aspect-ratio: 4;
    background: #f9fafb;
    border-radius: 8px;
    overflow: hidden;
}

.ac-waveform svg,
.ac-spectrogram svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* --- Prediction --- */
.ac-prediction {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
}

.ac-pred-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    color: #1f2937;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: var(--font-sans);
    margin-bottom: 14px;
}

.ac-pred-header i { color: #06b6d4; }

.ac-pred-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 16px;
    align-items: center;
}

.ac-pred-main {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(6,182,212,0.08), rgba(139,92,246,0.08));
    border: 1px solid rgba(6,182,212,0.2);
    border-radius: 12px;
}

.ac-pred-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(6,182,212,0.30);
    animation: acPulse 2s ease-in-out infinite;
}

.ac-pred-icon svg {
    width: 32px;
    height: 32px;
}

.ac-pred-label {
    font-size: 10.5px;
    color: #6b7280;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: var(--font-sans);
}

.ac-pred-value {
    font-size: 22px;
    font-weight: 800;
    color: #1f2937;
    font-family: var(--font-sans);
    line-height: 1.1;
    margin: 2px 0;
}

.ac-pred-conf {
    font-size: 11.5px;
    font-weight: 700;
    color: #06b6d4;
    font-family: var(--font-sans);
}

.ac-pred-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ac-pred-row {
    display: grid;
    grid-template-columns: 70px 1fr 50px;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
}

.ac-pred-row-name {
    font-family: var(--font-sans);
    font-weight: 700;
    color: #4b5563;
}

.ac-pred-row-track {
    height: 9px;
    background: #f3f4f6;
    border-radius: 999px;
    overflow: hidden;
}

.ac-pred-row-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.6s var(--ease);
}

.ac-pred-row-pct {
    font-family: var(--font-sans);
    font-size: 10.5px;
    color: #6b7280;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

/* --- Features summary --- */
.ac-features {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
}

.ac-features-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    color: #1f2937;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: var(--font-sans);
    margin-bottom: 12px;
}

.ac-features-header i { color: #06b6d4; }

.ac-features-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.ac-feat-stat {
    background: linear-gradient(135deg, rgba(6,182,212,0.05), rgba(139,92,246,0.05));
    border: 1px solid rgba(6,182,212,0.15);
    border-radius: 10px;
    padding: 10px 8px;
    text-align: center;
}

.ac-feat-label {
    display: block;
    font-size: 10px;
    color: #6b7280;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: var(--font-sans);
    margin-bottom: 4px;
}

.ac-feat-value {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: #06b6d4;
    font-family: var(--font-sans);
    font-variant-numeric: tabular-nums;
}

/* --- Info section --- */
.ac-info {
    background: linear-gradient(135deg, rgba(6,182,212,0.05), rgba(139,92,246,0.05));
    border: 1px solid rgba(6,182,212,0.20);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.ac-info-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

.ac-info-title {
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 6px;
    font-family: var(--font-sans);
}

.ac-info p {
    margin: 0;
    font-size: 12px;
    color: #4b5563;
    line-height: 1.6;
    font-family: var(--font-sans);
}

/* --- Code blocks --- */
.ac-code-block {
    background: #0f172a;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 18px;
    border: 1px solid #1e293b;
}

.ac-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #1e293b, #334155);
    color: white;
    padding: 10px 16px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 700;
    border-bottom: 1px solid #334155;
}

.ac-code-header > span:first-child {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ac-code-header i { color: #06b6d4; }

.ac-code-tag {
    background: rgba(6,182,212,0.20);
    color: #67e8f9;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
}

.ac-code {
    margin: 0;
    padding: 18px;
    background: transparent;
    overflow-x: auto;
    direction: ltr;
    text-align: left;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 12.5px;
    line-height: 1.6;
    color: #e2e8f0;
    max-height: 600px;
    overflow-y: auto;
}

.ac-code code {
    font-family: inherit;
    color: inherit;
    background: none;
    white-space: pre;
}

@media (max-width: 768px) {
    .ac-frame { padding: 12px; }
    .ac-app { padding: 14px; }
    .ac-visual { grid-template-columns: 1fr; }
    .ac-pred-grid { grid-template-columns: 1fr; }
    .ac-features-grid { grid-template-columns: repeat(3, 1fr); }
    .ac-waveform, .ac-spectrogram { aspect-ratio: 2; }
}

@media (max-width: 480px) {
    .ac-header { flex-direction: column; text-align: center; }
    .ac-features-grid { grid-template-columns: repeat(2, 1fr); }
    .ac-pred-row { grid-template-columns: 60px 1fr 40px; }
    .ac-code { font-size: 11px; }
}

/* ==========================================================
   RAQI — AI MENTAL HEALTH COMPANION (Mobile App)
   ========================================================== */
.rq-frame { padding: 20px; background: #f0fdf4; border-radius: 16px; }

.rq-stage {
    display: flex;
    gap: 28px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 16px;
}

/* --- Phone Frame --- */
.rq-phone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.rq-phone-frame {
    width: 280px;
    height: 580px;
    background: linear-gradient(135deg, #1f2937, #111827);
    border-radius: 38px;
    padding: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25), inset 0 0 0 1px rgba(255,255,255,0.05);
    position: relative;
}

.rq-phone-highlight .rq-phone-frame {
    transform: scale(1.05);
    box-shadow: 0 30px 70px rgba(16, 185, 129, 0.35), inset 0 0 0 1px rgba(255,255,255,0.08);
}

.rq-notch {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 22px;
    background: #000;
    border-radius: 999px;
    z-index: 100;
}

.rq-screen {
    width: 100%;
    height: 100%;
    background: #0f172a;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    color: white;
    font-family: var(--font-sans);
    direction: rtl;
}

/* --- Status bar --- */
.rq-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 22px 0;
    font-size: 13px;
    font-weight: 600;
}

.rq-status-light { color: rgba(255,255,255,0.9); }

.rq-time { font-variant-numeric: tabular-nums; }

.rq-status-icons {
    display: flex;
    gap: 5px;
    font-size: 10px;
    align-items: center;
}

.rq-status-icons i { font-size: 10px; }

/* --- Content area --- */
.rq-content {
    padding: 18px 18px 100px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: calc(100% - 40px);
    overflow-y: auto;
}

/* --- Greeting --- */
.rq-greeting {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rq-greeting-sub {
    font-size: 11px;
    color: #94a3b8;
    margin: 0 0 2px;
}

.rq-greeting-name {
    font-size: 18px;
    font-weight: 800;
    margin: 0;
    color: white;
}

.rq-avatar {
    position: relative;
}

.rq-avatar-inner {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: white;
}

/* --- Score Card --- */
.rq-score-card {
    position: relative;
    border-radius: 18px;
    padding: 18px;
    background: linear-gradient(135deg, #064e3b, #0f766e);
    overflow: hidden;
}

.rq-score-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.4), transparent 60%);
}

.rq-score-content {
    position: relative;
    text-align: center;
}

.rq-score-label {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    margin: 0 0 8px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.rq-score-ring {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto;
}

.rq-score-ring svg {
    width: 100%;
    height: 100%;
}

.rq-score-value {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.rq-score-num {
    font-size: 32px;
    font-weight: 900;
    color: white;
    line-height: 1;
}

.rq-score-of {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
}

.rq-score-trend {
    margin: 8px 0 0;
    font-size: 12px;
    color: #6ee7b7;
    font-weight: 700;
}

.rq-score-trend i { margin-left: 3px; }

.rq-score-mood {
    margin: 4px 0 0;
    font-size: 12px;
    color: rgba(255,255,255,0.85);
    font-weight: 600;
}

/* --- Check-in --- */
.rq-checkin {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 12px 14px;
}

.rq-checkin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.rq-checkin-title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: white;
}

.rq-checkin-meta {
    font-size: 10.5px;
    color: #94a3b8;
    background: rgba(255,255,255,0.05);
    padding: 2px 8px;
    border-radius: 999px;
}

.rq-checkin-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.rq-checkin-row > span:first-child {
    font-size: 11.5px;
    color: #cbd5e1;
    font-weight: 600;
}

.rq-checkin-emojis {
    display: flex;
    gap: 6px;
    font-size: 20px;
}

.rq-checkin-emojis span {
    opacity: 0.4;
    filter: grayscale(0.5);
    transition: all 0.2s;
}

.rq-checkin-emojis span.active {
    opacity: 1;
    filter: none;
    transform: scale(1.15);
}

.rq-checkin-btn {
    width: 100%;
    padding: 8px;
    background: linear-gradient(135deg, #10b981, #06b6d4);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-sans);
}

/* --- Suggestion --- */
.rq-suggestion {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 14px;
    padding: 12px;
}

.rq-suggestion-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.rq-suggestion-info { flex: 1; min-width: 0; }

.rq-suggestion-title {
    margin: 0 0 2px;
    font-size: 12.5px;
    font-weight: 700;
    color: white;
}

.rq-suggestion-desc {
    margin: 0;
    font-size: 10.5px;
    color: #cbd5e1;
}

.rq-suggestion-go {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: none;
    color: #8b5cf6;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 11px;
}

/* --- Tabbar --- */
.rq-tabbar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-around;
    padding: 8px 12px 22px;
}

.rq-tab {
    background: none;
    border: none;
    color: #64748b;
    font-family: var(--font-sans);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 9.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
}

.rq-tab.active { color: #10b981; }

.rq-tab i { font-size: 16px; }

.rq-home-indicator {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: rgba(255,255,255,0.4);
    border-radius: 999px;
}

.rq-home-indicator-light { background: rgba(255,255,255,0.5); }

/* --- Insights screen --- */
.rq-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rq-page-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
}

.rq-back, .rq-filter {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.rq-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 14px;
}

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

.rq-card-header h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rq-card-header h4 i { color: #a78bfa; font-size: 12px; }

.rq-card-trend {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

.rq-card-trend.up { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }

.rq-card-badge {
    font-size: 10px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 700;
}

.rq-chart {
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 6px;
}

.rq-chart svg {
    width: 100%;
    height: 70px;
    display: block;
}

.rq-chart-axis {
    display: flex;
    justify-content: space-around;
    margin-top: 4px;
    font-size: 10px;
    color: #64748b;
    font-weight: 600;
}

/* --- Patterns --- */
.rq-patterns { display: flex; flex-direction: column; gap: 10px; }

.rq-pattern {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.rq-pattern-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

.rq-pattern-info { flex: 1; min-width: 0; }

.rq-pattern-title {
    margin: 0 0 3px;
    font-size: 12.5px;
    font-weight: 700;
    color: white;
    line-height: 1.3;
}

.rq-pattern-desc {
    margin: 0;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.5;
}

/* --- Correlations --- */
.rq-correlations {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rq-correlation {
    display: grid;
    grid-template-columns: auto auto auto 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
}

.rq-corr-icon, .rq-corr-target {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.rq-corr-arrow {
    font-size: 16px;
    font-weight: 900;
}

.rq-corr-arrow.up { color: #6ee7b7; }
.rq-corr-arrow.down { color: #fca5a5; }

.rq-corr-label {
    font-size: 11px;
    color: #cbd5e1;
    font-weight: 600;
}

.rq-corr-value {
    font-size: 11px;
    color: white;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* --- Breathing screen --- */
.rq-screen-breathing {
    background: linear-gradient(135deg, #1e1b4b, #312e81);
}

.rq-breathing-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 24px 60px;
    position: relative;
}

.rq-close-btn {
    position: absolute;
    top: 50px;
    right: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.rq-breathing-info {
    text-align: center;
    margin-top: 40px;
}

.rq-breathing-eyebrow {
    font-size: 11px;
    color: #c4b5fd;
    margin: 0 0 6px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 700;
}

.rq-breathing-info h2 {
    font-size: 38px;
    margin: 0 0 6px;
    font-weight: 900;
    color: white;
    letter-spacing: -0.02em;
}

.rq-breathing-desc {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    margin: 0;
}

/* Breathing circle animation */
.rq-breath-circle-wrap {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 30px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rq-breath-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(167, 139, 250, 0.3);
    animation: rqPulse 4s ease-in-out infinite;
}

.rq-breath-ring-1 {
    width: 100%;
    height: 100%;
    animation-delay: 0s;
}

.rq-breath-ring-2 {
    width: 80%;
    height: 80%;
    animation-delay: 0.4s;
}

.rq-breath-ring-3 {
    width: 60%;
    height: 60%;
    animation-delay: 0.8s;
}

@keyframes rqPulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.rq-breath-core {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a78bfa, #6366f1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 60px rgba(167, 139, 250, 0.5);
    color: white;
    animation: rqBreathe 4s ease-in-out infinite;
}

@keyframes rqBreathe {
    0%, 100% { transform: scale(0.85); }
    50% { transform: scale(1.1); }
}

.rq-breath-label {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 2px;
    opacity: 0.9;
}

.rq-breath-count {
    font-size: 36px;
    font-weight: 900;
    line-height: 1;
}

.rq-breath-progress {
    width: 100%;
    margin-top: auto;
}

.rq-breath-progress-bar {
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.rq-breath-progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    width: 60%;
    background: linear-gradient(90deg, #a78bfa, #6366f1);
    border-radius: 999px;
}

.rq-breath-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 10.5px;
    color: rgba(255,255,255,0.7);
}

.rq-breath-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

.rq-breath-btn-secondary {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rq-breath-btn-primary {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: white;
    border: none;
    color: #6366f1;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

/* --- Screen labels --- */
.rq-screen-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 700;
    font-family: var(--font-sans);
    margin: 0;
    text-align: center;
}

/* --- Deep features grid --- */
.rq-deep {
    margin-top: 32px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.04), rgba(6, 182, 212, 0.04));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 16px;
}

.rq-deep-title {
    font-family: var(--font-ar);
    font-size: 19px;
    font-weight: 800;
    text-align: center;
    margin: 0 0 20px;
    color: #1f2937;
}

.rq-deep-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.rq-deep-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
}

.rq-deep-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    margin-bottom: 10px;
}

.rq-deep-card h4 {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 800;
    margin: 0 0 6px;
    color: #1f2937;
}

.rq-deep-card p {
    font-family: var(--font-sans);
    font-size: 12px;
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
}

/* RTL adjustments */
[dir="rtl"] .rq-suggestion-title,
[dir="rtl"] .rq-suggestion-desc,
[dir="rtl"] .rq-greeting-sub,
[dir="rtl"] .rq-greeting-name {
    text-align: right;
}

[dir="rtl"] .rq-pattern-title,
[dir="rtl"] .rq-pattern-desc {
    text-align: right;
}

@media (max-width: 920px) {
    .rq-stage { gap: 20px; }
    .rq-phone-frame { width: 240px; height: 500px; }
    .rq-phone-highlight .rq-phone-frame { transform: scale(1); }
}

@media (max-width: 768px) {
    .rq-frame { padding: 12px; }
    .rq-stage { flex-direction: column; align-items: center; }
    .rq-phone-frame { width: 280px; height: 580px; }
}

/* ==========================================================
   WASEL — RIDE-HAILING APP (InDrive style)
   ========================================================== */
.ws-frame { padding: 20px; background: #f0fdf4; border-radius: 16px; }

.ws-stage {
    display: flex;
    gap: 28px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 16px;
}

.ws-phone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.ws-phone-frame {
    width: 280px;
    height: 580px;
    background: linear-gradient(135deg, #1f2937, #111827);
    border-radius: 38px;
    padding: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25), inset 0 0 0 1px rgba(255,255,255,0.05);
    position: relative;
}

.ws-phone-highlight .ws-phone-frame {
    transform: scale(1.05);
    box-shadow: 0 30px 70px rgba(16, 185, 129, 0.35), inset 0 0 0 1px rgba(255,255,255,0.08);
}

.ws-notch {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 22px;
    background: #000;
    border-radius: 999px;
    z-index: 100;
}

.ws-screen {
    width: 100%;
    height: 100%;
    background: #0f172a;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    color: white;
    font-family: var(--font-sans);
    direction: rtl;
}

.ws-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 22px 0;
    font-size: 13px;
    font-weight: 600;
    color: white;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
}

.ws-status-icons {
    display: flex;
    gap: 5px;
    font-size: 10px;
    align-items: center;
}

.ws-time { font-variant-numeric: tabular-nums; }

.ws-home-indicator {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: rgba(255,255,255,0.4);
    border-radius: 999px;
    z-index: 60;
}

/* --- Map screen --- */
.ws-map {
    position: absolute;
    inset: 0;
}

.ws-map svg {
    width: 100%;
    height: 100%;
}

.ws-top-bar {
    position: absolute;
    top: 50px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: space-between;
    z-index: 30;
}

.ws-menu-btn, .ws-current-location {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.ws-current-location { color: #10b981; }

.ws-bottom-card {
    position: absolute;
    bottom: 24px;
    left: 12px;
    right: 12px;
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px;
    padding: 16px;
    z-index: 30;
}

.ws-destination {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.ws-loc-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ws-loc-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ws-loc-dot.from { background: #10b981; }
.ws-loc-dot.to { background: #ef4444; }

.ws-loc-info { flex: 1; min-width: 0; }

.ws-loc-label {
    margin: 0;
    font-size: 10px;
    color: #94a3b8;
    font-weight: 700;
}

.ws-loc-text {
    margin: 1px 0 0;
    font-size: 12.5px;
    color: white;
    font-weight: 600;
}

.ws-loc-divider {
    width: 2px;
    height: 12px;
    background: #475569;
    margin-right: 4px;
}

.ws-distance {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.ws-distance-info {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ws-distance-info span {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 600;
}

.ws-distance-info strong {
    font-size: 13px;
    color: white;
    font-weight: 800;
}

.ws-continue-btn {
    width: 100%;
    padding: 11px;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-sans);
}

/* --- Price screen --- */
.ws-content {
    padding: 50px 18px 30px;
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ws-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ws-page-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: white;
}

.ws-back-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.ws-price-hint {
    margin: 0;
    font-size: 11.5px;
    color: #94a3b8;
    line-height: 1.5;
}

.ws-price-range {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    padding: 10px 12px;
}

.ws-price-range-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ws-price-range-item span {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
}

.ws-price-range-item strong {
    font-size: 13px;
    color: #6ee7b7;
    font-weight: 800;
}

.ws-price-input-wrap {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 14px;
    padding: 16px;
}

.ws-price-input-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.ws-price-currency {
    font-size: 13px;
    color: #6ee7b7;
    font-weight: 700;
}

.ws-price-amount {
    font-size: 42px;
    font-weight: 900;
    color: white;
    line-height: 1;
}

.ws-price-slider-track {
    height: 5px;
    background: rgba(255,255,255,0.15);
    border-radius: 999px;
    position: relative;
    margin-bottom: 8px;
}

.ws-price-slider-fill {
    position: absolute;
    inset: 0;
    width: 44%;
    background: linear-gradient(90deg, #10b981, #6ee7b7);
    border-radius: 999px;
}

.ws-price-slider-thumb {
    position: absolute;
    top: 50%;
    left: 44%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    background: white;
    border: 3px solid #10b981;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.ws-price-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #64748b;
    font-weight: 700;
    margin-top: 4px;
}

.ws-section-label {
    margin: 4px 0 0;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 700;
}

.ws-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ws-option {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 11px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 12.5px;
}

.ws-option i:first-child {
    color: #10b981;
    width: 18px;
    text-align: center;
}

.ws-option > span:nth-child(2) {
    flex: 1;
    text-align: right;
    font-weight: 600;
}

.ws-option > strong {
    color: #cbd5e1;
    font-weight: 700;
}

.ws-option-empty { color: #64748b !important; font-weight: 500 !important; }

.ws-option-arrow {
    color: #64748b;
    font-size: 11px;
}

.ws-confirm-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-sans);
    margin-top: auto;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

/* --- Offers screen --- */
.ws-searching {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    padding: 10px 14px;
    color: #6ee7b7;
    font-size: 12px;
    font-weight: 600;
}

.ws-searching-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-top-color: #10b981;
    border-radius: 50%;
    animation: wsSpin 1s linear infinite;
}

@keyframes wsSpin {
    to { transform: rotate(360deg); }
}

.ws-offer-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ws-offer-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 12px;
    transition: all 0.2s;
}

.ws-offer-card.accepted {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.4);
}

.ws-offer-driver {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.ws-driver-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
}

.ws-driver-info { flex: 1; min-width: 0; }

.ws-driver-name-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.ws-driver-name {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: white;
}

.ws-driver-rating {
    font-size: 11px;
    font-weight: 700;
    color: #fbbf24;
}

.ws-driver-rating i { margin-left: 2px; font-size: 10px; }

.ws-driver-car {
    margin: 0;
    font-size: 11px;
    color: #94a3b8;
}

.ws-offer-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.ws-offer-bid-label {
    display: block;
    font-size: 10px;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 2px;
}

.ws-offer-bid-value {
    font-size: 18px;
    font-weight: 900;
    color: white;
    font-variant-numeric: tabular-nums;
}

.ws-offer-actions {
    display: flex;
    gap: 6px;
}

.ws-offer-counter, .ws-offer-accept {
    padding: 7px 14px;
    border-radius: 8px;
    border: none;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-sans);
}

.ws-offer-counter {
    background: rgba(255,255,255,0.06);
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
}

.ws-offer-accept {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.ws-waiting-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 4px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
}

.ws-waiting-info i { color: #fbbf24; }

.ws-screen-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 700;
    font-family: var(--font-sans);
    margin: 0;
    text-align: center;
}

@media (max-width: 920px) {
    .ws-stage { gap: 20px; }
    .ws-phone-frame { width: 240px; height: 500px; }
    .ws-phone-highlight .ws-phone-frame { transform: scale(1); }
}

@media (max-width: 768px) {
    .ws-frame { padding: 12px; }
    .ws-stage { flex-direction: column; align-items: center; }
    .ws-phone-frame { width: 280px; height: 580px; }
}

/* ==========================================================
   PROJECTS NOTICE BANNER
   ========================================================== */
.projects-notice {
    max-width: 1100px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(239, 68, 68, 0.06));
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-right: 4px solid #f59e0b;
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-family: var(--font-ar);
}

.projects-notice-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.projects-notice-content {
    flex: 1;
    min-width: 0;
}

.projects-notice-title {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 800;
    color: #92400e;
    letter-spacing: 0.02em;
}

.projects-notice-text {
    margin: 0;
    font-size: 13px;
    color: #78350f;
    line-height: 1.6;
}

.projects-notice-close {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #92400e;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    transition: all 0.2s var(--ease);
    margin-right: auto;
}

.projects-notice-close:hover {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

@media (max-width: 640px) {
    .projects-notice { padding: 12px 14px; gap: 10px; }
    .projects-notice-icon { width: 30px; height: 30px; font-size: 13px; }
    .projects-notice-title { font-size: 12px; }
    .projects-notice-text { font-size: 12px; }
}

/* ==========================================================
   WAZIF — JOB PLATFORM APP
   ========================================================== */
.wz-frame { padding: 20px; background: #eef2ff; border-radius: 16px; }

.wz-stage {
    display: flex;
    gap: 28px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 16px;
}

.wz-phone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.wz-phone-frame {
    width: 280px;
    height: 580px;
    background: linear-gradient(135deg, #1f2937, #111827);
    border-radius: 38px;
    padding: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25), inset 0 0 0 1px rgba(255,255,255,0.05);
    position: relative;
}

.wz-phone-highlight .wz-phone-frame {
    transform: scale(1.05);
    box-shadow: 0 30px 70px rgba(99, 102, 241, 0.35), inset 0 0 0 1px rgba(255,255,255,0.08);
}

.wz-notch {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 22px;
    background: #000;
    border-radius: 999px;
    z-index: 100;
}

.wz-screen {
    width: 100%;
    height: 100%;
    background: #f8fafc;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    color: #1f2937;
    font-family: var(--font-sans);
    direction: rtl;
}

.wz-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 22px 0;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
}

.wz-status-icons {
    display: flex;
    gap: 5px;
    font-size: 10px;
    align-items: center;
}

.wz-time { font-variant-numeric: tabular-nums; }

.wz-content {
    padding: 50px 18px 100px;
    height: calc(100% - 24px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wz-home-indicator {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: rgba(31, 41, 55, 0.4);
    border-radius: 999px;
    z-index: 60;
}

/* --- Top bar / Greeting --- */
.wz-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wz-greeting-sub {
    margin: 0 0 2px;
    font-size: 11px;
    color: #6b7280;
}

.wz-greeting-name {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #1f2937;
}

.wz-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wz-icon-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #eef2ff;
    border: none;
    color: #4f46e5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.wz-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    font-size: 9px;
    font-weight: 800;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wz-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Search --- */
.wz-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.wz-search i { color: #9ca3af; font-size: 13px; }

.wz-search input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-family: var(--font-sans);
    font-size: 12px;
    color: #1f2937;
}

.wz-search input::placeholder { color: #9ca3af; }

/* --- Filter chips --- */
.wz-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.wz-chips::-webkit-scrollbar { display: none; }

.wz-chip {
    padding: 6px 14px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    color: #6b7280;
    cursor: pointer;
    font-family: var(--font-sans);
    flex-shrink: 0;
}

.wz-chip.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-color: #6366f1;
}

/* --- Section header --- */
.wz-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.wz-section-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    color: #1f2937;
}

.wz-section-header a {
    font-size: 11.5px;
    color: #6366f1;
    font-weight: 700;
    cursor: pointer;
}

/* --- Job list / cards --- */
.wz-job-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wz-job-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px;
    display: flex;
    gap: 10px;
    transition: all 0.2s var(--ease);
}

.wz-job-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.wz-job-info { flex: 1; min-width: 0; }

.wz-job-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3px;
}

.wz-job-title {
    margin: 0;
    font-size: 13.5px;
    font-weight: 800;
    color: #1f2937;
    line-height: 1.3;
}

.wz-bookmark {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
}

.wz-job-company {
    margin: 0 0 6px;
    font-size: 11.5px;
    color: #6b7280;
    font-weight: 600;
}

.wz-job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-bottom: 6px;
}

.wz-job-meta span {
    font-size: 10.5px;
    color: #6b7280;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.wz-job-meta i { color: #9ca3af; font-size: 10px; }

.wz-job-salary {
    font-size: 12px;
    font-weight: 800;
    color: #6366f1;
    font-variant-numeric: tabular-nums;
}

/* --- Tabbar --- */
.wz-tabbar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-around;
    padding: 8px 8px 22px;
}

.wz-tab {
    background: none;
    border: none;
    color: #9ca3af;
    font-family: var(--font-sans);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 9.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
}

.wz-tab.active { color: #6366f1; }

.wz-tab i { font-size: 16px; }

/* --- Details screen --- */
.wz-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.wz-back-btn, .wz-icon-btn-small {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #1f2937;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.wz-job-header {
    text-align: center;
    padding: 4px 0 10px;
}

.wz-job-logo-large {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    margin: 0 auto 10px;
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.25);
}

.wz-job-header-title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 800;
    color: #1f2937;
}

.wz-job-header-company {
    margin: 0 0 10px;
    font-size: 12.5px;
    color: #6b7280;
    font-weight: 600;
}

.wz-job-tags {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.wz-tag {
    padding: 4px 10px;
    background: #eef2ff;
    color: #4f46e5;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
}

.wz-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px;
}

.wz-info-cell {
    text-align: center;
    padding: 8px 4px;
}

.wz-info-cell i {
    color: #6366f1;
    font-size: 14px;
    margin-bottom: 4px;
    display: block;
}

.wz-info-cell p {
    margin: 0 0 2px;
    font-size: 10px;
    color: #6b7280;
    font-weight: 600;
}

.wz-info-cell strong {
    font-size: 12px;
    color: #1f2937;
    font-weight: 800;
    display: block;
}

.wz-section { display: flex; flex-direction: column; gap: 6px; }

.wz-section-title {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    color: #1f2937;
}

.wz-section-text {
    margin: 0;
    font-size: 11.5px;
    color: #4b5563;
    line-height: 1.6;
}

.wz-list {
    margin: 0;
    padding-right: 16px;
    font-size: 11.5px;
    color: #4b5563;
    line-height: 1.8;
}

/* Apply footer */
.wz-apply-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 10px 16px 22px;
    display: flex;
    gap: 8px;
}

.wz-save-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.wz-apply-btn {
    flex: 1;
    height: 44px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-sans);
}

/* --- Profile screen --- */
.wz-profile-header {
    text-align: center;
    padding: 6px 0 10px;
}

.wz-profile-avatar-large {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    font-weight: 800;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.3);
}

.wz-profile-name {
    margin: 0 0 3px;
    font-size: 17px;
    font-weight: 800;
    color: #1f2937;
}

.wz-profile-title {
    margin: 0 0 4px;
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
}

.wz-profile-location {
    margin: 0 0 12px;
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
}

.wz-profile-location i { margin-left: 4px; }

.wz-profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    background: #f9fafb;
    border-radius: 10px;
    padding: 10px;
}

.wz-profile-stat {
    text-align: center;
}

.wz-profile-stat strong {
    display: block;
    font-size: 16px;
    font-weight: 800;
    color: #6366f1;
    margin-bottom: 2px;
}

.wz-profile-stat span {
    font-size: 10px;
    color: #6b7280;
    font-weight: 600;
}

.wz-completion {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
}

.wz-completion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #1f2937;
}

.wz-completion-header strong {
    color: #6366f1;
    font-size: 14px;
}

.wz-progress-track {
    height: 6px;
    background: #f3f4f6;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 6px;
}

.wz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 999px;
}

.wz-completion-hint {
    margin: 0;
    font-size: 10.5px;
    color: #6b7280;
}

.wz-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.wz-menu-item {
    background: none;
    border: none;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #1f2937;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 12.5px;
    font-weight: 600;
    text-align: right;
    border-bottom: 1px solid #f3f4f6;
}

.wz-menu-item:last-child { border-bottom: none; }

.wz-menu-item i:first-child {
    color: #6366f1;
    width: 18px;
    text-align: center;
    font-size: 13px;
}

.wz-menu-item > span:nth-child(2) {
    flex: 1;
}

.wz-menu-arrow {
    color: #9ca3af;
    font-size: 11px;
}

.wz-screen-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 700;
    font-family: var(--font-sans);
    margin: 0;
    text-align: center;
}

@media (max-width: 920px) {
    .wz-stage { gap: 20px; }
    .wz-phone-frame { width: 240px; height: 500px; }
    .wz-phone-highlight .wz-phone-frame { transform: scale(1); }
}

@media (max-width: 768px) {
    .wz-frame { padding: 12px; }
    .wz-stage { flex-direction: column; align-items: center; }
    .wz-phone-frame { width: 280px; height: 580px; }
}

/* --- Search extras --- */
.wz-search-large {
    padding: 12px 14px;
}
.wz-search-clear {
    background: #f3f4f6;
    border: none;
    color: #6b7280;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    cursor: pointer;
    flex-shrink: 0;
}

.wz-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.wz-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eef2ff;
    color: #4f46e5;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    padding: 4px 4px 4px 10px;
    font-size: 11px;
    font-weight: 700;
}

.wz-filter-tag i { font-size: 9px; }

.wz-filter-tag button {
    background: rgba(99, 102, 241, 0.15);
    border: none;
    color: #4f46e5;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    cursor: pointer;
}

.wz-result-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 11.5px;
    font-weight: 600;
    color: #6b7280;
}

.wz-sort-btn {
    background: none;
    border: none;
    color: #6366f1;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.wz-bookmark.active { color: #6366f1; }

/* --- Applications screen --- */
.wz-app-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.wz-app-stat {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 4px;
    text-align: center;
}

.wz-app-stat strong {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: #6366f1;
    margin-bottom: 2px;
}

.wz-app-stat.accepted strong { color: #10b981; }
.wz-app-stat.interview strong { color: #f59e0b; }
.wz-app-stat.rejected strong { color: #ef4444; }

.wz-app-stat span {
    font-size: 9.5px;
    color: #6b7280;
    font-weight: 600;
}

.wz-app-tabs {
    display: flex;
    gap: 4px;
    background: #f3f4f6;
    padding: 4px;
    border-radius: 10px;
    overflow-x: auto;
}

.wz-app-tab {
    flex: 1;
    padding: 6px 8px;
    background: none;
    border: none;
    border-radius: 7px;
    font-size: 10.5px;
    font-weight: 700;
    color: #6b7280;
    cursor: pointer;
    font-family: var(--font-sans);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.wz-app-tab span {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    padding: 1px 5px;
    border-radius: 999px;
    font-size: 9px;
}

.wz-app-tab.active {
    background: white;
    color: #6366f1;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.wz-app-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wz-app-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    position: relative;
}

.wz-app-card.accepted { border-color: rgba(16, 185, 129, 0.4); background: rgba(16, 185, 129, 0.04); }
.wz-app-card.interview { border-color: rgba(245, 158, 11, 0.4); background: rgba(245, 158, 11, 0.04); }
.wz-app-card.rejected { opacity: 0.7; }

.wz-app-status-badge {
    position: absolute;
    top: -8px;
    right: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 9.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.wz-app-card.accepted .wz-app-status-badge { background: #10b981; color: white; }
.wz-app-card.interview .wz-app-status-badge { background: #f59e0b; color: white; }
.wz-app-card.pending .wz-app-status-badge { background: #6366f1; color: white; }
.wz-app-card.rejected .wz-app-status-badge { background: #ef4444; color: white; }

.wz-app-logo {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.wz-app-info { min-width: 0; }

.wz-app-title {
    margin: 0 0 2px;
    font-size: 12.5px;
    font-weight: 700;
    color: #1f2937;
}

.wz-app-company {
    margin: 0 0 3px;
    font-size: 10.5px;
    color: #6b7280;
    font-weight: 600;
}

.wz-app-date {
    margin: 0;
    font-size: 10px;
    color: #6366f1;
    font-weight: 700;
}

.wz-app-arrow {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 12px;
    padding: 0;
}

/* --- Messages screen --- */
.wz-conv-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wz-conv-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.2s var(--ease);
}

.wz-conv-item.unread { background: rgba(99, 102, 241, 0.05); }

.wz-conv-avatar {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 15px;
    font-weight: 800;
    flex-shrink: 0;
}

.wz-conv-unread-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: #ef4444;
    border: 2px solid white;
    border-radius: 50%;
}

.wz-conv-info { flex: 1; min-width: 0; }

.wz-conv-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.wz-conv-name {
    margin: 0;
    font-size: 12.5px;
    font-weight: 700;
    color: #1f2937;
}

.wz-conv-item.unread .wz-conv-name { font-weight: 800; }

.wz-conv-time {
    font-size: 10px;
    color: #9ca3af;
    font-weight: 600;
}

.wz-conv-preview {
    margin: 0;
    font-size: 11px;
    color: #6b7280;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wz-conv-item.unread .wz-conv-preview { color: #1f2937; font-weight: 600; }

/* --- Company page --- */
.wz-company-cover {
    height: 80px;
    border-radius: 12px;
    position: relative;
    margin-bottom: 32px;
}

.wz-company-logo {
    position: absolute;
    bottom: -22px;
    right: 16px;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: white;
    border: 4px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.wz-company-cover .wz-company-logo {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.wz-company-header {
    margin-bottom: 4px;
}

.wz-company-name {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 800;
    color: #1f2937;
}

.wz-company-industry {
    margin: 0 0 3px;
    font-size: 11.5px;
    color: #6b7280;
    font-weight: 600;
}

.wz-company-location {
    margin: 0 0 12px;
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
}

.wz-company-location i { margin-left: 4px; }

.wz-company-actions {
    display: flex;
    gap: 6px;
}

.wz-company-follow-btn, .wz-company-msg-btn {
    flex: 1;
    padding: 8px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-sans);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.wz-company-follow-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
}

.wz-company-msg-btn {
    background: white;
    color: #6366f1;
    border: 1px solid #6366f1;
}

.wz-company-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    background: #f9fafb;
    border-radius: 12px;
    padding: 10px;
}

.wz-company-stat {
    text-align: center;
}

.wz-company-stat strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: #6366f1;
    margin-bottom: 2px;
}

.wz-company-stat span {
    font-size: 9.5px;
    color: #6b7280;
    font-weight: 600;
}

.wz-section-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.wz-section-header-inline a {
    font-size: 11px;
    color: #6366f1;
    font-weight: 700;
    cursor: pointer;
}

.wz-company-jobs {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wz-company-job {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wz-company-job-info { flex: 1; min-width: 0; }

.wz-company-job-title {
    margin: 0 0 2px;
    font-size: 12px;
    font-weight: 700;
    color: #1f2937;
}

.wz-company-job-meta {
    margin: 0;
    font-size: 10px;
    color: #6b7280;
}

.wz-company-job-go {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #eef2ff;
    border: none;
    color: #6366f1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
}

/* ==========================================================
   WAZIF WEB — EMPLOYER DASHBOARD
   ========================================================== */
.wb-frame { padding: 20px; background: #f5f3ff; border-radius: 16px; }

.wb-stage {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 8px;
}

/* --- Browser frame --- */
.wb-browser {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.10), 0 0 0 1px rgba(0,0,0,0.05);
    border: 1px solid #e5e7eb;
}

.wb-browser-bar {
    display: flex;
    align-items: center;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 10px 14px;
    gap: 12px;
}

.wb-browser-dots {
    display: flex;
    gap: 6px;
}

.wb-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: block;
}

.wb-dot.red { background: #ef4444; }
.wb-dot.yellow { background: #f59e0b; }
.wb-dot.green { background: #10b981; }

.wb-browser-url {
    flex: 1;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 5px 14px;
    font-size: 11px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 320px;
    margin: 0 auto;
}

.wb-browser-url i { color: #10b981; }

.wb-browser-actions {
    color: #9ca3af;
    font-size: 12px;
}

/* --- App layout --- */
.wb-app {
    display: flex;
    min-height: 620px;
    background: #f9fafb;
}

/* --- Sidebar --- */
.wb-sidebar {
    width: 220px;
    background: white;
    border-left: 1px solid #e5e7eb;
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wb-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 6px;
}

.wb-sidebar-logo i {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.wb-sidebar-logo span {
    font-size: 16px;
    font-weight: 900;
    color: #1f2937;
}

.wb-sidebar-company {
    background: #f9fafb;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wb-company-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wb-company-name {
    margin: 0 0 2px;
    font-size: 12px;
    font-weight: 700;
    color: #1f2937;
}

.wb-company-tier {
    margin: 0;
    font-size: 10px;
    color: #f59e0b;
    font-weight: 700;
}

.wb-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.wb-nav-label {
    margin: 12px 6px 4px;
    font-size: 9.5px;
    color: #9ca3af;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.wb-nav-label:first-child { margin-top: 0; }

.wb-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: none;
    border: none;
    border-radius: 8px;
    color: #6b7280;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 12.5px;
    font-weight: 600;
    text-align: right;
    width: 100%;
    position: relative;
}

.wb-nav-item i:first-child {
    width: 16px;
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
}

.wb-nav-item > span {
    flex: 1;
    text-align: right;
}

.wb-nav-item:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.wb-nav-item.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    color: #6366f1;
}

.wb-nav-item.active i:first-child { color: #6366f1; }

.wb-nav-badge {
    background: #f3f4f6;
    color: #6b7280;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    margin-right: auto;
}

.wb-nav-item.active .wb-nav-badge { background: #6366f1; color: white; }

.wb-nav-badge.new {
    background: #ef4444;
    color: white;
}

.wb-nav-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    margin-right: auto;
}

.wb-sidebar-footer {
    border-top: 1px solid #f3f4f6;
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* --- Main area --- */
.wb-main {
    flex: 1;
    padding: 18px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    overflow: hidden;
}

.wb-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wb-topbar-greeting {
    margin: 0 0 2px;
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
}

.wb-topbar-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #1f2937;
}

.wb-topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wb-icon-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: white;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.wb-icon-btn:hover { background: #f9fafb; }

.wb-icon-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #ef4444;
    color: white;
    font-size: 9px;
    font-weight: 800;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wb-profile-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 5px 10px 5px 5px;
    font-size: 12px;
    font-weight: 700;
    color: #1f2937;
    cursor: pointer;
}

.wb-avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    font-weight: 800;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* --- Stats cards --- */
.wb-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.wb-stat-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.wb-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.wb-stat-info { min-width: 0; }

.wb-stat-label {
    margin: 0 0 2px;
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
}

.wb-stat-value {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 800;
    color: #1f2937;
    line-height: 1;
}

.wb-stat-change {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
}

.wb-stat-change.up { background: rgba(16, 185, 129, 0.1); color: #059669; }
.wb-stat-change.down { background: rgba(239, 68, 68, 0.1); color: #dc2626; }

/* --- Card / Two-col --- */
.wb-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
}

.wb-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.wb-card-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    color: #1f2937;
}

.wb-select {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 11px;
    font-family: var(--font-sans);
    color: #6b7280;
    font-weight: 600;
    cursor: pointer;
}

.wb-link {
    font-size: 11px;
    color: #6366f1;
    font-weight: 700;
    cursor: pointer;
}

.wb-card-actions {
    display: flex;
    gap: 6px;
}

.wb-btn-primary, .wb-btn-secondary {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-sans);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.wb-btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.25);
}

.wb-btn-secondary {
    background: white;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

/* --- Two-column --- */
.wb-two-col {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 14px;
}

/* --- Chart --- */
.wb-chart {
    background: #f9fafb;
    border-radius: 8px;
    padding: 12px;
    margin: 0 -4px;
}

.wb-chart svg {
    width: 100%;
    height: 160px;
    display: block;
}

.wb-chart-axis {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 10px;
    color: #9ca3af;
    font-weight: 600;
}

/* --- Top jobs list --- */
.wb-top-jobs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wb-top-job {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    background: #f9fafb;
}

.wb-top-job-rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #eef2ff;
    color: #6366f1;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wb-top-job-info { flex: 1; min-width: 0; }

.wb-top-job-title {
    margin: 0 0 2px;
    font-size: 12px;
    font-weight: 700;
    color: #1f2937;
}

.wb-top-job-meta {
    margin: 0;
    font-size: 10.5px;
    color: #6b7280;
}

.wb-trend {
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
}

.wb-trend.up { background: rgba(16, 185, 129, 0.1); color: #059669; }
.wb-trend.down { background: rgba(239, 68, 68, 0.1); color: #dc2626; }

/* --- Table --- */
.wb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.wb-table thead th {
    background: #f9fafb;
    padding: 10px 12px;
    text-align: right;
    font-weight: 700;
    color: #6b7280;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.wb-table thead th:first-child { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
.wb-table thead th:last-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }

.wb-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #f3f4f6;
    color: #1f2937;
}

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

.wb-table-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wb-table-name {
    margin: 0;
    font-size: 12.5px;
    font-weight: 700;
    color: #1f2937;
}

.wb-table-email {
    margin: 0;
    font-size: 10.5px;
    color: #9ca3af;
}

.wb-status {
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    display: inline-block;
}

.wb-status.new { background: rgba(99,102,241,0.1); color: #6366f1; }
.wb-status.review { background: rgba(245,158,11,0.1); color: #d97706; }
.wb-status.interview { background: rgba(16,185,129,0.1); color: #059669; }
.wb-status.accepted { background: rgba(34,197,94,0.15); color: #15803d; }

.wb-icon-btn-sm {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.wb-icon-btn-sm:hover { background: #f3f4f6; color: #1f2937; }

/* --- Form (Screen 2) --- */
.wb-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.wb-form-group label {
    font-size: 11px;
    color: #6b7280;
    font-weight: 700;
}

.wb-form-group input,
.wb-form-group select,
.wb-form-group textarea {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 12.5px;
    font-family: var(--font-sans);
    color: #1f2937;
    background: white;
    outline: none;
    font-weight: 600;
}

.wb-form-group input:focus,
.wb-form-group select:focus,
.wb-form-group textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.wb-form-group textarea {
    min-height: 80px;
    resize: vertical;
    line-height: 1.5;
}

.wb-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.wb-form-row .wb-form-group { margin-bottom: 12px; }

.wb-tag-input {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    min-height: 38px;
    align-items: center;
}

.wb-input-tag {
    background: #eef2ff;
    color: #4f46e5;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.wb-input-tag i {
    font-size: 8px;
    cursor: pointer;
    opacity: 0.7;
}

.wb-tag-input input {
    flex: 1;
    min-width: 100px;
    border: none !important;
    padding: 4px 6px !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 11.5px !important;
}

/* --- Side panel settings --- */
.wb-side-title {
    margin: 0 0 10px;
    font-size: 12.5px;
    font-weight: 800;
    color: #1f2937;
}

.wb-side-title:not(:first-child) { margin-top: 16px; }

.wb-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 12px;
    color: #1f2937;
    font-weight: 600;
}

.wb-toggle-row:last-of-type { border-bottom: none; }

.wb-toggle {
    width: 36px;
    height: 20px;
    border-radius: 999px;
    background: #e5e7eb;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.wb-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

.wb-toggle.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.wb-toggle.active::after {
    transform: translateX(-16px);
}

.wb-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.wb-info-row:last-of-type { border-bottom: none; }

.wb-info-row i {
    width: 32px;
    height: 32px;
    background: #f3f4f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    font-size: 13px;
    flex-shrink: 0;
}

.wb-info-row p {
    margin: 0 0 2px;
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
}

.wb-info-row span {
    font-size: 12px;
    font-weight: 800;
    color: #1f2937;
}

.wb-screen-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 700;
    font-family: var(--font-sans);
    margin: 8px 0 0;
    text-align: center;
}

@media (max-width: 920px) {
    .wb-two-col { grid-template-columns: 1fr; }
    .wb-stats { grid-template-columns: repeat(2, 1fr); }
    .wb-sidebar { width: 180px; }
}

@media (max-width: 768px) {
    .wb-frame { padding: 12px; }
    .wb-app { flex-direction: column; min-height: auto; }
    .wb-sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; padding: 12px; }
    .wb-nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
    .wb-nav-item { width: auto; padding: 6px 10px; }
    .wb-nav-label { display: none; }
    .wb-sidebar-footer { display: none; }
    .wb-stats { grid-template-columns: 1fr; }
    .wb-main { padding: 14px; }
}
