/* RenterVault — Protect Your Deposit */
/* Design System */

:root {
  /* Colors */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary: #10b981;
  --secondary-dark: #059669;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  /* Neutrals */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Semantic */
  --bg: #f3f4f6;
  --card-bg: #ffffff;
  --text: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  
  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--space-lg);
}

/* Phone Frame */
.phone-frame {
  width: 375px;
  height: 812px;
  background: #000;
  border-radius: 44px;
  padding: 12px;
  box-shadow: 
    0 25px 50px -12px rgba(0,0,0,0.5),
    inset 0 0 0 2px #333;
}

.app {
  width: 100%;
  height: 100%;
  background: var(--bg);
  border-radius: 36px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Status Bar */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  font-size: 14px;
  font-weight: 600;
  background: var(--card-bg);
}

.status-icons {
  display: flex;
  gap: var(--space-xs);
}

/* Screens */
.screens {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: var(--space-md);
  overflow-y: auto;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  transform: translateX(20px);
  transition: all 0.3s ease;
}

.screen.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* App Header */
.app-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  margin: calc(-1 * var(--space-md));
  margin-bottom: var(--space-md);
  padding: var(--space-lg);
  padding-top: var(--space-md);
  color: white;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xs);
}

.app-header h1 {
  font-size: 24px;
  font-weight: 700;
}

.icon-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 18px;
}

.tagline {
  font-size: 14px;
  opacity: 0.9;
}

/* Property Card */
.property-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-md);
}

.property-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.property-info h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.property-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.property-status {
  font-size: 12px;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  font-weight: 600;
}

.property-status.active {
  background: #dcfce7;
  color: #166534;
}

.property-stats {
  display: flex;
  justify-content: space-around;
  padding: var(--space-md) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-md);
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

.lease-progress {
  margin-top: var(--space-sm);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.progress-bar {
  height: 8px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* Quick Actions */
.quick-actions {
  margin-bottom: var(--space-md);
}

.quick-actions h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-sm);
  background: var(--card-bg);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.action-icon {
  font-size: 24px;
}

.action-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

/* Streak Card */
.streak-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.streak-icon {
  font-size: 32px;
}

.streak-content {
  display: flex;
  flex-direction: column;
}

.streak-value {
  font-size: 16px;
  font-weight: 700;
  color: #92400e;
}

.streak-desc {
  font-size: 12px;
  color: #b45309;
}

/* Recent Activity */
.recent-activity h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.activity-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.activity-icon {
  font-size: 20px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
}

.activity-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.activity-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.activity-time {
  font-size: 11px;
  color: var(--text-muted);
}

.verified-badge {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #dcfce7;
  color: #166534;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

/* Alert Banner */
.alert-banner {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-top: var(--space-md);
}

.alert-banner.warning {
  background: #fef3c7;
}

.alert-icon {
  font-size: 20px;
}

.alert-content {
  display: flex;
  flex-direction: column;
}

.alert-title {
  font-size: 13px;
  font-weight: 600;
  color: #92400e;
}

.alert-desc {
  font-size: 12px;
  color: #b45309;
}

/* Screen Header */
.screen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.screen-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.back-btn {
  background: none;
  border: none;
  font-size: 14px;
  color: var(--primary);
  cursor: pointer;
  font-weight: 500;
}

/* Capture Screen */
.capture-type-selector {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.capture-type {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.capture-type.active {
  border-color: var(--primary);
  background: #eff6ff;
  color: var(--primary);
}

.category-selector h3,
.room-selector h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.category-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm);
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-btn span:first-child {
  font-size: 20px;
}

.category-btn.active {
  border-color: var(--primary);
  background: #eff6ff;
}

.room-dropdown {
  width: 100%;
  padding: var(--space-md);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  margin-bottom: var(--space-md);
}

.capture-preview {
  margin-bottom: var(--space-md);
}

.camera-placeholder {
  aspect-ratio: 4/3;
  background: var(--gray-800);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
}

.camera-icon {
  font-size: 48px;
  margin-bottom: var(--space-sm);
}

.camera-placeholder p {
  font-size: 14px;
  opacity: 0.8;
}

.capture-tip {
  font-size: 12px !important;
  opacity: 0.6 !important;
  margin-top: var(--space-sm);
  text-align: center;
}

.capture-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.info-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 13px;
  color: var(--text-muted);
}

.info-item.verified {
  color: var(--secondary);
  font-weight: 500;
}

.capture-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
}

.capture-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Rooms Screen */
.checklist-progress {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-md);
}

