/* =========================================================
   BY SERGIO — Dashboard Layout Styles
   ========================================================= */

@import url('style.css'); /* Inherit base tokens & components */

body.app-layout {
  background: var(--bg);
  height: 100vh;
  overflow: hidden;
  display: flex;
}

/* ---------------------------------------------------------
   SIDEBAR
   --------------------------------------------------------- */
.app-sidebar {
  width: 280px;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
  transition: all var(--t-base);
}

.app-sidebar-header {
  height: 72px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.app-sidebar-header .nav-logo { font-size: 1.25rem; }

.app-sidebar-nav {
  padding: 1.5rem 1rem;
  flex: 1;
  overflow-y: auto;
}
.app-nav-group {
  margin-bottom: 1.5rem;
}
.app-nav-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 0.5rem;
  padding-left: 0.75rem;
  font-weight: 600;
}
.app-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--t-fast);
  text-decoration: none;
  cursor: pointer;
}
.app-nav-item:hover {
  background: var(--surface);
  color: var(--white);
}
.app-nav-item.active {
  background: rgba(91,110,245,0.1);
  color: var(--accent-light);
  border: 1px solid rgba(91,110,245,0.2);
}
.app-nav-icon {
  font-size: 1.15rem;
  opacity: 0.8;
  width: 24px;
  text-align: center;
}
.app-nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}

.app-user-profile {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.app-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: white;
  border: 2px solid var(--bg);
}
.app-user-info strong { display: block; color: var(--white); font-size: 0.9rem; }
.app-user-info span { font-size: 0.75rem; color: var(--text-faint); }

/* ---------------------------------------------------------
   MAIN CONTENT AREA
   --------------------------------------------------------- */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.app-topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}
.app-topbar-title {
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
}
.app-topbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.app-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  background: var(--bg);
}

/* ---------------------------------------------------------
   COMPONENTS (Bento Box, Status, Timeline)
   --------------------------------------------------------- */

/* Status indicators */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.status-active { background: rgba(0,212,170,0.1); color: var(--accent-2); border: 1px solid rgba(0,212,170,0.2); }
.status-active::before { background: var(--accent-2); }
.status-pending { background: rgba(245,191,91,0.1); color: #f5bf5b; border: 1px solid rgba(245,191,91,0.2); }
.status-pending::before { background: #f5bf5b; }
.status-review { background: rgba(91,110,245,0.1); color: var(--accent-light); border: 1px solid rgba(91,110,245,0.2); }
.status-review::before { background: var(--accent-light); }

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: min-content;
  gap: 1.5rem;
}
.bento-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}
.bento-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.bento-card-header h3 {
  font-size: 1.1rem;
  color: var(--white);
  font-family: var(--font-body);
  margin: 0;
}
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }

/* Product Info Card */
.product-info { display: flex; align-items: center; gap: 1.25rem; }
.product-icon {
  width: 60px; height: 60px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(91,110,245,0.1) 0%, rgba(0,212,170,0.1) 100%);
  border: 1px solid rgba(91,110,245,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; flex-shrink: 0;
}
.product-details h4 { font-size: 1.25rem; margin-bottom: 0.25rem; color: var(--white); }
.product-details p { font-size: 0.85rem; margin: 0; color: var(--text-muted); }

/* Timeline Tracker */
.tracker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin-top: 1.5rem;
  padding: 0 1rem;
}
.tracker::before {
  content: '';
  position: absolute;
  top: 12px; left: 24px; right: 24px;
  height: 2px; background: var(--border);
  z-index: 0;
}
.tracker-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}
.tracker-dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t-fast);
}
.tracker-step.done .tracker-dot { background: var(--accent); border-color: var(--accent); }
.tracker-step.done .tracker-dot::after { content: '✓'; color: white; font-size: 0.75rem; font-weight: 700; }
.tracker-step.active .tracker-dot { border-color: var(--accent-2); box-shadow: 0 0 12px rgba(0,212,170,0.4); }
.tracker-step.active .tracker-dot::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); }
.tracker-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }
.tracker-step.active .tracker-label { color: var(--accent-2); font-weight: 600; }
.tracker-step.done .tracker-label { color: var(--white); }

/* Linear Table / List */
.table-list { margin-top: 0.5rem; }
.table-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
}
.table-list-item:hover { background: rgba(255,255,255,0.02); }
.table-list-item:last-child { border-bottom: none; }
.ticket-info strong { display: block; font-size: 0.95rem; color: var(--white); }
.ticket-info span { font-size: 0.8rem; color: var(--text-faint); }
.ticket-meta { display: flex; align-items: center; gap: 1rem; }

/* ---------------------------------------------------------
   ADMIN KANBAN BOARD
   --------------------------------------------------------- */
.kanban-board {
  display: flex;
  gap: 1.5rem;
  height: 100%;
  overflow-x: auto;
  padding-bottom: 1rem;
}
.kanban-col {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.kanban-col-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.kanban-col-header h3 { font-size: 0.9rem; margin: 0; font-family: var(--font-body); display: flex; align-items: center; gap: 0.5rem; }
.kanban-count { background: var(--bg-3); color: var(--text-muted); padding: 2px 8px; border-radius: 20px; font-size: 0.75rem; }
.kanban-cards {
  padding: 1rem;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Draggable Kanban Card */
.kanban-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  cursor: grab;
  transition: all var(--t-fast);
}
.kanban-card:hover { border-color: rgba(91,110,245,0.4); transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,0.2); }
.kanban-card:active { cursor: grabbing; }

.kcard-tags { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }
.kcard-tag { font-size: 0.65rem; padding: 2px 8px; border-radius: 4px; font-weight: 600; text-transform: uppercase; }
.tag-bug { background: rgba(245,101,101,0.15); color: #fc8181; }
.tag-feature { background: rgba(91,110,245,0.15); color: #9fa9ff; }
.tag-content { background: rgba(0,212,170,0.15); color: #4fd1c5; }

.kanban-card h4 { font-size: 0.95rem; color: var(--white); margin-bottom: 0.5rem; line-height: 1.4; font-family: var(--font-body); }
.kcard-client { display: flex; align-items: center; gap: 0.5rem; margin-top: 1rem; }
.kcard-avatar { width: 24px; height: 24px; border-radius: 50%; font-size: 0.6rem; display: flex; align-items: center; justify-content: center; color: white; background: var(--bg-3); }

/* Hide scrollbar for kanban */
.kanban-cards::-webkit-scrollbar { width: 4px; }
.kanban-cards::-webkit-scrollbar-track { background: transparent; }
.kanban-cards::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* Responsive basics */
@media (max-width: 1024px) {
  .bento-grid { grid-template-columns: 1fr 1fr; }
  .span-3 { grid-column: span 2; }
}
@media (max-width: 768px) {
  .app-sidebar { position: fixed; transform: translateX(-100%); z-index: 100; }
  .bento-grid { grid-template-columns: 1fr; }
  .span-3, .span-2 { grid-column: span 1; }
}
