/* assets/css/style.css */

/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  color: #333;
  background-color: #f4f4f4;
  margin: 0;
  padding: 0;
}

header {
  background-color: #004080;
  color: #fff;
  padding: 1rem 2rem;
}

header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1rem;
}

header nav ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}

header nav ul li a:hover {
  text-decoration: underline;
}

main {
  padding: 2rem;
  max-width: 1200px;
  margin: 1rem auto;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h2 {
  margin-top: 0;
  color: #004080;
}

.btn {
  display: inline-block;
  background-color: #004080;
  color: #fff;
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
}

.btn:hover {
  background-color: #003060;
}

/* Table Styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

table th,
table td {
  border: 1px solid #ddd;
  padding: 0.75rem;
  text-align: left;
}

table th {
  background-color: #f0f0f0;
}

table tr:nth-child(even) {
  background-color: #fafafa;
}

/* Form Styles */
form label {
  font-weight: bold;
}

form input[type="text"],
form input[type="date"],
form select,
form textarea {
  width: 100%;
  padding: 0.5rem;
  margin: 0.25rem 0 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

form button {
  background-color: #004080;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
}

form button:hover {
  background-color: #003060;
}

footer {
  text-align: center;
  padding: 1rem;
  background-color: #f0f0f0;
  margin-top: 2rem;
}
/* Two-column form layout */
form.asset-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2rem;            /* vertical gap 1rem, horizontal 2rem */
  align-items: start;
}

/* Each label+field pair */
form.asset-form .form-group {
  display: flex;
  flex-direction: column;
}

/* Make full-width groups span both columns and center their contents */
form.asset-form .form-group.full {
  grid-column: 1 / -1;
  display: flex;            /* ensure itâ€™s a flex container */
  flex-direction: column;   /* stack children vertically */
  align-items: center;      /* center children horizontally */
}

/* Prevent the button from stretching */
form.asset-form .form-group.full button {
  width: auto;              /* shrink to fit content */
  padding: 0.5rem 1rem;     /* adjust padding */
  max-width: 200px;         /* optional cap */
}
/* Layout container holds sidebar + main content */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar (your new â€œheaderâ€) */
.sidebar {
  flex: 0 0 200px;             /* fixed 200px wide */
  background-color: #004080;   /* dark blue */
  color: #fff;
  padding: 2rem 1rem;
  position: fixed;             /* stick to the left */
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  box-shadow: 2px 0 5px rgba(0,0,0,0.1);
  z-index: 100;
}

.sidebar h1 {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
  text-align: center;
}

.sidebar nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar nav ul li {
  margin-bottom: 1rem;
}

.sidebar nav ul li a {
  color: #fff;
  text-decoration: none;
  display: block;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 500;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li a.active {
  background-color: #003060;
}

/* Main content needs to shift right so it isnâ€™t covered by the sidebar */
.main-content {
  margin-left: 200px;
  padding: 2rem;
  flex: 1;
  background-color: #f4f4f4;
}

/* Make it mobile-friendly: sidebar becomes top nav */
@media (max-width: 767px) {
  .app-container {
    flex-direction: column;
  }
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    overflow-x: auto;
    padding: 1rem;
  }
  .sidebar h1 {
    flex: 0 0 auto;
    margin-right: 2rem;
  }
  .sidebar nav ul {
    display: flex;
    gap: 1rem;
  }
  .sidebar nav ul li {
    margin: 0;
  }
  .main-content {
    margin: 0;
    margin-top: 1rem;
  }
}
/* Settings page grid */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

/* Individual setting card */
.settings-card {
  background-color: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}

.settings-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.settings-card h3 {
  margin-bottom: 0.5rem;
  color: #004080;
}

.settings-card p {
  flex: 1;
  margin-bottom: 1rem;
  color: #555;
}

/* Ensure the Manage button sits at the bottom */
.settings-card .btn {
  align-self: flex-start;
}
/* Icon spacing in sidebar links */
.sidebar nav ul li a i {
  margin-right: 0.75rem;
  width: 1.25rem; /* align icons */
  text-align: center;
}
/* Force sidebar icons white */
.sidebar nav ul li a,
.sidebar nav ul li a i,
.sidebar nav ul li a .fas {
  color: #fff !important;
}
/* 1) Target <i> tags and their ::before pseudo-elements */
.sidebar nav ul li a i,
.sidebar nav ul li a i::before {
  color: #fff !important;
}

/* 2) Target inline SVG icons and their paths */
.sidebar nav ul li a svg,
.sidebar nav ul li a svg path {
  fill: #fff !important;
}

/* 3) In case of the new SVG injection class */
.sidebar nav ul li a .svg-inline--fa {
  color: #fff !important;
}
/* Form Inputs: include text, email, password, date */
form.asset-form input[type="text"],
form.asset-form input[type="email"],
form.asset-form input[type="password"],
form.asset-form input[type="date"],
form.asset-form select,
form.asset-form textarea {
  width: 100%;
  padding: 0.5rem;
  margin: 0.25rem 0 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
/* ===== Login Page Styles ===== */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #f4f4f4;
}

.login-box {
  background: #fff;
  padding: 2rem;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.login-box h2 {
  margin-bottom: 1.5rem;
  color: #004080;
}

.login-box .error {
  color: #c00;
  margin-bottom: 1rem;
}

.login-form label {
  display: block;
  text-align: left;
  margin-bottom: 0.25rem;
  font-weight: bold;
}

.login-form input {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.login-form button {
  width: 100%;
  padding: 0.75rem;
  background-color: #004080;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
}

.login-form button i {
  margin-right: 0.5rem;
}
/* Sidebar user block */
.sidebar .user-info {
  color: #fff;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar .user-info .logout {
  margin-left: auto;
  color: #fff;
}

.sidebar .user-info i {
  font-size: 1.2rem;
}
/* Global error style */
.error {
  color: red;
  font-weight: bold;
  margin-bottom: 1rem;
}
/* ---------------------------------- */
/* DASHBOARD: Modern Summary Cards    */
/* ---------------------------------- */
.dashboard-container .dashboard-cards {
  display: flex !important;
  gap: 1rem;
  margin-bottom: 2rem;
}
.dashboard-container .dashboard-cards > .dashboard-card {
  flex: 1 1 0;
  background: #fff;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform .3s, box-shadow .3s;
  position: relative;
  overflow: hidden;
}
.dashboard-container .dashboard-cards > .dashboard-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* Gradients by index */
.dashboard-container .dashboard-cards > .dashboard-card:nth-of-type(1) {
  background: linear-gradient(135deg, #6A11CB 0%, #2575FC 100%);
}
.dashboard-container .dashboard-cards > .dashboard-card:nth-of-type(2) {
  background: linear-gradient(135deg, #11998E 0%, #38EF7D 100%);
}
.dashboard-container .dashboard-cards > .dashboard-card:nth-of-type(3) {
  background: linear-gradient(135deg, #F7971E 0%, #FFD200 100%);
}

/* Icon circle */
.dashboard-container .dashboard-cards .icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  background: rgba(255,255,255,0.2);
  font-size: 1.5rem;
  color: #fff;
}

/* Counts & Labels */
.dashboard-container .dashboard-cards .value {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  color: #fff;
}
.dashboard-container .dashboard-cards .label {
  font-size: 0.9rem;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: .05em;
  color: rgba(255,255,255,0.9);
}

/* ---------------------------------- */
/* RECENT ASSETS TABLE                */
/* ---------------------------------- */
.recent-assets table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}
.recent-assets th,
.recent-assets td {
  padding: .75rem;
  border: 1px solid #e1e1e1;
}
.recent-assets th {
  background: #f9f9f9;
  color: #444;
}
.recent-assets tr:nth-child(even) {
  background: #fcfcfc;
}

/* ---------------------------------- */
/* CHARTS GRID                        */
/* ---------------------------------- */
.charts-grid {
  display: flex !important;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.charts-grid > .chart-card {
  flex: 1 1 calc(33.333% - 1rem);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  height: 260px;
}
.charts-grid > .chart-card h3 {
  margin: 0 0 .5rem;
  font-size: 1rem;
  text-align: center;
  color: #333;
}
.charts-grid > .chart-card canvas {
  flex: 1;
}

/* ---------------------------------- */
/* RESPONSIVE                          */
/* ---------------------------------- */
@media (max-width: 767px) {
  .dashboard-container .dashboard-cards {
    flex-direction: column;
  }
  .charts-grid {
    flex-direction: column;
  }
  .charts-grid > .chart-card {
    flex: 1 1 100%;
    height: 220px;
  }
}
/* assets/css/style.css */

/* ... (keep all existing styles from the top) ... */

/* Main content needs to shift right so it isnâ€™t covered by the sidebar */
.main-content {
  margin-left: 200px;
  padding: 2rem;
  flex: 1;
  background-color: #f4f4f4;
}

/* --- Hamburger Menu (New styles) --- */
.mobile-nav-toggle {
  display: none; /* Hidden on desktop */
  background: transparent;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001; /* Above sidebar content */
}

/* For screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* Make it mobile-friendly: sidebar becomes top nav */
@media (max-width: 767px) {
  .app-container {
    flex-direction: column;
  }
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    justify-content: space-between; /* Changed */
    align-items: center; /* New */
    overflow-x: visible; /* Changed */
    padding: 1rem;
  }
  .sidebar h1 {
    flex: 0 0 auto;
    margin-right: 2rem;
  }

  /* --- New mobile nav styles --- */
  .mobile-nav-toggle {
    display: block; /* Show the button */
  }

  .sidebar nav {
    /* Hide nav by default, show as overlay when active */
    display: none;
    position: absolute;
    top: 100%; /* Position below the header bar */
    left: 0;
    right: 0;
    background-color: #003a79; /* A slightly darker blue */
    z-index: 1000;
    padding: 1rem;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
  }

 /* ... (keep all existing styles from the top of the file) ... */

/* Main content needs to shift right so it isnâ€™t covered by the sidebar */
.main-content {
  margin-left: 200px;
  padding: 2rem;
  flex: 1;
  background-color: #f4f4f4;
}

/* --- Hamburger Menu (New styles) --- */
.mobile-nav-toggle {
  display: none; /* Hidden on desktop */
  background: transparent;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001;
}

/* For screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* Make it mobile-friendly: sidebar becomes top nav */
@media (max-width: 767px) {
  .app-container {
    flex-direction: column;
  }
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow-x: visible; /* Allow nav to show */
    padding: 1rem;
  }
  .sidebar h1 {
    flex: 0 0 auto;
    margin-right: 1rem;
    margin-bottom: 0; /* Override default margin */
  }

  /* --- Styles for the mobile navigation --- */
  .mobile-nav-toggle {
    display: block; /* Show the button on mobile */
  }

  .sidebar nav {
    display: none; /* Hide nav by default */
    position: absolute;
    top: 100%; /* Position below the header bar */
    left: 0;
    right: 0;
    background-color: #004080; /* Match sidebar color */
    z-index: 1000;
    padding: 1rem;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
  }

  /* This class is toggled by JavaScript to show the nav */
  .sidebar.nav-open nav {
    display: block;
  }

  .sidebar nav ul {
    display: flex;
    flex-direction: column; /* Stack nav items vertically */
    gap: 0;
  }
  .sidebar nav ul li {
    margin: 0;
    width: 100%;
  }

  .main-content {
    margin: 0;
  }
}
}
/* Mobile header */
.mobile-header {
  display: none;
  background: #004080;
  color: #fff;
  align-items: center;
  padding: 0.75rem 1rem;
}
.mobile-menu-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}
.mobile-title {
  margin-left: 1rem;
  font-size: 1.25rem;
  font-weight: 500;
}

/* Show mobile header, hide sidebar by default */
@media (max-width: 767px) {
  .mobile-header {
    display: flex;
  }
  .app-container {
    flex-direction: column;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 200px;
    height: 100%;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 200;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
    padding-top: 1rem;
  }
}
/* ===== FORCE ALL TABLE CELLS TO WRAP ===== */
table th,
table td {
    white-space: normal !important;
    word-wrap: break-word !important;
    word-break: break-word;
    max-width: 250px; /* adjust if needed */
}


/* ... (keep all other existing styles below this point) ... */