/**
 * Portal-wide icon buttons (toolbar, cards, dialogs, forms).
 * Works with portal-ui.js auto-enhancement and explicit mt-* / portal-btn classes.
 */

.portal-skip-enhance,
.dashboard-menu-trigger,
.dashboard-menu-item,
.bp-contact-action,
input[type="checkbox"],
input[type="radio"] {
  /* excluded from auto-enhance */
}

button.portal-btn-enhanced,
a.portal-btn-enhanced,
button.mt-toolbar-btn,
.mt-toolbar-btn,
button.mt-card-act,
a.mt-card-act,
.mt-card-act,
button.mt-dialog-act,
.mt-dialog-act,
button.mt-row-act,
.mt-row-act,
.map-tools button,
.form-actions button,
.gi-actions button,
.mt-gi-actions button,
.modal-buttons button,
.ev-form-actions button,
.ev-form-actions a.mt-card-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: auto;
  max-width: none;
  box-sizing: border-box;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

button.portal-btn-enhanced,
a.portal-btn-enhanced {
  padding: 0.45rem 0.9rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  color: #475569;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
}

button.portal-btn-enhanced:hover,
a.portal-btn-enhanced:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

button.portal-btn-enhanced i,
a.portal-btn-enhanced i {
  font-size: 1.05rem;
  line-height: 1;
}

button.portal-btn-enhanced span,
a.portal-btn-enhanced span {
  white-space: nowrap;
}

button.portal-btn-enhanced.portal-btn--primary,
button.portal-btn-enhanced[type="submit"]:not(.portal-btn--secondary):not(.portal-btn--neutral) {
  border: none;
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #60a5fa 100%);
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}

button.portal-btn-enhanced.portal-btn--primary i,
button.portal-btn-enhanced[type="submit"]:not(.portal-btn--secondary) i {
  color: #fff;
}

button.portal-btn-enhanced.secondary,
button.portal-btn-enhanced.portal-btn--secondary,
button.portal-btn-enhanced.btn-secondary {
  border: none;
  color: #fff;
  background: linear-gradient(135deg, #64748b 0%, #94a3b8 100%);
}

button.portal-btn-enhanced.portal-btn--search {
  border: none;
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #60a5fa 100%);
}

button.portal-btn-enhanced.portal-btn--search i { color: #fff; }

.mt-toolbar-btn {
  border: none;
  border-radius: 10px;
  color: #fff;
  padding: 0.45rem 0.9rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.mt-toolbar-btn--search,
.mt-toolbar-btn--apply,
.mt-toolbar-btn--submit,
.mt-toolbar-btn--schedule {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #60a5fa 100%);
}

.mt-toolbar-btn--reset {
  background: linear-gradient(135deg, #64748b 0%, #94a3b8 100%);
}

.mt-toolbar-btn--export {
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
}

.mt-toolbar-btn--copy {
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
}

.mt-card-act {
  flex-direction: column;
  min-width: 4.25rem;
  max-width: 7.5rem;
  padding: 0.45rem 0.5rem;
  font-size: 0.68rem;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  color: #475569;
}

.mt-card-act i { font-size: 1.2rem; }

.mt-card-act--view i { color: #2563eb; }
.mt-card-act--plan i { color: #0d9488; }
.mt-card-act--complete i { color: #16a34a; }

.mt-dialog-act {
  padding: 0.5rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  color: #475569;
}

.mt-dialog-act--save i { color: #2563eb; }
.mt-dialog-act--complete i { color: #16a34a; }
.mt-dialog-act--close i { color: #64748b; }

.modal-buttons {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.modal .modal-buttons button {
  width: auto;
}

.dashboard-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: calc(100% - 16px);
  margin: 2px 8px;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 600;
  color: #12314f;
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
}

.dashboard-menu-item i {
  font-size: 1rem;
  width: 1.1rem;
  text-align: center;
  color: #2563eb;
}

.dashboard-menu-item--logout-secondary i {
  color: #64748b;
}

.dashboard-menu-item:hover {
  background: #eff6ff;
}

.login-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.login-page__card {
  max-width: 460px;
}

.login-form-actions {
  display: flex;
  margin-top: 0.25rem;
}

.login-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #60a5fa 100%);
  box-shadow: 0 2px 10px rgba(29, 78, 216, 0.28);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.login-submit-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.login-submit-btn i {
  font-size: 1.1rem;
}

.login-help-links {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.login-help-link {
  display: inline-flex;
  flex: 1 1 8.5rem;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-help-link i {
  font-size: 1.05rem;
  line-height: 1;
}

.login-help-link span {
  white-space: nowrap;
}

.login-help-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.login-help-link--signup i {
  color: #0d9488;
}

.login-help-link--signup:hover {
  border-color: #5eead4;
  background: #f0fdfa;
}

.login-help-link--reset i {
  color: #7c3aed;
}

.login-help-link--reset:hover {
  border-color: #c4b5fd;
  background: #f5f3ff;
}

/* First-login password tip */
.portal-pwd-tip-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 23, 42, 0.45);
}

.portal-pwd-tip {
  position: fixed;
  z-index: 201;
  max-width: min(320px, calc(100vw - 24px));
  padding: 1rem 1.1rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.2);
  border: 1px solid #bfdbfe;
}

.portal-pwd-tip__title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #1e3a8a;
}

.portal-pwd-tip__text {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.4;
}

.portal-pwd-tip__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.portal-pwd-tip-arrow {
  position: fixed;
  z-index: 201;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 12px solid #fff;
  filter: drop-shadow(0 -1px 1px rgba(15, 23, 42, 0.08));
}
