@import url("./uci-fonts.css");
@import url("./material-symbols.css");
@import url("./theme.css");

html.dark body {
  background-color: #020A0A;
  color: #eae7d4;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

body {
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

.btn-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #eae7d4 100%);
}

.hairline-border {
  border: 0.5px solid rgba(234, 231, 212, 0.25);
}

.hairline-border:focus-within {
  border-color: #eae7d4;
}

.gold-glow {
  box-shadow: 0 0 32px rgba(234, 231, 212, 0.08);
}

.auth-grid-bg {
  background-image: linear-gradient(rgba(234, 231, 212, 0.03) 0.5px, transparent 0.5px),
    linear-gradient(90deg, rgba(234, 231, 212, 0.03) 0.5px, transparent 0.5px);
  background-size: 40px 40px;
}

input.uci-input,
select.uci-input,
textarea.uci-input {
  width: 100%;
  background-color: transparent !important;
  background-image: none;
  border: none !important;
  box-shadow: none !important;
  padding: 0;
  color: #eae7d4 !important;
  font-size: 1rem;
  line-height: 1.5;
  --tw-ring-shadow: 0 0 #0000 !important;
  --tw-ring-offset-shadow: 0 0 #0000 !important;
}

input.uci-input:focus,
select.uci-input:focus,
textarea.uci-input:focus {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
  ring: 0;
}

input.uci-input::placeholder,
textarea.uci-input::placeholder {
  color: rgba(234, 231, 212, 0.45) !important;
  opacity: 1;
}

input.uci-input:-webkit-autofill,
input.uci-input:-webkit-autofill:hover,
input.uci-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #020A0A inset !important;
  -webkit-text-fill-color: #eae7d4 !important;
  caret-color: #eae7d4;
  transition: background-color 5000s ease-in-out 0s;
}

select.uci-input {
  appearance: none;
  cursor: pointer;
  background-color: transparent !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23eae7d4'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0 center !important;
  background-size: 1.25rem !important;
  padding-right: 1.75rem;
}

select.uci-input option {
  background-color: #020A0A;
  color: #eae7d4;
}

