/* TwinLink PWA Push POC - Styles */

:root {
  /* TwinLink Color Palette */
  --primary: #ce262a;
  --primary-50: #fef2f2;
  --primary-100: #fde3e4;
  --primary-200: #fdcbcc;
  --primary-300: #faa7a9;
  --primary-400: #f57477;
  --primary-500: #eb484c;
  --primary-600: #ce262a;
  --primary-700: #b52024;
  --primary-800: #961e21;
  --primary-900: #7d1f21;

  --neutral-50: #f5f6f6;
  --neutral-100: #e5e7e8;
  --neutral-200: #cfd2d2;
  --neutral-300: #adb2b3;
  --neutral-400: #838b8d;
  --neutral-500: #687072;
  --neutral-600: #595f61;
  --neutral-700: #4c5152;
  --neutral-800: #3f4243;
  --neutral-900: #3b3d3e;
  --neutral-950: #252727;

  --background: var(--neutral-50);
  --card: #ffffff;
  --card-foreground: var(--neutral-950);
  --text: var(--neutral-800);
  --text-muted: var(--neutral-500);

  --radius: 0.625rem;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--background);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

/* Layout */
.app-container {
  min-height: 100vh;
  padding: 1rem;
}

@media (min-width: 640px) {
  .app-container {
    padding: 2rem;
  }
}

.app-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.app-logo {
  width: 48px;
  height: 48px;
}

.app-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--neutral-800);
}

.app-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Card */
.card {
  background-color: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card + .card {
  margin-top: 1rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--neutral-800);
  margin-bottom: 1rem;
}

/* Status List */
.status-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--neutral-100);
}

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

.status-label {
  font-size: 0.875rem;
  color: var(--text);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

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

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

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

/* Buttons */
.btn {
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.btn + .btn {
  margin-top: 0.75rem;
}

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

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-700);
}

.btn-primary:active:not(:disabled) {
  background-color: var(--primary-800);
}

.btn-secondary {
  background-color: var(--neutral-100);
  color: var(--neutral-800);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--neutral-200);
}

/* Events List */
.events-container {
  max-height: 400px;
  overflow-y: auto;
  margin: -0.5rem;
  padding: 0.5rem;
}

.events-empty {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.event-item {
  padding: 0.875rem;
  border-radius: calc(var(--radius) - 2px);
  background-color: var(--neutral-50);
  margin-bottom: 0.5rem;
}

.event-item:last-child {
  margin-bottom: 0;
}

.event-item.warning {
  border-left: 3px solid #f59e0b;
}

.event-item.critical {
  border-left: 3px solid var(--primary);
}

.event-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.event-message {
  font-size: 0.875rem;
  color: var(--text);
}

/* Scrollbar */
.events-container::-webkit-scrollbar {
  width: 8px;
}

.events-container::-webkit-scrollbar-track {
  background: var(--neutral-100);
  border-radius: 4px;
}

.events-container::-webkit-scrollbar-thumb {
  background: var(--neutral-300);
  border-radius: 4px;
}

.events-container::-webkit-scrollbar-thumb:hover {
  background: var(--neutral-400);
}

/* Button Group */
.button-group {
  margin-top: 1.5rem;
}

/* Responsive */
@media (min-width: 640px) {
  .app-container {
    max-width: 480px;
    margin: 0 auto;
  }
}
