/* ===== GLOBAL STYLES - Apple-Like Dark Design System ===== */

/* ===== CSS RESET & BASE ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  padding-top: var(--header-height);
  min-height: 100vh;
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-surface);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
  transition: background var(--duration-fast) var(--ease-default);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ===== FOCUS STATES ===== */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ===== SHARED ANIMATIONS ===== */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ===== UTILITY CLASSES ===== */
.modern-desktop {
  width: 100%;
}

/* ===== HIDDEN UTILITY CLASSES ===== */
.delete-form-hidden {
  display: none;
}

.file-preview-hidden {
  display: none;
}

.detail-card-enhanced {
  box-shadow: none;
}

/* ===== PAGE HEADERS ===== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
  padding: var(--space-6) 0;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.page-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* ===== EMPTY STATES ===== */
.empty-state-enhanced {
  text-align: center;
  padding: var(--space-16) var(--space-6);
  color: var(--text-secondary);
}

.empty-state-enhanced i {
  font-size: 80px;
  opacity: 0.3;
  margin-bottom: var(--space-6);
  display: block;
  color: var(--text-muted);
}

.empty-state-enhanced h5 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
  color: var(--text-primary);
}

.empty-state-enhanced p {
  font-size: var(--text-base);
  margin-bottom: var(--space-6);
  color: var(--text-secondary);
}

/* Standard empty state (from design system) */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-16) var(--space-8);
  text-align: center;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  color: var(--text-muted);
  font-size: 2rem;
}

.empty-state-title {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.empty-state-description,
.empty-state p {
  max-width: 400px;
  margin-bottom: var(--space-6);
  color: var(--text-secondary);
}

.empty-state h5 {
  margin-bottom: var(--space-2);
  color: var(--text-primary);
  font-size: var(--text-xl);
  font-weight: 600;
}

/* ===== TIMESTAMP ===== */
.timestamp-natural {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
}

/* ===== SKIP LINK (Accessibility) ===== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: var(--text-inverse);
  padding: var(--space-2) var(--space-4);
  z-index: 10000;
  transition: top var(--duration-normal);
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 var(--radius-md) 0;
}

.skip-link:focus {
  top: 0;
}

/* ===== SELECTION ===== */
::selection {
  background: var(--primary-transparent);
  color: var(--text-primary);
}
