
/* ENVIA LMS V10.2.0 | FINAL MOBILE STANDARD
   This file intentionally loads after legacy CSS and normalizes mobile behavior. */
:root{
  --mobile-bg:#f5f7fb;
  --mobile-card:#ffffff;
  --mobile-border:#dfe8f5;
  --mobile-text:#071846;
  --mobile-muted:#64748b;
  --mobile-blue:#1D63FF;
  --mobile-navy:#031B63;
  --mobile-purple:#5A22FF;
}
@media (max-width: 1024px){
  html,body{width:100%;max-width:100%;overflow-x:hidden!important;background:var(--mobile-bg)!important;-webkit-text-size-adjust:100%;}
  *{box-sizing:border-box;}
  img,video,svg,canvas,iframe{max-width:100%;height:auto;}
  body.shell-ready .app-shell{display:block!important;width:100%!important;min-width:0!important;background:var(--mobile-bg)!important;}
  body.shell-ready .sidebar{display:none!important;}
  body.shell-ready .main{width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;padding:0 0 calc(92px + env(safe-area-inset-bottom))!important;overflow-x:hidden!important;background:var(--mobile-bg)!important;}
  body.shell-ready .main > :not(.topbar){max-width:100%!important;}
  body.shell-ready .section{padding:14px 12px 24px!important;}
  body.shell-ready .container{width:100%!important;max-width:100%!important;padding-left:12px!important;padding-right:12px!important;margin:0 auto!important;}

  /* Mobile topbar */
  body.shell-ready .topbar{position:sticky!important;top:0!important;z-index:850!important;width:100%!important;min-height:76px!important;display:grid!important;grid-template-columns:58px minmax(0,1fr) 58px!important;align-items:center!important;gap:12px!important;padding:10px 18px!important;background:rgba(255,255,255,.96)!important;border-bottom:1px solid #e4ebf6!important;box-shadow:0 8px 28px rgba(15,23,42,.05)!important;backdrop-filter:blur(18px)!important;}
  body.shell-ready .mobile-menu-trigger{display:flex!important;align-items:center!important;justify-content:center!important;width:58px!important;height:58px!important;border-radius:20px!important;border:1px solid #dce6f7!important;background:#f8fbff!important;color:var(--mobile-navy)!important;box-shadow:0 12px 26px rgba(15,23,42,.055)!important;}
  body.shell-ready .mobile-menu-trigger .material-symbols-rounded{font-size:32px!important;line-height:1!important;color:currentColor!important;}
  body.shell-ready .topbar-title{min-width:0!important;text-align:center!important;justify-self:center!important;}
  body.shell-ready .topbar-title .topbar-kicker,body.shell-ready .topbar-title h3{display:none!important;}
  body.shell-ready .mobile-topbar-brand{display:block!important;max-width:58vw!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;color:var(--mobile-navy)!important;font-weight:950!important;font-size:clamp(1.3rem,6.2vw,1.8rem)!important;letter-spacing:-.045em!important;line-height:1!important;}
  body.shell-ready .topbar-actions{justify-self:end!important;display:flex!important;align-items:center!important;gap:0!important;}
  body.shell-ready .notification-menu{display:none!important;}
  body.shell-ready .profile-trigger{display:flex!important;align-items:center!important;justify-content:center!important;width:58px!important;height:58px!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;}
  body.shell-ready .profile-meta,body.shell-ready .profile-trigger > .material-symbols-rounded{display:none!important;}
  body.shell-ready .profile-trigger .avatar{display:flex!important;align-items:center!important;justify-content:center!important;width:58px!important;height:58px!important;border-radius:999px!important;background:linear-gradient(135deg,var(--mobile-blue),var(--mobile-purple))!important;color:#fff!important;font-size:1.05rem!important;font-weight:950!important;box-shadow:0 14px 34px rgba(29,99,255,.22)!important;}

  /* Full mobile menu */
  .envia-mobile-menu-sheet{display:none!important;position:fixed!important;inset:0!important;z-index:9999!important;}
  .envia-mobile-menu-sheet.is-open{display:block!important;}
  .envia-mobile-menu-backdrop{position:absolute!important;inset:0!important;background:rgba(3,11,34,.44)!important;backdrop-filter:blur(8px)!important;}
  .envia-mobile-menu-panel{position:absolute!important;inset:0!important;width:100%!important;height:100dvh!important;max-height:100dvh!important;overflow-y:auto!important;padding:28px 20px calc(112px + env(safe-area-inset-bottom))!important;background:linear-gradient(180deg,#ffffff 0%,#f6f8ff 100%)!important;border-radius:0!important;box-shadow:none!important;transform:none!important;}
  .envia-mobile-menu-handle{display:none!important;}
  .envia-mobile-menu-panel header{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:16px!important;margin:0 0 18px!important;padding:0!important;}
  .envia-mobile-menu-panel header strong{display:block!important;font-size:2rem!important;line-height:1.05!important;color:var(--mobile-navy)!important;letter-spacing:-.045em!important;font-weight:950!important;}
  .envia-mobile-menu-panel header span{display:block!important;margin-top:6px!important;color:var(--mobile-muted)!important;font-size:1rem!important;font-weight:650!important;}
  .envia-mobile-menu-panel header button{width:58px!important;height:58px!important;flex:0 0 58px!important;border-radius:20px!important;border:1px solid var(--mobile-border)!important;background:#fff!important;color:var(--mobile-text)!important;font-size:2rem!important;line-height:1!important;display:flex!important;align-items:center!important;justify-content:center!important;box-shadow:0 14px 32px rgba(15,23,42,.08)!important;}
  .envia-mobile-menu-list{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;}
  .envia-mobile-menu-list a,.envia-mobile-logout{width:100%!important;min-height:64px!important;display:grid!important;grid-template-columns:48px minmax(0,1fr)!important;align-items:center!important;gap:14px!important;padding:11px 14px!important;border:1px solid var(--mobile-border)!important;border-radius:20px!important;background:#fff!important;text-decoration:none!important;color:var(--mobile-text)!important;font-size:1.02rem!important;font-weight:900!important;text-align:left!important;letter-spacing:-.015em!important;box-shadow:0 12px 28px rgba(15,23,42,.045)!important;}
  .envia-mobile-menu-list a.is-parent{background:linear-gradient(180deg,#f8fbff,#eef5ff)!important;color:#0b57d0!important;border-color:#cfddf3!important;}
  .envia-mobile-menu-list a.is-child{margin-left:18px!important;width:calc(100% - 18px)!important;min-height:56px!important;font-size:.94rem!important;font-weight:800!important;background:#fff!important;border-radius:18px!important;}
  .envia-mobile-menu-list a.is-active{border-color:#bad2ff!important;background:#eef5ff!important;color:#0b57d0!important;box-shadow:0 16px 34px rgba(29,99,255,.12)!important;}
  .envia-mobile-menu-icon{width:48px!important;height:48px!important;display:flex!important;align-items:center!important;justify-content:center!important;border-radius:16px!important;background:#eef5ff!important;color:var(--mobile-blue)!important;overflow:hidden!important;}
  .envia-mobile-menu-icon .material-symbols-rounded{display:block!important;color:currentColor!important;font-family:'Material Symbols Rounded'!important;font-size:27px!important;line-height:1!important;width:27px!important;height:27px!important;overflow:hidden!important;text-transform:none!important;letter-spacing:normal!important;white-space:nowrap!important;font-weight:500!important;}
  .envia-mobile-menu-text{display:block!important;min-width:0!important;line-height:1.18!important;white-space:normal!important;overflow-wrap:break-word!important;word-break:normal!important;}
  .envia-mobile-logout{margin-top:14px!important;border-color:#fecaca!important;background:#fff7f7!important;color:#b91c1c!important;}
  .envia-mobile-logout .envia-mobile-menu-icon{background:#fee2e2!important;color:#b91c1c!important;}
  body.mobile-sheet-open{overflow:hidden!important;}

  /* Bottom navigation */
  .envia-bottom-nav{position:fixed!important;left:0!important;right:0!important;bottom:0!important;z-index:900!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important;padding:12px 14px max(12px,env(safe-area-inset-bottom))!important;background:rgba(255,255,255,.97)!important;border-top:1px solid #e1e8f4!important;border-radius:24px 24px 0 0!important;box-shadow:0 -16px 40px rgba(15,23,42,.12)!important;backdrop-filter:blur(18px)!important;}
  .envia-bottom-nav a{height:62px!important;border-radius:18px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:4px!important;text-decoration:none!important;color:#475569!important;font-weight:850!important;font-size:.82rem!important;line-height:1!important;}
  .envia-bottom-nav a.is-active{background:#eef5ff!important;color:#0b57d0!important;}
  .envia-bottom-nav .material-symbols-rounded{font-family:'Material Symbols Rounded'!important;width:27px!important;height:27px!important;overflow:hidden!important;font-size:27px!important;line-height:1!important;color:currentColor!important;}

  /* Universal grids -> mobile cards */
  .admin-dashboard-modern,.sales-page,.sales-crm-root,.crm-detail-root,.designer-shell,.admin-page,.page-shell,.content-page{display:block!important;width:100%!important;max-width:100%!important;padding:16px 14px 28px!important;overflow:hidden!important;}
  .admin-metrics-grid,.admin-main-grid,.admin-secondary-grid,.stats-grid,.dashboard-grid,.kpi-grid,.v4-kpi-grid,.employee-kpi-grid,.sales-kpi-grid,.crm-stats-grid,.quick-grid,.feature-grid,.settings-grid,.form-grid,.form-grid-2,.media-center-grid,.sales-grid,.report-grid{display:grid!important;grid-template-columns:1fr!important;gap:14px!important;width:100%!important;max-width:100%!important;margin:0 0 14px!important;}
  .admin-stat-card,.stat-card,.kpi-card,.metric-card,.dashboard-card,.phone-card,.dash-card,.chart-card,.quick-actions-card,.activity-card,.reminders-card,.active-companies-card,.system-card,.card,.sales-card,.crm-card,.admin-card,.v4-card,.media-panel,.media-library-panel{width:100%!important;max-width:100%!important;border-radius:24px!important;background:#fff!important;border:1px solid #e4ebf7!important;box-shadow:0 12px 32px rgba(15,23,42,.06)!important;overflow:hidden!important;}
  .admin-stat-card,.stat-card,.kpi-card,.metric-card{min-height:118px!important;display:grid!important;grid-template-columns:86px minmax(0,1fr)!important;align-items:center!important;gap:16px!important;padding:17px!important;}
  .admin-stat-card .stat-icon,.stat-card .stat-icon,.kpi-card .stat-icon,.metric-card .stat-icon{width:78px!important;height:78px!important;border-radius:22px!important;background:#eef5ff!important;display:flex!important;align-items:center!important;justify-content:center!important;color:var(--mobile-blue)!important;}
  .admin-stat-card .stat-icon .material-symbols-rounded,.stat-card .stat-icon .material-symbols-rounded,.kpi-card .stat-icon .material-symbols-rounded,.metric-card .stat-icon .material-symbols-rounded{font-family:'Material Symbols Rounded'!important;font-size:40px!important;line-height:1!important;color:currentColor!important;}
  .admin-stat-card p,.stat-card p,.kpi-card p,.metric-card p{margin:0 0 6px!important;color:var(--mobile-muted)!important;font-size:1rem!important;font-weight:850!important;}
  .admin-stat-card strong,.stat-card strong,.kpi-card strong,.metric-card strong{display:block!important;color:var(--mobile-text)!important;font-size:2.15rem!important;line-height:1!important;letter-spacing:-.05em!important;}
  .admin-stat-card small,.stat-card small,.kpi-card small,.metric-card small{display:block!important;margin-top:6px!important;font-size:.95rem!important;font-weight:850!important;color:#059669!important;}
  .dash-card,.chart-card,.quick-actions-card,.activity-card,.reminders-card,.active-companies-card,.system-card{padding:18px!important;}
  .dash-card h3,.chart-card h3,.card h3,.card h2{font-size:1.18rem!important;margin:0 0 12px!important;color:var(--mobile-text)!important;line-height:1.15!important;}
  .quick-action{min-height:58px!important;border-radius:18px!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:12px!important;padding:12px 14px!important;text-align:left!important;font-weight:900!important;}
  .quick-action .material-symbols-rounded{font-family:'Material Symbols Rounded'!important;font-size:26px!important;line-height:1!important;color:currentColor!important;}
  .hero-card,.sales-hero,.nace-hero,.assignment-hero,.crm-record-hero,.page-hero,.admin-hero{display:grid!important;grid-template-columns:1fr!important;gap:14px!important;padding:20px!important;border-radius:24px!important;margin:14px!important;}
  .hero-card h1,.sales-hero h1,.nace-hero h1,.page-hero h1,.admin-hero h1{font-size:clamp(1.5rem,8vw,2.05rem)!important;line-height:1.08!important;letter-spacing:-.045em!important;margin:0 0 8px!important;}
  .hero-card p,.sales-hero p,.nace-hero p,.page-hero p,.admin-hero p{font-size:.96rem!important;line-height:1.55!important;margin:0!important;}

  /* Tables become cards */
  .table-wrap,.table-responsive,.v4-table-wrap,.crm-table-wrap,.sales-table-wrap,.employee-table-wrap,.report-table-wrap,.kvkk-table-wrap,.audit-table-wrap,.cert-table-wrap,.contract-table-wrap,.cms-compact-table-wrap,.responsive-table,.envia-table-card-wrap{width:100%!important;overflow:visible!important;border:0!important;background:transparent!important;}
  table.envia-mobile-table,table.modern-table,table.table{display:block!important;width:100%!important;border:0!important;background:transparent!important;}
  table.envia-mobile-table thead,table.modern-table thead,table.table thead{display:none!important;}
  table.envia-mobile-table tbody,table.modern-table tbody,table.table tbody{display:grid!important;gap:12px!important;width:100%!important;}
  table.envia-mobile-table tr,table.modern-table tr,table.table tr{display:grid!important;gap:9px!important;width:100%!important;padding:16px!important;border:1px solid #e4ebf7!important;border-radius:22px!important;background:#fff!important;box-shadow:0 10px 26px rgba(15,23,42,.055)!important;}
  table.envia-mobile-table td,table.envia-mobile-table th,table.modern-table td,table.table td{display:grid!important;grid-template-columns:minmax(96px,38%) minmax(0,1fr)!important;gap:10px!important;align-items:start!important;width:100%!important;padding:0!important;border:0!important;text-align:left!important;white-space:normal!important;word-break:break-word!important;}
  table.envia-mobile-table td::before,table.envia-mobile-table th::before,table.modern-table td::before,table.table td::before{content:attr(data-label);color:var(--mobile-muted)!important;font-size:.78rem!important;font-weight:900!important;text-transform:none!important;}
  .actions,.table-actions,.row-actions,.action-buttons{display:flex!important;flex-wrap:wrap!important;gap:8px!important;justify-content:flex-start!important;}
  .icon-action,.table-actions button,.row-actions button,.action-buttons button{min-width:44px!important;min-height:44px!important;border-radius:14px!important;}

  /* Forms */
  .modal:not(#logoutConfirmModal){align-items:stretch!important;padding:0!important;}
  .modal:not(#logoutConfirmModal) .modal-panel{width:100%!important;max-width:100%!important;min-height:100dvh!important;max-height:100dvh!important;border-radius:0!important;overflow:auto!important;padding:22px 18px 110px!important;}
  input,select,textarea,.input,.select,.auth-input{width:100%!important;min-height:50px!important;border-radius:15px!important;font-size:16px!important;}
  textarea{min-height:120px!important;}
  .btn,button,a.btn{min-height:46px;border-radius:14px;}
  .modal-actions,.form-actions,.page-actions{position:sticky!important;bottom:0!important;z-index:2!important;display:grid!important;grid-template-columns:1fr!important;gap:10px!important;width:100%!important;padding:14px!important;margin:16px -14px -14px!important;background:linear-gradient(180deg,rgba(255,255,255,0),#fff 34%)!important;}

  /* Public landing */
  body:not(.shell-ready) .container{width:100%!important;max-width:100%!important;padding-left:18px!important;padding-right:18px!important;}
  .public-header,.landing-header{position:sticky!important;top:0!important;z-index:80!important;background:rgba(255,255,255,.96)!important;backdrop-filter:blur(18px)!important;}
  .hero,.landing-hero,.hero-grid,.landing-video-premium,.landing-video-public,.feature-grid,.reference-logo-row-v930,.reference-carousel-track,.contact-grid,.footer-grid{display:grid!important;grid-template-columns:1fr!important;gap:18px!important;}
  .hero h1,.landing-hero h1{font-size:clamp(2rem,10vw,3.1rem)!important;line-height:1.05!important;}
  .dashboard-card,.phone-card,.hero-device,.hero-mockup{display:none!important;}
  .reference-carousel,.reference-slider,.references-slider{display:flex!important;overflow-x:auto!important;overflow-y:hidden!important;gap:14px!important;scroll-snap-type:x mandatory!important;-webkit-overflow-scrolling:touch!important;padding:8px 18px 16px!important;margin-left:-18px!important;margin-right:-18px!important;}
  .reference-carousel::-webkit-scrollbar,.reference-slider::-webkit-scrollbar,.references-slider::-webkit-scrollbar{display:none!important;}
  .reference-card,.reference-logo-card,.reference-logo-row-v930 article{flex:0 0 min(74vw,260px)!important;min-width:min(74vw,260px)!important;scroll-snap-align:center!important;min-height:130px!important;display:flex!important;align-items:center!important;justify-content:center!important;}
  .reference-card img,.reference-logo-card img,.reference-logo-row-v930 img{max-width:82%!important;max-height:88px!important;object-fit:contain!important;}
}
@media (max-width:390px){
  body.shell-ready .topbar{grid-template-columns:52px minmax(0,1fr) 52px!important;padding-left:12px!important;padding-right:12px!important;}
  body.shell-ready .mobile-menu-trigger,body.shell-ready .profile-trigger,body.shell-ready .profile-trigger .avatar{width:52px!important;height:52px!important;border-radius:18px!important;}
  .envia-mobile-menu-panel{padding-left:14px!important;padding-right:14px!important;}
  .admin-stat-card,.stat-card,.kpi-card,.metric-card{grid-template-columns:76px minmax(0,1fr)!important;padding:14px!important;}
  .admin-stat-card .stat-icon,.stat-card .stat-icon,.kpi-card .stat-icon,.metric-card .stat-icon{width:70px!important;height:70px!important;}
  .envia-bottom-nav{padding-left:8px!important;padding-right:8px!important;gap:4px!important;}
  .envia-bottom-nav a{font-size:.74rem!important;}
}
