:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --surface-hover: #e2e8f0;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #6366f1;
  --brand-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --brand-dark: #4f46e5;
  --accent: #10b981;
  --accent-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --navbar-bg: rgba(255, 255, 255, 0.88);
  --navbar-text: #0f172a;
  --nav-hover: rgba(99, 102, 241, 0.08);
  --nav-active-bg: #6366f1;
  --nav-active-text: #ffffff;
  --danger: #ef4444;
  --ok: #10b981;
  --warn: #f59e0b;
  --info: #3b82f6;
  --shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px -10px rgba(99, 102, 241, 0.18);
  --glass: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  --radius: 12px;
}

body.dark-mode {
  --bg: #090d16;
  --surface: #111827;
  --surface-2: #1f2937;
  --surface-hover: #374151;
  --ink: #f9fafb;
  --muted: #9ca3af;
  --line: #1f2937;
  --brand: #818cf8;
  --brand-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --brand-dark: #6366f1;
  --accent: #34d399;
  --accent-gradient: linear-gradient(135deg, #34d399 0%, #059669 100%);
  --navbar-bg: rgba(17, 24, 39, 0.88);
  --navbar-text: #f9fafb;
  --nav-hover: rgba(129, 140, 248, 0.12);
  --nav-active-bg: #6366f1;
  --nav-active-text: #ffffff;
  --shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 40px -10px rgba(99, 102, 241, 0.3);
  --glass: rgba(17, 24, 39, 0.75);
  --glass-border: rgba(255, 255, 255, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.8fr);
}

.login-hero {
  position: relative;
  min-height: 100vh;
  padding: 42px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(10, 29, 24, 0.85), rgba(10, 29, 24, 0.22)),
    url("https://images.unsplash.com/photo-1586773860418-d37222d8fce3?auto=format&fit=crop&w=1600&q=80") center / cover;
}

.login-hero h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(2.4rem, 5vw, 5.4rem);
  line-height: 0.95;
}

.login-hero p {
  max-width: 620px;
  margin: 18px 0 0;
  font-size: 1.06rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.86);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 720px;
  margin-top: 34px;
}

.hero-stat {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border-radius: 8px;
}

.hero-stat strong {
  display: block;
  font-size: 1.7rem;
}

.hero-stat span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.86rem;
}

.login-panel {
  min-height: 100vh;
  padding: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
}

.login-card {
  width: min(100%, 430px);
}

.brand-row,
.top-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
}

.login-card h2 {
  margin: 32px 0 8px;
  font-size: 2rem;
}

.login-card > p {
  margin: 0 0 26px;
  color: var(--muted);
  line-height: 1.6;
}

.role-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 5px;
  margin-bottom: 20px;
  background: var(--surface-2);
  border-radius: 8px;
}

.role-tabs button {
  min-height: 42px;
  color: var(--muted);
  background: transparent;
  border-radius: 7px;
  font-weight: 700;
}

.role-tabs button.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 4px 12px rgba(20, 35, 29, 0.08);
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.88rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}

.field textarea {
  min-height: 108px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.13);
}

.primary-btn,
.ghost-btn,
.danger-btn,
.tiny-btn {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
}

.primary-btn {
  color: #fff;
  background: var(--brand);
}

.primary-btn:hover {
  background: var(--brand-dark);
}

.ghost-btn {
  color: var(--ink);
  background: var(--surface-2);
}

.danger-btn {
  color: #fff;
  background: var(--danger);
}

.tiny-btn {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.8rem;
  color: var(--brand-dark);
  background: rgba(15, 118, 110, 0.1);
}

.action-stack,
.feedback-box {
  display: grid;
  gap: 7px;
  min-width: 150px;
}

.action-stack select,
.feedback-box select,
.feedback-box textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}

.feedback-box textarea {
  min-height: 62px;
  resize: vertical;
}

.image-thumb {
  width: 62px;
  height: 52px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
}

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

