/* Imali Hub Global Stylesheet & Design System Variables */

:root {
  /* Colors */
  --primary-color: #1d1d1f;      /* Apple Dark Gray */
  --primary-light: #424245;
  --secondary-color: #86868b;    /* Apple Light Gray */
  --accent-color: #0066cc;       /* Apple Link Blue */
  --accent-hover: #0077ed;
  --accent-light: rgba(0, 102, 204, 0.1);
  
  --bg-color: #f5f5f7;           /* Apple Background */
  --card-bg: #ffffff;
  --border-color: #d2d2d7;
  
  /* Status Colors */
  --status-draft: #86868b;
  --status-submitted: #0066cc;
  --status-review: #f56300;
  --status-docs: #bf4800;
  --status-approved: #34c759;
  --status-rejected: #ff3b30;
  --status-disbursed: #28cd41;

  /* Typography */
  --font-family-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-family-heading: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  --text-main: #1d1d1f;
  --text-dark: #000000;
  --text-light: #86868b;
  --text-white: #ffffff;

  /* Layout Constants */
  --header-height: 80px;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-premium: 0 20px 25px -5px rgba(10, 25, 47, 0.06), 0 10px 10px -5px rgba(10, 25, 47, 0.04);
  
  /* Micro-Animations transition */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-sans);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.47059;
  letter-spacing: -0.022em;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  color: var(--text-dark);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

ul {
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Global loading state */
.page-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Header Navbar Styles */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  transition: var(--transition-normal);
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-graphics {
  display: flex;
  align-items: center;
}

.logo-text {
  font-family: var(--font-family-heading);
  font-weight: 800;
  font-size: 22px;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

.logo-text span {
  color: var(--accent-color);
}

.desktop-nav ul {
  display: flex;
  gap: 32px;
}

.nav-item {
  font-weight: 400;
  color: var(--text-main);
  font-size: 12px;
  letter-spacing: -0.01em;
  padding: 8px 4px;
  position: relative;
}

.nav-item:hover, .nav-item.active {
  color: var(--primary-color);
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: var(--transition-normal);
}

.nav-item:hover::after, .nav-item.active::after {
  width: 100%;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-toggle-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary-color);
}

/* Mobile Nav Menu Dropdown */
.mobile-nav-dropdown {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 99;
  transform: translateY(-10px);
  opacity: 0;
  transition: var(--transition-normal);
}

.mobile-nav-dropdown.show {
  display: block;
  transform: translateY(0);
  opacity: 1;
}

.mobile-nav-dropdown ul {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-nav-item {
  display: block;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-light);
  padding: 8px 0;
}

.mobile-nav-item.active, .mobile-nav-item:hover {
  color: var(--primary-color);
}

.mobile-auth-section {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  margin-top: 8px;
}

/* App Viewport */
.app-viewport {
  min-height: calc(100vh - var(--header-height) - 250px);
}

/* Sticky Float Action */
.sandbox-floating-action {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
}

.btn-fab {
  border-radius: 50px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.4);
}

/* Footer Styles */
.app-footer {
  background-color: var(--primary-color);
  color: #94A3B8;
  padding: 64px 0 24px 0;
  border-top: 1px solid #1E293B;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo .logo-text {
  color: var(--text-white);
}

.footer-logo .logo-text span {
  color: var(--accent-color);
}

.footer-desc {
  line-height: 1.6;
}

.footer-grid h4 {
  color: var(--text-white);
  font-size: 16px;
  margin-bottom: 24px;
}

.footer-links ul, .footer-institutions ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  border-top: 1px solid #1E293B;
  padding-top: 24px;
  text-align: center;
  font-size: 12px;
}

/* Responsive queries */
@media (max-width: 768px) {
  .desktop-nav, #nav-auth-actions {
    display: none;
  }
  
  .mobile-toggle-btn {
    display: block;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .app-header {
    height: 70px;
  }
  
  :root {
    --header-height: 70px;
  }
}
