:root {
  --color-primary: #339933;
  --color-primary-light: #e6f4ea;
  --color-primary-dark: #2d5a2d;
  --color-warning: #8b6b00;
  --color-warning-bg: #fff3e0;
  --color-error: #c62828;
  --color-error-bg: #ffebee;
  --color-neutral: #5f6368;
  --color-neutral-bg: #f1f3f4;
  --color-text: #333;
  --color-background: #f5f5f5;
  --color-white: #fff;
  --color-border: #ccc;
  --spacing-xs: 0.2rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 6px 12px rgba(0, 0, 0, 0.2);
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --font-xs: 0.8rem;
  --font-sm: 1rem;
  --font-md: 1.2rem;
  --font-lg: 1.5rem;
  --font-xl: 1.8rem;
  --font-xxl: 2.5rem;
}

html {
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
}

h3 {
  font-size: var(--font-md);
  margin: var(--spacing-md) 0 var(--spacing-xs) 0;
  color: #444;
  border-left: 0.15em solid var(--color-primary);
  padding-left: var(--spacing-md);
}

.main {
  margin: 0 auto;
  padding: 0 var(--spacing-md) var(--spacing-md);
}

.main > h2 {
  font-size: var(--font-xl);
  margin-top: var(--spacing-xs);
  margin-bottom: var(--spacing-lg);
  color: #333;
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: var(--spacing-xs);
  margin-left: calc(-1 * var(--spacing-md));
  padding-left: var(--spacing-md);
}

.app-header {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: var(--spacing-md) var(--spacing-md);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-header h1 {
  white-space: nowrap;
  margin: 0;
  font-size: var(--font-lg);
}

.app-header h1 a {
  color: var(--color-white);
  text-decoration: none;
  font-weight: bold;
}

.app-header h1 a:hover {
  text-decoration: underline;
}

.hamburger-menu {
  display: block;
  cursor: pointer;
}

.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px 0;
  background-color: var(--color-white);
  transition: all 0.3s ease;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 80%;
  max-width: 300px;
  height: 100%;
  background-color: var(--color-primary-dark);
  padding-top: 60px;
  box-shadow: -2px 0 5px rgba(0,0,0,0.5);
  z-index: 1050;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-nav.open {
  display: block;
  transform: translateX(0);
}

.mobile-nav a {
  display: block;
  padding: 15px 20px;
  color: white;
  text-decoration: none;
  border-bottom: 1px solid #444;
}

.mobile-nav a:hover {
  background-color: #555;
}

.close-menu-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

.card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  padding: var(--spacing-xs) var(--spacing-md);
  margin-bottom: var(--spacing-md);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  text-align: justify; 
}

.card h1 {
  margin-top: 0;
  font-size: var(--font-lg);
  color: var(--color-primary);
}

.card h2 {
  margin-top: 0;
  margin-bottom: 0;
  color: var(--color-primary);
  font-size: var(--font-lg);
}

.card p {
  margin: var(--spacing-xs) 0;
  line-height: 1.8;
  text-indent: 1em;
}

.card code {
  background: var(--color-background);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  font-size: var(--font-sm);
  font-family: monospace;
}

