/* mobile.css — Mobile responsiveness and tab layouts for Ash & Amber SaaS */

@media (max-width: 768px) {
  /* Hide standard sidebar */
  .sidebar {
    display: none !important;
  }

  /* Main panel takes full viewport width and accounts for bottom nav height */
  .main {
    width: 100vw !important;
    height: calc(100vh - 56px) !important;
    overflow-y: auto;
  }

  /* Topbar compact */
  .topbar {
    padding: 10px 14px !important;
    height: 50px !important;
  }
  .tb-title {
    font-size: 15px !important;
  }
  .hamburger-btn {
    display: block !important; /* Visible on mobile */
  }

  /* Info Grid: 1 column on phone screen */
  .info-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* Table Wrap: horizontal scrolling with smooth touch deceleration */
  .tbl-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 6px;
    border: 1px solid #e8e3d8;
  }

  /* Remarks Grid: 1 column */
  .rem-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* Compact topbar tool targets */
  .tb-tools button {
    padding: 6px 10px !important;
    font-size: 11px !important;
  }

  /* Modals full viewport screen overlay */
  .modal-bg {
    align-items: flex-end !important; /* Drawer slides from bottom on mobile */
  }
  .share-modal, .viewer-box, .modal {
    width: 100vw !important;
    height: 90vh !important;
    max-height: 90vh !important;
    border-radius: 16px 16px 0 0 !important;
    overflow-y: auto !important;
  }

  /* Drawer panel: mobile hamburger sliding menu drawer */
  .sidebar-panel {
    position: fixed !important;
    left: -100% !important;
    top: 0 !important;
    width: 85vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: #faf9f6 !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15) !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .sidebar-panel.open {
    left: 0 !important;
  }
  
  .sidebar-overlay {
    display: none !important;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 9998 !important;
    backdrop-filter: blur(2px);
  }
  .sidebar-overlay.show {
    display: block !important;
  }

  /* Bottom Navigation Styles */
  .bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: #2C3E35 !important;
    height: 56px !important;
    z-index: 9997 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
  }
}

/* Sidebar panel and overlay defaults for desktop */
.sidebar-panel {
  display: none;
}
.sidebar-overlay {
  display: none;
}

/* Bottom Nav bar item link styles */
.bottom-nav {
  display: none;
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  gap: 3px;
  transition: all 0.2s;
}
.bottom-nav a.active, .bottom-nav a:hover {
  color: #B08D5B !important;
}
.bottom-nav a span {
  font-size: 16px;
}

/* Dashboard UI Layout Styling rules */
.dash-container {
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.dash-title {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 500;
  color: #2C3E35;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dash-subtitle {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #7A7268;
  margin-top: 4px;
}

/* Premium Dashboard Metric overview cards grid */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 900px) {
  .dash-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }
}

.dash-card {
  background: #ffffff;
  border: 1px solid #E2DDD3;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.dash-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.dc-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #7A7268;
  font-weight: 600;
}
.dc-value {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 600;
  color: #2C3E35;
}
.dc-meta {
  font-size: 11px;
  color: #aaa;
}

/* Dashboard chart row wrappers */
.dash-row {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 18px;
  margin-bottom: 24px;
}
@media (max-width: 900px) {
  .dash-row {
    grid-template-columns: 1fr;
  }
}

/* Custom CSS Horizontal bar charts */
.chart-box {
  background: #ffffff;
  border: 1px solid #E2DDD3;
  border-radius: 10px;
  padding: 20px;
}
.chart-title {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  color: #2C3E35;
  margin-bottom: 16px;
  border-bottom: 1px solid #F5F3EF;
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chart-item {
  margin-bottom: 14px;
}
.chart-item-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #555;
  margin-bottom: 5px;
}
.chart-bar-bg {
  background: #F5F3EF;
  height: 8px;
  border-radius: 10px;
  overflow: hidden;
}
.chart-bar-fill {
  background: #B08D5B;
  height: 100%;
  border-radius: 10px;
  transition: width 0.8s ease-in-out;
}
.chart-bar-fill.accent {
  background: #2C3E35;
}

/* Margin Tracker scroll ledger tables */
.ledger-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.ledger-tbl th {
  text-align: left;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #999;
  padding: 10px 8px;
  border-bottom: 2px solid #E2DDD3;
  background: #FAFAF7;
}
.ledger-tbl td {
  padding: 10px 8px;
  border-bottom: 1px solid #F5F3EF;
  vertical-align: middle;
}
.ledger-tbl tr:hover td {
  background: #FAFAF7;
}
.tag-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tag-badge.high {
  background: #eafbe7;
  color: #2d7a2d;
}
.tag-badge.med {
  background: #fef8eb;
  color: #d0901e;
}
.tag-badge.low {
  background: #fdf2f2;
  color: #c44;
}

/* User & team management views */
.team-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #F5F3EF;
}
.team-item:last-child {
  border-bottom: none;
}
.team-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.team-name {
  font-size: 13px;
  font-weight: 500;
  color: #2C3E35;
}
.team-email {
  font-size: 11px;
  color: #888;
}
.team-role {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.team-role.admin {
  background: #EDE8DF;
  color: #B08D5B;
}
.team-role.merchant {
  background: #E2DDD3;
  color: #7A7268;
}

/* Analytics Activity Timeline */
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 5px;
}
.timeline-item {
  display: flex;
  gap: 12px;
  font-size: 11.5px;
  line-height: 1.4;
}
.timeline-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #B08D5B;
  margin-top: 5px;
  flex-shrink: 0;
}
.timeline-content {
  flex: 1;
}
.timeline-time {
  font-size: 10px;
  color: #aaa;
  margin-top: 2px;
}