.demo-box {
  margin-top: 18px;
  padding: 14px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.65;
}

/* Modern Top Navbar Layout */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--navbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 0 24px;
}

.navbar-container {
  max-width: 1400px;
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
}

.brand-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--brand-gradient);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  font-size: 1.1rem;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s ease;
}

.brand-logo:hover .brand-badge {
  transform: scale(1.06) rotate(-3deg);
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
}

.nav-link {
  height: 44px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 22px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.nav-link:hover {
  color: var(--ink);
  background: var(--nav-hover);
}

.nav-link.active {
  color: var(--nav-active-text);
  background: var(--nav-active-bg);
  box-shadow: var(--shadow-lg);
}

/* Navigation Dropdown */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  z-index: 1100;
  animation: fadeInDown 0.2s ease;
}

.nav-dropdown-menu.show {
  display: block;
}

.nav-dropdown-item {
  width: 100%;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.nav-dropdown-item:hover {
  background: var(--surface-2);
  color: var(--brand);
}

.nav-dropdown-item.active {
  color: var(--brand);
  background: rgba(99, 102, 241, 0.1);
}

.nav-search {
  flex: 1;
  max-width: 380px;
  position: relative;
}

.nav-search input {
  width: 100%;
  height: 42px;
  padding: 0 16px 0 42px;
  border-radius: 21px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
}

.nav-search input:focus {
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.nav-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* User Profile Menu & Dropdown */
.profile-wrapper {
  position: relative;
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: 30px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-profile-btn:hover,
.user-profile-btn.active {
  background: var(--surface-hover);
  border-color: var(--brand);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.88rem;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.user-meta {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.user-role-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--brand);
  line-height: 1;
  text-transform: capitalize;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 260px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 1100;
  animation: fadeInDown 0.2s ease;
}

.dropdown-menu.show {
  display: flex;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}

.dropdown-header-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink);
}

.dropdown-header-email {
  font-size: 0.78rem;
  color: var(--muted);
  word-break: break-all;
}

.dropdown-item {
  width: 100%;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.15s ease;
  border: none;
  cursor: pointer;
  text-align: left;
}

.dropdown-item:hover {
  background: var(--surface-2);
  color: var(--brand);
}

.dropdown-item.danger {
  color: var(--danger);
}

.dropdown-item.danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

.mobile-menu-btn {
  display: none;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  color: var(--ink);
}

.main {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px;
}

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

.user-pill strong {
  display: block;
  font-size: 0.92rem;
}

.user-pill span {
  color: var(--sidebar-user-pill-text);
  font-size: 0.78rem;
}

.main {
  min-width: 0;
  padding: 26px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
}

.topbar p {
  margin: 5px 0 0;
  color: var(--muted);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.search {
  min-width: 270px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric {
  padding: 18px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(24, 38, 32, 0.06);
}

.metric span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 7px;
  font-size: 2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 16px;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.chart-box {
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.pie {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 4px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}

.legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
}

.legend-item .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 12px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(24, 38, 32, 0.06);
}

.panel-head {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.9rem;
}

th {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

td strong {
  display: block;
}

td small {
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.badge.open {
  color: #7a2e0e;
  background: #ffedd5;
}

.badge.assigned {
  color: #1d4ed8;
  background: #dbeafe;
}

.badge.progress {
  color: #9a3412;
  background: #fed7aa;
}

.badge.resolved {
  color: #047857;
  background: #d1fae5;
}

.badge.closed {
  color: #475569;
  background: #e2e8f0;
}

.badge.priority-high {
  color: #991b1b;
  background: #fee2e2;
}

.badge.priority-medium {
  color: #92400e;
  background: #fef3c7;
}

.badge.priority-low {
  color: #166534;
  background: #dcfce7;
}

.list {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.list-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.list-item strong {
  display: block;
  margin-bottom: 4px;
}

.work-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.work-detail-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.work-detail-card h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
}

.work-detail-card p,
.work-detail-card small,
.work-detail-card li {
  color: var(--muted);
}

.work-detail-card ul {
  margin: 8px 0 0 16px;
  padding: 0;
}

.list-item span,
.list-item small {
  color: var(--muted);
  line-height: 1.5;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.person-card {
  padding: 16px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(24, 38, 32, 0.06);
}

.person-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.person-card h3 {
  margin: 0;
}

.person-card p {
  margin: 6px 0;
  color: var(--muted);
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.category {
  padding: 16px;
  border-radius: 8px;
  color: #fff;
}

.category.civil {
  background: #7c3f1d;
}

.category.electrical {
  background: #1d4ed8;
}

.category.horticulture {
  background: #15803d;
}

.category strong {
  display: block;
  font-size: 1.55rem;
  margin-top: 8px;
}

/* Commercial APK Store Component Styles */
.store-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  padding: 40px 48px;
  margin-bottom: 32px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%);
  color: #ffffff;
  box-shadow: var(--shadow-lg);
}

.store-hero-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.store-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 16px;
}

.store-hero h1 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 900;
  line-height: 1.1;
  margin: 0 0 14px 0;
  letter-spacing: -0.5px;
}

.store-hero p {
  font-size: 1.05rem;
  line-height: 1.6;
  opacity: 0.9;
  margin: 0 0 24px 0;
}

.store-hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-btn {
  height: 46px;
  padding: 0 24px;
  border-radius: 23px;
  font-weight: 800;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.hero-btn-primary {
  background: #ffffff;
  color: #4f46e5;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.hero-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
  background: #f8fafc;
}

.hero-btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  backdrop-filter: blur(8px);
}

.hero-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Category Filter Chips */
.store-categories {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 24px;
  scrollbar-width: none;
}

.store-categories::-webkit-scrollbar {
  display: none;
}

.category-chip {
  padding: 8px 18px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-chip:hover {
  border-color: var(--brand);
  color: var(--ink);
}

.category-chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
  box-shadow: var(--shadow);
}

/* App Cards Grid */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.app-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.25 ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(99, 102, 241, 0.4);
}

.app-card-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.app-icon {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  object-fit: cover;
  flex: 0 0 58px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
}

.app-info h3 {
  margin: 0 0 4px 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
}

.app-info .app-developer {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.app-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
}

.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--warn);
  font-weight: 800;
}

