/* ============================================================
   TesterApp – Dashboard & Inner Pages Styles
   dashboard.css — loaded on all authenticated pages
   ============================================================ */

/* ── LAYOUT ──────────────────────────────────────────────────── */
.page-wrap {
  min-height: 100vh;
  padding-top: var(--nav-height);
  display: flex; flex-direction: column;
  overflow-x: hidden;
}

.page-main {
  flex: 1; padding: 40px 24px;
  overflow-x: hidden;
}

#dev-name-color
{
	color: var(--accent);
}

.page-main .container { position: relative; z-index: 1; }

/* Full-bleed ticker: bleeds outside the container padding */
.ticker-dash {
  margin: 0 -24px 32px;
  width: calc(100% + 48px);
}
 .dash-header
 {
	margin-bottom:1rem;
 }
 
 .dash-header-flex {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 24px;
   flex-wrap: wrap;
 }
 .dash-header-actions {
   display: flex;
   gap: 12px;
 }
 
 .tester-sessions-list
 {
	 display: flex;
     flex-direction: column;
     gap: .5rem;
 }
 
 
  @media (max-width: 600px) {
    .dash-header-flex {
      justify-content: center;
      text-align: center;
    }
    .dash-header-actions .btn-sm {
      width: 100%;
      justify-content: center;
    }
  }
 
 .dash-header-subtitle {
   display: flex;
   gap: 10px;
   align-items: center;
 }
 
 #submitButtons 
 {
	display: flex;
	gap:.5rem;
 }
	
   @media (max-width: 480px) 
   {
		#submitButtons {
			flex-direction: column;
			gap:1rem;
		}
  }
  
  @media (max-width: 432px) 
  {
	  .app-card-header
	  {
		  flex-direction:column;
		  align-items: start !important;
	  }
  }
  
 @media (max-width: 600px) {
   .dash-header-flex {
     justify-content: center;
     text-align: center;
     flex-direction: column;
     gap: 16px;
   }
   .dash-header-title {
     width: 100%;
   }
   .dash-header-actions {
      width: 60%;
      justify-content: center;
	  align-items:center;
      flex-direction: column;
      gap: 1rem;
    }
   .dash-header-subtitle {
     justify-content: center;
   }
 }
 
 .dash-grid {
   display: grid;
   grid-template-columns: 1fr 340px;
   gap: 24px;
   margin-top: 8px;
 }
 
 .dash-col-main, .dash-col-side {
   display: flex;
   flex-direction: column;
   gap: 24px;
 }
 
 .app-list {
   display: flex;
   flex-direction: column;
   gap: 12px;
 }
 
 @media (max-width: 992px) {
   .dash-grid {
     grid-template-columns: 1fr;
   }
   .dash-col-side {
     gap: 24px;
   }
 }
 
  @media (max-width: 600px) {
    .dash-header {
      grid-template-columns: 1fr;
      text-align: center;
      gap: 12px;
    }
    .dash-header .btn-primary, .dash-header .btn-ghost {
      width: 100%;
      justify-content: center;
    }
  }

/* ── METRIC CARDS ROW ──────────────────────────────────────────── */
.metrics-row {
  display: grid;
/*  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));*/
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem; margin-bottom: 2rem;
}
.stat-grid-mobile {
  /* Utility class to reinforce grid behavior */
}
.metric-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r2); padding: 24px 20px;
  transition: border-color .2s;
}
.metric-card:hover { border-color: var(--border2); }
.metric-card .sc-value {
  font-family: var(--font-head); font-size: 36px; font-weight: 800;
  line-height: 1; letter-spacing: -0.03em;
  margin-bottom: 6px;
}
.metric-card .sc-label { font-size: 11px; color: var(--txt3); letter-spacing: 0.08em; text-transform: uppercase; }
.metric-card .sc-trend { font-family: var(--font-mono); font-size: 11px; margin-top: 8px; }
.sc-green { color: var(--accent); }
.sc-warn  { color: var(--warn); }
.sc-blue  { color: #63b3ed; }

/* ── DASHBOARD CARD (Utility) ────────────────────────────── */
.dash-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 24px;
}

