/* common.css - Darveys Application Common Styles */

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

body {
  font-family: Arial, sans-serif;
  background: #f4f4f4;
  color: #333;
  line-height: 1.6;
}

/* Container Styles */
.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dashboard-container {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.login-container {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
  margin-bottom: 20px;
}

/* Header Styles */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

/* Navigation Styles */
.navigation {
  margin-bottom: 20px;
}

.nav-link {
  display: inline-block;
  padding: 8px 15px;
  margin-right: 10px;
  background: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.nav-link:hover {
  background: #0056b3;
  text-decoration: none;
  color: white;
}

/* Form Styles */
.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #555;
}

input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Button Styles */
button,
.btn {
  background: #007bff;
  color: white;
  padding: 12px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: background-color 0.3s ease;
}

button:hover,
.btn:hover {
  background: #0056b3;
  color: white;
  text-decoration: none;
}

.search-btn {
  background: #007bff;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

.search-btn:hover {
  background: #0056b3;
}

.edit-btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

.edit-btn:hover {
  background: #218838;
}

.logout {
  background: #dc3545;
}

.logout:hover {
  background: #c82333;
}

/* Message Styles */
.message {
  padding: 10px;
  margin-bottom: 20px;
  border-radius: 4px;
  border: 1px solid transparent;
}

.success {
  background: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}

.error {
  background: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}

.warning {
  background: #fff3cd;
  color: #856404;
  border-color: #ffeaa7;
}

/* Table Styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: white;
}

th,
td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
  vertical-align: top;
}

th {
  background-color: #f8f9fa;
  font-weight: bold;
  color: #555;
}

tr:hover {
  background-color: #f5f5f5;
}

/* Special Elements */
.captcha-container {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 5px;
  border: 1px solid #ddd;
  margin-bottom: 15px;
}

.captcha-question {
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 10px;
  color: #333;
}

.refresh-captcha {
  background: #6c757d;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  margin-top: 5px;
  display: block;
  width: fit-content;
  white-space: nowrap;
}

.refresh-captcha:hover {
  background: #545b62;
}

.user-details {
  margin-top: 20px;
  font-size: 12px;
  color: #666;
  background: #f8f9fa;
  padding: 15px;
  border-radius: 5px;
  border-left: 4px solid #007bff;
  width: 100%;
  max-width: 400px;
}

.search-form {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #dee2e6;
}

.current-search {
  background: #fff3cd;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 15px;
  border-left: 4px solid #ffc107;
}

/* Edit Form Styles */
.edit-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.edit-input {
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  width: 120px;
}

.edit-select {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.edit-container {
  margin-top: 8px;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 4px;
  border: 1px dashed #dee2e6;
}

/* Value Display Styles */
.null-value {
  color: #dc3545;
  font-style: italic;
  background: #fff3cd;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  font-size: 12px;
}

.field-value {
  padding: 4px 8px;
  background: #e9ecef;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 5px;
  font-weight: 500;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mb-0 {
  margin-bottom: 0;
}

.mt-20 {
  margin-top: 20px;
}

.no-data {
  text-align: center;
  padding: 20px;
  color: #6c757d;
  background: #f8f9fa;
  border-radius: 4px;
  margin-top: 20px;
}

/* Login Page Specific */
.login-body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  padding: 20px;
  flex-direction: column;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container,
  .dashboard-container,
  .login-container {
    padding: 20px;
    margin: 10px;
  }

  .header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .nav-link {
    display: block;
    margin-bottom: 5px;
    margin-right: 0;
  }

  table {
    font-size: 14px;
  }

  th,
  td {
    padding: 8px 10px;
  }

  .edit-form {
    flex-direction: column;
    align-items: stretch;
  }

  .edit-input {
    width: 100%;
  }
}
