/* Base layout */
body {
  margin: 0;
  font-family: 'Poppins', system-ui, sans-serif;
  background-color: #f1f3f5;
  color: #212529;
  line-height: 1.6;
}

.container {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

/* Headings */
h1, h2, h3 {
  color: #0d6efd;
  margin-bottom: 20px;
}

/* Forms */
form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

label {
  font-weight: bold;
  margin-top: 10px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="datetime-local"],
textarea,
select {
  padding: 10px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
}

textarea {
  resize: vertical;
}

input[type="checkbox"] {
  transform: scale(1.2);
  margin-right: 8px;
}

/* Buttons */
button, .btn {
  padding: 10px 20px;
  font-size: 1rem;
  background-color: #0d6efd;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
  width: fit-content;
}

button:hover, .btn:hover {
  background-color: #0b5ed7;
}

/* Navigation */
.navbar {
  display: flex;
  justify-content: space-between;
  background: #0d6efd;
  padding: 10px 20px;
  color: white;
}

.navbar a {
  color: white;
  text-decoration: none;
  margin-left: 20px;
  font-weight: bold;
}

.navbar a:hover {
  text-decoration: underline;
}

/* Messages & Alerts */
.alert {
  padding: 10px 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.alert-success {
  background-color: #d1e7dd;
  color: #0f5132;
}

.alert-error {
  background-color: #f8d7da;
  color: #842029;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

th, td {
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
  text-align: left;
}

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

/* Footer */
footer {
  text-align: center;
  color: #6c757d;
  font-size: 0.9rem;
  margin-top: 50px;
}
/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.dashboard-card {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  text-decoration: none;
  color: #212529;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease-in-out;
}

.dashboard-card:hover {
  background-color: #e7f1ff;
  transform: translateY(-3px);
}

.dashboard-card img {
  width: 48px;
  height: 48px;
  margin-bottom: 10px;
}

.dashboard-card span {
  display: block;
  font-weight: 600;
}

/* Logout card special style */
.dashboard-card.logout {
  background-color: #ffe8e8;
  border: 1px solid #f5c2c7;
  color: #842029;
}

.dashboard-card.logout:hover {
  background-color: #f8d7da;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px 10px;
  background-color: #f8f9fa;
  color: #6c757d;
  font-size: 0.9rem;
  margin-top: 50px;
  border-top: 1px solid #dee2e6;
}
/* Back Button */
.btn-back {
  display: inline-block;
  margin-bottom: 20px;
  padding: 8px 16px;
  background-color: #0d6efd;
  color: white;
  text-decoration: none;
  border-radius: 6px;
}

.btn-back:hover {
  background-color: #0b5ed7;
}

/* Search Input */
.search-input {
  padding: 10px;
  margin: 20px 0;
  width: 100%;
  border: 1px solid #ced4da;
  border-radius: 8px;
  font-size: 1rem;
}

/* Contact Card List */
.contacts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Individual Contact Card */
.contact-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f8f9fa;
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: background 0.2s;
}
.contact-details {
  display: flex;
  align-items: center;
  gap: 16px;
}
.contact-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #0d6efd;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
}
.edit-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  flex: 1;
}
.edit-form input[type="text"] {
  flex: 1;
  min-width: 140px;
}
.contact-actions .btn {
  background-color: #407BBF; /* Your brand blue */
  color: white;
  border: none;
  padding: 6px 12px;
  margin-right: 5px;
  font-size: 0.9em;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.contact-actions .btn:hover {
  background-color: #305f95; /* Darker blue on hover */
}

.contact-actions .btn.btn-secondary {
  background-color: #ccc; /* Light gray */
  color: #333;
}

.contact-actions .btn.btn-secondary:hover {
  background-color: #999; /* Darker gray */
}
.copy-btn {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}
.contact-card:hover {
  background-color: #e7f1ff;
}

.contact-info {
  display: flex;
  flex-direction: column;
}

.contact-info strong {
  font-size: 1.1rem;
}

.contact-info span {
  font-size: 0.95rem;
  color: #6c757d;
}
.contact-view strong {
  font-size: 1.1rem;
}

.contact-view span {
  color: #6c757d;
  display: block;
  margin-top: 4px;
}

/* Delete Button */
.delete-btn {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: #dc3545;
  cursor: pointer;
}

.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  max-width: 400px;
  margin: auto;
  text-align: center;
}

.btn-secondary {
  background-color: #6c757d;
}

.btn-secondary:hover {
  background-color: #5a6268;
}

.pagination {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: center;
}

.pagination a {
  padding: 8px 14px;
  background-color: #e9ecef;
  border-radius: 6px;
  text-decoration: none;
  color: #0d6efd;
  font-weight: bold;
  transition: background-color 0.2s;
}

.pagination a:hover {
  background-color: #dee2e6;
}

.pagination a.active {
  background-color: #0d6efd;
  color: white;
}
.contact-actions button {
  background: none;
  border: none;
  padding: 4px;
  margin: 0 5px;
  font-size: 1.2em;
  cursor: pointer;
  outline: none;
}

.contact-actions button:focus {
  outline: none;
  box-shadow: none;
}

.contact-actions button:active {
  background: none;
}
