/* NOVADECI | Profile Update */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #edf2ee;
  --bg-dark: #04142c;

  --card-bg: rgba(255, 255, 255, 0.94);
  --card-bg-dark: rgba(20, 34, 56, 0.96);

  --card-border: rgba(207, 216, 226, 0.85);
  --card-border-dark: rgba(97, 121, 154, 0.26);

  --text: #273142;
  --text-dark: #f3f7fc;

  --muted: #8e98a9;
  --muted-dark: #93a3ba;

  --line: #d8e0e7;
  --line-dark: #465875;

  --primary: #49b657;
  --primary-dark: #2f9944;

  --accent: #2fe4b5;
  --accent-dark: #19d9d9;

  --input-bg: #ffffff;
  --input-bg-dark: #1d2e4a;

  --input-border: #d9e2da;
  --input-border-dark: #35506d;

  --box-bg: #f7f8fa;
  --box-bg-dark: #1a2b47;

  --info-bg: #f1fbf1;
  --info-bg-dark: #183130;

  --info-border: #55c86f;
  --info-border-dark: #1fe0c4;

  --shadow: 0 18px 48px rgba(32, 45, 62, 0.12);
  --shadow-dark: 0 22px 58px rgba(0, 0, 0, 0.48);

  --modal-overlay: rgba(99, 109, 122, 0.62);
  --modal-overlay-dark: rgba(1, 7, 17, 0.76);
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 14px;
  transition: background 0.25s ease, color 0.25s ease;
}

body.dark {
  background: var(--bg-dark);
  color: var(--text-dark);
}

.card {
  width: 100%;
  max-width: 520px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 28px 20px 18px;
  position: relative;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

body.dark .card {
  background: var(--card-bg-dark);
  border-color: var(--card-border-dark);
  box-shadow: var(--shadow-dark);
}

.logo-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.logo-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.logo-img {
  height: 65px;   /* from 46px ? bigger */
  width: auto;
  display: block;
}

.theme-btns {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 2px;
  background: rgba(233, 236, 240, 0.82);
  border: 1px solid rgba(212, 218, 225, 0.95);
  border-radius: 999px;
  padding: 2px;
  box-shadow: 0 6px 16px rgba(31, 41, 55, 0.08);
}

body.dark .theme-btns {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.05);
}

.theme-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: all 0.2s ease;
}

.theme-btn.active {
  background: #ffffff;
  color: #334155;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

body.dark .theme-btn {
  color: #97a8c0;
}

body.dark .theme-btn.active {
  background: #10213f;
  color: #ffd45a;
  box-shadow: none;
}

.title {
  text-align: center;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
  margin: 6px 0 18px;
  color: inherit;
}

.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #d8dee6;
  color: #667085;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

body.dark .step-num {
  background: #0c1b35;
  color: #b5c0d1;
}

.step.active .step-num,
.step.done .step-num {
  background: var(--primary);
  color: #fff;
}

.step-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

body.dark .step-label {
  color: var(--muted-dark);
}

.step.active .step-label,
.step.done .step-label {
  color: inherit;
}

.step-line {
  width: 56px;
  height: 2px;
  background: var(--line);
  border-radius: 999px;
}

body.dark .step-line {
  background: var(--line-dark);
}

.step-line.done {
  background: var(--primary);
}

.info-box {
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  border-radius: 14px;
  padding: 14px 14px;
  font-size: 12px;
  line-height: 1.65;
  color: inherit;
  margin-bottom: 18px;
  font-family: "IBM Plex Mono", monospace;
}

body.dark .info-box {
  background: var(--info-bg-dark);
  border-color: var(--info-border-dark);
}

.section-label,
.section-title,
.signin-box h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 10px;
  color: inherit;
}

.search-wrap,
.field-wrap {
  position: relative;
}

.search-wrap input,
.field-wrap input,
.form-group input {
  width: 100%;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: inherit;
  outline: none;
  font-size: 13px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.dark .search-wrap input,
body.dark .field-wrap input,
body.dark .form-group input {
  border-color: var(--input-border-dark);
  background: var(--input-bg-dark);
  color: var(--text-dark);
}

.search-wrap input {
  padding: 0 42px 0 38px;
}

.field-wrap input,
.form-group input {
  padding: 0 38px 0 12px;
}

.search-wrap input:focus,
.field-wrap input:focus,
.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(73, 182, 87, 0.14);
}

.icon-search {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-1000);
  display: flex;
  align-items: center;
  justify-content: center;
}

body.dark .icon-search {
  color: var(--muted-dark);
}

.btn-clear,
.btn-field-clear {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 8px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: none;
}

