* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body.auth-page {
  background-color: #f4f6f8;
  color: #1c252e;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  font-family: "Inter", sans-serif;
}

/* Main Container Layout */
.login-container {
  display: flex;
  width: 100%;
  max-width: 1100px;
  min-height: 650px;
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0px 8px 24px rgba(145, 158, 171, 0.12);
  overflow: hidden;
}

.brand-panel {
  flex: 1.1;
  background-color: #2b313a;
  color: #ffffff;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

/* Decorative background circle */
.brand-panel::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 90, 0, 0.15) 0%,
    rgba(255, 90, 0, 0) 70%
  );
  pointer-events: none;
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-box {
  width: 52px;
  height: 52px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo-svg {
  width: 100%;
  height: 100%;
}

.brand-title {
  font-size: 26px;
  font-weight: 800;
  color: #ff5a00;
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 12px;
  color: #919eab;
  font-weight: 500;
}

.hero-content {
  margin: 30px 0;
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  background-color: rgba(255, 90, 0, 0.15);
  color: #ff5a00;
  border: 1px solid rgba(255, 90, 0, 0.3);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 18px;
  letter-spacing: 0.3px;
}

.hero-content h2 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
}

.hero-content p {
  font-size: 14px;
  color: #919eab;
  line-height: 1.6;
}

/* Motto Card Matching Sidebar */
.motto-card {
  background: #21252c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
}

.motto-icon {
  font-size: 28px;
  color: #ff5a00;
  margin-bottom: 8px;
}

.motto-tag {
  font-size: 14px;
  font-weight: 700;
  color: #ff5a00;
  margin-bottom: 4px;
}

.motto-desc {
  font-size: 12px;
  color: #919eab;
  line-height: 1.4;
}

.brand-footer-text {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   Right Panel - Login Form Side
   ========================================================================== */
.form-panel {
  flex: 1;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #ffffff;
}

.form-wrapper {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

.form-header {
  margin-bottom: 32px;
}

.form-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: #1c252e;
  margin-bottom: 6px;
}

.form-header p {
  font-size: 13px;
  color: #637381;
}

/* Input Fields */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 13px;
  font-weight: 600;
  color: #1c252e;
}

.required {
  color: #ff4842;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: #919eab;
  font-size: 15px;
  pointer-events: none;
  transition: all 0.25s ease-in-out;
}

.input-wrapper input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  font-size: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  outline: none;
  background-color: #ffffff;
  color: #1c252e;
  transition: all 0.25s ease-in-out;
}

.input-wrapper input:focus {
  border-color: #ff5a00;
  box-shadow: 0 0 0 3px rgba(255, 90, 0, 0.12);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper input:focus ~ .input-icon {
  color: #ff5a00;
}

.toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #919eab;
  cursor: pointer;
  padding: 4px;
  font-size: 15px;
  transition: all 0.25s ease-in-out;
}

.toggle-password:hover {
  color: #1c252e;
}

/* Form Options: Remember Me & Forgot Password */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.checkbox-container {
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 24px;
  cursor: pointer;
  user-select: none;
  color: #637381;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  left: 0;
  height: 16px;
  width: 16px;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  transition: all 0.25s ease-in-out;
}

.checkbox-container:hover input ~ .checkmark {
  border-color: #ff5a00;
}

.checkbox-container input:checked ~ .checkmark {
  background-color: #ff5a00;
  border-color: #ff5a00;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.forgot-link {
  color: #ff5a00;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.25s ease-in-out;
}

.forgot-link:hover {
  text-decoration: underline;
  color: #e04e00;
}

/* Primary Button (scoped to the login/auth page only — see body.auth-page.
   Unscoped .btn-primary would otherwise leak into other pages' own
   .btn-primary buttons, e.g. add-employee.css) */
.auth-page .btn-primary {
  width: 100%;
  padding: 12px 20px;
  background-color: #ff5a00;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease-in-out;
  margin-top: 8px;
}

.auth-page .btn-primary:hover {
  background-color: #e04e00;
  box-shadow: 0 4px 12px rgba(255, 90, 0, 0.25);
}

.auth-page .btn-primary:active {
  transform: translateY(1px);
}

.portal-footer {
  margin-top: 32px;
  text-align: center;
  font-size: 12px;
  color: #637381;
}

.portal-footer strong {
  color: #ff5a00;
}

@media (max-width: 1150px) {
  .brand-panel,
  .form-panel {
    padding: 32px;
  }
}

@media (max-width: 900px) {
  .login-container {
    flex-direction: column;
    max-width: 480px;
    min-height: auto;
  }

  .brand-panel {
    padding: 32px;
  }

  .form-panel {
    padding: 32px;
  }

  .hero-content {
    margin: 20px 0;
  }
}