.appStatus {
    display: flex;
    align-items: center;
    gap: 8px;
}

.referalContainer {
    display: flex;
    gap: 8px;
}

@media (max-width: 600px) {
  .dash-card { padding: 16px; }
}


@media (max-width: 480px) {
		
    .app-card-header .app-meta {
        flex: 0 1 auto;
        min-width: auto;
    }
	
	.referalContainer 
	{
		flex-direction: column;	
	}
	
	.appStatus
	{
		margin: 0rem 0px 0px 0px;
	}
}

/* ── APP CARD (browse + dashboard) ──────────────────────────── */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.app-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r2); padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
  transition: border-color .2s, transform .2s;
  position: relative;
}
.app-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.app-card.featured { border-color: rgba(0,229,160,0.25); }
.app-card.featured::before {
  content: '⭐ Featured';
  position: absolute; top: -1px; right: 16px;
  background: var(--accent); color: #000;
  font-size: 10px; font-weight: 700; font-family: var(--font-mono);
  padding: 3px 10px; border-radius: 0 0 8px 8px;
  letter-spacing: 0.05em;
}
.app-card.premium {
  border-color: #00e5a0;
  box-shadow: 0 0 30px rgba(0, 229, 160, 0.3);
}
.app-card.premium::before {
  content: '⚡ Premium';
  position: absolute; top: -1px; right: 16px;
  background: #00e5a0; color: #000;
  font-size: 10px; font-weight: 800; font-family: var(--font-mono);
  padding: 3px 10px; border-radius: 0 0 8px 8px;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(0, 229, 160, 0.3);
}

.app-card-header { display: flex; align-items: center; gap: 14px; }
.app-icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--bg3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0; overflow: hidden;
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.app-meta { flex: 1; min-width: 0; }
.app-name { font-family: var(--font-head); font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-dev  { font-size: 12px; color: var(--txt3); margin-top: 2px; }
.app-category {
  font-family: var(--font-mono); font-size: 10px;
  padding: 2px 8px; border-radius: 100px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--txt3); white-space: nowrap;
}

.app-desc { font-size: 13px; color: var(--txt2); line-height: 1.6; flex: 1; }

/* Progress section inside app card */
.app-progress {}
.app-progress-label {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--txt3); margin-bottom: 6px;
}
.app-progress-label .count { font-family: var(--font-mono); color: var(--accent); font-weight: 600; }

/* Reward tag */
.app-reward {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--warn); font-family: var(--font-mono);
}

/* Card footer */
.app-card-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-top: 14px; border-top: 1px solid var(--border);
}
.app-slots { font-size: 12px; color: var(--txt3); font-family: var(--font-mono); }
.app-slots span { color: var(--txt2); font-weight: 600; }

/* ── SECTION HEADER ──────────────────────────────────────────── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 24px;
}
.section-header h2 { font-family: var(--font-head); font-size: clamp(18px, 4vw, 22px); font-weight: 700; letter-spacing: -0.02em; }

/* Profile Header Styles */
.profile-header-content { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.profile-avatar-large { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--border2); }
.profile-meta-main { flex: 1; min-width: 200px; }
.profile-badges { display: flex; gap: 12px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.profile-country { font-size: 14px; }

@media (max-width: 600px) {
  .profile-header-content { flex-direction: column; text-align: center; justify-content: center; }
  .profile-badges { justify-content: center; }
}

/* ── FILTER BAR ──────────────────────────────────────────────── */
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px;
  padding: 16px; background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r2);
}
.filter-bar select,
.filter-bar input[type="text"] {
  background: var(--bg3); border: 1px solid var(--border2); color: var(--txt);
  padding: 8px 12px; border-radius: 6px; font-size: 13px; font-family: var(--font-body);
  outline: none; transition: border-color .2s; cursor: pointer;
}
.filter-bar select:focus,
.filter-bar input[type="text"]:focus { border-color: rgba(66, 133, 244,0.4); }
.filter-bar input[type="text"] { flex: 1; min-width: 180px; }
.filter-bar input[type="text"]::placeholder { color: var(--txt3); }

