/* ================================
   SyncroConnect Global Theme
   ================================ */

:root {
  --brand: #4ade80;
  --brand-dark: #16a34a;
  --ink: #0f172a;
  --muted: #64748b;
  --bg: #f8fafc;
  --panel: #ffffff;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(15,23,42,0.06);
  --font-main: 'Inter', 'Segoe UI', sans-serif;
}

/* ====== BASE ====== */
html, body {
  height: 100%;
  margin: 0;
  font-family: var(--font-main);
  background: linear-gradient(145deg, #f8fafc 0%, #ecfdf5 100%);
  color: var(--ink);
}

#app-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

/* ====== CARD ====== */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 400px;
  padding: 32px;
  animation: fadeIn 0.4s ease;
}

/* ====== INPUTS ====== */
input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 1rem;
  margin-bottom: 1.25rem;
  transition: border 0.2s, box-shadow 0.2s;
}

input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(74,222,128,0.2);
}

/* ====== BUTTONS ====== */
button, .btn-primary {
  width: 100%;
  padding: 12px;
  font-weight: 600;
  background: var(--brand-dark);
  color: #ffffff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s, transform 0.1s;
}

button:hover, .btn-primary:hover {
  background: var(--brand);
  transform: translateY(-1px);
}

/* ====== ALERTS ====== */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  margin-bottom: 1.25rem;
}

/* ====== FOOTER ====== */
.powered {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 1rem;
}

/* ====== TOPBAR ====== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 10px rgba(15,23,42,0.05);
  padding: 14px 0;
  backdrop-filter: blur(8px);
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.topbar .title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}

.actions {
  display: flex;
  gap: 10px;
}

/* Buttons */
.nav-btn, .logoff-btn {
  display: inline-block;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.25s ease;
  color: #fff;
}

.nav-btn {
  background: var(--brand);
}
.nav-btn:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
}

.nav-btn.disabled {
  background: #cbd5e1;
  color: #475569;
  pointer-events: none;
  cursor: default;
}

.logoff-btn {
  background: #ef4444;
}
.logoff-btn:hover {
  background: #dc2626;
  transform: translateY(-2px);
}

/* ====== MOBILE NAVIGATION ====== */
.mobile-nav {
  display: none;
}

@media (max-width: 768px) {
  .topbar {
    display: none; /* Hide topbar on mobile */
  }

  .mobile-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--panel);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 10px rgba(15,23,42,0.05);
    padding: 10px 0 8px;
    z-index: 99;
  }

  .mobile-nav .nav-item {
    text-align: center;
    flex: 1;
    text-decoration: none;
    color: var(--ink);
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
  }

  .mobile-nav .nav-item .icon {
    font-size: 1.25rem;
  }

  .mobile-nav .nav-item:hover {
    color: var(--brand);
  }

  .mobile-nav .nav-item.disabled {
    color: #94a3b8;
    pointer-events: none;
  }

  .mobile-nav .nav-item.logout {
    color: #ef4444;
  }
}

/* ====== ANIMATIONS ====== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
