/* Galaxy App Store - Material Design Inspired Stylesheet */
:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --primary-light: #e8f0fe;
  --surface: #ffffff;
  --background: #f8f9fa;
  --text-primary: #202124;
  --text-secondary: #5f6368;
  --text-hint: #9aa0a6;
  --border: #dadce0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 6px 10px rgba(0,0,0,0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', 'Roboto', system-ui, -apple-system, sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* Header / Navigation */
.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
}

.header-brand .brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #0d47a1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: 700;
}

.header-brand .brand-text {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.header-brand .brand-text span {
  color: var(--primary);
}

.search-container {
  flex: 1;
  max-width: 600px;
  position: relative;
}

.search-container .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-hint);
  font-size: 16px;
  pointer-events: none;
}

.search-container input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  border: 1px solid var(--border);
  border-radius: 24px;
  font-size: 14px;
  background: var(--background);
  transition: var(--transition);
  outline: none;
}

.search-container input:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.search-container input::placeholder {
  color: var(--text-hint);
}

/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
}

.section-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-primary);
}

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

.app-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border: 1px solid transparent;
}

.app-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--border);
}

.app-card:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.app-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.app-card-top {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
}

.app-card-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  object-fit: cover;
  background: var(--background);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.app-card-info {
  flex: 1;
  min-width: 0;
}

.app-card-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-card-developer {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.app-card-size {
  font-size: 12px;
  color: var(--text-hint);
}

.app-card-description {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
  flex: 1;
}

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

.app-card-version {
  font-size: 12px;
  color: var(--text-hint);
}

.btn-install {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-install:hover {
  background: var(--primary-dark);
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
  transform: scale(1.02);
}

.btn-install:active {
  transform: scale(0.98);
}

/* Detail Page */
.detail-header {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.detail-top {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.detail-icon {
  width: 92px;
  height: 92px;
  border-radius: 18px;
  flex-shrink: 0;
  object-fit: cover;
  background: var(--background);
  box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

.detail-info {
  flex: 1;
  min-width: 0;
}

.detail-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.detail-developer {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 16px;
}

.detail-meta-item {
  display: flex;
  flex-direction: column;
}

.detail-meta-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-hint);
  letter-spacing: 0.5px;
  font-weight: 600;
}

.detail-meta-value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.detail-actions {
  margin-top: 8px;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--primary);
  color: white;
  border: none;
  padding: 14px 36px;
  border-radius: 28px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-download:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 16px rgba(26, 115, 232, 0.35);
  transform: scale(1.03);
}

.btn-download:active {
  transform: scale(0.98);
}

.btn-download i {
  font-size: 18px;
}

/* Screenshot Gallery */
.screenshot-section {
  margin-bottom: 24px;
}

.screenshot-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.screenshot-gallery {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}

.screenshot-gallery::-webkit-scrollbar {
  height: 4px;
}

.screenshot-gallery::-webkit-scrollbar-track {
  background: var(--background);
  border-radius: 2px;
}

.screenshot-gallery::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.screenshot-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  width: 200px;
  height: 360px;
}

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

/* Detail Sections */
.detail-section {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.detail-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.detail-description {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

.whats-new-content {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

/* Related Apps */
.related-section {
  margin-top: 32px;
}

.related-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* No results */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-hint);
}

.no-results i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.no-results p {
  font-size: 16px;
}

/* Admin Styles */
.admin-body {
  background: var(--background);
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #e8f0fe 0%, #f8f9fa 100%);
}

.login-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  width: 100%;
  max-width: 400px;
}

.login-card .brand-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #0d47a1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  font-weight: 700;
  margin: 0 auto 16px;
}

.login-card h2 {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.login-card .subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: var(--transition);
  outline: none;
  background: var(--background);
}

.form-control:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235f6368' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.btn-danger {
  background: #d93025;
  color: white;
}

.btn-danger:hover {
  background: #b3261e;
}

.btn-success {
  background: #188038;
  color: white;
}

.btn-success:hover {
  background: #137333;
}

