/* ===========================================================
   GoGoDashboard — Landing & Auth Interface Stylesheet
   -----------------------------------------------------------
   File: landing.css
   Loaded on: index.html, signup.html, reset-password.html

   Purpose:
     - Defines layout and design for login/signup screens
     - Includes split-screen image layout
     - Handles input groups, buttons, password toggle,
       and responsive adjustments for mobile

   Sections:
     1. Global Variables + Base Styles
     2. Layout (Container, Image, Form)
     3. Form Box + Typography
     4. Input Fields + States
     5. Buttons (Primary, Secondary, Ghost, Link)
     6. Password + Helper UI (Toggle, Hints, Feedback)
     7. Third-Party Login (Google)
     8. Animations + Transitions
     9. Responsive (≤860px)
   =========================================================== */


/* ===========================================================
   === SECTION 1: Global Variables + Base Styles
   =========================================================== */

/* -----------------------------------------------------------
   Root Variables
   ----------------------------------------------------------- */
:root {
  --accent: #2563eb;
  --bg: #f9fafb;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #6b7280;
  --shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  --radius: 16px;
}

/* -----------------------------------------------------------
   Base Reset
   ----------------------------------------------------------- */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  color: var(--ink);
  background: var(--bg);
}


/* ===========================================================
   === SECTION 2: Layout (Container, Image, Form)
   =========================================================== */

/* -----------------------------------------------------------
   Container + Split-Screen Layout
   ----------------------------------------------------------- */
.container {
  display: flex;
  min-height: 100vh;
}

/* Left-side background image */
.image-side {
  flex: 1;
  background: url('../images/landing.png') center center/cover no-repeat;
}

/* Right-side form container */
.form-side {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  padding: 40px;
}


/* ===========================================================
   === SECTION 3: Form Box + Typography
   =========================================================== */

/* -----------------------------------------------------------
   Centered form card
   ----------------------------------------------------------- */
.form-box {
  background: var(--panel);
  padding: 40px 36px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 360px;
  width: 100%;
  text-align: center;
}

/* Title and accent color span */
.form-box h1 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 28px;
}

.form-box span {
  color: var(--accent);
}

#formTitle {
  color: var(--muted);
  margin-bottom: 24px;
}


/* ===========================================================
   === SECTION 4: Input Fields + States
   =========================================================== */

/* -----------------------------------------------------------
   Input base styling
   ----------------------------------------------------------- */
.input-group {
  margin-bottom: 14px;
}

input[type=text],
input[type=password],
input[type=email] {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 15px;
}

/* Focus state highlight */
input:focus {
  outline: 3px solid rgba(37, 99, 235, 0.25);
  border-color: var(--accent);
}

/* Inline feedback area for validation or messages */
.message {
  margin-top: 0.8rem;
  font-size: 0.95rem;
  text-align: center;
  color: #dc2626; /* red default */
  min-height: 1.2em; /* avoids layout shift */
}


/* ===========================================================
   === SECTION 5: Buttons (Primary, Secondary, Ghost, Link)
   =========================================================== */

/* -----------------------------------------------------------
   Unified Button Styles
   ----------------------------------------------------------- */
.btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  margin-bottom: 10px;
  transition: background 0.2s, transform 0.1s;
}

.btn:hover {
  transform: translateY(-1px);
}

/* Primary action button (blue) */
.btn.primary {
  background: var(--accent);
  color: #fff;
}

.btn.primary:hover {
  background: #1d4ed8;
}

/* Neutral ghost button */
.btn.ghost {
  background: #f3f4f6;
  color: var(--ink);
}

/* Text-only link button */
.btn.link {
  background: transparent;
  color: var(--accent);
  text-decoration: underline;
}

/* -----------------------------------------------------------
   Button Group Layout
   ----------------------------------------------------------- */
.button-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}

/* Alternate secondary and ghost styles */
.btn.primary {
  background-color: #2563eb;
  color: white;
}

