:root {
  --primary: #174b8a;
  --primary-dark: #0f3566;
  --primary-light: #2d72d6;
  --accent: #f0a51a;

  --text-dark: #172033;
  --text-muted: #667085;

  --border: #d8e0ec;
  --background: #f4f7fb;
  --white: #ffffff;

  --danger: #b42318;
  --danger-bg: #fef3f2;
  --danger-border: #fecdca;

  --success: #067647;
  --success-bg: #ecfdf3;
  --success-border: #abefc6;

  --shadow: 0 20px 55px rgba(15, 53, 102, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text-dark);
  background: var(--background);
}

a {
  color: var(--primary-light);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.auth-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background:
    radial-gradient(
      circle at top right,
      rgba(71, 146, 255, 0.42),
      transparent 35%
    ),
    linear-gradient(135deg, #0b294e 0%, #174b8a 48%, #246fd3 100%);
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px 36px;
}

.auth-wrapper {
  width: 100%;
  max-width: 520px;
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 24px;
  color: var(--white);
}

.brand-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 16px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand-text span {
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -0.2px;
}

.brand-text small {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
}

.auth-card {
  padding: 38px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.auth-card-header {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
  text-align: center;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 700;
  color: #28344a;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.forgot-link {
  font-size: 13px;
  font-weight: 650;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper input {
  width: 100%;
  height: 52px;
  padding: 0 48px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  color: var(--text-dark);
  font: inherit;
  font-size: 15px;
  background: #ffffff;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.input-wrapper input::placeholder {
  color: #98a2b3;
}

.input-wrapper input:focus {
  border-color: var(--primary-light);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(45, 114, 214, 0.13);
}

.input-icon {
  position: absolute;
  left: 16px;
  z-index: 1;
  display: flex;
  color: #7c8ca5;
  pointer-events: none;
}

.password-toggle {
  position: absolute;
  right: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #7c8ca5;
  background: transparent;
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--primary);
  background: #eef4fc;
}

.btn-login,
.btn-register {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 750;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.btn-login {
  width: 100%;
  margin-top: 4px;
  border: 0;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  box-shadow: 0 9px 20px rgba(23, 75, 138, 0.26);
  cursor: pointer;
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(23, 75, 138, 0.32);
}

.btn-login:active {
  transform: translateY(0);
}

.auth-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 27px 0 22px;
  color: #98a2b3;
  font-size: 13px;
}

.auth-divider::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 1px;
  background: #e4e9f1;
}

.auth-divider span {
  position: relative;
  z-index: 1;
  padding: 0 12px;
  background: var(--white);
}

.register-box {
  text-align: center;
}

.register-box p {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 14px;
}

.btn-register {
  width: 100%;
  border: 1px solid #b8c9df;
  color: var(--primary);
  background: #f8fbff;
}

.btn-register:hover {
  text-decoration: none;
  border-color: var(--primary-light);
  background: #eef5ff;
}

.alert {
  margin-bottom: 20px;
  padding: 13px 15px;
  border: 1px solid;
  border-radius: 11px;
  font-size: 14px;
  line-height: 1.5;
}

.alert-error {
  color: var(--danger);
  border-color: var(--danger-border);
  background: var(--danger-bg);
}

.alert-success {
  color: var(--success);
  border-color: var(--success-border);
  background: var(--success-bg);
}

.auth-information {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.information-item {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(8px);
}

.information-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--white);
  font-size: 14px;
}

.information-item span {
  font-size: 12px;
  line-height: 1.5;
}

.auth-footer {
  padding: 19px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.75);
  background: rgba(6, 24, 47, 0.34);
  backdrop-filter: blur(10px);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  font-size: 13px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.86);
}

