@charset "UTF-8";

:root {
  /* Color Palette - Inherited from kanrensha_style.css */
  --primary-color: #4169e1;       /* Navy / Royal Blue */
  --accent-color: #fffacd;        /* lemonchiffon */
  --warning-color: #FFC107;       /* Yellow/Orange warning */
  --success-color: #d4edda;
  --secondary-color: #f5f5f5;     /* Light gray for backgrounds */
  --text-color: #333;
  --border-color: #ddd;
  --focus-ring-color: #003366a0;

  /* User Role Colors */
  --role-admin-color: #FF0000;
  --role-manager-color: #0000FF;
  --role-apiuser-color: #008000;
  --role-kanrensha-color: darkkhaki;
  --role-all-color: gold;

  /* Font */
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  font-weight: 400;
  color: var(--text-color);
  background-color: #fbfbfd;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Global Reset */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background-color: #f4f6f9;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Typography */
h1 {
  display: inline-block;
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 5px;
  padding-left: 5px;
  padding-right: 5px;
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  color: #1a1a1a;
}

h2 {
  font-size: 1.6rem;
  color: #222;
  border-left: 5px solid var(--primary-color);
  padding-left: 12px;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  color: #333;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.accent-h3 {
  display: inline-block;
  border-bottom: 1px solid var(--primary-color);
  padding-bottom: 3px;
  padding-left: 3px;
  padding-right: 3px;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.indent-h3 {
  display: inline-block;
  padding-left: 9px;
  font-weight: bold;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #4a4a4a;
}

/* General Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex-grow: 1;
}

/* Header & Navigation Tabs */
header.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
}

/* Always display title and navigation tabs on separate lines (rows) to prevent awkward title wrapping */
@media (min-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: stretch;
  }
}

.site-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0;
}

.site-title h1.logo-text {
  font-size: 1.35rem;
  margin: 0;
  padding: 0;
  border-bottom: none;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

.logo-badge {
  background-color: var(--primary-color);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
}

/* Tabs */
.nav-tabs {
  display: flex;
  overflow-x: auto;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.5rem;
  -webkit-overflow-scrolling: touch;
}

.tab-item {
  margin: 0;
}

.tab-button {
  display: block;
  padding: 1rem 1.2rem;
  border: none;
  border-radius: 0;
  background: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-button:hover {
  color: var(--primary-color);
  background-color: rgba(65, 105, 225, 0.05);
}

.tab-button.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  background-color: rgba(65, 105, 225, 0.02);
}

/* Sections management */
.tab-content-panel {
  display: none;
}

.tab-content-panel.active {
  display: block;
  animation: fadeIn 0.35s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Area / Significance section */
.hero-section {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  padding: 3rem 2rem;
  border-radius: 12px;
  margin-bottom: 2.5rem;
  box-shadow: 0 4px 15px rgba(30, 60, 114, 0.15);
}

.hero-section h2 {
  border-left: none;
  color: white;
  padding-left: 0;
  margin-top: 0;
  font-size: 2rem;
  font-weight: 700;
}

.hero-section p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  max-width: 800px;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

/* Cards & Grid layouts */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.portal-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.portal-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.08);
}

.portal-card h3 {
  margin-top: 0;
  font-size: 1.2rem;
  color: #111;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.portal-card p {
  font-size: 0.9rem;
  color: #555;
  flex-grow: 1;
}

