/* =====================================================
   Admin Panel CSS — ImobSystem
   ===================================================== */

:root {
  --primary:    #3B82F6;
  --secondary:  #10B981;
  --warning:    #F59E0B;
  --info:       #6366F1;
  --dark:       #1F2937;
  --light:      #F9FAFB;
  --sidebar-w:  260px;
  --topbar-h:   60px;
  --font:       'Inter', sans-serif;
}

* { box-sizing: border-box; }
body { font-family: var(--font); background: var(--light); color: var(--dark); }

/* ---- AUTH ---- */
.auth-body { background: linear-gradient(135deg, #1e3a5f 0%, #3B82F6 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.auth-container { width: 100%; max-width: 420px; padding: 1rem; }
.auth-card { background: #fff; border-radius: 1rem; padding: 2rem; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.auth-logo { text-align: center; margin-bottom: 1.5rem; }

/* ---- SIDEBAR ---- */
.sidebar {
  position: fixed; left: 0; top: 0; height: 100vh;
  width: var(--sidebar-w); background: var(--dark);
  display: flex; flex-direction: column;
  transition: transform .25s ease; z-index: 1000; overflow-y: auto;
}

.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand {
  display: flex; align-items: center; gap: .6rem;
  text-decoration: none; color: #fff; font-weight: 700; font-size: .95rem;
}
.sidebar-brand span { line-height: 1.2; }
.sidebar-toggle { color: #fff; border: none; background: none; }

.sidebar-user {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.08);
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; flex-shrink: 0;
}
.avatar-sm {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .75rem; flex-shrink: 0;
}
.sidebar-user .fw-semibold { color: #fff; }
.sidebar-user .text-muted { color: rgba(255,255,255,.5) !important; }

.sidebar-nav { list-style: none; padding: .5rem 0; margin: 0; flex: 1; }
.sidebar-nav li a {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem 1.25rem; color: rgba(255,255,255,.7);
  text-decoration: none; font-size: .875rem; border-radius: 0;
  transition: background .15s, color .15s;
}
.sidebar-nav li a:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar-nav li a.active { background: var(--primary); color: #fff; }
.sidebar-nav li a i { width: 18px; text-align: center; font-size: 1rem; }
.nav-label {
  padding: .75rem 1.25rem .25rem; font-size: .65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.35);
}

.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 999; }

/* ---- MAIN CONTENT ---- */
.admin-body { overflow-x: hidden; }
.main-content { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h); background: #fff;
  border-bottom: 1px solid #e5e7eb;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem; position: sticky; top: 0; z-index: 100;
}
.topbar .breadcrumb-item a { color: var(--primary); text-decoration: none; font-size: .85rem; }
.topbar .breadcrumb-item.active { font-size: .85rem; }

.content-wrapper { padding: 1.5rem; flex: 1; }

/* ---- PAGE HEADER ---- */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: .75rem; margin-bottom: 1.5rem;
}
.page-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0; }

/* ---- METRIC CARDS ---- */
.metric-card {
  background: #fff; border-radius: .75rem; padding: 1.25rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.06); display: flex; flex-direction: column; gap: .4rem;
}
.metric-icon {
  width: 44px; height: 44px; border-radius: .6rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: .25rem;
}
.metric-value { font-size: 1.75rem; font-weight: 700; line-height: 1; }
.metric-label { font-size: .8rem; color: #6b7280; }

/* ---- CARD tweaks ---- */
.card { border: none; border-radius: .75rem; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.card-header { background: #fff; border-bottom: 1px solid #f0f0f0; padding: .75rem 1rem; font-size: .9rem; }

/* ---- TABLE ---- */
.table thead th { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; }
.table tbody td { font-size: .875rem; vertical-align: middle; }

/* ---- UPLOAD AREA ---- */
.upload-area {
  border: 2px dashed #d1d5db; border-radius: .75rem; padding: 2rem;
  text-align: center; cursor: pointer; transition: border-color .2s, background .2s;
}
.upload-area:hover, .upload-area.drag-over { border-color: var(--primary); background: rgba(59,130,246,.04); }

/* ---- BUTTONS ---- */
.btn-xs { padding: .15rem .35rem; font-size: .7rem; }

/* ---- BADGE tweaks ---- */
.badge { font-weight: 500; }

/* ---- MOBILE SIDEBAR ---- */
@media (max-width: 767.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0; }
  .content-wrapper { padding: 1rem; }
}
