/* 
==================================================
  Global Settings
==================================================
*/
html {
  box-sizing: border-box;
  font-family: Arial, sans-serif; /* or 'Roboto', 'Open Sans', etc. if available */
  font-size: 16px; /* Base font size for easy scaling */
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  padding: 0;
  background-color: #f7f7f7; /* Light grey background */
  color: #000; /* Black text by default */
}

/* Common brand colors */
:root {
  --brand-red: #cc0000;
  --brand-grey: #666666;
  --brand-black: #000000;
}

/* Responsive container for main content */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* 
==================================================
  Header & Navigation
==================================================
*/
header {
  background-color: var(--brand-black);
  padding: 1rem;
  color: #fff;
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
}

/* Navigation links (when user is logged in) */
header nav a {
  color: #fff; 
  text-decoration: none;
  margin-right: 1rem;
  font-weight: bold;
}

header nav a:hover {
  text-decoration: underline;
}

/*
==================================================
  General Typography
==================================================
*/
h2, h3 {
  color: var(--brand-red); /* Red headings for emphasis */
  margin-top: 1.5rem;
}

/*
==================================================
  Links
==================================================
*/
a {
  color: var(--brand-red);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/*
==================================================
  Forms
==================================================
*/
form {
  background-color: #fff;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 2rem;
}

form div {
  margin-bottom: 1rem;
}

label {
  font-weight: bold;
  margin-bottom: 0.5rem;
  display: inline-block;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
textarea,
select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

button[type="submit"],
button[name="login"],
button[name="checkout"],
button[name="checkin"],
button[name="save_item"],
button[name="update_item"],
button[name="create_user"],
button[name="add_category"] {
  background-color: var(--brand-red);
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
}

button:hover {
  background-color: #b30000; /* Slightly darker red */
}

/*
==================================================
  Tables
==================================================
*/
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

table thead {
  background-color: var(--brand-black);
  color: #fff;
}

table th, table td {
  padding: 0.75rem;
  border: 1px solid #ddd;
  text-align: left;
}

table tbody tr:nth-child(even) {
  background-color: #f0f0f0;
}

/*
==================================================
  Footer
==================================================
*/
footer {
  background-color: #eee;
  text-align: center;
  padding: 1rem;
  margin-top: 2rem;
  color: var(--brand-grey);
}

/*
==================================================
  Utility / Helper Classes
==================================================
*/
/* Example utility class for spacing / alignment */
.text-center {
  text-align: center;
}

/*
==================================================
  Responsive Media Queries
==================================================
*/

/* For screens up to 768px wide (tablets & mobiles) */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.25rem;
  }

  /* Make tables horizontally scrollable on smaller screens */
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  button {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}
