/* Tsaipei Pay Detail Modern Stylesheet */

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

body {
  background-color: #faf9f3 !important;
  min-height: 100vh;
  font-family: "Inter", "Noto Sans TC", sans-serif;
  color: #3e3828;
  padding-bottom: 60px;
}

/* Navbar Style */
.navbar-inverse {
  background-color: #ffffff !important;
  border: none !important;
  border-bottom: 1px solid #e5e7eb !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
  margin-bottom: 30px !important;
  border-radius: 0 !important;
}

.navbar-inverse .infobar {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 15px !important;
  margin: 15px 0 !important;
  padding: 0 15px !important;
  float: none !important;
  width: 100% !important;
}

.navbar-inverse .infobar div:not(.moblie-menu) {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-block !important;
}

.navbar-inverse .infobar button {
  font-size: 15px !important;
  padding: 10px 24px !important;
  height: auto !important;
  border-radius: 30px !important;
  font-weight: 700 !important;
  border: 1px solid #d1d5db !important;
  background-color: #ffffff !important;
  color: #374151 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
}

.navbar-inverse .infobar button:hover {
  background-color: #e5b224 !important;
  color: #ffffff !important;
  border-color: #e5b224 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(229, 178, 36, 0.3) !important;
}

/* Mobile Navbar */
.moblie-style {
  background-color: #ffffff !important;
  padding: 12px 20px !important;
  border-bottom: 1px solid #e5e7eb !important;
  margin-bottom: 25px !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
  position: relative !important;
}

.moblie-style .infobar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

.moblie-style .title {
  font-size: 18px !important;
  font-weight: 800 !important;
  color: #111827 !important;
  text-align: center !important;
  flex: 1 !important;
  margin: 0 !important;
}

.moblie-style .pay-info {
  float: none !important;
  width: auto !important;
  padding: 0 !important;
}

.moblie-style .pay-info button {
  font-size: 14px !important;
  padding: 8px 16px !important;
  border-radius: 20px !important;
}

.moblie-menu {
  background-color: #ffffff !important;
  border-radius: 12px !important;
  padding: 8px 0 !important;
  margin-top: 5px !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
  border: 1px solid #e5e7eb !important;
  position: absolute !important;
  top: 100% !important;
  left: 20px !important;
  right: 20px !important;
  width: auto !important;
  z-index: 9999 !important;
  display: none;
}

.moblie-menu ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.moblie-menu a {
  text-decoration: none !important;
}

.moblie-menu li {
  padding: 12px 20px !important;
  color: #374151 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  border-bottom: 1px solid #e5e7eb !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  transition: all 0.2s ease !important;
}

.moblie-menu a:last-child li {
  border-bottom: none !important;
}

.moblie-menu li:hover {
  background-color: #fefbeb !important;
  color: #a07800 !important;
}

