﻿:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --focus: rgba(47, 111, 237, .18);
  --blue: #2f6fed;
  --blue2: #245fe0;
  --shadow: rgba(15, 23, 42, 0.1);
}

* {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  background: radial-gradient(1200px 700px at 10% 0%, #ffffff 0%, var(--bg) 55%, #eef2ff 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--text);
}

/* --- 容器優化：增加微透質感 --- */
.dialog-container {
  width: 100%;
  max-width: 320px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  padding: 18px; /* 內距將配合標題負 margin */
  box-shadow: 
    0 20px 40px rgba(15, 23, 42, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden; /* 確保內部標題背景不會超出圓角 */
}

/* --- 標題優化：頂部滿版色塊 --- */
h2.dialog-title {
  /* 透過負 margin 抵消容器 padding，達成滿版效果 */
  margin: -18px -18px 20px -18px;
  padding: 22px 0;
  text-align: center;
  
  /* 質感漸層與文字 */
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue2) 100%);
  color: #ffffff;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.5px;
  
  /* 圓角必須與容器一致 */
  border-radius: 15px 15px 0 0;
  
  /* 底部細微陰影增加層次感 */
  box-shadow: 0 4px 12px rgba(47, 111, 237, 0.15);
}

/* --- 輸入組佈局 --- */
.input-group {
  margin: 0 0 16px 0;
}

.input-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 6px 4px; /* 稍微靠左偏移增加設計感 */
  letter-spacing: 0.3px;
  text-transform: uppercase; /* 大寫標籤更具專業感 */
}

/* --- 輸入欄位與互動 --- */
.input-field,
select.input-field {
  width: 100%;
  height: 44px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  background: #fff;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-field::placeholder {
  color: #94a3b8;
}

.input-field:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--focus), 0 4px 10px rgba(47, 111, 237, 0.08);
  transform: translateY(-1px);
}

/* --- 密碼欄位圖示處理 --- */
.input-with-icon {
  position: relative;
}

.input-with-icon #txt_Password {
  padding-right: 46px;
}

.input-with-icon .icon-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: all 0.2s ease;
}

.input-with-icon .icon-btn:hover {
  background: rgba(15, 23, 42, 0.05);
  opacity: 1;
}

.input-with-icon .icon-btn img {
  width: 20px;
  height: 20px;
  display: block;
}

/* --- 錯誤訊息優化 --- */
.inform-text {
  min-height: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #dc2626;
  text-align: center;
  visibility: hidden;
  margin: 2px 0 8px;
  padding: 0 10px;
}

.inform-text.visible {
  visibility: visible;
}

/* --- 按鈕質感增強 --- */
.button-group {
  margin-top: 10px;
}

#btn_ok_ucs {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--blue) 0%, var(--blue2) 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(47, 111, 237, 0.2);
  transition: all 0.2s ease;
}

#btn_ok_ucs:hover {
  filter: brightness(1.05);
  box-shadow: 0 10px 20px rgba(47, 111, 237, 0.25);
  transform: translateY(-1px);
}

#btn_ok_ucs:active {
  transform: translateY(1px);
  box-shadow: 0 4px 8px rgba(47, 111, 237, 0.2);
}

/* --- 底部提示文字 --- */
.sub-hint {
  margin-top: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  opacity: 0.8;
}