/* TradeConnect Customer Dashboard Mobile App Shell
   Desktop uses a Pro-dashboard style fixed sidebar + full content canvas.
   Mobile becomes topbar + hamburger menu + card-friendly content. */

.tc-customer-mobile-topbar,
.tc-customer-mobile-menu {
  display: none;
}

.tc-mobile-job-cards {
  display: none;
}

/* Desktop correction for customer dashboard.
   The shared dashboard theme is also used by the pro dashboard, so this layer
   makes the homeowner desktop layout fill the screen instead of shrinking into
   a narrow column. */
@media (min-width: 901px) {
  body {
    padding-top: 0 !important;
    overflow-x: hidden !important;
  }

  .tc-customer-mobile-topbar,
  .tc-customer-mobile-menu {
    display: none !important;
  }

  .shell,
  #app {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100vh !important;
    background: #0d1117 !important;
  }

  .side {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    width: 260px !important;
    height: 100vh !important;
    overflow-y: auto !important;
    z-index: 20 !important;
  }

  .main {
    margin-left: 260px !important;
    width: calc(100vw - 260px) !important;
    max-width: none !important;
    min-height: 100vh !important;
    padding: 34px 42px !important;
    overflow-x: hidden !important;
  }

  .hero,
  .panel,
  .cards,
  .section,
  .table-wrap,
  .pro-grid,
  .grid,
  .form {
    max-width: 1180px !important;
  }

  .hero {
    width: 100% !important;
  }

  .cards {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(180px, 1fr)) !important;
    gap: 16px !important;
    width: 100% !important;
  }

  .grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 14px !important;
    width: 100% !important;
  }

  .pro-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)) !important;
    gap: 14px !important;
    width: 100% !important;
  }

  .form {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
    gap: 14px !important;
    width: 100% !important;
  }

  .panel,
  .stat,
  .perk,
  .profile-card,
  .pro,
  .empty {
    min-width: 0 !important;
  }

  .table {
    min-width: 720px !important;
  }
}

@media (max-width: 900px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    padding-top: 74px;
  }

  .tc-customer-mobile-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100000;
    min-height: 64px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(8, 12, 20, 0.96);
    border-bottom: 1px solid rgba(255,255,255,.08);
    backdrop-filter: blur(14px);
  }

  .tc-mobile-brand {
    color: #f4f7fb;
    text-decoration: none;
    font-family: 'Bebas Neue', system-ui, sans-serif;
    font-size: 24px;
    letter-spacing: 2px;
    line-height: 1;
    white-space: nowrap;
  }

  .tc-mobile-brand span {
    color: #ff6b2b;
  }

  .tc-mobile-user {
    min-width: 0;
    flex: 1;
    text-align: right;
  }

  .tc-mobile-user-name {
    display: block;
    color: #f4f7fb;
    font-size: 12px;
    font-weight: 900;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-left: auto;
  }

  .tc-mobile-user-email {
    display: block;
    color: #91a3bd;
    font-size: 10px;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-left: auto;
  }

  .tc-mobile-menu-btn {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(255,107,43,.35);
    background: rgba(255,107,43,.12);
    color: #ffb07a;
    font-size: 23px;
    font-weight: 900;
    cursor: pointer;
    flex-shrink: 0;
  }

  .tc-customer-mobile-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 99999;
    display: none;
    padding: 12px 14px 16px;
    background: rgba(13, 21, 32, .985);
    border-bottom: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 24px 70px rgba(0,0,0,.35);
    backdrop-filter: blur(14px);
  }

  body.tc-customer-menu-open .tc-customer-mobile-menu {
    display: block;
  }

  .tc-mobile-menu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tc-mobile-menu-item {
    width: 100%;
    min-height: 46px;
    border-radius: 13px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.045);
    color: #dbeafe;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    text-decoration: none;
    font: 900 14px 'DM Sans', system-ui, sans-serif;
    cursor: pointer;
  }

  .tc-mobile-menu-item.active,
  .tc-mobile-menu-item:hover {
    background: rgba(255,107,43,.14);
    border-color: rgba(255,107,43,.30);
    color: #ffb07a;
  }

  .tc-mobile-menu-item.danger {
    color: #fca5a5;
  }

  .shell,
  #app {
    display: block !important;
    width: 100% !important;
    max-width: 100vw !important;
    min-height: auto !important;
  }

  .side {
    display: none !important;
  }

  .main {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px !important;
    margin-left: 0 !important;
    overflow-x: hidden !important;
  }

  .hero {
    margin-top: 0 !important;
    padding: 20px 16px !important;
    border-radius: 18px !important;
  }

  .hero:after {
    display: none !important;
  }

  .top {
    display: block !important;
  }

  .title {
    font-size: clamp(36px, 12vw, 46px) !important;
    line-height: .95 !important;
    overflow-wrap: anywhere;
  }

  .sub {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }

  .actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin-top: 14px !important;
  }

  .actions .btn,
  .form-actions .btn,
  .smallbtn,
  .tc-support-btn {
    width: 100% !important;
    justify-content: center !important;
    min-height: 48px !important;
  }

  .cards,
  .grid,
  .form,
  .pro-grid {
    grid-template-columns: 1fr !important;
    width: 100% !important;
  }

  .panel,
  .stat,
  .perk,
  .profile-card,
  .pro,
  .empty {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .panel {
    padding: 16px !important;
    border-radius: 16px !important;
  }

  .form-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .field input,
  input,
  select,
  textarea {
    font-size: 16px !important;
    max-width: 100% !important;
  }

  #jobsList .table-wrap,
  #recentJobs .table-wrap {
    display: none !important;
  }

  #jobsList .tc-mobile-job-cards,
  #recentJobs .tc-mobile-job-cards {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .tc-mobile-job-card {
    background: #1b2a3f;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    padding: 15px;
  }

  .tc-mobile-job-card h3 {
    font-size: 15px;
    margin: 0 0 10px;
    color: #f4f7fb;
  }

  .tc-mobile-job-meta {
    display: grid;
    gap: 8px;
    color: #91a3bd;
    font-size: 13px;
    line-height: 1.45;
  }

  .tc-mobile-job-meta b {
    color: #dbeafe;
  }
}

@media (max-width: 420px) {
  .tc-mobile-user-name,
  .tc-mobile-user-email {
    max-width: 100px;
  }

  .tc-mobile-brand {
    font-size: 21px;
  }
}
