/* =========================================================
   SOLILUX PROPERTIES — App Shell
   ========================================================= */

:root {
  --brand-deep:     #315642;
  --brand-deep-2:   #24402f;
  --brand-gold:     #C9B17D;
  --brand-bg:       #F7F8F7;
  --brand-text:     #202820;
  --brand-muted:    #6b7a70;
  --brand-border:   #eef1ee;
  --sidebar-w:      260px;
  --topbar-h:       68px;
  --radius:         14px;
  --font-sans:      'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display:   'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--brand-bg);
  color: var(--brand-text);
  font-family: var(--font-sans);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); }
a { color: var(--brand-deep); }
a:hover { color: var(--brand-deep-2); }

/* -------- App shell layout -------- */
.app-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
}
.app-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* -------- Sidebar -------- */
.app-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: linear-gradient(180deg, #24402f 0%, #315642 100%);
  color: #e7efe9;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1040;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(201,177,125,.18);
  color: var(--brand-gold);
  display: flex; align-items: center; justify-content: center;
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1rem; letter-spacing: .05em; color: #fff; }
.brand-sub  { font-size: .72rem; color: rgba(255,255,255,.6); letter-spacing: .04em; }

.sidebar-close {
  background: transparent;
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  width: 34px; height: 34px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .15s ease;
}
.sidebar-close:hover { background: rgba(255,255,255,.1); }
.sidebar-close svg { width: 18px; height: 18px; }

/* -------- Sidebar nav -------- */
.sidebar-nav { padding: 10px 10px 20px; flex: 1 1 auto; }
.nav-section {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255,255,255,.42);
  margin: 16px 10px 6px;
  font-weight: 700;
}
.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,.82);
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 500;
  margin-bottom: 2px;
  transition: background .15s ease, color .15s ease;
}
.side-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.side-link:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}
.side-link.active {
  background: var(--brand-gold);
  color: #1f3a2c;
  font-weight: 700;
}
.side-link-logout { color: #f7c2c2; }
.side-link-logout:hover { background: rgba(220,53,69,.18); color: #fff; }

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .72rem;
  color: rgba(255,255,255,.5);
}

/* -------- Mobile backdrop -------- */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 23, .45);
  backdrop-filter: blur(2px);
  z-index: 1030;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
body.sidebar-open .sidebar-backdrop {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* -------- Topbar -------- */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--brand-border);
  padding: 0 20px;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-btn {
  position: relative;
  background: #fff;
  border: 1px solid var(--brand-border);
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--brand-deep);
  transition: background .15s ease;
}
.topbar-btn:hover { background: #f5f7f5; }
.topbar-btn svg { width: 18px; height: 18px; }
.notif-dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #dc3545;
  box-shadow: 0 0 0 2px #fff;
}

.page-heading { display: flex; flex-direction: column; min-width: 0; }
.page-title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 800;
  margin: 0;
  color: #0f1e17;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.page-breadcrumb .breadcrumb { --bs-breadcrumb-divider: '/'; font-size: .78rem; }
.page-breadcrumb .breadcrumb-item a { color: var(--brand-muted); text-decoration: none; }
.page-breadcrumb .breadcrumb-item.active { color: #0f1e17; }

/* -------- User chip -------- */
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
  cursor: pointer;
  transition: background .15s ease;
}
.user-chip:hover { background: #f5f7f5; }
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #315642, #4a7a5f);
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
}
.user-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.user-name { font-size: .82rem; font-weight: 700; color: #0f1e17; }
.user-role { font-size: .68rem; color: var(--brand-muted); }
.chip-caret { width: 14px; height: 14px; color: var(--brand-muted); }

.dropdown-menu .dropdown-item { display: flex; align-items: center; gap: 8px; font-size: .88rem; }
.dropdown-menu .dropdown-item svg { width: 16px; height: 16px; }

/* -------- Content area -------- */
.app-content {
  padding: 22px;
  flex: 1 1 auto;
  min-width: 0;
}

/* -------- Alerts -------- */
.alert { border-radius: 12px; border: 1px solid; font-size: .88rem; }
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }

/* =========================================================
   MOBILE / TABLET
   ========================================================= */
@media (max-width: 991.98px) {
  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,.2);
  }
  body.sidebar-open .app-sidebar {
    transform: translateX(0);
  }
  .app-content { padding: 16px; }
  .app-topbar { padding: 0 14px; }
}

@media (max-width: 575.98px) {
  .page-title { font-size: .95rem; }
  .page-breadcrumb { display: none; }
  .user-name { display: none; }
  .app-content { padding: 14px 12px; }
}