/* GOOGLE FONT */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

/* VARIABLES
(colors, sizes, shadows used everywhere) */

:root {
  --background-color: #f6f9fb;
  --text-color: #14181d;
  --muted-color: #5b6470;

  --accent-color: #0811bd;
  --accent-dark: #15425c;
  --accent-tint: #e5e6f3;

  --white: #ffffff;
  --border-color: #e3e8ee;
  --border-color-strong: #d3dae3;

  --title-size: 44px;
  --button-text-size: 14px;

  --radius: 14px;

  --shadow: 0 8px 30px rgba(20, 24, 29, 0.06);
  --shadow-hover: 0 16px 40px rgba(20, 24, 29, 0.12);
  --shadow-sm: 0 2px 8px rgba(20, 24, 29, 0.05);

  --focus-ring: 0 0 0 3px var(--accent-tint);
}

/* UNIVERSAL RESET */

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

/*  HTML & BODY */

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--background-color);
  color: var(--text-color);
}

/* LAYOUT
   (page width wrapper, used on every page)
*/

.container {
  width: min(1100px, 80%);
  margin: auto;
}

/* TYPOGRAPHY
  (used on every page) */

h1 {
  font-size: var(--title-size);
  margin-bottom: 12px;
}

h2 {
  font-size: 32px;
}

h3 {
  font-size: 20px;
}

p {
  color: var(--muted-color);
  line-height: 1.5;
}

/* 
   BUTTONS
   (.btn is used on every page)
 */

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

  gap: 6px;

  padding: 12px 20px;

  border: none;
  border-radius: var(--radius);

  background: var(--accent-color);
  color: var(--white);

  cursor: pointer;

  font-size: var(--button-text-size);

  transition: 0.3s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* CARDS (.card is used on every page) */

.card {
  background: var(--white);

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

  padding: 20px;

  box-shadow: var(--shadow-sm);

  transition: 0.3s;
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

/* FORM INPUTS (used on Book-Service, Workshop, and Auth) */

input,
select,
textarea {
  width: 100%;

  padding: 10px;

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

  border-radius: var(--radius);

  outline: none;

  margin-top: 8px;

  font-family: inherit;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--border-color-strong);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-color);
  box-shadow: var(--focus-ring);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-color);
  opacity: 0.75;
}

/*  NAVIGATION (used on Dashboard, Book-Service, Workshop, AnalyticReport) */