/* ── TABLE ───────────────────────────────────────────────────── */
.bt-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.bt-table th {
  text-align: left; padding: 10px 14px;
  font-size: 11px; font-weight: 600; color: var(--txt3);
  letter-spacing: 0.08em; text-transform: uppercase;
  border-bottom: 1px solid var(--border2);
  font-family: var(--font-mono);
}
.bt-table td {
  padding: 14px; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.bt-table tr:last-child td { border-bottom: none; }
.bt-table tr:hover td { background: var(--bg3); }
.bt-table-wrap {
  background: var(--bg2); 
  border: 1px solid var(--border);
  border-radius: var(--r2); 
  display:flex;
  flex-direction:column;
  gap:1rem;
  padding: 1rem;
  -webkit-overflow-scrolling: touch;
}

/* ── TESTER ROW (dashboard detail) ──────────────────────────── */
.tester-list { display: flex; flex-direction: column; gap: 0; }
.tester-item {
  display: flex; 
  align-items: flex-start; 
  gap: 16px;
  padding: 16px 20px; 
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border); 
  border-radius: 14px;
  transition: all .2s;
  position: relative; /* Added for absolute positioning of actions */
}
.tester-item:hover { background: rgba(255,255,255,0.04); border-color: var(--border2); }
.tester-item .t-info { flex: 1; min-width: 0; }
.tester-item .avatar { width: 44px; height: 44px; }
.tester-item .t-name { font-size: 14px; font-weight: 700; color: var(--txt); }
.tester-item .t-meta { font-size: 11px; color: var(--txt3); font-family: var(--font-mono); margin-top: 4px; }
.tester-item .t-days-desktop {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  color: var(--accent); background: var(--accent-dim);
  padding: 4px 12px; border-radius: 100px; white-space: nowrap;
}
.tester-item .t-days-desktop.complete { color: #63b3ed; background: rgba(99,179,237,0.1); }
.tester-item .t-days-desktop.warn     { color: var(--warn); background: rgba(245,166,35,0.1); }

.t-status-actions {
  position: absolute;
  top: 16px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.t-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-left: 12px;
}
.t-days-mobile { display: none; }
.t-days-desktop {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  color: var(--accent); background: var(--accent-dim);
  padding: 4px 12px; border-radius: 100px; white-space: nowrap;
}
.t-days-desktop.complete { color: #63b3ed; background: rgba(99,179,237,0.1); }
.t-days-desktop.warn     { color: var(--warn); background: rgba(245,166,35,0.1); }

/* Advanced Day Grid */
.adv-day-grid {
  display: grid;
  grid-template-columns: repeat(14, 48px);
  gap: 6px;
  margin-top: 16px;
  width: fit-content;
}

@media (max-width: 600px) {
  .adv-day-grid {
    grid-template-columns: repeat(7, 1fr);
    width: 100%;
    gap: 6px;
  }
}
.adv-day-box {
  aspect-ratio: 1/1;
  width: 100%; height: auto;
  min-width: 32px;
  max-width: 52px;
  border-radius: 12px;
  background: var(--bg3); border: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: default; transition: all .3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
  position: relative;
}
.adv-day-box[onclick] { cursor: pointer; }
.adv-day-box[onclick]:hover { 
  transform: translateY(-4px) scale(1.05); 
  border-color: var(--accent); 
  box-shadow: 0 8px 24px rgba(66, 133, 244,0.2);
  z-index: 10;
}

.adv-day-box .day-num { font-size: 11px; font-family: var(--font-mono); color: var(--txt3); font-weight: 700; line-height: 1; }
.adv-day-box .day-status { font-size: 16px; margin-top: 4px; line-height: 1; font-weight: 800; }

.adv-day-box.green  { background: rgba(0,229,160,0.15); border-color: rgba(0,229,160,0.3); }
.adv-day-box.green .day-num { color: var(--accent2); opacity: 0.8; }
.adv-day-box.green .day-status { color: var(--accent2); }

.adv-day-box.yellow { background: rgba(245,166,35,0.15); border-color: rgba(245,166,35,0.3); }
.adv-day-box.yellow .day-num { color: var(--warn); opacity: 0.8; }
.adv-day-box.yellow .day-status { color: var(--warn); }

.adv-day-box.red    { background: rgba(255,77,109,0.15); border-color: rgba(255,77,109,0.3); }
.adv-day-box.red .day-num { color: var(--red); opacity: 0.8; }
.adv-day-box.red .day-status { color: var(--red); }

.adv-day-box.missed { opacity: 0.85; border: 1px dashed var(--border2); background: #232326 !important; }
.adv-day-box.missed .day-num { color: #8e8e93; }
.adv-day-box.empty  { opacity: 0.2; }
.badge.missed { background: #232326; color: #8e8e93; border: 1px solid var(--border); }

/* Feedback Indicator */
.fb-indicator {
  position: absolute; top: 4px; right: 4px;
  font-size: 10px; opacity: 0.8;
  animation: bounceSoft 2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes bounceSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

/* Compact Grid for Dashboard */
.compact-grid {
  margin-top: 16px;
  padding: 4px 0; /* Extra space for hover scale */
}
.compact-grid .adv-day-grid {
  grid-template-columns: repeat(14, 3rem);
  gap: .01rem;
  margin: 0 auto;
}

@media (max-width: 1100px) {
  .compact-grid .adv-day-grid {
    grid-template-columns: repeat(7, 1fr);
    width: 100%;
    gap: 6px;
  }
}
.compact-grid .adv-day-box {
  aspect-ratio: 1/1;
  width: 100%; height: auto;
  min-width: 28px;
  max-width: 40px;
  border-radius: 8px;
}
.compact-grid .adv-day-box .day-num { font-size: 9px; }
.compact-grid .adv-day-box .day-status { font-size: 12px; margin-top: 1px; }
.compact-grid .fb-indicator { top: 2px; right: 2px; font-size: 8px; }

@media (max-width: 1100px) {
  .compact-grid .adv-day-box {
    width: 40px; height: 40px; border-radius: 10px;
  }
  .compact-grid .adv-day-box .day-num { font-size: 10px; }
  .compact-grid .adv-day-box .day-status { font-size: 14px; margin-top: 2px; }
  .compact-grid .fb-indicator { top: 3px; right: 3px; font-size: 9px; }
}

@media (max-width: 768px) {
  .tester-item {
    flex-direction: column;
    padding: 14px;
    gap: 12px;
  }
  
  .tester-item .avatar {
    width: 40px; height: 40px; font-size: 13px;
  }

  .tester-item .t-info {
    width: 100%;
  }
  .tester-item .t-name { font-size: 14px; }
  
  .t-days-desktop { display: none !important; }
  .t-days-mobile {
    display: inline-block;
    font-family: var(--font-mono); font-size: 10px; font-weight: 700;
    color: var(--accent); background: var(--accent-dim);
    padding: 3px 10px; border-radius: 100px; white-space: nowrap;
    margin-bottom: 6px;
    text-align: center;
  }
  .t-days-mobile.complete { color: #63b3ed; background: rgba(99,179,237,0.1); }
  .t-days-mobile.warn     { color: var(--warn); background: rgba(245,166,35,0.1); }

  .t-status-actions {
    position: absolute;
    top: 14px;
    right: 14px;
    width: auto !important;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    border-top: none !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
    gap: 6px !important;
  }

  .t-actions {
    display: flex !important;
    width: auto !important;
    margin-left: 0 !important;
    flex-direction: column !important; /* Stacked vertically */
    gap: 4px !important;
  }
  .t-actions .btn-xs {
    width: 100%;
    padding: 8px 10px !important;
    font-size: 11px !important;
    justify-content: center;
  }
  
  /* Ensure name doesn't collide with absolute actions */
  .tester-item .t-name {
    max-width: calc(100% - 80px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* ── DASHBOARD NOTIFICATIONS ─────────────────────────────────── */
.notif-list { display: flex; flex-direction: column; gap: .5rem; }
.notif-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 18px; border-radius: 10px;
  transition: background .15s; cursor: pointer;
}
.notif-item:hover { background: var(--bg3); }
.notif-item.unread { background: rgba(0,229,160,0.04); }
.notif-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { 
  font-size: 13px; font-weight: 600; margin-bottom: 2px; 
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; 
  overflow: hidden; line-height: 1.4;
}
.notif-body .notif-msg { font-size: 12px; color: var(--txt3); line-height: 1.4; }
.notif-time { font-family: var(--font-mono); font-size: 11px; color: var(--txt3); white-space: nowrap; }

@media (max-width: 480px) {
  .notif-item { padding: 12px; gap: 10px; }
  .notif-time { display: none; } /* Hide time on very small screens to save space */
}
.notif-dot {
  position: absolute; top: 8px; right: 8px;
  width: 8px; height: 8px; background: var(--red) !important;
  border-radius: 50%; border: 2px solid var(--bg);
  box-shadow: 0 0 10px rgba(255,77,109,0.3);
  pointer-events: none;
}

 /* ── LIVE FEED ───────────────────────────────────────────────── */
 .feed-item {
   display: flex; align-items: center; gap: 12px; padding: 12px 16px;
   border-bottom: 1px solid var(--border);
   flex-wrap: wrap; word-break: break-word;
 }
 .feed-item:last-child { border-bottom: none; }
 .feed-icon {
   width: 32px; height: 32px; border-radius: 8px;
   background: var(--accent-dim); display: flex;
   align-items: center; justify-content: center;
   font-size: 14px; flex-shrink: 0;
 }
 .feed-body { flex: 1; font-size: 12px; color: var(--txt2); min-width: 0; }
 .fi-user { font-weight: 600; color: var(--txt); }
 .fi-action { color: var(--txt2); font-size: 12px; }
 .fi-app { color: var(--accent); font-weight: 500; font-size: 12px; }
 .feed-time {
   font-size: 10px; color: var(--txt3);
   font-family: var(--font-mono); white-space: nowrap;
   margin-left: auto;
 }
 
 @media (max-width: 480px) {
   .feed-time { display: none; }
 }

/* ── FORM PAGE (submit app) ──────────────────────────────────── */
.form-page { max-width: 680px; }
.form-section {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r2); padding: clamp(16px, 5vw, 28px); margin-bottom: 16px;
}
.form-section-title {
  font-family: var(--font-head); font-size: 16px; font-weight: 700;
  margin-bottom: 20px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
}

@media (max-width: 580px) {
  .form-row { grid-template-columns: 1fr; }
  .form-actions {
    flex-direction: column;
    gap: 8px;
  }
  .form-actions .btn-primary, .form-actions .btn-ghost {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 374px) {
    .compact-grid .adv-day-grid {
        width: 100%;
        gap: 6px;
		width: 100%;
        gap: 6px;
        display: flex;
        flex-wrap: wrap;
    }
}

/* ── CHECKIN BUTTON ──────────────────────────────────────────── */
.checkin-card {
  background: linear-gradient(135deg, rgba(0,229,160,0.08), var(--bg2));
  border: 1px solid rgba(0,229,160,0.2); border-radius: var(--r2);
  padding: 28px; text-align: center; position: relative; overflow: hidden;
}
.checkin-card::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,160,0.12), transparent 70%);
}
.checkin-card h3 { font-family: var(--font-head); font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.checkin-card p  { font-size: 13px; color: var(--txt2); margin-bottom: 20px; }
.btn-checkin {
  background: var(--accent); color: #000;
  font-size: 15px; font-weight: 700;
  padding: 14px 40px; border-radius: 8px; border: none;
  box-shadow: 0 0 30px rgba(0,229,160,0.3);
  transition: transform .15s, box-shadow .15s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-checkin:hover    { transform: translateY(-2px); box-shadow: 0 4px 40px rgba(0,229,160,0.4); }
.btn-checkin:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-checkin.done     { background: var(--bg3); color: var(--accent); border: 1px solid rgba(0,229,160,0.3); box-shadow: none; }

/* ── LEADERBOARD ─────────────────────────────────────────────── */
.lb-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.lb-row:hover { background: var(--bg3); }
.lb-rank {
  font-family: var(--font-mono); font-size: 14px; font-weight: 700;
  width: 32px; text-align: center; flex-shrink: 0; color: var(--txt3);
}
.lb-rank.top3 { color: var(--accent); font-size: 18px; }
.lb-info { flex: 1; }
.lb-name { font-size: 14px; font-weight: 600; }
.lb-sub  { font-size: 12px; color: var(--txt3); font-family: var(--font-mono); margin-top: 2px; }
.lb-score { font-family: var(--font-head); font-size: 20px; font-weight: 800; color: var(--accent); }

/* ── MOBILE ──────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  #detail-grid, #app-layout, #dash-layout {
    grid-template-columns: 1fr !important;
  }
}

@media (min-width: 341px) and (max-width: 768px) {
	.app-grid {
 grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
  /* Layout gaps collapse */
  #detail-grid, #app-layout {
    gap: 20px !important;
  }

  .ticker-dash {
    margin: 0 -16px 24px !important;
    width: calc(100% + 32px) !important;
  }
  /* metric grid — single column for mobile */
  .stat-grid-mobile {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .metric-card { padding: 16px 12px; min-width: 0; }
  .metric-card .sc-value { font-size: 24px; }
  .metric-card .sc-label { font-size: 9px; }
  .page-main { padding: 24px 16px; }
  .page-header { 
    padding: calc(var(--nav-height) + 32px) 20px 32px; 
  }
  .page-header h1 { font-size: 26px; }
  
  /* Metric card improvements for 2x2 */
  .metric-card { 
    padding: 20px 14px; 
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
  }
  .metric-card .sc-value { font-size: 22px; margin-bottom: 4px; }
  .metric-card .sc-label { font-size: 9px; opacity: 0.8; }
}

@media (max-width: 900px) {
    .metrics-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
  #app-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  #app-layout > div {
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

@media (max-width: 480px) {
 	
  .section-header h2 
  { 
	 text-align:start; 
	 width: 100%;
  }
  
  .filter-bar { padding: 12px; }
  .filter-bar select, .filter-bar input[type="text"] { width: 100%; }
  
  /* Compacting sections */
  .form-section, [style*="background:var(--bg2)"] {
    padding: 16px !important;
  }
}

/* ── TEST SETUP MODAL ───────────────────────────────────────── */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
  animation: fadeIn .3s ease;
}
.modal-content {
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: 20px; width: 100%; max-width: 440px;
  max-height: 80vh; overflow-y: auto;
  position: relative; 
  box-shadow: 0 30px 90px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.05);
  animation: slideUp .4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex; flex-direction: column;
}
.modal-close {
  position: absolute; top: 12px; right: 12px;
  background: var(--bg3); border: none; color: var(--txt2);
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer; transition: all .2s; z-index: 10;
}
.modal-close:hover { background: var(--border2); color: var(--txt); transform: rotate(90deg); }

.modal-header { 
	padding: 24px 24px 16px; 
	border-bottom: 1px solid var(--border); 
	justify-content: space-between; 
	align-items: center; 
	display: flex;
    flex-direction: column;
	gap:.5rem;
	position: relative; 
}

.modal-header.centered { flex-direction: column; justify-content: center; text-align: center; }
.modal-header.centered .modal-close { position: absolute; right: 20px; top: 20px; }
.modal-header h3 { font-family: var(--font-head); font-size: 20px; font-weight: 800; margin-bottom: 4px; line-height: 1.1; }
.modal-header p { color: var(--accent); font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }

.setup-steps { padding: 0 24px 24px; flex: 1; margin-top: .5rem; }
.setup-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; padding: 10px 14px; background: var(--bg3); border-radius: 10px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}
.step-counter { color: var(--accent); font-family: var(--font-mono); }

.steps-progress { display: flex; gap: 6px; margin-bottom: 24px; }
.step-item {
  flex: 1; height: 3px; background: var(--border); border-radius: 2px;
  position: relative; transition: all .3s;
}
.step-item.active { background: var(--accent); box-shadow: 0 0 10px rgba(0,229,160,0.3); }
.step-item span {
  position: absolute; top: 10px; left: 0; font-size: 9px;
  color: var(--txt3); white-space: nowrap; font-weight: 600;
}
.step-item.active span { color: var(--accent); }

.step-section { margin-bottom: 20px; transition: opacity .3s, filter .3s; }
.step-section.disabled { opacity: 0.3; filter: grayscale(1); pointer-events: none; }

.step-icon { font-size: 20px; margin-bottom: 8px; }
.step-section h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.step-section p { font-size: 12px; color: var(--txt2); line-height: 1.4; margin-bottom: 12px; }
.modal-content > .link-report-section { margin: 0 24px 24px; }
.link-report-section > summary {
  display: flex; align-items: center; gap: 12px; min-height: 48px;
  padding: 12px 0; font-size: 17px; font-weight: 700; line-height: 1.4;
  cursor: pointer; list-style: none;
}
.link-report-section > summary::-webkit-details-marker { display: none; }
.link-report-section > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.link-report-section > summary .step-icon { margin: 0; font-size: 24px; flex-shrink: 0; }
.link-report-section > summary > span:last-child { flex: 1; min-width: 0; }
.link-report-section > summary::after { content: '+'; font-size: 24px; font-weight: 400; flex-shrink: 0; }
.link-report-section[open] > summary::after { content: '−'; }
.link-report-section p { font-size: 14px; line-height: 1.55; }
.link-report-section .form-group label { font-size: 14px; }
.link-report-section .form-control { min-height: 48px; font-size: 16px; }
.link-report-section textarea.form-control { min-height: 128px; resize: vertical; }
.link-report-section button[type="submit"] { min-height: 46px; font-size: 14px; }
.link-report-section [data-report-result]:empty { display: none; }

.confirm-check {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 10px 14px; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; margin-top: 10px; transition: all .2s;
}
.confirm-check:hover { border-color: var(--border2); }
.confirm-check input { width: 16px; height: 16px; accent-color: var(--accent); }
.confirm-check span { font-size: 12px; font-weight: 500; }

.info-alert {
  padding: 10px 14px; background: rgba(245,166,35,0.08); border: 1px solid rgba(245,166,35,0.15);
  border-radius: 8px; color: var(--warn); font-size: 11px; line-height: 1.4; margin-bottom: 12px;
}

.modal-footer {
  padding: 16px 24px; background: var(--bg3); border-top: 1px solid var(--border);
  text-align: center;
}
.modal-footer p { font-size: 10px; color: var(--txt3); font-weight: 500; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── DAILY CHECK-IN PREMIUM STYLES ─────────────────────────── */
.status-option { cursor: pointer; display: block; }
.status-option input { display: none; }
.status-option .opt-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 8px;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.status-option .opt-box::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at center, var(--accent-glow), transparent 70%);
  opacity: 0; transition: opacity 0.3s;
}
.status-option:hover .opt-box {
  border-color: var(--border2);
  transform: translateY(-2px);
  background: var(--surface);
}

.badge-works 
{
    background: rgba(0, 229, 160, 0.12);
    color: var(--accent2) !important;
    border-color: rgba(0, 229, 160, 0.25);
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 100px;
    border: 1px solid var(--accent2);
    color: var(--txt2);
    display: inline-block;
    text-align: center;
}

#work input:checked + .opt-box {
    border-color: var(--accent2);
    background: var(--accent-dim);
    box-shadow: 0 8px 24px rgba(0, 229, 160, 0.15);
    color: var(--accent2);
}

#improve input:checked + .opt-box {
	background: radial-gradient(circle at center, rgba(245, 166, 35, 0.25), transparent 70%);
    border-color: var(--warn);
    background: var(--accent-dim);
	box-shadow: 0 8px 24px rgba(245, 166, 35, 0.15);
    color: var(--warn);
}

#broken input:checked + .opt-box {
    border-color: var(--red);
    background: var(--accent-dim);
	box-shadow: 0 8px 24px rgba(255, 77, 109, 0.15);
    color: var(--red);
}

.status-option input:checked + .opt-box {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 8px 24px rgba(0,229,160,0.15);
  color: var(--accent);
}
.status-option input:checked + .opt-box::after { opacity: 1; }
.status-option .opt-box span { font-size: 20px; display: block; margin-bottom: 6px; }

.file-upload-zone {
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--bg3);
  position: relative;
  overflow: hidden;
}
.file-upload-zone:hover {
  border-color: var(--accent);
  background: rgba(0,229,160,0.02);
  transform: scale(0.99);
}
.file-upload-zone .icon-wrap {
  width: 56px; height: 56px;
  background: var(--bg2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  font-size: 24px;
  border: 1px solid var(--border);
  transition: all 0.3s;
}
.file-upload-zone:hover .icon-wrap {
  background: var(--accent-dim);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.file-upload-zone strong { display: block; font-size: 14px; color: var(--txt); margin-bottom: 4px; }
.file-upload-zone span { font-size: 12px; color: var(--txt3); }

#file-preview-img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 12px;
  margin-top: 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/*salvatore*/
.profile-summary-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 24px;
  margin-bottom: 16px;
  max-width: 100%;
  overflow: hidden;
}

.profile-summary-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border2);
  flex-shrink: 0;
}

