/* ===========================
   Base styles
   =========================== */
.fum-login-form {
  max-width: 350px;
  margin: 2em auto;
  padding: 1.5em;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafafa;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  font-family: Arial, sans-serif;
}

.fum-login-form h3 {
  margin-top: 0;
  margin-bottom: 1em;
  font-size: 1.4em;
  text-align: center;
  color: #333;
}

.fum-login-form label {
  font-weight: bold;
  display: block;
  margin-bottom: 0.3em;
  color: #444;
}

.fum-login-form input[type="text"],
.fum-login-form input[type="email"],
.fum-login-form input[type="password"] {
  width: 100%;
  padding: 0.6em;
  margin-bottom: 1em;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.95em;
  box-sizing: border-box;
}

.fum-login-form button {
  width: 100%;
  padding: 0.7em;
  background: #0073aa;
  border: none;
  border-radius: 4px;
  color: #fff;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.2s ease;
}
.fum-login-form button:hover { background: #005f8d; }

.fum-forgot-password { text-align: center; margin-top: 1em; }
.fum-forgot-password a { color: #0073aa; text-decoration: none; font-size: 0.9em; }
.fum-forgot-password a:hover { text-decoration: underline; }

.fum-logout-link {
  display: inline-block;
  padding: 0.5em 1em;
  background: #f44336;
  color: #fff !important;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s ease;
}
.fum-logout-link:hover { background: #d32f2f; }

/* Dashboard */
.fum-dashboard { max-width: 900px; margin: 2em auto; font-family: Arial, sans-serif; }
.fum-table {
  width: 100%; border-collapse: collapse; margin-top: 1em; background: #fff;
  border: 1px solid #ddd; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.fum-table th, .fum-table td { padding: 0.75em 1em; text-align: left; border-bottom: 1px solid #eee; font-size: 0.95em; }
.fum-table th { background: #f5f5f5; font-weight: bold; color: #333; }
.fum-table tr:hover td { background: #fafafa; }
.fum-table th:first-child, .fum-table td:first-child { text-align: center; width: 40px; }
.fum-table a { color: #0073aa; text-decoration: none; margin-right: 0.5em; }
.fum-table a:hover { text-decoration: underline; }

.fum-bulk-actions { margin-top: 1em; display: flex; gap: 0.5em; align-items: center; }
.fum-bulk-actions select, .fum-bulk-actions button { padding: 0.5em 0.8em; font-size: 0.9em; }
.fum-bulk-actions button { background: #0073aa; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.fum-bulk-actions button:hover { background: #005f8d; }

.fum-pagination { margin-top: 1.5em; text-align: center; }
.fum-pagination a {
  display: inline-block; margin: 0 0.25em; padding: 0.4em 0.7em;
  border: 1px solid #ddd; border-radius: 4px; text-decoration: none; color: #333; font-size: 0.9em;
}
.fum-pagination a.active, .fum-pagination a:hover { background: #0073aa; color: #fff; border-color: #0073aa; }

/* Add/Edit forms */
.fum-add-user, .fum-edit-user {
  max-width: 500px; margin: 2em auto; padding: 1.5em 2em;
  border: 1px solid #ddd; border-radius: 6px; background: #fafafa;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.fum-add-user h3, .fum-edit-user h3 {
  margin-top: 0; margin-bottom: 1em; font-size: 1.4em; text-align: center; color: #333;
}
.fum-add-user label, .fum-edit-user label { font-weight: bold; display: block; margin-bottom: 0.3em; color: #444; }
.fum-add-user input[type="text"], .fum-add-user input[type="email"], .fum-add-user input[type="password"],
.fum-edit-user input[type="text"], .fum-edit-user input[type="email"], .fum-edit-user input[type="password"] {
  width: 100%; padding: 0.6em; margin-bottom: 1em; border: 1px solid #ccc; border-radius: 4px; font-size: 0.95em; box-sizing: border-box;
}
.fum-add-user button, .fum-edit-user button {
  padding: 0.7em 1.2em; background: #0073aa; border: none; border-radius: 4px; color: #fff; font-size: 1em; cursor: pointer; transition: background 0.2s ease;
}
.fum-add-user button:hover, .fum-edit-user button:hover { background: #005f8d; }
.fum-add-user a, .fum-edit-user a { margin-left: 1em; color: #666; text-decoration: none; font-size: 0.9em; }
.fum-add-user a:hover, .fum-edit-user a:hover { text-decoration: underline; }

/* Icons spacing */
.fum-table i, .fum-login-form i, .fum-add-user i, .fum-edit-user i { margin-right: 0.4em; }

/* Messages stack */
#fum-messages {
  max-width: 600px; margin: 1em auto; display: flex; flex-direction: column; gap: 0.6em;
}
.fum-message {
  position: relative; padding: 0.8em 1em; border-radius: 6px; font-size: 0.95em;
  display: flex; align-items: center; gap: 0.5em; box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  opacity: 1; transition: opacity 0.8s ease;
}
.fum-message.fade-out { opacity: 0; }
.fum-success { background: #e6f7e6; border: 1px solid #b7e1b7; color: #2e7d32; }
.fum-error { background: #fdecea; border: 1px solid #f5c6cb; color: #c62828; }
.fum-message i { font-size: 1.2em; }
.fum-message .fum-close {
  position: absolute; top: 6px; right: 8px; background: transparent; border: none;
  font-size: 1.2em; color: inherit; cursor: pointer; line-height: 1;
}

/* Mobile controls */
.fum-mobile-controls { margin-bottom: 1em; }
.fum-toggle-controls {
  display: none; background: #0073aa; color: #fff; border: none; padding: 0.6em 1em;
  border-radius: 4px; font-size: 0.9em; cursor: pointer;
}
.fum-controls-panel { display: block; }

@media (max-width: 768px) {
  .fum-toggle-controls { display: inline-block; margin-bottom: 0.5em; }
  .fum-controls-panel { display: none; background: #f9f9f9; padding: 1em; border: 1px solid #ddd; border-radius: 6px; }
  .fum-controls-panel.active { display: block; }

  .fum-table, .fum-table thead, .fum-table tbody, .fum-table th, .fum-table td, .fum-table tr { display: block; width: 100%; }
  .fum-table thead { display: none; }
  .fum-table tr {
    margin-bottom: 1em; border: 1px solid #ddd; border-radius: 6px; padding: 0.5em; background: #fff;
  }
  .fum-table td { border: none; padding: 0.5em 0; position: relative; }
  .fum-table td::before { content: attr(data-label); font-weight: bold; display: block; margin-bottom: 0.2em; color: #444; }

  .fum-bulk-actions { flex-direction: column; align-items: stretch; }
  .fum-bulk-actions select, .fum-bulk-actions button { width: 100%; margin-bottom: 0.5em; }

  .fum-login-form, .fum-add-user, .fum-edit-user { width: 95%; padding: 1em; }
  .fum-login-form input, .fum-add-user input, .fum-edit-user input { font-size: 1em; }
  .fum-login-form button, .fum-add-user button, .fum-edit-user button { font-size: 1em; padding: 0.8em; }
}

@media (max-width: 480px) {
  .fum-login-form h3, .fum-add-user h3, .fum-edit-user h3 { font-size: 1.2em; }
  .fum-pagination a { padding: 0.3em 0.5em; font-size: 0.8em; }
}