
/* EDIVIC Production Mobile Layer - desktop remains unchanged */
:root { --edv-primary:#232F3E; --edv-accent:#FEBD69; --edv-bg:#f8fafc; --edv-text:#0f172a; --edv-muted:#64748b; }
@media (max-width: 768px) {
  html, body { width:100%; max-width:100%; overflow-x:hidden; background:var(--edv-bg); }
  body { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); -webkit-font-smoothing:antialiased; }
  body.edv-page-index, body.edv-page-login, body.edv-page-register, body.edv-page-signup, body.edv-page-reset-password, body.edv-page-privacy, body.edv-page-terms, body.edv-page-refund, body.edv-page-contact, body.edv-page-pricing { padding-bottom:0; }
  .edivic-page-skeleton { display:none!important; }
  .saas-header, header.saas-header { position:sticky!important; top:0; z-index:500; border-radius:0 0 22px 22px; overflow:hidden; }
  .footer { display:none!important; }
  a, button { -webkit-tap-highlight-color: transparent; }

  /* Auth pages */
  .auth-login-page, .auth-page, body.edv-page-login, body.edv-page-register, body.edv-page-signup { background:linear-gradient(180deg,#f8fafc 0%,#ffffff 100%)!important; }
  .auth-back-round { top:14px!important; left:14px!important; width:42px!important; height:42px!important; border-radius:16px!important; z-index:40; }
  .register-container, .login-register-same-ui { min-height:100svh!important; display:block!important; padding:18px!important; background:transparent!important; }
  .register-container .left-panel, .login-register-same-ui .left-panel { width:100%!important; min-height:auto!important; padding:58px 4px 18px!important; background:transparent!important; color:var(--edv-text)!important; text-align:left!important; box-shadow:none!important; }
  .left-panel h1 { font-size:32px!important; line-height:1.08!important; color:var(--edv-text)!important; margin:0 0 10px!important; letter-spacing:-.6px; }
  .left-panel p { color:var(--edv-muted)!important; font-size:14px!important; line-height:1.55!important; max-width:340px!important; }
  .register-launch-badge { background:var(--edv-primary)!important; color:var(--edv-accent)!important; border-radius:999px!important; padding:8px 14px!important; font-size:11px!important; display:inline-flex!important; margin-bottom:13px!important; box-shadow:0 12px 26px rgba(35,47,62,.12); }
  .register-trust-list, .register-benefit-grid, .login-benefit-grid, .info-box { display:none!important; }
  .register-container .right-panel, .login-register-same-ui .right-panel { width:100%!important; min-height:auto!important; padding:0!important; background:transparent!important; }
  .form-box, .login-form-box { width:100%!important; max-width:100%!important; border-radius:28px!important; padding:22px!important; background:#fff!important; box-shadow:0 18px 48px rgba(15,23,42,.11)!important; border:1px solid #e2e8f0!important; }
  .form-box h2 { font-size:25px!important; color:var(--edv-text)!important; line-height:1.15!important; }
  .form-box p, .register-subtitle { color:var(--edv-muted)!important; font-size:13px!important; line-height:1.45!important; }
  #login-form input, #register-form input, #register-form select, .form-box input, .form-box select, .form-box textarea { width:100%!important; height:54px!important; border-radius:18px!important; border:1.5px solid #dbe4ef!important; background:#fbfdff!important; padding:0 15px!important; font-size:15px!important; font-weight:700!important; margin-bottom:13px!important; }
  .form-box textarea { height:auto!important; min-height:128px!important; padding:14px 15px!important; }
  .auth-main-cta, #login-btn, #register-btn, .submit-btn, #post-btn, .subscribe-btn, .pricing-card button { width:100%!important; min-height:56px!important; border-radius:20px!important; background:var(--edv-primary)!important; color:#fff!important; font-weight:900!important; font-size:16px!important; box-shadow:0 16px 30px rgba(35,47,62,.20)!important; border:0!important; }
  .message-container { border-radius:16px!important; padding:12px 14px!important; font-size:13px!important; font-weight:800!important; }

  /* Dashboard + listing pages */
  .dashboard, .dashboard-layout, .main-content, .dashboard-main, .client-dashboard, .editor-dashboard { display:block!important; width:100%!important; margin:0!important; padding:16px!important; }
  .sidebar, aside.sidebar { display:none!important; }
  .hero-section, .welcome-card, .dashboard-hero, .hero, .projects-top, .page-top, .settings-header { border-radius:28px!important; padding:20px!important; background:var(--edv-primary)!important; color:#fff!important; box-shadow:0 18px 42px rgba(35,47,62,.18)!important; margin:14px 0 16px!important; }
  .hero-section h1, .welcome-card h1, .dashboard-hero h1, .hero h1, .projects-top h1, .page-top h1, .settings-header h1 { color:#fff!important; font-size:26px!important; line-height:1.12!important; }
  .hero-section p, .welcome-card p, .dashboard-hero p, .hero p, .projects-top p, .page-top p, .settings-header p { color:#dbe4ee!important; font-size:13px!important; line-height:1.5!important; }
  .cards, .stats-grid, .analytics-grid, .graph-section, .projects-grid, .editors-grid, .dashboard-grid { display:grid!important; grid-template-columns:1fr!important; gap:14px!important; }
  .card, .stat-card, .project-card, .editor-card, .settings-card, .form-box, .pricing-card, .detail-card { border-radius:24px!important; box-shadow:0 12px 30px rgba(15,23,42,.08)!important; border:1px solid #e2e8f0!important; background:#fff!important; }
  .project-page, .projects-page, .editors-page, .settings-page, .profile-page, .pricing-section { padding:14px!important; margin:0!important; width:100%!important; }
  .top-nav, .search-row, .page-top, .projects-top, .double-input, .double-group, .profile-main, .profile-grid { flex-direction:column!important; display:flex!important; align-items:stretch!important; gap:12px!important; }
  .search-box, .search-row > div { width:100%!important; min-width:0!important; }
  .professional-back-btn, .new-btn, .view-details-btn, .profile-btn, .hire-btn, .apply-btn { width:100%!important; justify-content:center!important; min-height:46px!important; border-radius:16px!important; }

  /* Forms */
  .input-group { margin-bottom:14px!important; }
  .input-group label { font-size:12px!important; color:var(--edv-text)!important; font-weight:900!important; margin-bottom:7px!important; display:block!important; }
  .input-group input, .input-group select, .input-group textarea, .upload-box input, #settings-form input, #settings-form select, #settings-form textarea { width:100%!important; min-height:50px!important; border-radius:16px!important; border:1.5px solid #dbe4ef!important; padding:12px 14px!important; font-size:14px!important; background:#fbfdff!important; }
  .upload-box { border-radius:22px!important; padding:18px!important; }

  /* Chat */
  .chat-container { display:block!important; height:auto!important; min-height:calc(100svh - 110px)!important; padding:12px!important; background:#f8fafc!important; }
  .contacts-panel, .chat-area { width:100%!important; height:auto!important; border-radius:24px!important; margin-bottom:14px!important; background:#fff!important; border:1px solid #e2e8f0!important; overflow:hidden!important; }
  .contacts-panel { min-height:220px!important; }
  .chat-area { min-height:62svh!important; display:flex!important; flex-direction:column!important; }
  .panel-header, .chat-header { background:var(--edv-primary)!important; color:#fff!important; border-radius:0!important; }
  .messages-feed { min-height:45svh!important; max-height:55svh!important; padding:14px!important; }
  .chat-footer { position:sticky!important; bottom:76px; background:#fff!important; padding:10px!important; border-top:1px solid #e2e8f0!important; }
  #chat-text-input { height:48px!important; border-radius:18px!important; }
  .send-btn { min-width:48px!important; border-radius:18px!important; }

  /* Bottom nav */
  .edv-mobile-bottom-nav { position:fixed; left:12px; right:12px; bottom:calc(10px + env(safe-area-inset-bottom,0px)); height:66px; z-index:9999; display:grid; grid-template-columns:repeat(4,1fr); background:#fff; border:1px solid #e2e8f0; border-radius:24px; box-shadow:0 18px 42px rgba(15,23,42,.20); overflow:hidden; }
  .edv-mobile-bottom-nav a { text-decoration:none; color:#94a3b8; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:3px; font-size:10px; font-weight:900; }
  .edv-mobile-bottom-nav i { font-size:18px; }
  .edv-mobile-bottom-nav a.active { color:var(--edv-primary); }
  .edv-mobile-bottom-nav a.active i { color:var(--edv-accent); }

  .edv-mobile-page-title { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 16px 0; }
  .edv-mobile-page-title .edv-logo-mini { width:42px; height:42px; border-radius:16px; background:var(--edv-primary); display:grid; place-items:center; overflow:hidden; box-shadow:0 12px 24px rgba(35,47,62,.18); }
  .edv-mobile-page-title img { width:78%; height:78%; object-fit:contain; }
  .edv-mobile-page-title strong { color:var(--edv-text); font-size:16px; }
}

/* =====================================================
   EDIVIC UNIFIED MOBILE BOTTOM BAR - same across pages
===================================================== */
@media (max-width: 768px){
  .edv-mobile-bottom-nav,
  .edivic-chat-bottom-nav{
    position:fixed!important;
    left:14px!important;
    right:14px!important;
    bottom:calc(12px + env(safe-area-inset-bottom,0px))!important;
    height:72px!important;
    z-index:9999!important;
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    align-items:center!important;
    justify-content:center!important;
    gap:4px!important;
    padding:8px!important;
    border-radius:28px!important;
    border:1px solid rgba(255,255,255,.16)!important;
    background:linear-gradient(135deg,rgba(15,23,42,.96),rgba(30,41,59,.94))!important;
    box-shadow:0 18px 45px rgba(15,23,42,.34), inset 0 1px 0 rgba(255,255,255,.10)!important;
    backdrop-filter:blur(20px)!important;
    -webkit-backdrop-filter:blur(20px)!important;
    overflow:hidden!important;
  }

  .edv-mobile-bottom-nav::before,
  .edivic-chat-bottom-nav::before{
    content:""!important;
    position:absolute!important;
    inset:auto 18% -32px 18%!important;
    height:46px!important;
    background:radial-gradient(circle,rgba(254,189,105,.42),transparent 70%)!important;
    pointer-events:none!important;
  }

  .edv-mobile-bottom-nav a,
  .edivic-chat-bottom-nav a{
    min-width:0!important;
    height:54px!important;
    border-radius:20px!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:4px!important;
    padding:6px 4px!important;
    color:#cbd5e1!important;
    text-decoration:none!important;
    font-size:10.5px!important;
    line-height:1!important;
    font-weight:900!important;
    letter-spacing:.01em!important;
    border:1px solid transparent!important;
    background:transparent!important;
    transition:transform .18s ease, background .18s ease, color .18s ease!important;
  }

  .edv-mobile-bottom-nav a i,
  .edivic-chat-bottom-nav a i{
    font-size:18px!important;
    line-height:1!important;
    color:inherit!important;
  }

  .edv-mobile-bottom-nav a.active,
  .edivic-chat-bottom-nav a.active{
    color:#111827!important;
    background:linear-gradient(135deg,#FEBD69,#ffd47e)!important;
    border-color:rgba(255,255,255,.26)!important;
    box-shadow:0 10px 24px rgba(254,189,105,.25)!important;
    transform:translateY(-1px)!important;
  }
}


/* EDIVIC: mobile bottom/down bar removed */
@media (max-width: 900px){
  body, body.edivic-mtb-nav-ready{ padding-bottom:0!important; }
  .edv-mtb-bottom-nav,
  .edv-mobile-bottom-nav,
  .edivic-chat-bottom-nav,
  .bottom-nav,
  .edv-chat-bottom-nav{
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
  }
}
