/* CanyonStreet V3.3: Mobile layout overhaul. No desktop layout changes. */
@media (max-width: 800px) {
  html, body { max-width:100%; overflow-x:clip; }
  .site-header { z-index:90; }
  .nav { min-height:70px; height:auto !important; display:flex; gap:8px; align-items:center; }
  .brand { min-width:0 !important; flex:1 1 auto; }
  .brand img { display:block; max-width:100%; width:140px !important; height:56px !important; object-fit:contain; object-position:left center; }
  .nav-actions { flex:none; display:flex; align-items:center; gap:7px; }
  .nav-actions .mobile-employee-shortcut { display:inline-flex; align-items:center; justify-content:center; font-size:12px; line-height:1.2; min-height:42px; padding:9px 10px; font-weight:800; color:#092c43; border:1px solid #ccdde6; border-radius:10px; background:#eff5f9; white-space:nowrap; }
  .nav-actions .menu-btn { border:1px solid #ccdde6; background:#fff; border-radius:11px; width:44px; height:44px; min-height:44px; display:grid; place-items:center; padding:0; color:#102d43; }
  .nav-links { position:absolute; top:70px !important; left:0; right:0; background:#fff; border-bottom:1px solid #d7e2e9; padding:15px 22px !important; gap:0 !important; box-shadow:0 16px 26px #092c4319; max-height:calc(100dvh - 70px); overflow-y:auto; }
  .nav-links a { width:100%; min-height:48px; display:flex; align-items:center; font-size:15px; padding:8px 5px; border-bottom:1px solid #edf2f5; }
  .nav-links a:last-child { border-bottom:0; }
  .hero-grid, .split, .contact-grid, .job-detail { grid-template-columns:minmax(0,1fr) !important; }
  .hero h1, .page-hero h1 { overflow-wrap:break-word; }
  .btn, button, [role=button] { touch-action:manipulation; }
  .job-card { display:flex !important; flex-direction:column; gap:17px; align-items:stretch; }
  .job-card .btn { text-align:center; width:100%; min-height:46px; }
  .job-card *, .admin-card * { min-width:0; }
  .apply-card, .contact-info, .admin-card { box-shadow:none !important; }
  .article-content, .contact-item { overflow-wrap:anywhere; }
  .map-box iframe { width:100% !important; max-width:100%; }
  .footer-grid, .footer-bottom { gap:24px; }
  /* A true mobile admin layout; avoid a miniature 250px desktop sidebar. */
  .admin-shell.open { display:flex !important; flex-direction:column !important; min-width:0; }
  .admin-sidebar { position:relative !important; top:auto !important; height:auto !important; padding:11px 13px 12px !important; min-width:0; }
  .admin-sidebar img { display:block; width:148px !important; max-width:50% !important; height:52px; object-fit:contain; object-position:left center; margin:0 0 9px !important; padding:4px !important; }
  .admin-sidebar #logoutBtn { position:absolute; right:13px; top:14px; margin:0 !important; width:auto !important; min-height:39px; padding:8px 12px; }
  .admin-sidebar .admin-nav { display:flex !important; flex-wrap:nowrap !important; overflow-x:auto !important; max-width:100%; grid-template-columns:none !important; gap:6px !important; padding:0 0 3px; -webkit-overflow-scrolling:touch; scrollbar-width:thin; }
  .admin-nav button { flex:0 0 auto; min-width:auto !important; font-size:12px; min-height:43px !important; padding:10px 13px !important; border:1px solid #ffffff2a; border-radius:10px; white-space:nowrap; }
  .admin-nav button.active { background:#e6eef5 !important; color:#09283e !important; }
  .admin-main { padding:14px 12px 24px !important; width:100%; min-width:0; }
  .admin-top { display:flex; align-items:center !important; gap:10px; padding:2px 2px 10px; margin-bottom:8px !important; flex-wrap:wrap; }
  .admin-top h1 { font-size:24px !important; margin-top:2px; }
  .admin-top .btn { min-height:42px; }
  .metric-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:9px !important; }
  .metric { padding:14px !important; border-radius:13px !important; }
  .metric strong { font-size:24px !important; }
  .metric span { font-size:12px !important; }
  .admin-card { padding:16px 13px !important; margin-bottom:14px; border-radius:14px !important; }
  .admin-card-head { align-items:flex-start; flex-wrap:wrap; gap:10px; }
  .admin-card-head h2 { font-size:18px; }
  .admin-card-head > .btn { width:100%; min-height:44px; }
  .editor-grid, .form-grid { grid-template-columns:1fr !important; gap:12px; }
  .editor-grid .full, .form-grid .full { grid-column:1 !important; }
  .field input, .field select, .field textarea, .admin-form input, .admin-form select { width:100%; max-width:100%; min-height:45px; font-size:16px; }
  .login-card { padding:24px 19px !important; border-radius:18px !important; }
  .login-card img { max-width:100%; }
  .admin-card .btn, .admin-form .btn { min-height:44px; }
  /* Desktop tables are now cards on phone; all existing buttons/selects work unchanged. */
  .table-wrap { overflow:visible !important; max-width:100% !important; }
  .admin-table { width:100% !important; min-width:0 !important; display:block; border-collapse:separate; }
  .admin-table thead { display:none; }
  .admin-table tbody { display:grid; gap:12px; min-width:0; }
  .admin-table tbody tr { display:block; border:1px solid #dce6ec; border-radius:12px; background:#fff; padding:9px 11px; min-width:0; }
  .admin-table tbody td { width:100%; display:grid; grid-template-columns:minmax(84px,30%) minmax(0,1fr); align-items:start; gap:10px; padding:9px 1px !important; border-bottom:1px solid #eef2f5 !important; line-height:1.45; overflow-wrap:anywhere; font-size:13px; text-align:left; }
  .admin-table tbody td:last-child { border-bottom:0 !important; }
  .admin-table tbody td::before { content:attr(data-mobile-label); font-size:11px; text-transform:uppercase; letter-spacing:.055em; font-weight:800; color:#687e8d; white-space:normal; }
  .admin-table tbody td .actions { flex-wrap:wrap; }
  .admin-table .icon-btn, .admin-table button, .admin-table select { min-height:39px; max-width:100%; }
  #panel-employee-management .csadmin-item { padding:13px !important; }
  #panel-employee-management .csadmin-tabs { position:static; gap:6px; }
  #panel-employee-management .csadmin-tabs button { min-height:44px; }
  #panel-employee-management .csadmin-actions { width:100%; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  #panel-employee-management .csadmin-actions > button, #panel-employee-management .csadmin-actions > select { width:100%; min-height:45px; }
  #panel-employee-management .csadmin-actions > :only-child { grid-column:1/-1; }
  #panel-employee-management .csadmin-grid { grid-template-columns:1fr; }
  #panel-employee-management input, #panel-employee-management select, #panel-employee-management textarea { font-size:16px; }
}
@media (max-width:350px) {
  .nav-actions .mobile-employee-shortcut { font-size:11px; padding:8px; }
  .brand img { width:115px !important; }
  .admin-table tbody td { grid-template-columns:75px minmax(0,1fr); }
  .metric-grid { grid-template-columns:1fr 1fr; }
}
@media (min-width:801px) { .mobile-employee-shortcut { display:none !important; } }
/* Keep Employee Management visible without sideways scrolling to the last tab. */
@media (max-width:800px) {
  .admin-nav button[data-panel="employee-management"] { order:-1; }
}


/* V3.5: Four fixed-width icon tabs in the Employee Management section on phones.
   No horizontal carousel/scrollbar or truncated labels; desktop keeps full text. */
#panel-employee-management .csadmin-tab-icon { display:none; }
#panel-employee-management .csadmin-tab-label { display:inline; }
@media (max-width:800px) {
  #panel-employee-management .csadmin-tabs {
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    align-items:stretch;
    width:100%;
    gap:8px !important;
    overflow:visible !important;
    padding:0 0 12px !important;
    margin:0 0 12px !important;
    scrollbar-width:none;
  }
  #panel-employee-management .csadmin-tabs button {
    display:flex;
    align-items:center;
    justify-content:center;
    min-width:0 !important;
    width:100%;
    min-height:52px !important;
    margin:0 !important;
    padding:8px 4px !important;
    line-height:1;
    box-sizing:border-box;
    border-radius:12px;
    transition:background-color .15s ease;
    touch-action:manipulation;
  }
  #panel-employee-management .csadmin-tabs .csadmin-tab-icon {
    display:block !important;
    width:22px;
    height:22px;
    flex-shrink:0;
  }
  #panel-employee-management .csadmin-tabs .csadmin-tab-label { display:none !important; }
  #panel-employee-management .csadmin-tabs button.active {
    background:#0b314e;
    color:white;
    border-color:#0b314e;
    box-shadow:0 0 0 2px rgba(200,153,79,.45);
  }
  #panel-employee-management .csadmin-tabs button:focus-visible {
    outline:3px solid #ba8745;
    outline-offset:2px;
  }
}
@media(max-width:360px){
  #panel-employee-management .csadmin-tabs {gap:5px !important;}
  #panel-employee-management .csadmin-tabs button {min-height:48px !important;}
}