.btn-clear.visible,
.btn-field-clear.visible {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.dark .btn-clear,
body.dark .btn-field-clear {
  color: var(--muted-dark);
}

.results-box {
  margin-top: 10px;
  min-height: 126px;
  border-radius: 14px;
  border: 1px solid var(--input-border);
  background: var(--box-bg);
  padding: 18px;
}

body.dark .results-box {
  border-color: var(--input-border-dark);
  background: var(--box-bg-dark);
}

.results-placeholder {
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  line-height: 1.85;
  font-style: italic;
}

body.dark .results-placeholder {
  color: var(--muted-dark);
}

.result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
}

body.dark .result-item {
  border-color: var(--input-border-dark);
  background: rgba(255, 255, 255, 0.03);
}

.result-item:last-child {
  margin-bottom: 0;
}

.result-info .rname {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-dark);
}

body.dark .result-info .rname {
  color: #69e0b0;
}

.result-info .meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

body.dark .result-info .meta {
  color: var(--muted-dark);
}

.btn-signin-inline {
  height: 36px;
  border: none;
  border-radius: 10px;
  padding: 0 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.signin-box,
.profile-form,
.success-box {
  margin-top: 4px;
}

.form-group,
.form-field {
  margin-bottom: 14px;
}

.form-group label,
.form-field label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: inherit;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.badge-req {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(73, 182, 87, 0.12);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

.error-msg,
.save-error {
  background: #fff1f1;
  color: #c62828;
  border: 1px solid #efb8b8;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  margin-top: 8px;
  margin-bottom: 10px;
}

body.dark .error-msg,
body.dark .save-error {
  background: rgba(198, 40, 40, 0.12);
  color: #ff9a9a;
  border-color: rgba(255, 154, 154, 0.25);
}

.signin-actions,
.profile-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  /* Eto ang importante para hindi siya lumutang sa desktop */
  position: relative;
  background: transparent;
  width: 100%;
}

.btn-back,
.btn-back2,
.btn-primary,
.btn-save,
.btn-ok,
.btn-agree {
  height: 40px;
  border: none;
  border-radius: 10px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.btn-back,
.btn-back2 {
  background: #e9edf3;
  color: #334155;
}

body.dark .btn-back,
body.dark .btn-back2 {
  background: #223452;
  color: #dbe7f7;
}

.btn-primary,
.btn-save,
.btn-ok,
.btn-agree {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 10px 22px rgba(73, 182, 87, 0.2);
}

.btn-primary,
.btn-save {
  flex: 1;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--modal-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 999;
}

body.dark .modal-overlay {
  background: var(--modal-overlay-dark);
}

.modal {
  width: 100%;
  max-width: 410px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid #d7dde5;
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  font-weight: 600;
  color: #2b3444;
}

.modal-body {
  padding: 16px 20px 8px;
}

.modal-body p {
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.55;
  color: #5a6473;
  font-family: "IBM Plex Mono", monospace;
}

.modal-body p strong {
  color: #394454;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid #e6ebf0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.modal-footer span {
  font-size: 12px;
  color: #6b7280;
  font-family: "IBM Plex Mono", monospace;
}

.success-box {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  padding: 20px;
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  border-radius: 14px;
  margin-bottom: 14px;
}

body.dark .success-box {
  background: var(--info-bg-dark);
  border-color: var(--info-border-dark);
}

input::placeholder {
  color: #9aa5b1;
}

body.dark input::placeholder {
  color: #7e90aa;
}

@media (max-width: 560px) {
  body {
    padding: 10px;
    align-items: flex-start;
  }

  .card {
    padding-bottom: 18px !important;
    margin-bottom: 0 !important;
    min-height: 100vh;
  }

  .logo-row {
    align-items: flex-start;
  }

  .logo-img {
    width: 180px;
  }

  .title {
    font-size: 17px;
  }

  .steps {
    gap: 6px;
  }

  .step-line {
    width: 24px;
  }

  .step-label {
    font-size: 11px;
  }

  .row-2 {
    grid-template-columns: 1fr;
  }

  .signin-actions,
  .profile-actions {
    position: static;
    bottom: auto;
    margin: 16px 0 0;
    padding: 8px 0 0;
    background: transparent;
    border-top: none;
    box-shadow: none;
    z-index: 2;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  
  body.dark .signin-actions,
  body.dark .profile-actions {
    background: transparent;
    border-top: none;
    box-shadow: none;
  }

  .btn-back,
  .btn-back2,
  .btn-primary,
  .btn-save,
  .btn-ok,
  .btn-agree {
    width: 100%;
    min-height: 40px;
    height: 40px;
    font-size: 13px;
  }

  .btn-primary,
  .btn-save {
    flex: none;
  }

  .modal {
    max-width: 100%;
  }
}