/* ==========================================================================
   Shared Header / Form / Modal Styles (moved here from menu.css)
   These are common across all dashboard views (header.php, coordinator
   modals, etc.) — not sidebar-specific, so they live here instead.
   ========================================================================== */

.form-control {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #dfe3e8;
  border-radius: 6px;
  outline: none;
  font-size: 14px;
  background: #ffffff;
  color: #1c252e;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.form-control:focus {
  border-color: #ff5a00;
  box-shadow: 0 0 0 3px rgba(255, 90, 0, 0.12);
}

.form-control.is-invalid {
  border-color: #dc3545;
}

.form-control.is-invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12);
}

.invalid-feedback {
  display: none;
  width: 100%;
  margin-top: 5px;
  font-size: 12px;
  color: #dc3545;
}

.form-control.is-invalid + .invalid-feedback {
  display: block;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
  z-index: 2000;

  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 450px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;

  animation: resetModalSlideIn 0.2s ease-out;
}

/* BootstrapValidator error messages */
.modal-content .help-block {
  color: #dc3545 !important;
  font-size: 12px;
  margin-top: 5px;
}

.modal-content .has-error .form-control {
  border-color: #dc3545;
}

.modal-content .has-error .form-control:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.12);
}

@keyframes resetModalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-15px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Modal Header */

.modal-content .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 20px 24px;

  border-bottom: 1px solid #e5e7eb;
}

.modal-content .modal-header h3 {
  margin: 0 0 4px 0;

  font-size: 18px;
  font-weight: 700;
  color: #1c252e;
}

.modal-content .modal-header p {
  margin: 0;

  font-size: 13px;
  color: #637381;
}

/* Close Button */

.modal-content .modal-close {
  width: 34px;
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border: 1px solid #dfe3e8;
  border-radius: 6px;

  background: #ffffff;

  color: #1c252e !important;

  cursor: pointer;

  font-size: 16px;

  line-height: 1;

  flex-shrink: 0;

  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.modal-content .modal-close i {
  color: #1c252e !important;
  font-size: 16px;
  line-height: 1;
}

.modal-content .modal-close:hover {
  background: #f3f4f6;
  border-color: #cfd4da;
  color: #ff5a00 !important;
}

.modal-content .modal-close:hover i {
  color: #ff5a00 !important;
}

/* Modal Form */

#profileResetPasswordForm {
  padding: 24px;
}

#profileResetPasswordForm .form-group {
  display: flex;
  flex-direction: column;

  gap: 7px;

  margin-bottom: 18px;
}

#profileResetPasswordForm .form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #1c252e;
}

/* Modal Inputs */

#profileResetPasswordForm .form-group input {
  width: 100%;

  padding: 11px 13px;

  font-size: 14px;

  border: 1px solid #e5e7eb;
  border-radius: 6px;

  outline: none;

  background: #ffffff;
  color: #1c252e;

  transition: all 0.2s ease;
}

#profileResetPasswordForm .form-group input:focus {
  border-color: #ff5a00;

  box-shadow: 0 0 0 3px rgba(255, 90, 0, 0.12);
}

/* Change Password Button */

#profileResetSubmit {
  width: 100%;

  padding: 12px 20px;

  margin-top: 4px;

  background: #ff5a00;
  color: #ffffff;

  border: none;
  border-radius: 6px;

  font-size: 14px;
  font-weight: 600;

  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 8px;

  transition: all 0.2s ease;
}

#profileResetSubmit:hover {
  background: #e04e00;

  box-shadow: 0 4px 12px rgba(255, 90, 0, 0.25);
}

#profileResetSubmit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  box-shadow: none;
}

/* Mobile */

@media (max-width: 500px) {
  .reset-password-modal {
    width: calc(100% - 30px);
    max-width: none;
  }

  .modal-content .modal-header {
    padding: 18px 20px;
  }

  #profileResetPasswordForm {
    padding: 20px;
  }
}

/* ==========================================================================
   Global Base Reset + Shared Header (moved here from dashboard.css)
   Used by every dashboard-layout view via includes/layout.php (.main-content)
   and includes/header.php (.top-header and everything inside it) — not
   dashboard-page-specific, so they live here instead.
   ========================================================================== */

body {
  display: flex;
  overflow-x: hidden;
  margin: 0;
  background-color: #f3f5f8;
  color: #1e293b;
  font-family: "Inter", sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}
a {
  text-decoration: none;
  color: inherit;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: #f3f5f8;
  min-height: 100vh;
}

