:root {
  --eip-main-bg: #F6F7F9;
  --eip-card-bg: #FFFFFF;
  --eip-border: #C7D2E3;
  --eip-primary: #14256A;
  --eip-accent: #1462CC;
  --eip-accent-hover: #1b4f9f;
  --eip-text-main: #111827;
  --eip-text-muted: #6B7280;
  --eip-footer-height: 56px;
  --eip-font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

body.eip-body {
  font-family: var(--eip-font-family);
  background-color: var(--eip-main-bg);
  color: var(--eip-text-main);
  min-height: 100vh;
}

.eip-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 與 Admin 頂部導覽列一致：白底、細底線、sticky */
.eip-header {
  background-color: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 999;
}

.eip-header-actions {
  display: flex;
  align-items: center;
}

/* 頂部列頭像（與 Admin 一致）*/
.eip-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--eip-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.eip-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 20px;
  color: var(--eip-primary);
}

.eip-brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background-color: var(--eip-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 18px;
}

.eip-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 48px calc(32px + var(--eip-footer-height)) 48px;
}

.eip-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    min-height: var(--eip-footer-height);
    background-color: #ffffff;
    border-top: 1px solid var(--eip-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--eip-text-muted);
    z-index: 1000;
}

.eip-login-wrapper {
  max-width: 1120px;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

.eip-login-hero {
  display: flex;
  justify-content: center;
}

.eip-login-hero-image {
  width: 100%;
  max-width: 600px;
  height: 520px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(20, 37, 106, 0.3), rgba(20, 98, 204, 0.3));
  opacity: 0.4;
}

.eip-login-card {
  background-color: var(--eip-card-bg);
  border-radius: 16px;
  border: 2px solid var(--eip-border);
  padding: 32px 32px 28px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.eip-login-title {
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--eip-primary);
}

.eip-login-subtitle {
  font-size: 14px;
  color: var(--eip-text-muted);
  margin-bottom: 24px;
}

.eip-input {
  height: 48px;
  border-radius: 10px;
  border: 1px solid var(--eip-border);
  font-size: 14px;
}

.eip-input:focus {
  border-color: var(--eip-accent);
  box-shadow: 0 0 0 3px rgba(20, 98, 204, 0.15);
  outline: none;
}

.eip-btn-primary {
  background-color: var(--eip-accent);
  border: none;
  border-radius: 10px;
  height: 52px;
  font-size: 18px;
  font-weight: 700;
}

.eip-btn-primary:hover {
  background-color: var(--eip-accent-hover);
}

.eip-link-forgot {
  font-size: 13px;
  color: var(--eip-accent);
  text-decoration: none;
}

.eip-link-forgot:hover {
  text-decoration: underline;
}

.eip-error {
  font-size: 13px;
}

/* 模組卡片樣式 - 符合 SVG 設計 */
.module-card {
  background: var(--eip-card-bg);
  border: 2px solid var(--eip-border);
  border-radius: 16px;
  padding: 0;
  height: 320px;
  position: relative;
  border-left: 6px solid var(--eip-primary);
  transition: all 0.3s ease;
  margin-bottom: 24px;
}

.module-card:hover {
  border-color: var(--eip-accent);
  box-shadow: 0 4px 12px rgba(20, 98, 204, 0.15);
  transform: translateY(-2px);
}

.module-icon {
  background: #E9EEF7;
  width: 80px;
  height: 80px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 40px auto 20px;
  font-size: 2rem;
}

.module-emoji {
  font-size: 2.5rem;
  line-height: 1;
}

.module-content {
  text-align: center;
  padding: 0 20px;
}

.module-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--eip-text-main);
  margin-bottom: 15px;
  font-family: var(--eip-font-family);
}

.module-desc {
  font-size: 14px;
  color: var(--eip-text-muted);
  margin-bottom: 8px;
  font-weight: 500;
  font-family: var(--eip-font-family);
}

.module-action {
  padding: 0 40px 30px;
  text-align: center;
}

.btn-module {
  background: var(--eip-accent);
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  padding: 14px 0;
  width: 85%;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  font-family: var(--eip-font-family);
  transition: all 0.3s ease;
  max-width: 280px;
  min-width: 120px;
}

.btn-module:hover:not(:disabled) {
  background: var(--eip-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(20, 98, 204, 0.3);
}

.btn-module:disabled {
  background: #9CA3AF;
  cursor: not-allowed;
  opacity: 0.6;
}

/* 響應式設計 */
@media (max-width: 1200px) {
  .eip-main {
    padding: 28px 32px calc(28px + var(--eip-footer-height)) 32px;
  }

  .btn-module {
    width: 90%;
    max-width: 260px;
    font-size: 17px;
  }
}

@media (max-width: 991.98px) {
  .eip-main {
    padding: 24px 16px;
  }

  .eip-login-wrapper {
    grid-template-columns: 1fr;
  }

  .eip-login-hero {
    order: 2;
  }

  .eip-login-card {
    order: 1;
  }

  .eip-login-hero-image {
    height: 260px;
  }

  .module-card {
    height: auto;
    min-height: 320px;
  }

  .module-icon {
    margin: 30px auto 15px;
  }

  .btn-module {
    width: 90%;
    max-width: 240px;
    font-size: 16px;
    padding: 13px 0;
  }
}

@media (max-width: 767.98px) {
  .module-card {
    margin-bottom: 20px;
  }

  .module-title {
    font-size: 18px;
  }

  .module-desc {
    font-size: 13px;
  }

  .btn-module {
    width: 85%;
    max-width: 200px;
    font-size: 15px;
    padding: 12px 0;
    min-width: 100px;
  }
}

@media (max-width: 575.98px) {
  .module-action {
    padding: 0 20px 25px;
  }

  .btn-module {
    width: 100%;
    max-width: none;
    font-size: 14px;
    padding: 11px 0;
  }

  .module-icon {
    width: 60px;
    height: 60px;
    margin: 25px auto 15px;
  }

  .module-emoji {
    font-size: 2rem;
  }
}