.command {
  border: 1px solid var(--color-border);
  background-color: var(--color-white);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.command-title {
  background-color: var(--color-primary-light);
  color: var(--color-primary-dark);
  border-left: 4px solid var(--color-primary);
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--radius-sm);
  font-size: var(--font-md);
  font-weight: bold;
  min-width: 4em;
  margin-right: var(--spacing-md);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.command-title .material-icons {
  font-size: 1.2em;
  margin-right: var(--spacing-xs);
  position: relative;
  top: 0.2em;
  color: var(--color-primary-dark);
}

.status,
.status-submitted,
.status-participated,
.status-declined,
.status-pending,
.status-unsubmitted,
.status-time,
.name,
.score {
  font-weight: bold;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  font-size: var(--font-md);
  border: none;
  box-sizing: border-box;
  height: 2.8rem;
  line-height: 1.4;
}

.score {
  color: var(--color-primary-dark);
  padding: 0.5rem 0.5rem;
  background-color: var(--color-primary-light);
  justify-content: center;
  margin-left: var(--spacing-md);
  width: 2em;
}

.status::before,
.status-submitted::before,
.status-participated::before,
.status-declined::before,
.status-pending::before,
.status-unsubmitted::before {
  margin-right: 0.5rem;
  font-size: 1.2em;
}

.status-submitted {
  color: var(--color-primary-dark);
  background-color: var(--color-primary-light);
  justify-content: center;
  width: 6.5em;
}

.status-unsubmitted {
  color: var(--color-error);
  background-color: var(--color-error-bg);
  justify-content: center;
  width: 6.5em;
}

.status-participated {
  color: var(--color-primary-dark);
  background-color: var(--color-primary-light);
  justify-content: center;
  width: 7em;
}

.status-declined {
  color: var(--color-neutral);
  background-color: var(--color-neutral-bg);
  justify-content: center;
  width: 7em;
}

.status-pending {
  color: var(--color-warning);
  background-color: var(--color-warning-bg);
  justify-content: center;
  width: 7em;
}

.status-time {
  color: var(--color-primary-dark);
  background-color: var(--color-primary-light);
  width: 10em;
}

.status-time::before { content: "🎉"; }
.status-submitted::before { content: "🌸"; }
.status-participated::before { content: "🎉"; }
.status-declined::before { content: "🙅‍♂️"; }
.status-pending::before { content: "🤔"; }
.status-unsubmitted::before { content: "⚠️"; }

.name {
  background-color: var(--color-primary-light);
  color: var(--color-primary-dark);
  border-left: 4px solid var(--color-primary);
  justify-content: flex-start;
  margin-right: var(--spacing-md);
  width: 6.5em;
}

.status-row {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.status-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  width: 5em;
}

.status-buttons .status {
  min-width: 5em;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  height: 2.8rem;
  line-height: 1.4;
  color: var(--color-neutral);
  background-color: var(--color-neutral-bg);
}

.status-buttons .status:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.status-buttons .status-participated {
  color: var(--color-primary-dark);
  background-color: var(--color-primary-light);
}

.status-buttons .status-declined {
  color: var(--color-neutral);
  background-color: var(--color-neutral-bg);
}

.status-buttons .status-pending {
  color: var(--color-warning);
  background-color: var(--color-warning-bg);
}

.app-footer {
  background-color: var(--color-primary);
  color: var(--color-white);
  text-align: center;
  padding: var(--spacing-xs) 0;
  margin-top: var(--spacing-sm);
  font-size: var(--font-sm);
}

.app-footer a {
  color: #0056b3;
  text-decoration: none;
}

.app-footer p {
  line-height: 1.6;
}

.loader {
  position: fixed;
  top: 10px;
  left: 10px;
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 9999;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.btn, .status-buttons .status, .button-container button {
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-md);
  padding: var(--spacing-md) var(--spacing-xl);
}

.btn:hover, .status-buttons .status:hover, 
.button-container button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.button-container {
  text-align: center;
  width: 100%;
  margin-top: var(--spacing-sm);
}

.button-container button {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: var(--color-white);
  border-radius: 25px;
  box-shadow: 0 4px 8px rgba(51, 153, 51, 0.3);
  position: relative;
  overflow: hidden;
  font-size: var(--font-sm);
  padding: var(--spacing-sm) var(--spacing-md);
}

.button-container button:hover {
  background: linear-gradient(135deg, var(--color-primary-dark), #2a512a);
}

.button-container button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(51, 153, 51, 0.2);
}

.button-container button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.button-container button:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

.spacing {
  margin: var(--spacing-md) 0;
}

:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

.menu-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-sm);
}

.btn {
  min-width: 60%;
  max-width: 90%;
  width: 80%;
  padding: var(--spacing-lg) var(--spacing-lg);
  font-size: var(--font-lg);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.btn.primary {
  background-color: #66b966;
  color: var(--color-white);
}

.btn.dark {
  background-color: #353a40;
  color: var(--color-white);
}

.btn.light {
  background-color: transparent;
  color: #353a40;
  border: 1px solid #353a40;
}

.btn-icon {
  font-size: var(--font-lg);
  margin-right: var(--spacing-sm);
}



#data {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.btn-action {
    background-color: var(--color-warning-bg);
    color: var(--color-warning);
    border: 1px solid #ffecb5;
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: var(--font-md);
    border-radius: var(--radius-sm);
    line-height: 1.5;
    min-width: auto;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
}

.btn-action:hover:not(:disabled) {
    background-color: #fff3cd;
    border-color: #ffe69c;
    color: #664d03;
}

.submission-status-card {
  padding-top: 1.5rem;
  position: relative;
  min-height: 100px;
}

h2 .refresh-icon {
  font-size: var(--font-md);
  padding: var(--spacing-xs) var(--spacing-sm); 
  line-height: 1;
  }

#initial-load-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-primary);
  z-index: 9999;
  opacity: 1;
  transition: opacity 1s ease-out 1s;
  pointer-events: none;
}

#initial-load-overlay.hide {
  opacity: 0;
}

.tab-nav {
  display: flex;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #e0e0e0;
  background-color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
}

.tab-button {
  padding: 0.8rem 1.2rem;
  border: none;
  background-color: transparent;
  cursor: pointer;
  font-size: 0.95rem;
  color: #666;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
  white-space: nowrap;
  flex-grow: 1;
  text-align: center;
}

.tab-button:hover {
  color: #333;
  background-color: #f8f8f8;
}

.tab-button.active {
  background-color: var(--color-primary-light);
  color: var(--color-primary-dark);
  border-bottom: 3px solid var(--color-primary-dark);
  transform: translateY(-2px);
}

.tab-content {
  display: none;
  padding: 0 0.5rem;
}

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

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

.comment-section {
  margin-top: 0.8em;
  display: block;
}

.comment-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.7em;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-bottom: 0.5em;
  line-height: 1.5; 
}

.save-comment-btn {
  margin-top: 0.5em; 
}

.save-status {
  font-size: 0.8em;
  font-style: italic;
  margin-left: 0.5em;
  display: inline-block;
  vertical-align: middle;
}

.progress-comment-display span {
  white-space: pre-wrap;
  word-wrap: break-word;
  text-align: justify;
}
.tab-container {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: var(--spacing-md);
}

.tab-button {
  padding: var(--spacing-sm) var(--spacing-md);
  cursor: pointer;
  border: none;
  background-color: transparent;
  font-size: 1rem;
  color: var(--color-neutral);
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}

.tab-button.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: bold;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.5s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