.profile-summary-info {
  flex: 1;
  min-width: 0;
}

.profile-summary-name {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-summary-stats {
  font-size: 12px;
  color: var(--txt3);
  margin-top: 4px;
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-summary-action {
  flex-shrink: 0;
  margin-left: auto;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .profile-summary-card {
    flex-wrap: wrap;
    padding: 16px;
    gap: 14px;
  }

  .profile-summary-info {
    flex: 1;
	gap: 6px; 
    min-width: 0;
  }

  .profile-summary-action {
    width: 100%;
    margin-left: 0;
    justify-content: center;
  }
}

/* ── PREMIUM APP CARD ─────────────────────────────────────────── */
.app-card.premium {
  border: 1.5px solid #00e5a0;
  box-shadow: 0 0 18px rgba(0, 229, 160, 0.18), 0 2px 12px rgba(0,0,0,0.18);
  position: relative;
}

.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #00e5a0;
  background: rgba(0, 229, 160, 0.12);
  border: 1px solid rgba(0, 229, 160, 0.35);
  border-radius: 20px;
  padding: 2px 9px;
  margin-left: 8px;
  vertical-align: middle;
  white-space: nowrap;
}

/* ── SUBMISSION TIER PICKER ───────────────────────────────────── */
.tier-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 4px;
}