.uci-field {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background-color: #020A0A;
  border: 0.5px solid rgba(234, 231, 212, 0.28);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: #eae7d4;
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.uci-field::placeholder {
  color: rgba(234, 231, 212, 0.45);
  opacity: 1;
}

.uci-field:focus {
  outline: none;
  border-color: rgba(234, 231, 212, 0.65);
  box-shadow: 0 0 20px rgba(234, 231, 212, 0.08);
}

.uci-select-field {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background-color: #020A0A;
  border: 0.5px solid rgba(234, 231, 212, 0.28);
  border-radius: 0.5rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.uci-select-field:focus-within {
  border-color: rgba(234, 231, 212, 0.65);
  box-shadow: 0 0 20px rgba(234, 231, 212, 0.08);
}

.uci-select-field select {
  appearance: none;
  display: block;
  width: 100%;
  border: none;
  background-color: transparent;
  color: #eae7d4;
  font-size: 1rem;
  line-height: 1.5;
  padding: 0.75rem 2.25rem 0.75rem 1rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23eae7d4'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1.25rem;
}

.uci-select-field select:focus {
  outline: none;
}

.uci-select-field select:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.uci-select-field select option {
  background-color: #020A0A;
  color: #eae7d4;
}

.uci-field:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.uci-field-password {
  padding: 0;
  overflow: hidden;
}

.uci-field-password .uci-input-password {
  padding: 0.75rem 2.75rem 0.75rem 1rem;
}

.uci-select-field-inline {
  border: none;
  background-color: transparent;
  box-shadow: none;
}

.uci-select-field-inline:focus-within {
  border: none;
  box-shadow: none;
}

.uci-select-field-inline select {
  padding-left: 0;
  padding-right: 2rem;
}

html.dark .uci-field {
  background-color: #020A0A !important;
  color: #eae7d4 !important;
  border-color: rgba(234, 231, 212, 0.28) !important;
  -webkit-text-fill-color: #eae7d4;
}

html.dark .uci-field::placeholder {
  color: rgba(234, 231, 212, 0.45) !important;
}

html.dark .uci-field:focus {
  border-color: rgba(234, 231, 212, 0.65) !important;
  box-shadow: 0 0 20px rgba(234, 231, 212, 0.08);
}

html.dark .uci-field-password {
  background-color: #020A0A !important;
}

html.dark .uci-field-password .uci-input-password {
  color: #eae7d4 !important;
  -webkit-text-fill-color: #eae7d4;
}

html.dark .uci-select-field {
  background-color: #020A0A !important;
  border-color: rgba(234, 231, 212, 0.28) !important;
}

html.dark .uci-select-field select {
  color: #eae7d4 !important;
}

.uci-quota-card {
  border: 0.5px solid rgba(234, 231, 212, 0.28);
  border-radius: 0.75rem;
  background: #020A0A;
  padding: 1rem 1.25rem;
}

.uci-quota-card.is-exceeded {
  border-color: rgba(255, 180, 171, 0.35);
  background: rgba(255, 180, 171, 0.06);
}

.uci-quota-meter {
  width: 100%;
  height: 0.35rem;
  border-radius: 9999px;
  background: rgba(234, 231, 212, 0.2);
  overflow: hidden;
}

.uci-quota-meter-fill {
  height: 100%;
  border-radius: inherit;
  background: #eae7d4;
  transition: width 0.25s ease;
}

.uci-quota-card.is-exceeded .uci-quota-meter-fill {
  background: #ffb4ab;
}

.uci-plan-settings-card {
  border: 0.5px solid rgba(234, 231, 212, 0.28);
  border-radius: 0.75rem;
  background: #020A0A;
  padding: 1rem;
}

.uci-plan-settings-input {
  width: 5.5rem;
  text-align: center;
}

input[type="checkbox"] {
  background-color: #020A0A !important;
  border-color: rgba(234, 231, 212, 0.6) !important;
  color: #eae7d4 !important;
}

input[type="date"].uci-input {
  color-scheme: dark;
}

.uci-password-field {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}

input.uci-input-password {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding-right: 2.75rem;
}

.uci-password-toggle {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: #eae7d4;
  cursor: pointer;
  border-radius: 9999px;
  flex-shrink: 0;
  z-index: 2;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.uci-password-toggle:hover {
  color: #eae7d4;
  background-color: rgba(234, 231, 212, 0.08);
}

.uci-password-toggle .material-symbols-outlined {
  font-size: 1.25rem;
  line-height: 1;
  display: block;
}

@media (max-width: 640px) {
  input.uci-input-password {
    padding-right: 3rem;
  }

  .uci-password-toggle {
    width: 2.75rem;
    height: 2.75rem;
    right: -0.125rem;
  }
}

.uci-admin-tab {
  color: #eae7d4;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.75rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.uci-admin-tab.uci-admin-tab-active {
  color: #eae7d4;
  border-bottom-color: #eae7d4;
}

.uci-badge-active {
  background: rgba(234, 231, 212, 0.12);
  color: #eae7d4;
  border: 1px solid rgba(234, 231, 212, 0.35);
}

.uci-badge-expired {
  background: rgba(255, 180, 171, 0.08);
  color: #ffb4ab;
  border: 1px solid rgba(255, 180, 171, 0.25);
}

.uci-register-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 4.5rem;
  opacity: 0.45;
  transition: opacity 0.2s ease;
}

.uci-register-step .material-symbols-outlined {
  font-size: 1.5rem;
}

.uci-register-step-label {
  font-size: 0.625rem;
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.uci-step-active {
  opacity: 1;
  color: #eae7d4;
}

.uci-step-done {
  opacity: 0.85;
  color: #eae7d4;
}

.uci-step-pending {
  opacity: 0.4;
  color: #eae7d4;
}

.uci-plan-card {
  position: relative;
  text-align: left;
  padding: 1.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(234, 231, 212, 0.25);
  background: #020A0A;
  cursor: pointer;
  opacity: 0.72;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, opacity 0.2s ease, background 0.2s ease;
}

.uci-plan-card:hover {
  border-color: rgba(234, 231, 212, 0.35);
  opacity: 0.9;
  transform: translateY(-2px);
}

.uci-plan-card.uci-plan-selected {
  opacity: 1;
  border-width: 2px;
  border-color: #eae7d4;
  background: linear-gradient(160deg, rgba(234, 231, 212, 0.14) 0%, #020A0A 55%);
  box-shadow: 0 0 32px rgba(234, 231, 212, 0.22), inset 0 0 0 1px rgba(234, 231, 212, 0.12);
  transform: translateY(-3px) scale(1.02);
}

.uci-plan-card.uci-plan-selected:hover {
  transform: translateY(-3px) scale(1.02);
}

.uci-plan-selected-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  background: rgba(234, 231, 212, 0.14);
  border: 1px solid rgba(234, 231, 212, 0.45);
  color: #eae7d4;
  font-size: 0.625rem;
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.uci-plan-selected-badge .material-symbols-outlined {
  font-size: 0.95rem;
}

.uci-plan-badge {
  position: absolute;
  top: -0.65rem;
  right: 1rem;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #ffffff 0%, #eae7d4 100%);
  color: #020A0A;
  font-size: 0.625rem;
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.uci-billing-cycle-panel {
  max-width: 28rem;
  margin: 0 auto 2.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: 0.75rem;
  border: 0.5px solid rgba(234, 231, 212, 0.25);
  background: #020A0A;
}

.uci-billing-cycle-label {
  display: block;
  margin-bottom: 0.85rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #eae7d4;
  text-align: center;
}

.uci-billing-cycle-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.uci-billing-cycle-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 1rem 1rem 0.85rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(234, 231, 212, 0.3);
  background: #020A0A;
  color: #eae7d4;
  cursor: pointer;
  opacity: 0.72;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, transform 0.15s ease;
}

.uci-billing-cycle-option:hover {
  border-color: rgba(234, 231, 212, 0.35);
  color: #eae7d4;
  opacity: 0.9;
}

.uci-billing-cycle-option.uci-billing-cycle-active {
  opacity: 1;
  border-width: 2px;
  border-color: #eae7d4;
  background: linear-gradient(160deg, rgba(234, 231, 212, 0.16) 0%, #020A0A 60%);
  color: #eae7d4;
  box-shadow: 0 0 28px rgba(234, 231, 212, 0.2), inset 0 0 0 1px rgba(234, 231, 212, 0.1);
  transform: translateY(-2px) scale(1.02);
}

.uci-billing-cycle-selected-badge {
  display: none;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  background: rgba(234, 231, 212, 0.14);
  border: 1px solid rgba(234, 231, 212, 0.45);
  color: #eae7d4;
  font-size: 0.5625rem;
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.uci-billing-cycle-option.uci-billing-cycle-active .uci-billing-cycle-selected-badge {
  display: inline-flex;
}

.uci-billing-cycle-option.uci-billing-cycle-active .uci-billing-cycle-option-hint {
  color: #eae7d4;
  opacity: 0.85;
}

.uci-billing-cycle-option-title {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.uci-billing-cycle-option-hint {
  font-size: 0.625rem;
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.75;
}

.uci-flow-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.uci-flow-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .uci-flow-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .uci-flow-nav.uci-flow-nav-single {
    grid-template-columns: 1fr;
    max-width: 22rem;
    margin: 0 auto;
  }
}

.uci-plan-summary-panel {
  max-width: 28rem;
  margin: 0 auto;
  width: 100%;
}

.uci-btn-back,
.uci-btn-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 3rem;
  padding: 0.85rem 1.25rem;
  border-radius: 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  border: 1px solid rgba(234, 231, 212, 0.35);
  background: rgba(28, 27, 30, 0.65);
  color: #eae7d4;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

button.uci-btn-cancel {
  appearance: none;
}

.uci-btn-back {
  border: 1px solid rgba(234, 231, 212, 0.45);
  background: rgba(234, 231, 212, 0.08);
  color: #eae7d4;
}

.uci-btn-back:hover {
  background: rgba(234, 231, 212, 0.16);
  border-color: rgba(234, 231, 212, 0.65);
  transform: translateY(-1px);
}

.uci-btn-cancel {
  border: 1px solid rgba(234, 231, 212, 0.35);
  background: rgba(28, 27, 30, 0.65);
  color: #eae7d4;
}

.uci-btn-cancel:hover {
  border-color: rgba(255, 180, 171, 0.45);
  background: rgba(255, 180, 171, 0.08);
  color: #ffb4ab;
  transform: translateY(-1px);
}

.uci-btn-back .material-symbols-outlined,
.uci-btn-cancel .material-symbols-outlined {
  font-size: 1.1rem;
}

.uci-stripe-panel {
  background: #020A0A;
  border: 1px solid rgba(234, 231, 212, 0.25);
}

.uci-stripe-input {
  background: #020A0A;
  border: 1px solid rgba(234, 231, 212, 0.5);
  color: #eae7d4;
  outline: none;
  transition: border-color 0.2s ease;
}

.uci-stripe-input:focus {
  border-color: #eae7d4;
}

.uci-spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(234, 231, 212, 0.25);
  border-top-color: #eae7d4;
  border-radius: 50%;
  animation: uci-spin 0.7s linear infinite;
  flex-shrink: 0;
}

.uci-btn-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
}

.uci-btn-submit:disabled {
  opacity: 0.92;
  cursor: wait;
}

@keyframes uci-spin {
  to {
    transform: rotate(360deg);
  }
}

.uci-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(1rem, env(safe-area-inset-top))
    max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
}

.uci-modal.hidden {
  display: none;
}

.uci-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(4px);
}

.uci-modal-panel {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: min(100%, 28rem);
  max-height: min(92dvh, calc(100dvh - 2rem));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 0.5px solid rgba(234, 231, 212, 0.3);
  background: #020A0A;
  box-shadow: 0 0 40px rgba(234, 231, 212, 0.12);
}

.uci-clarify-panel {
  width: min(100%, 34rem);
}

.uci-clarify-question-label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #eae7d4;
  line-height: 1.35;
}

.uci-clarify-options {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.uci-clarify-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 2.85rem;
  padding: 0.75rem 0.95rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(234, 231, 212, 0.35);
  background: rgba(28, 27, 30, 0.72);
  color: #eae7d4;
  text-align: left;
  font-size: 0.875rem;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.uci-clarify-option:hover {
  border-color: rgba(234, 231, 212, 0.55);
  background: rgba(234, 231, 212, 0.08);
  color: #eae7d4;
}

.uci-clarify-option.is-selected {
  border-color: rgba(234, 231, 212, 0.75);
  background: rgba(234, 231, 212, 0.14);
  color: #eae7d4;
  box-shadow: inset 0 0 0 1px rgba(234, 231, 212, 0.2);
}

.uci-clarify-option-mark {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  border: 1.5px solid rgba(234, 231, 212, 0.55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.uci-clarify-option.is-selected .uci-clarify-option-mark {
  border-color: #eae7d4;
  background: #eae7d4;
  box-shadow: inset 0 0 0 3px #020A0A;
}

@media (max-width: 639px) {
  .uci-modal-panel {
    padding: 1.25rem;
    max-height: min(90dvh, calc(100dvh - 1.5rem));
  }
}