/* ==========================================================
   GLOBAL FOOTER
   Used by all dashboard-layout pages
========================================================== */

.dashboard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  background-color: #ffffff;
  border-top: 1px solid #e2e8f0;
  font-size: 13px;
  color: #64748b;
  margin-top: auto;
}

.company-highlight {
  color: #f95700;
  font-weight: 700;
}

/* ==========================================================
   GLOBAL FOOTER - RESPONSIVE
========================================================== */

@media (max-width: 768px) {
  .dashboard-footer {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

.top-header {
  background-color: #ffffff;
  padding: 16px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-titles h1 {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}
.header-titles .subtitle {
  font-size: 13px;
  color: #f95700;
  font-weight: 600;
  margin-top: 3px;
}

.header-search {
  position: relative;
  width: 100%;
  max-width: 440px;
  min-width: 180px;
  flex: 1 1 auto;
}
.header-search input {
  width: 100%;
  padding: 10px 45px 10px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 30px;
  background-color: #ffffff;
  outline: none;
  font-size: 13.5px;
  color: #1e293b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: border-color 0.2s;
}
.header-search input:focus {
  border-color: #f95700;
}
.header-search .search-icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 14px;
  pointer-events: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}
.notification-bell {
  position: relative;
  font-size: 20px;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.notification-bell .badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background-color: #f95700;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 10px;
  line-height: 1;
}

.user-profile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.avatar {
  width: 40px;
  height: 40px;
  background-color: #cbd5e1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-size: 18px;
}
.user-info {
  display: flex;
  flex-direction: column;
}
.user-name {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}
.user-role {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}
.profile-arrow {
  font-size: 11px;
  color: #94a3b8;
}

/* ==========================================================================
   Profile Dropdown (header.php) — global, shared across every view
   ========================================================================== */

.user-profile {
  position: relative;
}

.profile-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  display: none;
  flex-direction: column;
  z-index: 1000;
  margin-top: 8px;
}

.profile-dropdown.show {
  display: flex;
}

.profile-dropdown a {
  padding: 12px 16px;
  font-size: 13px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background-color 0.2s;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.profile-dropdown a:hover {
  background-color: #f1f5f9;
}

.profile-dropdown a i {
  font-size: 14px;
  color: #64748b;
}

.profile-dropdown-divider {
  height: 1px;
  background-color: #e2e8f0;
  margin: 4px 0;
}

.logout-option {
  color: #ef4444 !important;
}

.logout-option:hover {
  background-color: #fef2f2 !important;
}

/* ==========================================================
   GLOBAL MODAL SIZES
========================================================== */

.modal-content {
  width: 90%;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
  position: relative;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

/* Small Modal */

.modal-sm {
  max-width: 400px;
}

/* Medium Modal */

.modal-md {
  max-width: 550px;
}

/* Large Modal */

.modal-lg {
  max-width: 700px;
}

/* Extra Large Modal */

.modal-xl {
  max-width: 900px;
}

/* ==========================================================
   GLOBAL MODAL RESPONSIVE
========================================================== */

@media (max-width: 768px) {
  .modal-content {
    width: 94%;
    max-width: 94%;
    max-height: calc(100vh - 30px);
  }
}

@media (max-width: 480px) {
  .modal-content {
    width: calc(100% - 24px);
    max-width: none;
    border-radius: 10px;
  }
}

/* ==========================================================
   GLOBAL HEADER RESPONSIVE
   Used by includes/header.php on every dashboard page
========================================================== */

@media (max-width: 1366px) {
  .top-header {
    padding: 16px 20px;
  }

  .header-search {
    max-width: 320px;
  }
}

@media (max-width: 1100px) {
  .top-header {
    gap: 16px;
  }

  .header-titles {
    flex-shrink: 0;
  }

  .header-search {
    max-width: 280px;
  }

  .header-actions {
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .top-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;

    /*
      Keep space for the hamburger/sidebar toggle.
      This is the same behavior currently working
      on the dashboard.
    */
    padding: 16px 20px 16px 60px;
  }

  .header-titles {
    width: 100%;
  }

  .header-search {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 500px) {
  .top-header {
    padding: 14px 15px 14px 55px;
    gap: 12px;
  }

  .header-titles h1 {
    font-size: 17px;
  }

  .header-titles .subtitle {
    font-size: 12px;
  }

  .header-search input {
    padding: 9px 40px 9px 15px;
    font-size: 13px;
  }

  .header-actions {
    gap: 14px;
  }

  .user-info {
    display: none;
  }

  .profile-arrow {
    display: none;
  }
}