/* Page Title Box */
.page-title-box {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 15px 25px;
  margin-bottom: 25px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.page-title-box h2 {
  font-size: 22px;
  font-weight: 800;
  color: #111827;
  letter-spacing: 2px;
  margin: 0 !important;
}

/* Control Panel (Month select and PDF download) */
.control-panel {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 20px 25px;
  margin-bottom: 30px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.page-title-box .moon-select,
.control-panel .moon-select {
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  float: none !important;
  flex: 0 1 240px;
}

.control-panel .moon-select select {
  width: 100%;
  height: 46px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background-color: #ffffff;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  padding-right: 40px;
}

.control-panel .moon-select select:focus {
  border-color: #e5b224;
  box-shadow: 0 0 0 3px rgba(229, 178, 36, 0.2);
}



/* Employee Profile Card */
.employee-card {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 24px 30px !important;
  margin-bottom: 30px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  border-left: 5px solid #e5b224;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
  float: none !important;
  width: 100% !important;
}

.employee-avatar-section {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1 1 auto;
}

.avatar-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background-color: #fef5c5;
  color: #a07800;
  font-size: 26px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(229, 178, 36, 0.15);
}

.employee-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.emp-name {
  font-size: 22px;
  font-weight: 800;
  color: #1f2937;
}

.emp-id {
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.employee-meta-section {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  flex: 2 1 450px;
  justify-content: flex-start;
  border-left: 1px solid #e5e7eb;
  padding-left: 40px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 120px;
}

.meta-label {
  font-size: 13px;
  font-weight: 700;
  color: #9ca3af;
}

.meta-value {
  font-size: 18px;
  font-weight: 800;
  color: #4b5563;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 27px;
}

.meta-value i {
  font-size: 16px;
  color: #9ca3af;
}

.meta-value.company {
  color: #996f03;
}

.meta-value.company i {
  color: #996f03;
}

/* Info Banner Notice */
.info-banner-notice {
  background-color: #fef2f2;
  border: 1px solid #fee2e2;
  border-radius: 12px;
  padding: 12px 18px;
  margin-top: -15px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #b91c1c;
  font-size: 14px;
  font-weight: 700;
}

.info-banner-notice i {
  font-size: 16px;
}

/* Detail Card Grid */
.detail-grid {
  margin-bottom: 30px !important;
  float: none !important;
  clear: both !important;
}

.detail-card {
  background-color: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  min-height: 280px;
  margin-bottom: 25px;
}

.card-header {
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.card-body {
  padding: 16px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed #e5e7eb;
  font-size: 14px;
  font-weight: 600;
  color: #4b5563;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  text-align: left;
}

.detail-value {
  font-weight: 800;
  color: #1f2937;
  text-align: right;
  font-size: 15px;
}

.empty-detail {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: #9ca3af;
  font-size: 15px;
  font-weight: 700;
}

/* Card Themes */
.card-theme-purple,
.card-theme-yellow {
  border-top: 4px solid #e5b224;
}
.card-theme-purple .card-header,
.card-theme-yellow .card-header {
  background-color: #fefbeb;
  color: #a07800;
}
.card-theme-purple .card-header i,
.card-theme-yellow .card-header i {
  color: #a07800;
}

.card-theme-green {
  border-top: 4px solid #2eb872;
}
.card-theme-green .card-header {
  background-color: #eefaf3;
  color: #2eb872;
}
.card-theme-green .card-header i {
  color: #2eb872;
}

.card-theme-red {
  border-top: 4px solid #fa5252;
}
.card-theme-red .card-header {
  background-color: #fff0f0;
  color: #fa5252;
}
.card-theme-red .card-header i {
  color: #fa5252;
}

/* Summary Card */
.summary-container {
  width: 100% !important;
  margin-bottom: 30px;
  padding: 0 !important;
  float: none !important;
  clear: both !important;
}

.summary-card {
  background: linear-gradient(135deg, #e5ad24 0%, #fcd840 100%);
  border-radius: 16px;
  padding: 30px !important;
  color: #3e2d00;
  text-align: center;
  box-shadow: 0 10px 15px -3px rgba(229, 178, 36, 0.25);
}

.summary-title {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #5c4500;
  margin-bottom: 8px;
}

.summary-formula {
  font-size: 13px;
  font-weight: 600;
  color: #735600;
  margin-bottom: 16px;
}

.summary-amount {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: 1px;
}

.summary-type {
  font-size: 14px;
  font-weight: 600;
  color: #5c4500;
  margin-top: 8px;
}

/* Memo Card */
.memo-container {
  width: 100% !important;
  padding: 0 !important;
  float: none !important;
  clear: both !important;
}

.memo-title {
  font-size: 18px;
  font-weight: 800;
  color: #1f2937;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.memo-card {
  background-color: #ffffff;
  border-radius: 16px;
  border: 1px dashed #d1d5db;
  padding: 20px 25px !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.memo-content {
  font-size: 15px;
  line-height: 1.7;
  color: #4b5563;
  font-weight: 600;
  text-align: left;
  white-space: pre-line;
}

/* Printable styles */
@media print {
  body {
    background-color: #ffffff !important;
    padding: 0 !important;
  }
  .navbar,
  .moblie-style,
  .control-panel,
  .btn-download-pdf {
    display: none !important;
  }
  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .employee-card {
    box-shadow: none !important;
    border: 1px solid #cbd5e1 !important;
    border-left: 5px solid #5c67f2 !important;
  }
  .detail-grid {
    margin-bottom: 15px !important;
  }
  .detail-card {
    box-shadow: none !important;
    border: 1px solid #cbd5e1 !important;
  }
  .summary-card {
    box-shadow: none !important;
    background: #e5b224 !important;
    color: #3e2d00 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* RWD Layout */
@media (max-width: 768px) {
  .employee-card {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 20px !important;
    gap: 20px !important;
    height: auto !important;
  }
  .employee-meta-section {
    border-left: none !important;
    padding-left: 0 !important;
    width: 100% !important;
    gap: 20px 15px !important;
    flex: none !important;
    display: flex !important;
    flex-wrap: wrap !important;
  }
  .employee-meta-section .meta-item {
    width: calc(50% - 8px) !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
  .control-panel {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 15px !important;
  }
  .control-panel .moon-select {
    flex: 1 !important;
  }
  .btn-download-pdf,
  .control-panel button {
    display: none !important;
  }
}

.btn-download-pdf,
.control-panel button {
  display: none !important;
}

/* Password Card Custom Styles */
.password-card {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 30px;
  margin-top: 20px;
  margin-bottom: 40px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  border-top: 5px solid #e5b224;
}

.security-icon-section {
  text-align: center;
  margin-bottom: 25px;
}

.lock-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: #fef5c5;
  color: #a07800;
  font-size: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  box-shadow: 0 4px 10px rgba(229, 178, 36, 0.15);
}

.security-icon-section h3 {
  font-size: 18px;
  font-weight: 800;
  color: #1f2937;
  margin-bottom: 6px;
}

.security-icon-section .subtitle {
  font-size: 13px;
  color: #9ca3af;
  font-weight: 600;
}

.custom-input-group {
  margin-bottom: 20px;
}

.custom-input-group label {
  font-size: 14px;
  font-weight: 700;
  color: #4b5563;
  margin-bottom: 8px;
  display: block;
}

.custom-input-group label i {
  color: #a07800;
  margin-right: 4px;
}

.custom-input-group input.form-control {
  height: 46px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  transition: all 0.2s ease;
  width: 100%;
}

.custom-input-group input.form-control:focus {
  border-color: #e5b224;
  box-shadow: 0 0 0 3px rgba(229, 178, 36, 0.2);
  outline: none;
}

.password-rules {
  background-color: #fefbeb;
  border: 1px solid #fdf6cc;
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  font-weight: 700;
  color: #a07800;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 25px;
}

.password-rules i {
  font-size: 15px;
  flex-shrink: 0;
}

.submit-section {
  margin-top: 15px;
}

.btn-yellow-primary {
  background-color: #e5b224 !important;
  color: #ffffff !important;
  border: none !important;
  height: 46px;
  border-radius: 8px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
}

.btn-yellow-primary:hover {
  background-color: #c4930f !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(229, 178, 36, 0.3) !important;
}

.btn-yellow-primary:active {
  transform: translateY(0) !important;
}
