/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 *= require_tree .
 *= require_self
 */

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* PR Banner */
.pr-banner {
  background: linear-gradient(90deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
  padding: 6px 0;
  font-size: 12px;
  text-align: center;
  position: relative;
  z-index: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-left: -20%;
  width: calc(100% + 20%);
}

.pr-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 10px;
}

.pr-link {
  color: #fbbf24;
  text-decoration: underline;
  font-weight: 600;
}

.pr-link:hover {
  color: #f59e0b;
  text-decoration: underline;
}

/* Campaign Banner Scroll */
.campaign-banner-scroll {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
  height: 36px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  margin-left: -20%;
  width: calc(100% + 20%);
  border-top: 2px solid #ff6b00;
  border-bottom: 2px solid #ff6b00;
}

.campaign-banner-track {
  display: flex;
  white-space: nowrap;
  animation: scroll-left 20s linear infinite;
  height: 100%;
}

.campaign-banner-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  height: 100%;
  cursor: pointer;
}

.campaign-text {
  font-size: 18px;
  font-weight: bold;
  color: #ff0000;
  padding: 9px 80px;
  text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* モバイル対応 */
@media (max-width: 768px) {
  .pr-banner {
    font-size: 10px;
    padding: 4px 0;
  }

  .pr-banner-content {
    padding: 0 5px;
  }

  .campaign-banner-scroll {
    height: 24px;
  }

  .campaign-text {
    font-size: 12px;
    padding: 6px 40px;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

a {
  text-decoration: none;
  color: inherit;
}

/* App container */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* Sidebar styles */
.sidebar {
  width: 20%;
  max-width: 300px;
  min-width: 250px;
  background-color: #6464FF;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 995;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-title {
  color: white;
  font-size: 20px;
  font-weight: bold;
  display: block;
  text-align: center;
}

.site-title-image {
  max-width: 100%;
  max-height: 60px;
  width: auto;
  height: auto;
}

.site-title:hover {
  color: white;
}

.menu-items {
  padding: 20px 15px;
}

.menu-item {
  display: block;
  background-color: white;
  color: #6464FF;
  padding: 8px 16px;
  margin-bottom: 10px;
  border-radius: 10px;
  text-align: center;
  font-weight: 500;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
}

.menu-item:hover {
  background-color: #FFFF96;
}

/* Sidebar footer */
.sidebar-footer {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  padding: 15px;
}

.logout-button {
  display: block;
  background-color: white;
  color: #6464FF;
  padding: 6px 8px;
  margin-bottom: 15px;
  border-radius: 10px;
  text-align: center;
  font-weight: 500;
  font-size: 14px;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
  width: 50%;
  margin-left: auto;
  margin-right: auto;
}

.logout-button:hover {
  background-color: #FFFF96;
}

.user-info {
  text-align: center;
  color: white;
  font-size: 24px;
  line-height: 1.4;
}

.user-email {
  margin-bottom: 4px;
  font-weight: 500;
}

.user-company {
  font-weight: 400;
}

/* Main content */
.main-content {
  margin-left: 20%;
  width: 80%;
  min-height: 100vh;
  transition: margin-left 0.3s ease, width 0.3s ease;
}

.mobile-header {
  display: none;
  background-color: #6464FF;
  padding: 15px 20px;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 992;
}

.mobile-title {
  color: white;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-title-image {
  max-height: 32px;
  width: auto;
}

.burger-menu {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  flex-direction: column;
  width: 30px;
  height: auto;
}

.burger-menu span {
  display: block;
  height: 3px;
  width: 22px;
  background-color: white;
  border-radius: 2px;
  transition: all 0.3s ease;
  margin-bottom: 4px;
}

.burger-menu span:last-child {
  margin-bottom: 0;
}

.burger-menu.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.burger-menu.active span:nth-child(2) {
  opacity: 0;
}

.burger-menu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.content-area {
  padding: 40px;
}

.page-content {
  max-width: 1200px;
  margin: 0 auto;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 990;
}

.sidebar-overlay.active {
  display: block;
}

/* Responsive design */
@media (max-width: 1080px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
    max-width: 280px;
  }
  
  .sidebar.active {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
    width: 100%;
  }
  
  .mobile-header {
    display: flex;
  }
  
  .content-area {
    padding: 20px;
  }
  
  .page-content {
    width: 80%;
    margin: 0 auto;
  }
  
  .page-content form,
  .page-content .form-container {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .content-area {
    padding: 15px;
  }
  
  .mobile-title {
    font-size: 16px;
  }
}

/* MyPage styles */
.mypage-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.mypage-header h1 {
  font-size: 28px;
  color: #333;
  margin: 0;
}

.edit-button {
  background-color: #000064;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
}

.edit-button:hover {
  background-color: #000050;
}

.mypage-form {
  max-width: 800px;
  margin: 0 auto;
}

.form-section {
  background-color: white;
  padding: 30px;
  margin-bottom: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Editing mode background colors */
div.form-section.editing {
  background-color: #fffbf0 !important;
}

#company-info-section.editing,
#cc-email-section.editing {
  background-color: #fffbf0 !important;
}

.form-section h3 {
  color: #333;
  font-size: 20px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.bank-section {
  margin-bottom: 30px;
  padding: 20px;
  background-color: #f8f8f8;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.bank-section h4 {
  color: #333;
  font-size: 24px;
  margin-bottom: 15px;
  font-weight: 600;
}

.bank-header-with-checkbox {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.checkbox-wrapper-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-wrapper-inline .form-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  margin: 0;
}

.checkbox-wrapper-inline .checkbox-label {
  font-size: 16px;
  font-weight: 500;
  color: #333;
  margin: 0;
  cursor: pointer;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
  font-size: 21px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 21px;
  background-color: #f9f9f9;
  color: #666;
  transition: border-color 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: #6464FF;
  background-color: white;
}

.file-upload-area {
  position: relative;
  margin-top: 8px;
}

.file-upload-display {
  padding: 12px 16px;
  border: 2px dashed #e0e0e0;
  border-radius: 8px;
  background-color: #f9f9f9;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.file-upload-display:hover {
  border-color: #6464FF;
  background-color: #f0f0ff;
}

.file-upload-text {
  color: #666;
  font-size: 21px;
}

/* Responsive adjustments for MyPage */
@media (max-width: 1080px) {
  .mypage-header {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .form-section {
    padding: 20px;
  }
  
  .bank-section {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .mypage-header h1 {
    font-size: 24px;
  }
  
  .form-section {
    padding: 15px;
  }
  
  .bank-section {
    padding: 12px;
  }
  
  .edit-button {
    padding: 10px 20px;
    font-size: 13px;
  }
}

/* Label with action styles */
.label-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.change-link {
  background: none;
  border: none;
  color: #6464FF;
  font-size: 18px;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  transition: color 0.3s ease;
}

.change-link:hover {
  color: #5050E0;
}

/* Section header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
}

.section-header h3 {
  margin: 0;
  color: #333;
  font-size: 20px;
}

/* Edit button container */
.edit-button-container {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

/* Save button container */
.save-button-container {
  text-align: center;
  margin-top: 40px;
  padding: 30px 0;
}

.save-button {
  background-color: #FF6B6B;
  color: white;
  border: none;
  padding: 15px 40px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
}

.save-button:hover {
  background-color: #FF5252;
}

/* Edit mode styles */
.form-input.editable {
  background-color: white;
  border-color: #6464FF;
  color: #333;
}

.file-upload-display.editable {
  border-color: #6464FF;
  background-color: white;
  color: #333;
}

/* Responsive adjustments for new elements */
@media (max-width: 1080px) {
  .label-with-action {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
  
  .change-link {
    align-self: flex-end;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .section-header .edit-button {
    align-self: center;
  }
}

@media (max-width: 480px) {
  .save-button {
    padding: 12px 30px;
    font-size: 14px;
  }
  
  .change-link {
    font-size: 11px;
  }
}

/* Collapsible header styles */
.collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 5px 0;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 20px;
}

.collapsible-header h3 {
  margin: 0;
  color: #333;
  font-size: 20px;
}

.toggle-button {
  background-color: #6464FF;
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-button:hover {
  background-color: #5050E0;
  transform: scale(1.1);
}

.toggle-button.active {
  /* 回転なし - ボタンはまっすぐのまま */
}

/* Bank content animation */
.bank-content {
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.bank-content.show {
  display: block;
}

/* Responsive adjustments for collapsible elements */
@media (max-width: 480px) {
  .toggle-button {
    width: 25px;
    height: 25px;
    font-size: 16px;
  }

  .collapsible-header h3 {
    font-size: 18px;
  }
}

/* Auth page styles */
.auth-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.auth-header h1 {
  font-size: 28px;
  color: #333;
  margin: 0;
}

.signup-section {
  margin-top: 20px;
}

.auth-form {
  max-width: 500px;
  margin: 0 auto;
}

.login-button, .signup-button {
  width: 100%;
  background-color: #6464FF;
  color: white;
  border: none;
  padding: 15px 20px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
  margin-top: 10px;
}

.login-button:hover, .signup-button:hover {
  background-color: #5050E0;
}

.signup-note {
  color: #666;
  font-size: 14px;
  margin: 10px 0;
  text-align: center;
  line-height: 1.4;
}

.forgot-password-link {
  text-align: center;
  margin: 15px 0 0 0;
}

.forgot-password-link a {
  color: #6464FF;
  text-decoration: underline;
  font-size: 14px;
  transition: color 0.3s ease;
}

.forgot-password-link a:hover {
  color: #5050E0;
}

.receiver-note {
  margin-bottom: 20px;
  padding: 15px;
  background-color: #FFFF96;
  border-radius: 5px;
}

.receiver-note p {
  margin: 0;
  color: #FF6400;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
}

/* Auth toggle headers */
.signup-toggle-header, .login-toggle-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding: 5px 0;
}

.signup-toggle-header h1, .login-toggle-header h1 {
  margin: 0;
  color: #333;
  font-size: 28px;
}

.auth-toggle-button {
  background-color: #6464FF;
  color: white;
  border: none;
  padding: 18px 35px;
  border-radius: 44px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.auth-toggle-button:hover {
  background-color: #5050E0;
  transform: translateY(-1px);
}

/* Auth content animations */
.auth-form {
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

#login-section {
  transition: opacity 0.3s ease-out;
}

#signup-content {
  transition: opacity 0.3s ease-out;
}

/* Responsive adjustments for auth pages */
@media (max-width: 1080px) {
  .auth-form {
    max-width: 100%;
  }

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

  .signup-toggle-header, .login-toggle-header {
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .auth-header h1 {
    font-size: 24px;
  }

  .signup-toggle-header h1, .login-toggle-header h1 {
    font-size: 24px;
  }

  .auth-toggle-button {
    font-size: 15px;
    padding: 16px 32px;
  }

  .login-button, .signup-button {
    padding: 12px 20px;
    font-size: 14px;
  }

  .signup-note {
    font-size: 12px;
  }

  .signup-section {
    margin-top: 10px;
  }

  .forgot-password-link a {
    font-size: 12px;
  }

  .receiver-note {
    padding: 12px;
  }

  .receiver-note p {
    font-size: 16px;
  }
}

/* Notifications page styles */
.notifications-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.notifications-header h1 {
  font-size: 28px;
  color: #333;
  margin: 0;
}

.notifications-list {
  max-width: 900px;
  margin: 0 auto;
}

.news-item {
  background-color: white;
  margin-bottom: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border-bottom: 1px solid #f0f0f0;
}

.news-header:hover {
  background-color: #f8f8ff;
}

.news-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.news-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin: 0;
  line-height: 1.3;
}

.news-date {
  font-size: 14px;
  color: #666;
  font-weight: 400;
}

.unpublished-tag {
  display: inline-block;
  background-color: #FF9800;
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

.news-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.news-actions .edit-button,
.news-actions .delete-button {
  background-color: #6464FF;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.news-actions .delete-button {
  background-color: #FF6B6B;
}

.news-actions .edit-button:hover {
  background-color: #5050E0;
}

.news-actions .delete-button:hover {
  background-color: #FF5252;
}

.news-actions .toggle-button {
  background-color: #6464FF;
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.news-actions .toggle-button:hover {
  background-color: #5050E0;
  transform: scale(1.1);
}

.news-actions .toggle-button.active {
  background-color: #5050E0;
}

.news-content {
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.news-body {
  padding: 20px 25px 25px 25px;
  background-color: #f9f9f9;
  border-top: 1px solid #e0e0e0;
}

.news-body p {
  margin: 0 0 15px 0;
  line-height: 1.6;
  color: #333;
  font-size: 16px;
}

.news-body p:last-child {
  margin-bottom: 0;
}

.news-body ul {
  margin: 15px 0;
  padding-left: 20px;
}

.news-body li {
  margin-bottom: 8px;
  line-height: 1.6;
  color: #333;
  font-size: 16px;
}

.news-body strong {
  color: #6464FF;
  font-weight: 600;
}

/* Responsive adjustments for notifications page */
@media (max-width: 1080px) {
  .notifications-list {
    max-width: 100%;
  }

  .news-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 20px;
  }

  .news-info {
    width: 100%;
  }

  .news-actions {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }

  .news-actions .edit-button,
  .news-actions .delete-button {
    flex: 0 0 auto;
  }

  .news-actions .toggle-button {
    margin-left: auto;
    flex-shrink: 0;
  }

  .news-body {
    padding: 15px 20px 20px 20px;
  }
}

@media (max-width: 480px) {
  .notifications-header h1 {
    font-size: 24px;
  }

  .news-item {
    margin-bottom: 15px;
    border-radius: 8px;
  }

  .news-header {
    padding: 12px 15px;
    gap: 10px;
  }

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

  .news-date {
    font-size: 13px;
  }

  .news-actions {
    gap: 6px;
  }

  .news-actions .edit-button,
  .news-actions .delete-button {
    padding: 6px 12px;
    font-size: 12px;
  }

  .news-actions .toggle-button {
    width: 26px;
    height: 26px;
    font-size: 14px;
    flex-shrink: 0;
  }

  .unpublished-tag {
    font-size: 10px;
    padding: 2px 6px;
    margin-left: 4px;
  }

  .news-title {
    font-size: 16px;
    line-height: 1.4;
  }

  .news-date {
    font-size: 12px;
  }

  .news-body {
    padding: 12px 15px 15px 15px;
  }

  .news-body p,
  .news-body li {
    font-size: 15px;
  }
}

/* ID Buttons */
.id-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  justify-content: center;
}

.id-button {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: default;
  color: white;
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.receive-id {
  background-color: #963C00;
}

.issue-id {
  background-color: #9B009B;
}

/* Upgrade Button */
.upgrade-button {
  background-color: #00D250;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
  text-decoration: none;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.upgrade-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.6),
    transparent
  );
  transition: left 0.5s ease;
}

.upgrade-button:hover::before {
  left: 100%;
}

.upgrade-button:hover {
  background-color: #00B545;
  animation: glow-pulse 1.5s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2),
                0 0 10px rgba(0, 210, 80, 0.4),
                0 0 20px rgba(0, 210, 80, 0.2);
  }
  50% {
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2),
                0 0 20px rgba(0, 210, 80, 0.6),
                0 0 30px rgba(0, 210, 80, 0.4);
  }
}

/* Upgrade Note */
.upgrade-note {
  font-size: 14px;
  color: #666;
  margin-top: 10px;
  margin-bottom: 0;
  text-align: center;
  max-width: 800px;
}

.free-features-note {
  font-size: 14px;
  color: #888;
  margin-top: 5px;
  margin-bottom: 0;
  text-align: center;
  max-width: 800px;
  font-style: normal;
}

/* Add News Button */
.add-news-button {
  background-color: #6464FF;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
  margin-top: 15px;
}

.add-news-button:hover {
  background-color: #5555E6;
}

/* Info Page Styles */
.info-section {
  margin-bottom: 40px;
}

.info-section h2 {
  font-size: 24px;
  color: #333;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #6464FF;
}

.info-block {
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.info-block p {
  margin-bottom: 15px;
  line-height: 1.6;
  color: #333;
}

.info-block p:last-child {
  margin-bottom: 0;
}

/* Estimates Page Styles */
.estimates-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.estimates-header h1 {
  font-size: 28px;
  color: #333;
  margin: 0 0 15px 0;
}

.header-buttons {
  display: flex;
  gap: 15px;
  align-items: center;
}

.new-estimate-button, .received-estimates-button {
  background-color: #009B9B;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
  margin-top: 15px;
}

.new-estimate-button:hover {
  background-color: #008080;
}

.received-estimates-button {
  background-color: #6464FF !important;
}

.received-estimates-button:hover {
  background-color: #5050E0 !important;
}

/* Received estimates status badges */
.status-badge.expired {
  background-color: #ff6b6b;
  color: white;
}

.status-badge.valid {
  background-color: #51cf66;
  color: white;
}

/* Invoice page specific button color */
.invoices-page .new-estimate-button {
  background-color: #FF5A5A;
}

.invoices-page .new-estimate-button:hover {
  background-color: #E64545;
}

.estimates-filter,
.invoices-filter {
  background-color: white;
  padding: 10px 30px;
  margin-bottom: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.estimates-filter h3,
.invoices-filter h3 {
  color: #333;
  font-size: 20px;
  margin-bottom: 5px;
  padding-bottom: 5px;
  border-bottom: 1px solid #e0e0e0;
}

.filter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.date-range-section label,
.client-section label {
  display: block;
  font-weight: 500;
  color: #333;
  margin-bottom: 10px;
}

.client-section {
  margin-top: 7px;
}

.client-select {
  width: 100%;
  max-width: 300px;
}

.filter-button-section {
  margin-top: 10px;
  text-align: center;
}

.filter-search-button {
  background-color: #6E9B9B;
  color: white;
  border: none;
  padding: 8px 32px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
}

.filter-search-button:hover {
  background-color: #5A8080;
}

.show-all-button {
  background-color: #964BC8;
  color: white;
  border: none;
  padding: 8px 32px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
}

.show-all-button:hover {
  background-color: #7D3BA5;
}

.search-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.show-all-button-small {
  background-color: #964BC8;
  color: white;
  border: none;
  padding: 5px 21px;
  border-radius: 7px;
  font-size: 0.87em;
  cursor: pointer;
}

.show-all-button-small:hover {
  background-color: #7D3BA5;
}

.date-range {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.date-input-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.form-select {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 14px;
  background-color: white;
  min-width: 80px;
}

.form-select:focus {
  outline: none;
  border-color: #009B9B;
  box-shadow: 0 0 5px rgba(0, 155, 155, 0.3);
}

.date-separator {
  font-size: 16px;
  color: #666;
  font-weight: 500;
}

/* Search Results */
.search-results {
  max-width: 1200px;
  margin: 0 auto;
}

.search-results h3 {
  color: #333;
  font-size: 24px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #009B9B;
}

.results-table-container {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

.results-table th,
.results-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.results-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #333;
  font-size: 17px;
}

.results-table tbody tr:hover {
  background-color: #f8f9fa;
}

.results-table td {
  font-size: 17px;
  color: #333;
}

.status-badge {
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  display: inline-block;
  min-width: 70px;
  white-space: nowrap;
}

.status-badge.opened {
  background-color: #d4edda;
  color: #155724;
}

.status-badge.not-opened {
  background-color: #f8d7da;
  color: #721c24;
}

.status-badge.issued {
  background-color: #d1ecf1;
  color: #0c5460;
}

.status-badge.not-issued {
  background-color: #fff3cd;
  color: #856404;
}

.status-badge.paid {
  background-color: #d4edda;
  color: #155724;
}

.status-badge.not-paid {
  background-color: #f8d7da;
  color: #721c24;
}

.status-badge-button {
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  display: inline-block;
  min-width: 70px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  position: relative;
}

.status-badge-button.not-issued {
  background-color: #fff3cd;
  color: #856404;
}

.status-badge-button.not-issued:hover {
  background-color: #ffeaa7;
  transform: scale(1.05);
}

.status-badge-button.issued {
  background-color: #d1ecf1;
  color: #0c5460;
}

.status-badge-button.issued:hover {
  background-color: #b8dadf;
  transform: scale(1.05);
}

/* Custom tooltip styling */
.status-badge-button[title]:hover::after {
  content: attr(title);
  position: absolute;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 17px;
  white-space: nowrap;
  z-index: 1000;
  top: -45px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.status-badge-button[title]:hover::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  pointer-events: none;
}


.detail-button {
  background-color: #009B9B;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.detail-button:hover {
  background-color: #008080;
}

/* Download button styles */
.download-button {
  background-color: #009B9B;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.download-button:hover {
  background-color: #008080;
}

.download-button.disabled {
  background-color: #cccccc;
  color: #666666;
  cursor: not-allowed;
  pointer-events: none;
}

.detail-buttons {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-button-small {
  background-color: #009B9B;
  color: white;
  border: none;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.detail-button-small:hover {
  background-color: #008080;
}

/* Invoice page detail buttons - match invoice new button color */
.invoices-page .detail-button-small:nth-child(2) {
  background-color: #FF5A5A;
}

.invoices-page .detail-button-small:nth-child(2):hover {
  background-color: #E64545;
}

.delete-button {
  background-color: #FF0000;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.delete-button:hover {
  background-color: #CC0000;
}

/* Status badge styles */
.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
  min-width: 60px;
  display: inline-block;
}

.status-active {
  background-color: #E8F5E8;
  color: #2E7D32;
}

.status-pending {
  background-color: #FFF3E0;
  color: #F57C00;
}

.status-inactive {
  background-color: #FFEBEE;
  color: #C62828;
}

/* No data styling */
.no-data {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 20px;
}

.receiver-header-buttons {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 15px;
}

.receiver-register-button {
  background-color: #009B9B;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
}

.receiver-register-button:hover {
  background-color: #008080;
}


/* Responsive design for estimates */
@media (max-width: 768px) {
  .date-range {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .date-input-group {
    width: 100%;
  }

  .form-select {
    flex: 1;
    min-width: 0;
  }

  .results-table-container {
    border-radius: 5px;
  }

  .results-table th,
  .results-table td {
    padding: 8px 10px;
    font-size: 12px;
  }

  .status-badge {
    font-size: 10px;
    padding: 3px 6px;
    min-width: 50px;
  }

  .detail-button {
    padding: 4px 8px;
    font-size: 10px;
  }

  .detail-button-small {
    padding: 2px 6px;
    font-size: 9px;
  }

  .filter-button-section {
    flex-direction: column;
    gap: 10px;
  }

  .filter-search-button,
  .show-all-button {
    width: 100%;
    max-width: 250px;
    margin: 0 auto;
  }
}

/* Recipient Registration Form Styles */
.recipient-register-form {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-description {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  border-left: 4px solid #009B9B;
}

.form-description p {
  margin-bottom: 8px;
  font-size: 14px;
  color: #555;
}

.form-description p:last-child {
  margin-bottom: 0;
}

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

.email-input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
}

.input-with-remove {
  display: flex;
  align-items: center;
  gap: 10px;
}

.email-input {
  flex: 1;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.email-input:focus {
  outline: none;
  border-color: #009B9B;
}

.remove-email-button {
  background-color: #ff4444;
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
  flex-shrink: 0;
}

.remove-email-button:hover {
  background-color: #cc3333;
}

.form-actions {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.add-email-button {
  background-color: #FF8C00;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  align-self: flex-start;
}

.add-email-button:hover {
  background-color: #E67800;
}

.submit-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.submit-button {
  background-color: #009B9B;
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.submit-button:hover {
  background-color: #007878;
}

.cancel-button {
  background-color: #666;
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.cancel-button:hover {
  background-color: #555;
}


/* Responsive design for recipient registration form */
@media (max-width: 768px) {
  .recipient-register-form {
    margin: 10px;
    padding: 20px;
  }

  .form-actions {
    align-items: stretch;
  }

  .add-email-button {
    align-self: stretch;
    text-align: center;
  }

  .submit-actions {
    flex-direction: column;
  }

  .submit-button,
  .cancel-button {
    width: 100%;
    text-align: center;
  }
}

/* Forgot Password Styles */
.forgot-password-link {
  color: #666;
  font-size: 14px;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.forgot-password-link:hover {
  color: #333;
}

.forgot-password-form {
  max-width: 400px;
  margin: 0 auto;
}

.forgot-password-form .form-description {
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid #6464FF;
}

.forgot-password-form .form-description p {
  margin-bottom: 8px;
  font-size: 14px;
  color: #555;
}

.forgot-password-form .form-description p:last-child {
  margin-bottom: 0;
}

.back-to-login-link {
  color: #6464FF;
  font-size: 14px;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.back-to-login-link:hover {
  color: #4a4aff;
}

/* ========== 管理画面スタイル ========== */

/* 管理画面メニューボタン */
.admin-menu-item {
  background-color: #8B0000 !important;
  color: white !important;
  font-weight: bold;
  border: 2px solid #8B0000;
}

.admin-menu-item:hover {
  background-color: #A52A2A !important;
  border-color: #A52A2A;
}

/* 管理画面ログインページ */
.admin-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.admin-login-container {
  background: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  width: 100%;
}

.admin-login-title {
  font-size: 28px;
  color: #333;
  text-align: center;
  margin-bottom: 10px;
  font-weight: bold;
}

.admin-login-subtitle {
  color: #666;
  text-align: center;
  margin-bottom: 30px;
  font-size: 14px;
}

.admin-login-form .form-group {
  margin-bottom: 20px;
}

.admin-login-form .form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #333;
}

.admin-login-form .form-control {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.admin-login-form .form-control:focus {
  outline: none;
  border-color: #667eea;
}

.btn-admin-primary {
  background-color: #8B0000;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.3s ease;
}

.btn-admin-primary:hover {
  background-color: #A52A2A;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f1aeb5;
  padding: 12px;
  border-radius: 5px;
  margin-bottom: 20px;
  text-align: center;
}

/* 管理画面ダッシュボード */
.admin-dashboard {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 3px solid #8B0000;
}

.admin-title {
  font-size: 32px;
  color: #8B0000;
  font-weight: bold;
  margin: 0;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: center;
}

.admin-user {
  color: #666;
  font-size: 14px;
}

.btn-admin-logout {
  background-color: #666;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.btn-admin-logout:hover {
  background-color: #555;
}

/* 管理画面ナビゲーション */
.admin-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 2px solid #eee;
  padding-bottom: 20px;
}

.admin-nav-btn {
  background-color: #f8f9fa;
  color: #666;
  padding: 12px 24px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
}

.admin-nav-btn:hover {
  background-color: #e9ecef;
  color: #333;
}

.admin-nav-btn.active {
  background-color: #8B0000;
  color: white;
  border-color: #8B0000;
}

/* 管理画面セクション */
.admin-section {
  margin-bottom: 40px;
}

.admin-section-title {
  font-size: 24px;
  color: #333;
  margin-bottom: 20px;
  font-weight: bold;
}

/* 管理画面テーブル */
.admin-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  background-color: #8B0000;
  color: white;
  padding: 12px;
  text-align: left;
  font-weight: bold;
  font-size: 14px;
  white-space: nowrap;
}

.admin-table td {
  padding: 12px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  white-space: nowrap;
}

.admin-table tr:hover {
  background-color: #f8f9fa;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

/* 管理画面ボタン */
.btn-admin-sm {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
  margin-right: 5px;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.btn-view {
  background-color: #17a2b8;
  color: white;
}

.btn-view:hover {
  background-color: #138496;
}

.btn-edit {
  background-color: #ffc107;
  color: #212529;
}

.btn-edit:hover {
  background-color: #e0a800;
}

.btn-pdf {
  background-color: #6c757d;
  color: white;
}

.btn-pdf:hover {
  background-color: #545b62;
}

.btn-delete {
  background-color: #dc3545;
  color: white;
}

.btn-delete:hover {
  background-color: #c82333;
}

.admin-actions-cell {
  white-space: nowrap;
}

.admin-actions-cell form {
  display: inline;
  margin: 0;
}

.admin-actions-section form {
  display: inline;
  margin: 0;
}

/* ステータスバッジ */
.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
}

.status-badge.opened {
  background-color: #d4edda;
  color: #155724;
}

.status-badge.unopened {
  background-color: #f8d7da;
  color: #721c24;
}

.status-badge.issued {
  background-color: #d1ecf1;
  color: #0c5460;
}

.status-badge.not-issued {
  background-color: #fff3cd;
  color: #856404;
}

/* 権限バッジ */
.role-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
}

.role-badge.role-receiver_id {
  background-color: #963C00;
  color: white;
}

.role-badge.role-issuer_id {
  background-color: #9B009B;
  color: white;
}

.role-badge.role-master_id {
  background-color: #8B0000;
  color: white;
}

/* データなしメッセージ */
.no-data {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 16px;
}

/* 管理画面編集ページ */
.admin-edit-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.btn-admin-back {
  background-color: #6c757d;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.btn-admin-back:hover {
  background-color: #545b62;
}

.admin-form-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin-top: 20px;
}

.admin-form .form-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.admin-form .form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.admin-form .form-section h3 {
  color: #8B0000;
  margin-bottom: 20px;
  font-size: 20px;
  font-weight: bold;
}

.admin-form .form-section h4 {
  color: #333;
  margin: 20px 0 10px 0;
  font-size: 16px;
  font-weight: bold;
}

.admin-form .form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.admin-form .form-group {
  flex: 1;
  margin-bottom: 20px;
}

.admin-form .form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #333;
}

.admin-form .form-control {
  width: 100%;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.admin-form .form-control:focus {
  outline: none;
  border-color: #8B0000;
}

.admin-form .radio-group {
  display: flex;
  gap: 20px;
  align-items: center;
}

.admin-form .radio-group input[type="radio"] {
  margin-right: 5px;
}

.admin-form .radio-group label {
  margin-bottom: 0;
  font-weight: normal;
}

.estimate-item, .invoice-item {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 15px;
  border: 1px solid #dee2e6;
}

.form-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.btn-admin-secondary {
  background-color: #6c757d;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.btn-admin-secondary:hover {
  background-color: #545b62;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
  .admin-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .admin-actions {
    flex-direction: row;
    gap: 10px;
    justify-content: center;
  }

  .admin-nav {
    flex-direction: column;
  }

  .admin-table-container {
    overflow-x: auto;
  }

  .admin-table {
    min-width: 800px;
  }

  .admin-form .form-row {
    flex-direction: column;
  }

  .form-actions {
    flex-direction: column;
  }
}

/* 管理画面詳細ページスタイル */
.admin-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.admin-info-item {
  display: flex;
  align-items: center;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 5px;
}

.admin-info-item.full-width {
  grid-column: 1 / -1;
}

.admin-info-item label {
  font-weight: bold;
  color: #8B0000;
  min-width: 120px;
  margin-right: 10px;
  flex-shrink: 0;
}

.admin-info-item span {
  flex: 1;
}

.admin-link {
  color: #8B0000;
  text-decoration: none;
  font-weight: bold;
}

.admin-link:hover {
  color: #6B0000;
  text-decoration: underline;
}

.admin-actions-section {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .admin-info-grid {
    grid-template-columns: 1fr;
  }

  .admin-info-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-info-item label {
    margin-bottom: 5px;
    margin-right: 0;
  }

  .admin-actions-section {
    flex-direction: column;
  }
}

/* ======================
 * Billing Info Styles
 * ====================== */

.billing-info-details {
  max-width: 800px;
}

.detail-group {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.detail-group h3 {
  color: #2c3e50;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e0e0e0;
  font-size: 1.1em;
  font-weight: 600;
}

.detail-row {
  display: flex;
  margin-bottom: 12px;
  align-items: center;
}

.detail-row label {
  width: 200px;
  font-weight: 500;
  color: #555;
  flex-shrink: 0;
}

.detail-row span {
  color: #333;
}

.detail-row small {
  color: #666;
  font-size: 0.9em;
}

.deleted-user {
  color: #e74c3c;
  font-style: italic;
}

.billing-info-form .form-group {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.billing-info-form .form-group h3 {
  color: #2c3e50;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e0e0e0;
  font-size: 1.1em;
  font-weight: 600;
}

.billing-info-form .form-row {
  margin-bottom: 15px;
}

.billing-info-form .form-label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #555;
}

.billing-info-form .form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.billing-info-form .form-control:focus {
  outline: none;
  border-color: #6464FF;
  box-shadow: 0 0 0 2px rgba(100, 100, 255, 0.2);
}

.billing-info-form .form-actions {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
  display: flex !important;
  justify-content: center !important;
  gap: 15px !important;
}

.billing-info-form .form-actions .btn {
  text-align: center !important;
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
  min-width: 80px !important;
  white-space: nowrap !important;
}

.billing-info-form .error-messages {
  background: #ffe6e6;
  border: 1px solid #ff9999;
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 20px;
}

.billing-info-form .error-messages h4 {
  color: #d32f2f;
  margin-bottom: 10px;
}

.billing-info-form .error-messages ul {
  list-style-type: disc;
  margin-left: 20px;
}

.billing-info-form .error-messages li {
  color: #d32f2f;
  margin-bottom: 5px;
}

/* ======================
 * Contract and Billing Warning Styles
 * ====================== */

.contract-header {
  text-align: center;
  margin-bottom: 30px;
}

.contract-content {
  max-width: 800px;
  margin: 0 auto;
}

.contract-section {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.contract-section h2 {
  color: #2c3e50;
  margin-bottom: 15px;
}

.contract-list {
  list-style-type: disc;
  margin-left: 20px;
}

.contract-list li {
  margin-bottom: 8px;
}

.pricing-info {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 5px;
}

.terms-content {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 5px;
  max-height: 200px;
  overflow-y: auto;
}

.contract-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

.contract-agree-btn {
  background-color: #28a745;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}

.contract-agree-btn:hover {
  background-color: #218838;
}

.contract-cancel-btn {
  background-color: #6c757d;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  font-size: 16px;
}

.contract-cancel-btn:hover {
  background-color: #5a6268;
}

.downgrade-button {
  background-color: #dc3545;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  font-size: 16px;
  display: inline-block;
}

.downgrade-button:hover {
  background-color: #c82333;
}

.scrollable-terms {
  max-height: 300px;
  overflow-y: auto;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 5px;
  border: 1px solid #dee2e6;
}

.scrollable-terms h3 {
  color: #2c3e50;
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 16px;
}

.scrollable-terms h3:first-child {
  margin-top: 0;
}

.scrollable-terms p {
  margin-bottom: 10px;
  line-height: 1.6;
}

.scrollable-terms ul {
  margin: 10px 0 10px 20px;
}

.scrollable-terms li {
  margin-bottom: 5px;
}

.terms-date {
  margin-top: 20px;
  text-align: right;
  font-style: italic;
  color: #6c757d;
}

.legal-info {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 5px;
  border: 1px solid #dee2e6;
}

.legal-row {
  display: flex;
  margin-bottom: 10px;
  padding: 5px 0;
  border-bottom: 1px solid #e9ecef;
}

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

.legal-row label {
  font-weight: bold;
  min-width: 120px;
  color: #495057;
}

.legal-row span {
  flex: 1;
  color: #212529;
}

/* ======================
 * Landing Page Styles
 * ====================== */

.landing-page {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  color: #2c3e50;
  margin-bottom: 1.5rem;
}

/* Hero Section */
.hero-section {
  background-color: #6464FF;
  color: white;
  padding: 2.5rem 0;
  text-align: center;
  border-radius: 16px;
  margin: 1rem 0.5rem;
}

.hero-logo {
  max-width: 400px;
  width: 100%;
  height: auto;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  color: white;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* CTA Buttons */
.cta-button {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.cta-button.primary {
  background: #f39c12;
  color: white;
  box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.cta-button.primary:hover {
  background: #e67e22;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

.cta-button.secondary {
  background: transparent;
  color: white;
  border-color: white;
}

.cta-button.secondary:hover {
  background: white;
  color: #667eea;
}

.cta-button.large {
  padding: 1.25rem 3rem;
  font-size: 1.125rem;
}

/* Features Section */
.features-section {
  padding: 2rem 0;
  background: #f8f9fa;
  border-radius: 16px;
  margin: 1rem 0.5rem;
}

.feature-content {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 0.5rem;
}

.feature-description {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #2c3e50;
  text-align: center;
  margin: 1.5rem 0;
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.image-item {
  text-align: center;
}

.feature-image {
  width: 100%;
  max-width: 700px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.feature-image:hover {
  transform: translateY(-8px);
}

/* Problem Solution Section */
.problem-solution-section {
  padding: 2rem 0;
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
  border-radius: 16px;
  margin: 1rem 0.5rem;
}

.problem-content {
  max-width: 1400px;
  margin: 0 auto;
  text-align: center;
  padding: 0 0.1rem;
}

.problem-statement {
  font-size: 1.25rem;
  color: #2c3e50;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.solution-statement {
  font-size: 1.5rem;
  color: #e74c3c;
  font-weight: 700;
  margin-top: 2rem;
}

/* Pricing Section */
.pricing-section {
  padding: 2rem 0;
  background: white;
  border-radius: 16px;
  margin: 1rem 0.5rem;
}

.pricing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.pricing-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  border: 2px solid #e9ecef;
  transition: transform 0.3s ease;
}

.pricing-card:hover {
  transform: translateY(-8px);
}

.pricing-card.featured {
  border-color: #f39c12;
  transform: scale(1.05);
}

.plan-header {
  text-align: center;
  margin-bottom: 2rem;
}

.plan-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 1rem;
}

.plan-price .price {
  font-size: 2rem;
  font-weight: 800;
  color: #f39c12;
  display: block;
}

.price-note {
  font-size: 0.875rem;
  color: #6c757d;
  display: block;
  margin-top: 0.5rem;
}

.plan-features p {
  margin-bottom: 0.75rem;
  color: #495057;
  padding-left: 1.5rem;
  position: relative;
}

.plan-features p:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #28a745;
  font-weight: bold;
}

/* Contact Section */
.contact-section {
  padding: 2rem 0;
  background: #f8f9fa;
  border-radius: 16px;
  margin: 1rem 0.5rem;
}

.contact-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-description {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  color: #495057;
}

.contact-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-label {
  font-weight: 600;
  color: #2c3e50;
}

.contact-email {
  color: #f39c12;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.125rem;
}

.contact-email:hover {
  text-decoration: underline;
}

/* CTA Section */
.cta-section {
  padding: 2rem 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
  border-radius: 16px;
  margin: 1rem 0.5rem;
}

.cta-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta-description {
  font-size: 1.125rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-logo {
    max-width: 300px;
  }

  .section-title {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .image-gallery {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .feature-description {
    font-size: 1rem;
    margin: 1rem 0;
  }

  .feature-content {
    padding: 0 0.25rem;
  }

  .problem-content {
    padding: 0 0.25rem;
  }

  .features-section,
  .problem-solution-section,
  .pricing-section,
  .contact-section,
  .cta-section,
  .hero-section {
    margin: 0.5rem 0.25rem;
    padding: 1.5rem 0;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cta-button {
    width: 100%;
    max-width: 300px;
  }

  .pricing-cards {
    grid-template-columns: 1fr;
  }

  .pricing-card.featured {
    transform: none;
  }

  .contact-info {
    flex-direction: column;
    gap: 0.5rem;
  }

  .cta-title {
    font-size: 2rem;
  }
}

.billing-check-button {
  background-color: #17a2b8;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  font-size: 14px;
  display: inline-block;
  margin-top: 10px;
}

.billing-check-button:hover {
  background-color: #138496;
}

.billing-warning {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.warning-text {
  color: #856404;
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}

.header-top-section {
  margin-bottom: 15px;
}

.validity-period {
  background-color: #d1ecf1;
  border: 1px solid #bee5eb;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 12px;
  color: #0c5460;
  font-weight: 500;
  margin-bottom: 10px;
  white-space: nowrap;
  text-align: center;
}

.issuer-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.billing-check-button-header {
  background-color: #009B9B;
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 4px;
  font-size: 13px;
  transition: background-color 0.3s;
  white-space: nowrap;
}

.billing-check-button-header:hover {
  background-color: #007a7a;
  color: white;
}

.downgrade-button-header {
  background-color: #dc3545;
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 4px;
  font-size: 13px;
  transition: background-color 0.3s;
  white-space: nowrap;
}

.downgrade-button-header:hover {
  background-color: #c82333;
  color: white;
}

.payment-status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
}

.payment-status-paid {
  background-color: #d1e7dd;
  color: #0f5132;
}

.payment-status-unpaid {
  background-color: #f8d7da;
  color: #721c24;
}

/* 課金情報ページ専用のボタンスタイル */
.billing-info-actions {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 15px !important;
  flex-direction: row !important;
}

.billing-info-actions .btn {
  text-align: center !important;
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
  min-width: 80px !important;
  white-space: nowrap !important;
}

/* レスポンシブでも横並びを維持 */
@media (max-width: 768px) {
  .billing-info-actions {
    flex-direction: row !important;
    justify-content: center !important;
    gap: 10px !important;
  }

  .billing-info-actions .btn {
    text-align: center !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-width: 70px !important;
    white-space: nowrap !important;
  }
}