/* ALBUKHR MARKETPLACE — cleaned, responsive, emoji-free.
   Dock Navigation intentionally NOT included. */

:root{--brand:#0f7a3d;--bg:#f4f7f6;--text:#222;--muted:#707070;--border:#e1e6e3;--card:#fff}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:system-ui,-apple-system,"Segoe UI",Arial,sans-serif;background:var(--bg);color:var(--text);min-height:100vh;overflow-x:hidden;padding-bottom:30px}
button,input,select{font:inherit}
.header{height:60px;padding:0 16px;background:var(--brand);display:flex;align-items:center;justify-content:space-between}
.header-left,.header-right{display:flex;align-items:center}
.brand{color:#fff;font-weight:700;font-size:18px;letter-spacing:1px}
.header-btn{width:40px;height:40px;border:0;border-radius:12px;background:rgba(255,255,255,.12);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative}
.header-icon{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.notification-badge{position:absolute;top:6px;right:6px;width:7px;height:7px;border-radius:50%;background:#ef4444;display:none}

.market-controls{padding:14px 16px 4px;display:flex;gap:10px;align-items:center}
.search-control{flex:1;min-width:0;height:46px;padding:0 13px;border:1px solid var(--border);border-radius:14px;background:#fff;display:flex;align-items:center;gap:9px;box-shadow:0 4px 12px rgba(0,0,0,.035)}
.control-icon{width:18px;height:18px;fill:none;stroke:#777;stroke-width:1.8;stroke-linecap:round}
.search-control input{width:100%;min-width:0;border:0;outline:0;background:transparent;font-size:14px}
.market-controls select{height:46px;padding:0 12px;border:1px solid var(--border);border-radius:14px;background:#fff;font-size:13px;outline:none}
.search-control:focus-within,.market-controls select:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(15,122,61,.1)}

.market-section{padding:16px}
.section-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.section-header h2{margin:0;font-size:21px;font-weight:750}
.market-insights-slider{display:flex;gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;padding:2px 2px 10px;scrollbar-width:none}
.market-insights-slider::-webkit-scrollbar{display:none}
.market-box{min-width:290px;background:#fff;border-radius:22px;padding:18px;box-shadow:0 10px 28px rgba(0,0,0,.07);scroll-snap-align:start;flex-shrink:0;animation:fadeUp .35s ease both;transition:.25s}
.market-box:hover{transform:translateY(-3px)}
.market-box h3{margin:0 0 10px;font-size:17px}
.market-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid #f0f2f1}
.market-item:last-child{border-bottom:0}
.market-item span{min-width:0;font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.market-item b{flex:0 0 auto;color:var(--brand);font-size:12px}

.discovery-section{margin-bottom:6px}
.featured-project{background:linear-gradient(135deg,#0f7a3d,#17994b);color:#fff;border-radius:24px;padding:22px;margin:12px 16px 18px;box-shadow:0 12px 28px rgba(15,122,61,.2);animation:fadeUp .35s ease}
.featured-title{font-size:12px;font-weight:750;letter-spacing:1px;text-transform:uppercase;opacity:.9;margin-bottom:9px}
.featured-name{font-size:25px;font-weight:800;line-height:1.2;margin-bottom:10px}
.featured-desc{font-size:14px;line-height:1.6;opacity:.95;margin-bottom:17px}
.featured-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:16px}
.featured-stat{background:rgba(255,255,255,.12);border-radius:16px;padding:11px 8px;text-align:center}
.featured-stat span{display:block;font-size:11px;opacity:.85;margin-bottom:4px}
.featured-stat b{font-size:16px}
.featured-progress{height:8px;background:rgba(255,255,255,.25);border-radius:999px;overflow:hidden;margin:15px 0 8px}
.featured-progress-bar{height:100%;background:#fff;border-radius:999px;transition:width .8s ease}
.featured-funded{text-align:right;font-size:11px;margin-bottom:14px;opacity:.9}
.featured-btn{width:100%;padding:14px;border:0;border-radius:16px;background:#fff;color:var(--brand);font-weight:750;cursor:pointer}

.marketplace{padding:0 12px}
.project-card{background:#fff;border-radius:22px;padding:18px;margin:0 4px 18px;box-shadow:0 10px 28px rgba(0,0,0,.07);transition:.25s;overflow:hidden;animation:fadeUp .35s ease;cursor:pointer}
.project-card:hover{transform:translateY(-4px);box-shadow:0 18px 35px rgba(0,0,0,.11)}
.project-header{display:flex;align-items:flex-start;gap:14px;margin-bottom:14px}
.project-icon{width:56px;height:56px;border-radius:16px;background:#eef8f1;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden}
.project-icon img{width:100%;height:100%;object-fit:cover}
.project-icon-fallback{width:28px;height:28px;fill:none;stroke:var(--brand);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.project-title{font-size:19px;font-weight:750;line-height:1.25;margin-bottom:4px}
.project-category{font-size:12px;color:#777}
.badge-group{display:flex;flex-wrap:wrap;gap:7px;margin-top:9px}
.core-badge,.trend,.roi-badge,.liquidity-badge,.risk-badge{display:inline-flex;align-items:center;justify-content:center;padding:5px 9px;border-radius:999px;font-size:10px;font-weight:750;white-space:nowrap}
.core-badge{background:#fff7d6;color:#8a6500;border:1px solid #f0d36b}
.trend{background:#ffe9e7;color:#c62828;border:1px solid #ffb5af}
.roi-badge{background:#e8fff0;color:#087f23;border:1px solid #7bd389}
.liquidity-badge{background:#e8f4ff;color:#1565c0;border:1px solid #90caf9}
.risk-badge.low{background:#e8fff0;color:#087f23;border:1px solid #9bdfaa}
.risk-badge.medium{background:#fff7e6;color:#d97706;border:1px solid #f0c979}
.risk-badge.high{background:#ffeaea;color:#c62828;border:1px solid #f1a4a4}
.project-desc{margin:14px 0;font-size:13px;line-height:1.6;color:#555}
.project-info{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0}
.info-box{background:#f7f8fa;border-radius:14px;padding:10px;text-align:center}
.info-box span{display:block;font-size:11px;color:#777;margin-bottom:4px}
.info-box b{font-size:15px;color:var(--brand)}
.project-progress{margin-top:16px}
.progress-label{display:flex;justify-content:space-between;font-size:12px;margin-bottom:6px;color:#666}
.progress{height:9px;background:#e7ece9;border-radius:999px;overflow:hidden}
.progress-bar{height:100%;width:0;background:linear-gradient(90deg,#0f7a3d,#21b35b);border-radius:999px;transition:width .8s ease}
.roi-box{margin-top:18px;padding:15px;background:#f8fafc;border:1px solid #edf2f7;border-radius:18px}
.roi-title{font-size:13px;font-weight:750;margin-bottom:10px}
.roi-input{width:100%;padding:13px 14px;border:1px solid #d9e2ec;border-radius:14px;font-size:15px;outline:none;background:#fff}
.roi-input:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(15,122,61,.12)}
.roi-result{margin-top:10px;padding:12px;border-radius:14px;background:#eef8f1;display:flex;justify-content:space-between;gap:10px;font-size:13px;font-weight:600}
.roi-result b{font-size:17px;color:var(--brand)}
.invest-btn{width:100%;margin-top:18px;padding:15px;border:0;border-radius:16px;background:linear-gradient(135deg,#0f7a3d,#18a558);color:#fff;font-size:15px;font-weight:750;cursor:pointer;box-shadow:0 8px 18px rgba(15,122,61,.2);transition:.25s}
.invest-btn:hover{transform:translateY(-2px)}
.invest-btn:active{transform:scale(.98)}
.empty,.loading-card{background:#fff;border-radius:20px;padding:20px;margin:0 4px 16px;text-align:center;color:#777;font-size:13px;box-shadow:0 8px 20px rgba(0,0,0,.05)}
.skeleton{height:14px;background:#e8ecea;border-radius:8px;margin:10px 0;animation:pulse 1.2s infinite}
@keyframes pulse{0%{opacity:.45}50%{opacity:1}100%{opacity:.45}}
@keyframes fadeUp{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:translateY(0)}}

.app-alert{display:none;position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:99999;align-items:center;justify-content:center;padding:20px;backdrop-filter:blur(5px)}
.app-alert.show{display:flex}
.app-alert-box{width:100%;max-width:420px;background:#fff;border-radius:24px;padding:22px;box-shadow:0 30px 60px rgba(0,0,0,.25);animation:fadeUp .25s ease}
.app-alert-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px}
.app-alert-header h3{margin:0;color:var(--brand);font-size:20px}
.app-alert-close{width:40px;height:40px;border:0;border-radius:12px;background:#f2f4f3;color:#444;display:flex;align-items:center;justify-content:center;cursor:pointer}
.app-alert-close svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.app-alert-box p{margin:0 0 15px;color:#555;line-height:1.55;font-size:14px}
.modal-field-label{display:block;margin-bottom:7px;font-size:12px;font-weight:650;color:#555}
.amount-input-wrap{display:flex;align-items:center;border:1px solid #ddd;border-radius:14px;background:#fff;overflow:hidden;margin-bottom:18px}
.amount-input-wrap:focus-within{border-color:var(--brand);box-shadow:0 0 0 3px rgba(15,122,61,.1)}
.amount-input-wrap input{flex:1;min-width:0;padding:13px;border:0;outline:0;background:transparent}
.amount-input-wrap span{padding:0 14px;color:var(--brand);font-weight:750;font-size:13px}
.app-alert-icon{width:44px;height:44px;margin:0 auto 12px;border-radius:14px;background:#e8f7ee;position:relative}
.app-alert-icon:before{content:"";position:absolute;left:50%;top:50%;width:7px;height:7px;border-radius:50%;background:var(--brand);transform:translate(-50%,-50%)}
.app-alert-actions{display:flex;gap:10px;margin-top:8px}
.app-alert-btn{width:100%;padding:14px;border:0;border-radius:15px;background:linear-gradient(135deg,#0f7a3d,#18a558);color:#fff;font-size:15px;font-weight:750;cursor:pointer}

@media(max-width:600px){
  .market-controls{padding:12px 12px 3px}
  .market-controls select{width:112px}
  .market-section{padding:14px 12px}
  .section-header h2{font-size:19px}
  .market-box{min-width:275px}
  .featured-project{margin:10px 12px 16px;padding:18px;border-radius:21px}
  .featured-name{font-size:22px}
  .project-card{margin-left:0;margin-right:0;padding:16px;border-radius:20px}
  .project-title{font-size:17px}
  .project-icon{width:52px;height:52px}
}
@media(max-width:380px){
  .market-controls{flex-direction:column}
  .market-controls select{width:100%}
  .featured-stats{gap:7px}
            }

.project-card{cursor:pointer}.project-card:focus-visible{outline:3px solid rgba(15,122,61,.25);outline-offset:2px}.project-view-btn{width:100%;margin-top:10px;padding:13px 15px;border:1px solid #d8e4dc;border-radius:16px;background:#f7faf8;color:#0f7a3d;font-size:14px;font-weight:750;cursor:pointer}.project-view-btn:hover{background:#eef8f1;border-color:#a9cbb6}.project-view-btn:active{transform:scale(.98)}