.app-size {
  color: var(--muted);
  font-weight: 600;
}

.app-category-tag {
  background: var(--surface-2);
  color: var(--brand);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.72rem;
}

.app-card-body {
  margin-bottom: 18px;
}

.app-description {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.download-btn {
  height: 38px;
  padding: 0 16px;
  border-radius: 19px;
  background: var(--brand-gradient);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.download-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.version-badge {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

/* Store Section Titles */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
  cursor: pointer;
}

.section-link:hover {
  text-decoration: underline;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
  .navbar-container {
    height: 64px;
  }
  
  .nav-search {
    display: none;
  }
  
  .nav-links {
    display: none;
  }

  .nav-links.mobile-show {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    gap: 8px;
    height: auto;
  }
  
  .nav-link {
    width: 100%;
    border-radius: 8px;
  }

  .mobile-menu-btn {
    display: block;
  }
}

@media (max-width: 600px) {
  .user-meta {
    display: none;
  }
  
  .store-hero {
    padding: 24px;
  }
  
  .app-grid {
    grid-template-columns: 1fr;
  }
}

/* Toggle Switch for Auto-Crawler */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #10b981;
}

.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 1px #10b981;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

/* Quick Crawl Buttons */
.quick-crawl-btn {
  padding: 16px 24px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.quick-crawl-btn:hover {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.quick-crawl-btn svg {
  flex-shrink: 0;
}

/* Secondary Button */
.secondary-btn {
  padding: 10px 20px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.secondary-btn:hover:not(:disabled) {
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.secondary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Spinner for loading states */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