.tier-option {
  position: relative;
}

.tier-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.tier-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1.5px solid var(--border2);
  border-radius: var(--r2);
  padding: 18px 16px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  background: var(--surface2);
}

.tier-card:hover {
  border-color: var(--accent);
}

.tier-option input[type="radio"]:checked + .tier-card {
  border-color: var(--accent);   
  background: rgba(66, 133, 244, 0.06);
  box-shadow:var(--accent-shadow);
}

.tier-option input[type="radio"]:checked + .premium-tier-card {
  border-color: var(--accent2);
  background: rgba(0, 229, 160, 0.06);
  box-shadow: 0 0 14px rgba(0, 229, 160, 0.15);
}

.premium-tier-card
{
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1.5px solid var(--border2);
  border-radius: var(--r2);
  padding: 18px 16px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  background: var(--surface2);
}

.tier-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--txt);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tier-card-cost {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-head);
}

.google-button {
    padding: 8px 20px;
    font-size: 13px;
    border-radius: 6px;
    background: var(--accent);
    color: #000;
    font-weight: 600;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 0 30px rgba(66, 133, 244, 0.3);
}

.tier-card-cost span {
  font-size: 12px;
  font-weight: 500;
  color: var(--txt3);
}

.tier-card-desc {
  font-size: 12px;
  color: var(--txt2);
  line-height: 1.55;
}

.tier-premium .tier-card-title { color: #00e5a0; }

@media (max-width: 500px) {
  .tier-picker { grid-template-columns: 1fr; }
}


@media (max-width: 320px) 
{
	.app-grid {
		display: flex;
		flex-direction: column;
	}	
}

.t-progress {
    font-size: 10px;
    color: var(--txt3);
    font-family: var(--font-mono);
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.boh
{
	display:flex; justify-content: space-around; margin-bottom: 1rem;
}

@media (max-width: 449px) 
{
	.boh 
	{ 
		flex-flow: column-reverse;
		gap: .5rem;
		align-items: center;
	}	
}

.btn-disabled
{
	background: var(--bg3);
    color: var(--txt3);
    border: 1px solid var(--border);
    cursor: not-allowed;
    box-shadow: none;
}