.progress-circle {
  position: relative;
  width: 60px;
  height: 60px;
}

.progress-circle svg {
  transform: rotate(-90deg);
}

.progress-bg {
  fill: none;
  stroke: var(--gray-200);
  stroke-width: 3;
}

.progress-value {
  fill: none;
  stroke: var(--secondary);
  stroke-width: 3;
  stroke-linecap: round;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: 700;
  color: var(--secondary);
}

.progress-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.progress-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.room-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.room-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.room-item:hover {
  box-shadow: var(--shadow-md);
}

.room-status {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 700;
}

.room-item.complete .room-status {
  background: #dcfce7;
  color: #166534;
}

.room-item.incomplete .room-status {
  background: var(--gray-200);
  color: var(--gray-400);
}

.room-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.room-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.room-count {
  font-size: 12px;
  color: var(--text-muted);
}

.room-arrow {
  color: var(--gray-400);
}

.checklist-tips {
  padding: var(--space-md);
  background: #eff6ff;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary);
}

.checklist-tips h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

.checklist-tips ul {
  padding-left: var(--space-md);
}

.checklist-tips li {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

/* Compare Screen */
.compare-selector {
  margin-bottom: var(--space-md);
}

.compare-dropdown {
  width: 100%;
  padding: var(--space-md);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
}

.compare-view {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.compare-panel {
  flex: 1;
}

.compare-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: var(--space-xs);
}

.compare-image {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-xs);
}

.compare-image .image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: white;
}

.compare-image .image-placeholder span {
  font-size: 32px;
  margin-bottom: var(--space-xs);
}

.compare-image.before {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.compare-image.after {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.compare-meta {
  display: flex;
  flex-direction: column;
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
}

.compare-divider {
  display: flex;
  align-items: center;
  color: var(--gray-400);
  font-size: 20px;
}

.compare-notes {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-sm);
}

.compare-notes h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.note-item {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
}

.note-item:last-child {
  border-bottom: none;
}

.note-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-xs);
}

.note-badge.move-in {
  background: #e0e7ff;
  color: #4338ca;
}

.note-badge.current {
  background: #dcfce7;
  color: #166534;
}

.note-item p {
  font-size: 13px;
  color: var(--text);
  font-style: italic;
}

.compare-verdict {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: #dcfce7;
  border-radius: var(--radius-md);
}

.verdict-icon {
  font-size: 28px;
}

.verdict-content {
  display: flex;
  flex-direction: column;
}

.verdict-title {
  font-size: 14px;
  font-weight: 600;
  color: #166534;
}

.verdict-desc {
  font-size: 12px;
  color: #15803d;
}

/* Export Screen */
.export-preview {
  margin-bottom: var(--space-lg);
}

.pdf-preview {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.pdf-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.pdf-logo {
  font-size: 28px;
}

.pdf-title h4 {
  font-size: 14px;
  font-weight: 600;
}

.pdf-title p {
  font-size: 12px;
  opacity: 0.9;
}

.pdf-body {
  padding: var(--space-md);
}

.pdf-section {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
}

.pdf-section:last-child {
  border-bottom: none;
}

.section-icon {
  font-size: 16px;
}

.pdf-footer {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  background: var(--gray-100);
  font-size: 11px;
  color: var(--text-muted);
}

.export-options h3,
.export-format h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.option-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.option-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.option-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.format-options {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.format-btn {
  flex: 1;
  padding: var(--space-md);
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.format-btn.active {
  border-color: var(--primary);
  background: #eff6ff;
  color: var(--primary);
}

.export-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
  margin-bottom: var(--space-md);
}

.export-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.export-tip {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: #fef3c7;
  border-radius: var(--radius-md);
}

.tip-icon {
  font-size: 16px;
}

.export-tip p {
  font-size: 12px;
  color: #92400e;
  line-height: 1.5;
}

/* Bottom Navigation */
.bottom-nav {
  display: flex;
  justify-content: space-around;
  padding: var(--space-sm) 0;
  padding-bottom: calc(var(--space-sm) + 8px);
  background: var(--card-bg);
  border-top: 1px solid var(--border);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-xs) var(--space-md);
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.2s ease;
}

.nav-item.active {
  opacity: 1;
}

.nav-icon {
  font-size: 20px;
}

.nav-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--text);
}

/* Responsive */
@media (max-width: 400px) {
  body {
    padding: 0;
  }
  
  .phone-frame {
    width: 100%;
    height: 100vh;
    border-radius: 0;
    padding: 0;
  }
  
  .app {
    border-radius: 0;
  }
}