@media (max-width: 640px) {
  .auth-main {
    align-items: flex-start;
    padding-top: 28px;
  }

  .auth-brand {
    justify-content: flex-start;
  }

  .brand-badge {
    width: 50px;
    height: 50px;
    border-radius: 13px;
  }

  .brand-text span {
    font-size: 18px;
  }

  .brand-text small {
    font-size: 12px;
  }

  .auth-card {
    padding: 27px 22px;
    border-radius: 18px;
  }

  .auth-card-header h1 {
    font-size: 27px;
  }

  .auth-information {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .auth-main {
    padding-inline: 14px;
  }

  .auth-card {
    padding: 24px 18px;
  }

  .label-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

.auth-brand-inside {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 0;
  color: var(--text-dark);
  text-align: center;
}

.ocs-logo {
  display: block;
  width: 110px;
  height: 110px;
  object-fit: contain;
  border-radius: 18px;
}

.auth-brand-inside .brand-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.auth-brand-inside .brand-text span {
  color: var(--text-dark);
  font-size: 22px;
  font-weight: 750;
  line-height: 1.25;
}

.auth-brand-inside .brand-text small {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.4;
}

.footer-inner-centered {
  justify-content: center;
  text-align: center;
}

.footer-copyright {
  display: flex;
  flex-direction: column;
  gap: 5px;
  line-height: 1.5;
}

.footer-developer {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

@media (max-width: 420px) {
  .ocs-logo {
    width: 90px;
    height: 90px;
  }

  .auth-brand-inside .brand-text span {
    font-size: 19px;
  }

  .auth-brand-inside .brand-text small {
    font-size: 12px;
  }
}

/* forgot-password */
.forgot-heading {
  margin-bottom: 26px;
  text-align: center;
}

.forgot-heading h1 {
  margin: 0 0 10px;
  color: var(--text-dark);
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.forgot-heading p {
  max-width: 390px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}

.back-login {
  margin-top: 22px;
  text-align: center;
}

.back-login a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 650;
}

.back-login a:hover {
  text-decoration: none;
  color: var(--primary-dark);
}

.footer-inner-centered {
  justify-content: center;
  text-align: center;
}

.footer-copyright {
  display: flex;
  flex-direction: column;
  gap: 5px;
  line-height: 1.5;
}

.footer-developer {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

@media (max-width: 420px) {
  .forgot-heading h1 {
    font-size: 24px;
  }

  .forgot-heading p {
    font-size: 13px;
  }
}
/* end forgot-password */

/* Register */
.register-main {
  padding-top: 40px;
  padding-bottom: 40px;
}

.register-wrapper {
  max-width: 860px;
}

.register-card {
  padding: 30px 42px 38px;
}

.register-intro {
  max-width: 620px;
  margin: -4px auto 30px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
  text-align: center;
}

.register-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.register-section {
  position: relative;
  margin: 0;
  padding: 0;
}

.register-section + .register-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e5eaf1;
}

.register-section h2 {
  margin: 0 0 14px;
  color: var(--text-dark);
  font-size: 17px;
  line-height: 1.4;
}

.register-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
  row-gap: 14px;
}

.register-grid .form-group {
  margin: 0;
  gap: 6px;
}

.register-full {
  grid-column: 1 / -1;
}

.register-form input,
.register-form select {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: none;
  color: var(--text-dark);
  font: inherit;
  background: var(--white);
}

.register-form input:focus,
.register-form select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(45, 114, 214, 0.13);
}

.required {
  color: var(--danger);
}

.form-help,
.form-hint {
  display: block;
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.role-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.role-option {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 13px;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.role-option:hover {
  border-color: var(--primary-light);
  background: #f7faff;
}

.role-option:has(input:checked) {
  border-color: var(--primary-light);
  background: #eef5ff;
  box-shadow: 0 0 0 3px rgba(45, 114, 214, 0.1);
}

.role-option input {
  flex: 0 0 auto;
  width: 18px;
  min-height: auto;
  height: 18px;
  margin-top: 2px;
}

.role-option-content {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.role-option-content strong {
  color: var(--text-dark);
  font-size: 14px;
}

.role-option-content small {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 95px;
}

.password-field .password-toggle {
  right: 8px;
  width: auto;
  padding: 0 10px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.autocomplete {
  position: relative;
}

.autocomplete-results {
  position: absolute;
  z-index: 50;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 15px 35px rgba(15, 53, 102, 0.17);
}

.autocomplete-item {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid #edf0f5;
  color: var(--text-dark);
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.autocomplete-item:hover {
  color: var(--primary);
  background: #f1f6fd;
}

.autocomplete-status {
  padding: 14px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.autocomplete-status.error,
.error-text {
  color: var(--danger);
}

.success-text {
  color: var(--success);
}

.validation-list {
  margin: 0;
  padding-left: 18px;
}

.register-submit {
  margin-top: 20px;
}

.autocomplete {
  position: relative;
  z-index: 30;
}

.autocomplete-results {
  z-index: 100;
}

.register-section {
  position: relative;
}

.form-group:has(.autocomplete) {
  margin-bottom: 0;
}

@media (max-width: 720px) {
  .register-wrapper {
    max-width: 540px;
  }

  .register-card {
    padding: 28px 23px;
  }

  .register-grid,
  .role-options {
    grid-template-columns: 1fr;
  }

  .register-full {
    grid-column: auto;
  }
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  width: 100%;
  padding-right: 52px;
}

.password-icon-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #718096;
  background: transparent;
  transform: translateY(-50%);
  cursor: pointer;
}

.password-icon-toggle:hover {
  color: var(--primary);
  background: #eef4fc;
}

.password-icon-toggle svg {
  display: block;
  pointer-events: none;
}

.password-icon-toggle svg[hidden] {
  display: none;
}

.register-form input.is-invalid,
.register-form select.is-invalid {
  border-color: var(--danger);
  background: #fffafa;
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.1);
}

.register-form input.is-invalid:focus,
.register-form select.is-invalid:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.14);
}

.field-error {
  display: none;
  margin-top: 4px;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.45;
}

.field-error:not(:empty) {
  display: block;
}

.form-group:has(.is-invalid) label {
  color: var(--danger);
}

.autocomplete {
  position: relative;
  width: 100%;
}

.autocomplete-results {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  z-index: 200;

  max-height: 280px;
  overflow-y: auto;
  overflow-x: hidden;

  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 53, 102, 0.18);
}

.autocomplete-results[hidden] {
  display: none;
}

.autocomplete-item {
  display: block;
  width: 100%;
  padding: 13px 16px;
  border: 0;
  border-bottom: 1px solid #e7ecf3;
  color: var(--text-dark);
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
  background: #ffffff;
  cursor: pointer;
}

.autocomplete-item:last-child {
  border-bottom: 0;
}

.autocomplete-item:hover,
.autocomplete-item:focus {
  outline: none;
  color: var(--primary);
  background: #eef5ff;
}

.autocomplete-status {
  padding: 14px 16px;
  color: var(--text-muted);
  font-size: 13px;
}

.autocomplete-status.error {
  color: var(--danger);
}

.form-group:focus-within {
  position: relative;
  z-index: 50;
}

.register-full {
  position: relative;
}

.register-section {
  position: relative;
}

.register-grid {
  position: relative;
}
/* End Register */

/* setup super admin */
.auth-form > .form-group > input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: none;
  color: var(--text-dark);
  font: inherit;
  background: var(--white);
}

.auth-form > .form-group > input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(45, 114, 214, 0.13);
}
/* endsetup super admin */

/* reset password */
.input-wrapper input.is-invalid {
  border-color: var(--danger);
  background: var(--danger-bg);
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.1);
}

.alert ul {
  margin: 8px 0 0;
  padding-left: 20px;
}
/* endsetup reset password */

/* navbar */
.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logout-form {
  display: inline;
  margin: 0;
}

.logout-button {
  display: inline;
  padding: 0;
  border: 0;
  color: var(--primary-light);
  font: inherit;
  background: transparent;
  cursor: pointer;
}

.logout-button:hover {
  text-decoration: underline;
}
/* navbar */
