/* =========================================
   GLOBAL STYLES - Authentication & Common
========================================= */

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

/* Body & Layout */
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background-color: #f4f6f9;
  color: #333;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* Form Styling */
/* Default application forms */
form {
  width: 100%;
}

/* Authentication forms only */
.auth-form {
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  max-width: 400px;
  margin: 40px auto;
  border: 1px solid #ddd;
}

/* Application-wide form wrapper: allows large forms to expand */
.form-wrapper {
  width: 100%;
  max-width: none;
  margin: 0 auto;
}

.form-wrapper form {
  width: 100%;
}

.form-wrapper input,
.form-wrapper select,
.form-wrapper textarea {
  width: 100%;
}

/* Form Inputs */
input[type="email"],
input[type="password"],
input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  margin-bottom: 15px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"],
.auth-form input[type="number"],
.auth-form select,
.auth-form textarea,
.form-wrapper input[type="email"],
.form-wrapper input[type="password"],
.form-wrapper input[type="text"],
.form-wrapper input[type="number"],
.form-wrapper select,
.form-wrapper textarea {
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #0077cc;
  outline: none;
  box-shadow: 0 0 3px #0077cc;
}

/* Buttons */
button {
  background-color: #0077cc;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #005fa3;
}

/* Headings */
h2, h3 {
  color: #333;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

h2 {
  text-align: center;
}

/* Links */
a {
  color: #0077cc;
  text-decoration: none;
  transition: text-decoration 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

/* Messages */
.error, p.error {
  color: red;
  font-weight: bold;
  padding: 12px;
  margin: 15px 0;
  border-radius: 5px;
  background-color: #fce4e4;
  border: 1px solid #d32f2f;
}

.success, .success-message {
  color: green;
  font-weight: bold;
  padding: 12px;
  margin: 15px 0;
  border-radius: 5px;
  background-color: #e0f5e0;
  border: 1px solid #3cba54;
}

.error-message {
  color: red;
  font-weight: bold;
}

/* Modal Overlay & Box */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal {
  background: white;
  padding: 20px;
  border-radius: 8px;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  font-family: sans-serif;
}

.modal h3 {
  margin-top: 0;
  color: #0077cc;
}

.modal button {
  background: #0077cc;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
}

.modal button:hover {
  background: #005fa3;
}

/* Responsive */
@media (max-width: 600px) {
  body {
    padding: 10px;
  }

  /* Restrict only auth forms on small screens */
  .auth-form {
    padding: 15px;
    max-width: 100%;
    margin: 20px auto;
  }

  input[type="email"],
  input[type="password"],
  input[type="text"],
  select {
    padding: 8px;
  }
}

@media (max-width: 768px) {
  .auth-form {
    max-width: 100%;
  }
}
