/* =========================
   DASHBOARD (pages/dashboard.css)
   Goal: clean layout, equal blocks, mobile-friendly
========================= */

/* Container */
.dash-container{
  max-width:1240px;
}

/* Main grid */
.dash-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:16px;
}

@media (min-width: 980px){
  .dash-grid{
    grid-template-columns: 2fr 1fr; /* left wider, right sidebar */
    align-items:start;
  }
}

.dash-left,
.dash-right{
  display:flex;
  flex-direction:column;
  gap:16px;
}

/* =========================
   Common helpers
========================= */

.card-pad{ padding:18px; }
.muted2{ color:var(--muted); }

.mini-title{
  margin:0 0 8px 0;
  font-size:16px;
  font-weight:850;
}

.hr{
  height:1px;
  background:var(--border);
  margin:14px 0;
}

/* Header rows inside cards */
.dash-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.dash-head h1{
  margin:0 0 6px 0;
  font-size:22px;
  letter-spacing:-.2px;
}

.dash-head p{
  margin:0;
}

/* Buttons row */
.btn-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

@media (min-width: 980px){
  .btn-row{ justify-content:flex-end; }
}

/* =========================
   Equal blocks: "tiles"
   (clickable cards inside a section)
========================= */

.dash-tiles{
  display:grid;
  grid-template-columns: 1fr;
  gap:10px;
  margin-top:14px;
}

/* if you want 2 columns on desktop, uncomment:
@media (min-width: 980px){
  .dash-tiles{ grid-template-columns: 1fr 1fr; }
}
*/

.dash-tile{
  display:block;
  padding:14px;
  text-decoration:none;
}

.dash-tile:hover{
  box-shadow: 0 10px 28px rgba(2, 6, 23, .08);
  transform: translateY(-1px);
}

.dash-tile__row{
  display:flex;
  gap:12px;
  align-items:flex-start;
}

.dash-tile__ico{
  width:36px;
  height:36px;
  border-radius:12px;
  border:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  background:#fff;
  font-size:18px;
  line-height:1;
}

.dash-tile__title{
  font-weight:850;
}

.dash-tile__desc{
  margin-top:4px;
  font-size:13px;
  color:var(--muted);
  line-height:1.35;
}

/* =========================
   Files list
========================= */

.file-list{
  margin-top:10px;
}

.file-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 0;
  border-bottom:1px solid #f0f2f5;
}

.file-row:last-child{ border-bottom:none; }

.file-left{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.file-ico{
  width:34px;
  height:34px;
  border-radius:10px;
  border:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:16px;
  flex:0 0 auto;
  background:#fff;
}

.file-name{
  font-weight:650;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width: 520px;
}

.file-meta{
  font-size:12px;
  color:var(--muted);
  white-space:nowrap;
  margin-top:2px;
}

.file-actions{
  display:flex;
  gap:8px;
  flex:0 0 auto;
}

.btn-sm{
  padding:8px 10px;
  border-radius:10px;
  border:1px solid var(--border);
  font-size:13px;
  background:#fff;
  cursor:pointer;
}

.btn-sm:hover{ opacity:.92; }

/* =========================
   Profile card
========================= */

.profile-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
}

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

.profile-subtitle{
  font-size:13px;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.35px;
}

.profile-title{
  font-size:22px;
  font-weight:850;
  margin:4px 0 0 0;
  line-height:1.2;
}

.profile-meta{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:10px;
  font-size:13px;
}

.profile-meta a{
  color:var(--muted);
  text-decoration:none;
}

.profile-meta a:hover{
  color:var(--text);
}

/* Avatar */
.profile-avatar{
  flex:0 0 auto;
}

.profile-avatar__box{
  width:120px;
  height:120px;
  border-radius:24px;
  border:1px solid var(--border);
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f7f7f9;
}

.profile-avatar__box img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.profile-plan{
  position:absolute;
  right:-8px;
  bottom:-8px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:999px;
  padding:6px 12px;
  font-size:12px;
  font-weight:850;
}

/* =========================
   Tabs (optional)
   If you want a single "AI" block that opens internal tabs.
========================= */

.dash-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:12px;
}

.dash-tab{
  border:1px solid var(--border);
  background:#fff;
  border-radius:999px;
  padding:8px 10px;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}

.dash-tab.is-active{
  background:rgba(20,85,135,.10);
  border-color:rgba(20,85,135,.25);
  color:var(--brand);
}

.dash-tabpanel{
  display:none;
  margin-top:12px;
}

.dash-tabpanel.is-active{
  display:block;
}

/* =========================
   Mobile fixes
========================= */

@media (max-width: 700px){

  .profile-header{
    flex-direction:column;
    align-items:flex-start;
  }

  .profile-avatar__box{
    width:96px;
    height:96px;
    border-radius:22px;
  }

  .file-row{
    flex-direction:column;
    align-items:flex-start;
  }

  .file-actions{
    width:100%;
  }

  .btn-sm{
    width:100%;
  }

  .file-name{
    max-width: 100%;
  }

}