nav {
  height: 70px;

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

.logo {
  display: flex;
  align-items: center;
  gap: 8px;

  color: var(--accent-color);

  font-size: 24px;

  font-weight: 700;
}

.nav-links {
  display: flex;

  list-style: none;

  gap: 30px;
}

.nav-links a {
  position: relative;

  display: flex;
  align-items: center;
  gap: 6px;

  text-decoration: none;

  color: var(--muted-color);

  font-weight: 500;

  transition: 0.3s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: 0.3s;
}

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

.nav-links a:hover::after {
  width: 100%;
}

/* PAGE HEADER (used on Dashboard, Book-Service, Workshop, AnalyticReport) */

.page-header {
  margin: 40px 0 25px;
}

.page-header p {
  margin-top: 8px;
}

/* TABLE (used on Dashboard and Workshop) */

table {
  width: 100%;

  border-collapse: collapse;

  margin-top: 20px;

  background: var(--white);
}

th,
td {
  padding: 14px;

  text-align: left;

  border-bottom: 1px solid var(--border-color);
}

th {
  background: var(--accent-tint);
  color: var(--accent-dark);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 13px;
}

/*  DASHBOARD PAGE (Dashboard.html only: stat cards + recent jobs table) */

.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.stats .card:nth-child(1) {
  background: #d2d5f6;
}

.stats .card:nth-child(2) {
  background: #fff3cd;
}

.stats .card:nth-child(3) {
  background: #d6efff;
}

.stats .card:nth-child(4) {
  background: #d1f5dd;
}

.stats .card:nth-child(5) {
  background: #ececec;
}

.stats .card h3 {
  color: var(--muted-color);
  font-size: 14px;
  text-transform: uppercase;
}

.card h2 {
  margin-top: 15px;

  color: var(--accent-color);
}

/* BOOK SERVICE PAGE (Book-Service.html only: the repair job form) */

form {
  display: flex;

  flex-direction: column;

  gap: 25px;

  margin-bottom: 50px;
}

label {
  display: block;

  margin: 15px 0 8px;

  font-weight: 500;
}

textarea {
  resize: vertical;

  min-height: 100px;
}

/* WORKSHOP PAGE (Workshop.html only: job queue, filters, status pills, actions) */

.workshop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.workshop-header .btn {
  width: auto;
}

.workshop-tools {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.tool-group label {
  margin-bottom: 8px;
}

.tool-group input,
.tool-group select {
  margin-top: 0;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.table-header h2 {
  font-size: 24px;
}

#jobCounter {
  padding: 8px 15px;
  border-radius: 30px;
  background: var(--accent-tint);
  color: var(--accent-color);
  font-size: 14px;
  font-weight: 600;
}

tbody tr:hover {
  background: #f8faff;
}

.status {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
}
.status i {
  margin-right: 4px;
}

.status.pending {
  background: #fff3cd;
  color: #8a6d00;
}

.status.progress {
  background: #d6efff;
  color: #0b5ed7;
}

.status.completed {
  background: #d1f5dd;
  color: #198754;
}

.status.collected {
  background: #ececec;
  color: #9c4dcc;
}

.action-buttons {
  display: flex;
  gap: 8px;
}

.action-buttons button {
  width: auto;
  padding: 8px 12px;
}

/* ANALYTIC REPORT PAGE (AnalyticReport.html only: reuses .stats/.card from Dashboard section above,
   this is only for the chart container placeholder)*/

.chart-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.chart-label {
  width: 160px;
  font-size: 14px;
  color: var(--text-color);
}

.chart-bar-bg {
  flex: 1;
  background: var(--accent-tint);
  border-radius: 30px;
  height: 10px;
  overflow: hidden;
}

.chart-bar {
  height: 100%;
  background: var(--accent-color);
  border-radius: 30px;
  transition: 0.3s;
}

.chart-count {
  width: 30px;
  text-align: right;
  font-size: 14px;
  color: var(--muted-color);
}

/* AUTHENTICATION PAGE (index.html only: login and signup forms) */

.auth-layout {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
 background-image:linear-gradient( rgba(0, 0, 0, 0.30), rgba(0, 0, 0, 0.25)),url("https://images.unsplash.com/photo-1727893119356-1702fe921cf9?w=600&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Nnx8Y2FyJTIwcmVwYWlyJTIwc2hvcHxlbnwwfHwwfHx8MA%3D%3D");
background-repeat: no-repeat;
background-size: cover;
background-position: center;
background-attachment: fixed;
}

.auth-container {
  width: 100%;

  max-width: 400px;

  background: var(--white);

  padding: 28px 30px;

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

  border-radius: var(--radius);

  box-shadow: var(--shadow);

}

.auth-logo {
  text-align: center;

  color: var(--accent-color);

  font-size: 26px;

  font-weight: 700;

  margin-bottom: 18px;
}

.auth-container h1 {
  text-align: center;

  font-size: 26px;

  margin: 0 0 6px;
}

.auth-subtitle {
  text-align: center;

  color: var(--muted-color);

  font-size: 14px;

  margin: 0 0 18px;
}

.auth-container form {
  display: flex;

  flex-direction: column;

  gap: 0;

  margin: 0;
}

.auth-container label {
  display: block;

  margin: 10px 0 5px;

  font-size: 14px;

  font-weight: 500;

  color: var(--text-color);
}

.auth-container input {
  width: 100%;

  padding: 11px 12px;

  margin: 0;

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

  border-radius: 8px;

  background: var(--white);

  color: var(--text-color);

  font-size: 14px;
}

.auth-container input:focus {
  outline: none;

  border-color: var(--accent-color);

  box-shadow: var(--focus-ring);
}

.auth-container .btn {
  width: 100%;

  margin-top: 16px;
}

.auth-switch {
  text-align: center;

  margin: 15px 0 0;

  font-size: 14px;

  color: var(--muted-color);
}

.auth-switch a {
  color: var(--accent-color);

  font-weight: 600;

  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.auth-message {
  text-align: center;

  min-height: 18px;

  margin: 8px 0 0;

  font-size: 13px;
}

/*  UTILITY (used by Auth.js to show/hide login vs signup form) */

.hidden {
  display: none !important;
}

/* POP_UP Message Style ( Inside Repair.js & Workshop.js) */
.pop-up {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--white);
  border-left: 4px solid var(--accent-color);
  padding: 14px 18px;
  border-radius: 10px;
  box-shadow: var(--shadow-hover);
  max-width: 280px;
  z-index: 999;
}

.pop-up h4 {
  font-size: 14px;
  margin-bottom: 4px;
}

.pop-up p {
  font-size: 13px;
  margin: 0;
  color: var(--muted-color);
}
/*MOBILE Navigation (hamburger button - hidden on desktop, only shown on small screens) */

.toggle-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;

  width: 26px;
  height: 18px;
}

.toggle-btn .bar {
  height: 3px;
  width: 100%;
  background-color: var(--accent-color);
  border-radius: 10px;
}

/* RESPONSIVENESS FOR WHAT IS LEFT (tablets, small-mobiles, and everything in between) */

/* TABLETS */
@media (max-width: 1024px) {
  .container {
    width: 90%;
  }

  .stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .workshop-tools {
    grid-template-columns: 1fr 1fr;
  }
}

/* SMALL TABLETS / LARGE PHONES */
@media (max-width: 768px) {
  nav.container {
    flex-wrap: wrap;
    position: relative;
    height: auto;
    padding: 15px 0;
  }

  .toggle-btn {
    display: flex;
  }

  .nav-links {
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;

    max-height: 0;
    overflow: hidden;
    opacity: 0;

    transition:
      max-height 0.4s ease,
      opacity 0.4s ease;
  }

  .nav-links a {
    padding: 10px 0;
  }

  nav.container.active .nav-links {
    max-height: 300px;
    opacity: 1;
    margin-top: 10px;
  }

  /* turns the hamburger-Menu into an X when it is open */
  nav.container.active .toggle-btn .bar:nth-child(2) {
    opacity: 0;
  }

  nav.container.active .toggle-btn .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  nav.container.active .toggle-btn .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .workshop-tools {
    grid-template-columns: 1fr;
  }

  .workshop-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  /* Tables Layout  For Small Screens  */
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  h1 {
    font-size: 32px;
  }
}

/* SMALL Phones */
@media (max-width: 480px) {
  .stats {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 26px;
  }

  h2 {
    font-size: 24px;
  }
 .auth-layout {
    background-attachment: scroll;
  }
  .auth-container {
    padding: 20px;
  }

  .action-buttons {
    flex-direction: column;
  }
}