.btn.primary:hover {
  background-color: #1e40af;
}

.btn.secondary {
  background-color: #10b981;
  color: white;
}

.btn.secondary:hover {
  background-color: #059669;
}

.btn.ghost {
  background-color: #f3f4f6;
  color: #111827;
}

.btn.ghost:hover {
  background-color: #e5e7eb;
}


/* ===========================================================
   === SECTION 6: Password + Helper UI (Toggle, Hints, Feedback)
   =========================================================== */

/* -----------------------------------------------------------
   Stacked labels inside fields
   ----------------------------------------------------------- */
.input-group.stacked {
  position: relative;
}

.input-group.stacked label {
  position: absolute;
  top: 6px;
  left: 12px;
  font-size: 12px;
  color: #9ca3af;
  background: #fff;
  padding: 0 4px;
  pointer-events: none;
  z-index: 3;
}

.input-group.stacked input {
  padding-top: 28px; /* room for the label */
}

/* -----------------------------------------------------------
   Autofill correction (Chrome/Edge)
   ----------------------------------------------------------- */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  transition: background-color 9999s ease-in-out 0s !important;
  -webkit-text-fill-color: var(--ink) !important;
  background-color: #fff !important;
  box-shadow: 0 0 0px 1000px #fff inset !important;
}

input:focus {
  background-color: #fff !important;
}

/* -----------------------------------------------------------
   Password toggle button inside input
   ----------------------------------------------------------- */
.password-group input#password {
  padding-right: 2.75rem; /* reserve space for eye icon */
}

.password-group .pw-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: #6b7280;
  cursor: pointer;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 6; /* above input */
  pointer-events: all; /* ensure clicks register */
  padding: 0;
}

.password-group .pw-toggle:hover {
  color: #374151;
}

.password-group .pw-toggle svg {
  display: block;
}

/* -----------------------------------------------------------
   Password strength / helper list
   ----------------------------------------------------------- */
.pw-help {
  margin: 8px 0 0;
  padding-left: 0;
  list-style: none;
  font-size: 0.92rem;
  color: #6b7280;
  text-align: left;
}

.pw-help li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}

.pw-help li.ok {
  color: #059669; /* green */
}

.pw-help li.bad {
  color: #dc2626; /* red */
}

.pw-help li svg {
  width: 16px;
  height: 16px;
}

/* -----------------------------------------------------------
   Input feedback messages with icons
   ----------------------------------------------------------- */
.input-feedback {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  text-align: left;
  margin-top: 6px;
  min-height: 1.2em;
}

.input-feedback svg {
  width: 16px;
  height: 16px;
}

.input-feedback.ok {
  color: #059669; /* green */
}

.input-feedback.bad {
  color: #dc2626; /* red */
}


/* ===========================================================
   === SECTION 7: Third-Party Login (Google)
   =========================================================== */

/* -----------------------------------------------------------
   Google Sign-In Button
   ----------------------------------------------------------- */
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 1px solid #dadce0;
  border-radius: 6px;
  background: #fff;
  padding: 12px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: box-shadow 0.2s;
  margin-top: 10px;
}

.google-btn:hover {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.google-btn img {
  width: 20px;
  height: 20px;
}


/* ===========================================================
   === SECTION 8: Animations + Transitions
   =========================================================== */

/* -----------------------------------------------------------
   Smooth fade-in for main app content
   ----------------------------------------------------------- */
.fade-in {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ===========================================================
   === SECTION 9: Responsive (≤860px)
   =========================================================== */

@media(max-width:860px) {
  .container {
    flex-direction: column;
  }

  .image-side {
    height: 40vh;
  }

  .form-side {
    height: 60vh;
  }
}


/* ===========================================================
   End of landing.css
   -----------------------------------------------------------
   Notes:
   - Maintain alignment with dashboard.css structure.
   - Avoid inline color overrides — use CSS variables.
   - Keep responsive breakpoints consistent across pages.
   =========================================================== */
