/* =========================================================
   FitSpend
   Shared Styles — Homepage + Dashboard
   ========================================================= */

/* =========================================================
   Expenses Project
   Shared Styles — Homepage + Dashboard
   ========================================================= */


/* =========================================================
   Variables
   ========================================================= */

:root {
  --bg: #f5f6fa;
  --card: #ffffff;

  --text: #172033;
  --muted: #7a8292;
  --muted-dark: #626b7c;

  --border: #e5e8ef;

  --primary: #6f63d9;
  --primary-dark: #5e52c7;
  --primary-light: #f0edff;
  --primary-lighter: #f7f5ff;

  --income: #27977e;
  --income-dark: #168f77;
  --income-bg: #edf8f5;

  --expense: #c23f61;
  --expense-bg: #fff0f4;

  --cash: #4f82d9;
  --cash-bg: #edf4ff;

  --total: #3a9b88;
  --total-bg: #edf8f5;

  --spending: #c23f61;
  --spending-bg: #fff2f5;

  --shadow:
    0 8px 28px rgba(24, 32, 52, 0.07);

  --shadow-soft:
    0 4px 18px rgba(24, 32, 52, 0.05);

  --shadow-large:
    0 18px 55px rgba(24, 32, 52, 0.10);

  --radius-lg: 22px;
  --radius-md: 17px;
  --radius-sm: 13px;
}


/* =========================================================
   Reset
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;

  background:
    linear-gradient(
      180deg,
      #f7f8fb 0%,
      #f2f3f7 100%
    );

  color: var(--text);

  font-family:
    Arial,
    Helvetica,
    sans-serif;

  -webkit-font-smoothing: antialiased;
}

/* Force all elements to inherit the system font */
*,
*::before,
*::after {
  font-family: inherit;
}

body,
button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline:
    3px solid rgba(111, 99, 217, 0.22);

  outline-offset: 2px;
}


/* =========================================================
   Shared Container
   ========================================================= */

.section-container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
  position: relative;
  z-index: 20;

  width: min(1480px, calc(100% - 36px));

  min-height: 86px;

  margin: 16px auto 0;

  padding: 14px 24px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background: rgba(255, 255, 255, 0.96);

  border:
    1px solid var(--border);

  border-radius: 24px;

  box-shadow: var(--shadow-soft);
}

.header-inner {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 24px;
}


/* =========================================================
   Brand
   ========================================================= */

.brand {
  display: flex;
  align-items: center;

  gap: 15px;

  color: var(--text);

  text-decoration: none;

  flex-shrink: 0;
}

.brand-icon {
  width: 56px;
  height: 56px;

  display: flex;
  align-items: flex-end;
  justify-content: center;

  gap: 5px;

  padding: 12px;

  border-radius: 17px;

  background:
    linear-gradient(
      145deg,
      #f0edff,
      #e7e2ff
    );
}

.brand-icon span {
  width: 7px;

  border-radius:
    5px 5px 2px 2px;

  background: var(--primary);
}

.brand-icon span:nth-child(1) {
  height: 18px;
}

.brand-icon span:nth-child(2) {
  height: 28px;
}

.brand-icon span:nth-child(3) {
  height: 37px;
}


/* Homepage brand */

.brand-content {
  display: flex;
  flex-direction: column;

  gap: 3px;

  min-width: 0;
}

.brand-name {
  font-size: 19px;
  font-weight: 850;

  letter-spacing: -0.4px;

  white-space: nowrap;
}

.brand-tagline {
  color: var(--muted);

  font-size: 12px;
  font-weight: 500;

  white-space: nowrap;
}


/* Existing Dashboard brand */

.brand-text {
  display: flex;
  flex-direction: column;

  gap: 3px;
}

.brand-text strong {
  font-size: 19px;
  font-weight: 850;

  letter-spacing: -0.4px;
}

.brand-text small {
  color: var(--muted);

  font-size: 12px;
  font-weight: 500;
}


/* =========================================================
   Homepage Navigation
   ========================================================= */

.header-nav {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 28px;

  margin-left: auto;
}

.header-nav a {
  color: #596276;

  font-size: 14px;
  font-weight: 700;

  text-decoration: none;

  transition:
    color 0.2s ease;
}

.header-nav a:hover {
  color: var(--primary);
}


/* =========================================================
   Homepage Account Button
   ========================================================= */

.header-actions {
  display: flex;
  align-items: center;

  flex-shrink: 0;
}

.account-button {
  min-height: 46px;

  padding: 0 20px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border:
    1px solid #e1e4ea;

  border-radius: 14px;

  background: #ffffff;

  color: var(--text);

  font-size: 14px;
  font-weight: 750;

  text-decoration: none;

  cursor: pointer;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.account-button:hover {
  background: #fafbfc;

  border-color: #d6dae2;

  transform: translateY(-1px);
}


/* =========================================================
   Existing Dashboard Logout
   ========================================================= */

.logout-btn {
  min-height: 48px;

  padding: 0 20px;

  border:
    1px solid #e1e4ea;

  border-radius: 14px;

  background: #ffffff;

  color: var(--text);

  font-size: 14px;
  font-weight: 750;

  cursor: pointer;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.logout-btn:hover {
  background: #fafbfc;

  border-color: #d6dae2;

  transform: translateY(-1px);
}


/* =========================================================
   Buttons
   ========================================================= */

.primary-button,
.secondary-button {
  min-height: 52px;

  padding: 0 25px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 14px;

  font-size: 15px;
  font-weight: 800;

  text-decoration: none;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.primary-button {
  background:
    linear-gradient(
      145deg,
      #7569df,
      #6256cf
    );

  color: #ffffff;

  box-shadow:
    0 8px 20px rgba(111, 99, 217, 0.20);
}

.primary-button:hover {
  transform: translateY(-2px);

  box-shadow:
    0 12px 25px rgba(111, 99, 217, 0.25);
}

.secondary-button {
  border:
    1px solid #dfe3eb;

  background: #ffffff;

  color: #4e586a;
}

.secondary-button:hover {
  background: #fafbfc;

  border-color: #d5d9e1;

  transform: translateY(-2px);
}


/* =========================================================
   Reduced Motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;

    transition-duration:
      0.01ms !important;

    animation-duration:
      0.01ms !important;

    animation-iteration-count:
      1 !important;
  }
}