.card-link-btn {
  align-self: flex-start;
  margin-top: 1rem;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.card-link-btn:hover {
  background-color: #2b4ea1;
}

/* Alerts and Messages - Adapted from kanrensha_style.css */
.msg-box {
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.msgbox-warning {
  background-color: #fff9e6;
  border-color: #ffe8a1;
  color: #856404;
}

.msgbox-warning h4 {
  margin: 0;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.msgbox-error {
  background-color: #fdf2f2;
  border-color: #f5c6cb;
  color: #721c24;
}

.msgbox-info {
  background-color: #f1f8e9;
  border-color: #c5e1a5;
  color: #33691e;
}

/* Sub-features & Link List */
.sub-feature-section {
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.link-block {
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px dashed var(--border-color);
}

.link-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

@media (min-width: 768px) {
  .link-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.5rem;
  }
}

.link-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.link-item:hover {
  text-decoration: underline;
}

/* Badge styling */
.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-right: 0.5rem;
}

.badge-warning {
  background-color: var(--warning-color);
  color: #111;
}

.badge-primary {
  background-color: var(--primary-color);
  color: white;
}

.badge-gray {
  background-color: #e0e0e0;
  color: #555;
}

/* Component Previews (Interactive/Aesthetic Mocks) */
.component-preview {
  margin-top: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: #fafbfc;
  padding: 1.5rem;
}

.component-preview-header {
  font-size: 0.85rem;
  font-weight: bold;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 1rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}

.mock-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
}

.mock-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

@media (min-width: 576px) {
  .mock-row {
    flex-direction: row;
    align-items: center;
  }
  .mock-row label {
    flex-basis: 150px;
    flex-shrink: 0;
    text-align: right;
    padding-right: 1rem;
    font-weight: 600;
  }
}

.mock-input {
  flex-grow: 1;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.9rem;
  background-color: white;
}

.mock-btn {
  padding: 0.5rem 1.2rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.mock-btn:hover {
  background-color: #2b4ea1;
}

.mock-notice {
  font-size: 0.75rem;
  color: #666;
  margin-top: 0.5rem;
  line-height: 1.4;
  background-color: #fff9e6;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  border-left: 3px solid var(--warning-color);
}

.mock-result {
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1rem;
  margin-top: 0.5rem;
  font-family: monospace;
  font-size: 0.85rem;
  color: #333;
  overflow-x: auto;
}

/* Footer Section - Adapted from kanrensha_style.css */
footer.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background-color: #ffffff;
}

.footer-top {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer-top {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-info {
  max-width: 450px;
}

.footer-logo {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.footer-desc {
  font-size: 0.8rem;
  color: #666;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .footer-links {
    text-align: right;
  }
}

.footer-link {
  font-size: 0.85rem;
  color: #555;
  text-decoration: none;
  font-weight: 500;
}

.footer-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.footer-disclaimers-box {
  background-color: var(--secondary-color);
  border-top: 1px solid var(--border-color);
  padding: 1.5rem 0;
}

.footer-disclaimers-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.disclaimer-title {
  font-size: 0.85rem;
  font-weight: bold;
  color: #555;
  margin-bottom: 0.5rem;
}

.disclaimer-text {
  font-size: 0.75rem;
  color: #777;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.disclaimer-text:last-child {
  margin-bottom: 0;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding: 1rem 0;
  background-color: #fafafa;
}

.footer-bottom-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .footer-bottom-container {
    flex-direction: row;
    justify-content: space-between;
  }
}

.copyright {
  font-size: 0.8rem;
  color: #888;
}

.footer-email {
  font-size: 0.8rem;
  color: #666;
  text-decoration: none;
}

.footer-email:hover {
  color: var(--primary-color);
}

/* Modals / Overlay Elements - Inherited from kanrensha_style.css */
.overBackground,
.overBackgroundLayer2 {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overBackground.active {
  opacity: 1;
  visibility: visible;
}

.overComponent,
.overComponentLayer2 {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 90%;
  max-width: 750px;
  max-height: 85vh;
  padding: 2rem;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow-y: auto;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.overComponent.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #111;
  margin: 0;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  font-weight: bold;
  color: #888;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close-btn:hover {
  color: #333;
}

.modal-body {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.7;
}

.modal-body h4 {
  font-size: 1.1rem;
  color: #222;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.modal-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
}

.modal-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background-color: #eee;
  color: #333;
  transition: all 0.2s;
}

.modal-btn:hover {
  background-color: #ddd;
}

/* Toast implementation styling */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background-color: #333;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}