.btn-secondary {
  background: var(--background);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 16px;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-text {
  font-size: 12px;
  color: var(--text-hint);
  margin-top: 4px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Admin Header */
.admin-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.admin-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.admin-header-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.admin-header-brand span {
  color: var(--primary);
}

.admin-nav {
  display: flex;
  gap: 4px;
}

.admin-nav a {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.admin-nav a:hover,
.admin-nav a.active {
  background: var(--primary-light);
  color: var(--primary);
}

.admin-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-user {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Admin Dashboard */
.admin-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 20px;
}

.stat-card .stat-icon.blue {
  background: var(--primary-light);
  color: var(--primary);
}

.stat-card .stat-icon.green {
  background: #e6f4ea;
  color: #188038;
}

.stat-card .stat-icon.orange {
  background: #fef7e0;
  color: #e37400;
}

.stat-card .stat-icon.red {
  background: #fce8e6;
  color: #d93025;
}

.stat-card .stat-number {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-card .stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Admin Table */
.table-container {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.table-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.table-responsive {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th {
  text-align: left;
  padding: 14px 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-hint);
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  background: var(--background);
}

table td {
  padding: 14px 20px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

table tr:last-child td {
  border-bottom: none;
}

table tr:hover td {
  background: var(--background);
}

.table-app-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 10px;
}

.table-app-name {
  font-weight: 600;
  color: var(--text-primary);
}

.table-actions {
  display: flex;
  gap: 6px;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.badge-success {
  background: #e6f4ea;
  color: #188038;
}

.badge-warning {
  background: #fef7e0;
  color: #e37400;
}

/* Admin Form */
.admin-form-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  max-width: 800px;
}

.admin-form-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* File Upload */
.file-upload-wrapper {
  position: relative;
}

.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--background);
}

.file-upload-area:hover,
.file-upload-area.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.file-upload-area i {
  font-size: 36px;
  color: var(--text-hint);
  margin-bottom: 8px;
}

.file-upload-area p {
  color: var(--text-secondary);
  font-size: 13px;
}

.file-upload-area .file-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 8px;
  display: none;
}

.file-upload-area.has-file .file-name {
  display: block;
}

.file-upload-area input[type="file"] {
  display: none;
}

/* Current file display */
.current-file {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--background);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  font-size: 13px;
}

.current-file i {
  color: var(--primary);
}

.current-file .remove-file {
  margin-left: auto;
  color: #d93025;
  cursor: pointer;
  font-size: 16px;
}

/* Screenshots preview */
.screenshots-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.screenshot-thumb {
  width: 80px;
  height: 140px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.screenshot-thumb-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: grab;
  transition: transform 0.15s;
}

.screenshot-thumb-wrapper:active {
  cursor: grabbing;
  transform: scale(0.95);
}

.screenshot-thumb-wrapper.drag-over {
  border-left: 3px solid var(--primary);
  padding-left: 4px;
}

.drag-handle {
  color: #aaa;
  cursor: grab;
  font-size: 14px;
  display: flex;
  align-items: center;
  padding: 2px;
}

.drag-handle:hover {
  color: var(--primary);
}

.screenshot-thumb-wrapper .remove-screenshot {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #d93025;
  color: white;
  border: none;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Alert messages */
.alert {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-danger {
  background: #fce8e6;
  color: #d93025;
  border: 1px solid #f5c6c2;
}

.alert-success {
  background: #e6f4ea;
  color: #188038;
  border: 1px solid #c8e6c9;
}

.alert-warning {
  background: #fef7e0;
  color: #e37400;
  border: 1px solid #ffecb3;
}

.alert-info {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid #bbdefb;
}

/* Pagination / Load more */
.text-center {
  text-align: center;
}

.mt-3 {
  margin-top: 16px;
}

.mb-3 {
  margin-bottom: 16px;
}

/* Loading */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.loading-spinner::after {
  content: '';
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Toast notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #323232;
  color: white;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
  max-width: 360px;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Mobile nav toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-primary);
  cursor: pointer;
  padding: 4px;
}

/* Back button */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
  text-decoration: none;
}

.back-link:hover {
  color: var(--primary);
}

/* Footer */
.app-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 24px 20px;
  text-align: center;
  color: var(--text-hint);
  font-size: 13px;
  margin-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 8px 16px;
    gap: 10px;
  }

  .header-brand .brand-text {
    font-size: 18px;
  }

  .search-container {
    order: 3;
    max-width: 100%;
    flex-basis: 100%;
  }

  .apps-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .main-content {
    padding: 16px;
  }

  .detail-header {
    padding: 20px;
  }

  .detail-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .detail-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
  }

  .detail-meta {
    justify-content: center;
  }

  .detail-actions {
    text-align: center;
  }

  .screenshot-item {
    width: 160px;
    height: 288px;
  }

  .detail-section {
    padding: 18px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .admin-form-card {
    padding: 20px;
  }

  .admin-header-inner {
    padding: 8px 16px;
  }

  .admin-nav {
    display: none;
  }

  .admin-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px;
    box-shadow: var(--shadow-md);
  }

  .mobile-nav-toggle {
    display: block;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .login-card {
    padding: 28px 24px;
  }

  .table-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .apps-grid {
    grid-template-columns: 1fr;
  }
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 24px;
  color: white;
  font-size: 36px;
  font-weight: 300;
  cursor: pointer;
  z-index: 10;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  transition: 0.2s;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.2);
}

.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 30px;
  font-weight: 300;
  cursor: pointer;
  z-index: 10;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  transition: 0.2s;
  user-select: none;
}

.lightbox-prev:hover, .lightbox-next:hover {
  background: rgba(255,255,255,0.2);
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  background: rgba(0,0,0,0.5);
  padding: 6px 16px;
  border-radius: 20px;
}

@media (max-width: 768px) {
  .lightbox-prev, .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-close {
    top: 8px;
    right: 12px;
    font-size: 30px;
  }
}
