/**
 * Omnihub Presale Automation - Shared layout
 * Header, footer, typography, and buttons used across all pages
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --brand-primary: #0d47a1;
  --brand-primary-hover: #1565c0;
  --brand-accent: #1976d2;
  --text-primary: #1a1a2e;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --bg-subtle: #f8fafc;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --radius: 8px;
  --header-height: 64px;
  --footer-height: 48px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-base: 14px;
  --font-size-sm: 13px;
  --font-size-xs: 12px;
  --font-size-lg: 16px;
  --font-size-xl: 18px;
  --font-size-2xl: 24px;
}

/* Global typography - apply to body on all pages */
body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Shared button styles - consistent across all pages */
.btn {
  background: var(--brand-primary);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-family);
  transition: background 0.2s, box-shadow 0.2s;
}
.btn:hover {
  background: var(--brand-primary-hover);
  box-shadow: 0 0 0 3px rgba(25,118,210,0.15);
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: #fff;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: var(--bg-subtle);
  box-shadow: none;
}

.btn-small {
  background: var(--brand-accent);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-family);
  transition: background 0.2s;
}
.btn-small:hover {
  background: var(--brand-primary-hover);
}

.btn-small-danger {
  background: #dc2626;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-family);
  transition: background 0.2s;
}
.btn-small-danger:hover {
  background: #b91c1c;
}
.btn-small-danger:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

/* Action button group - aligned row */
.action-buttons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Global header - consistent across all pages */
.app-global-header {
  height: var(--header-height);
  background: linear-gradient(135deg, #0d47a1 0%, #1565c0 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
  z-index: 100;
}

.app-global-header-brand {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-global-header-brand:hover {
  color: rgba(255,255,255,0.95);
}

.app-global-header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.app-global-header-nav a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.app-global-header-nav a:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.app-global-header-nav .btn-primary {
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.app-global-header-nav .btn-primary:hover {
  background: rgba(255,255,255,0.3);
}

/* Home link - prominent navigation */
.app-global-header-nav .home-link {
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.app-global-header-nav .home-link:hover {
  background: rgba(255,255,255,0.3);
  color: #fff;
}

/* Page breadcrumb - consistent across all pages */
.app-page-breadcrumb {
  flex-shrink: 0;
  background: #fff;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  padding: 10px 24px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.app-page-breadcrumb a {
  color: var(--brand-accent, #1976d2);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.app-page-breadcrumb a:hover {
  text-decoration: underline;
}
.app-page-breadcrumb .breadcrumb-sep {
  color: var(--text-secondary, #64748b);
  font-weight: 300;
}
.app-page-breadcrumb .breadcrumb-current {
  color: var(--text-primary, #1a1a2e);
  font-weight: 500;
}

/* Notification bell */
.notification-bell-wrap {
  position: relative;
}
.notification-bell-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.9);
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notification-bell-btn:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.notification-bell-btn .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 600;
  background: #ef4444;
  color: #fff;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notification-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  width: 360px;
  max-width: 90vw;
  max-height: 400px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  border: 1px solid var(--border-color, #e2e8f0);
  display: none;
  flex-direction: column;
  z-index: 1000;
}
.notification-dropdown.open {
  display: flex;
}
.notification-dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary, #1a1a2e);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.notification-mark-all-read {
  font-size: 12px;
  font-weight: 500;
  color: var(--brand-accent, #1976d2);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}
.notification-mark-all-read:hover {
  background: rgba(25, 118, 210, 0.1);
}
.notification-dropdown-body {
  flex: 1;
  overflow-y: auto;
  max-height: 320px;
}
.notification-dropdown-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-secondary, #64748b);
  font-size: 13px;
}
.notification-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  font-size: 13px;
  color: var(--text-primary, #1a1a2e);
}
.notification-item:last-child {
  border-bottom: none;
}
.notification-item.info { border-left: 4px solid #1976d2; }
.notification-item.success { border-left: 4px solid #4caf50; }
.notification-item.warning { border-left: 4px solid #ff9800; }
.notification-item.error { border-left: 4px solid #f44336; }
.notification-item-time {
  font-size: 11px;
  color: var(--text-secondary, #64748b);
  margin-top: 4px;
}
.notification-item.read {
  opacity: 0.65;
  background: #fafafa;
}
.notification-item-wrap {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.notification-item-content {
  flex: 1;
  min-width: 0;
}
.notification-item-mark-read {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--brand-accent, #1976d2);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.notification-item-mark-read:hover {
  background: rgba(25, 118, 210, 0.1);
}
.notification-item.read .notification-item-mark-read {
  display: none;
}

/* Global footer */
.app-global-footer {
  flex-shrink: 0;
  background: #1a1a2e;
  color: rgba(255,255,255,0.7);
  padding: 14px 24px;
  font-size: 13px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.app-global-footer a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
}

.app-global-footer a:hover {
  text-decoration: underline;
}

/* Responsive header */
@media (max-width: 768px) {
  .app-global-header {
    padding: 0 16px;
    flex-wrap: wrap;
    height: auto;
    min-height: var(--header-height);
    padding: 12px 16px;
  }
  .app-global-header-brand {
    font-size: 16px;
  }
  .app-global-header-nav {
    gap: 12px;
  }
  .app-global-header-nav a {
    font-size: 13px;
    padding: 6px 10px;
  }
}

/* Responsive footer */
@media (max-width: 480px) {
  .app-global-footer {
    font-size: 12px;
    padding: 12px 16px;
  }
}
