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

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  background: #ffffff;
  color: #333;
  padding: 20px 30px;
}

.page-wrapper {
  max-width: 960px;
  margin: 0 auto;
}

h1 {
  font-size: 20px;
  margin-bottom: 16px;
  color: #1a1a1a;
}

h2 {
  font-size: 16px;
  margin-bottom: 12px;
  color: #1a1a1a;
}

/* Navigation */
.main-nav {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 2px solid #80ff00;
}

.main-nav a {
  padding: 8px 16px;
  text-decoration: none;
  color: #333;
  font-size: 13px;
  font-weight: bold;
  border-radius: 6px 6px 0 0;
  background: #f0f0f0;
  border: 1px solid #ccc;
  border-bottom: none;
  margin-right: 2px;
}

.main-nav a:hover {
  background: #e0f5c0;
}

.main-nav .nav-active {
  background: #7dfe7d;
  color: #1a1a1a;
}

/* Dashboard Cards */
.dashboard-cards {
  display: flex;
  gap: 16px;
}

.dash-card {
  background: linear-gradient(180deg, rgba(186,251,191,1) 0%, rgba(233,255,235,1) 100%);
  border: 1px solid #c6eea0;
  border-radius: 9px;
  padding: 20px 30px;
  text-align: center;
  min-width: 160px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 6px 14px;
  font-size: 12px;
  background: #7dfe7d;
  border: 1px solid #5cc55c;
  border-radius: 5px;
  color: #1a1a1a;
  text-decoration: none;
  cursor: pointer;
  font-weight: bold;
  margin-right: 6px;
}

.btn:hover {
  background: #60e060;
}

.btn-small {
  padding: 3px 10px;
  font-size: 11px;
}

.btn-danger {
  background: #ff8888;
  border-color: #cc5555;
}

.btn-danger:hover {
  background: #ff6666;
}

.btn-secondary {
  background: #e8e8e8;
  border-color: #aaa;
}

.btn-secondary:hover {
  background: #d8d8d8;
}

/* Phase Blocks (Onboarding) */
.phase-block {
  margin-bottom: 28px;
}

.phase-header {
  display: inline-flex;
  align-items: center;
  background: #7dfe7d;
  padding: 12px 16px 5px 10px;
  border-radius: 9px 9px 0 0;
  font-size: 14px;
  color: #1a1a1a;
}

.phase-header .phase-num {
  font-weight: bold;
  margin-right: 4px;
}

.phase-header .kw {
  font-weight: bold;
}

.phase-bar {
  height: 5px;
  background: #80ff00;
  width: 100%;
  margin-bottom: 8px;
}

.card {
  background: #BAFBBF;
  background: linear-gradient(180deg, rgba(186,251,191,1) 0%, rgba(233,255,235,1) 100%);
  border: 1px solid #c6eea0;
  border-radius: 9px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.card-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.card-main {
  flex: 1;
}

.card-stat {
  width: 210px;
  background: #c8f090;
  border: 1px solid #9fc572;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 12px 10px;
  text-align: center;
  flex-shrink: 0;
}

.stat-number {
  font-size: 56px;
  font-weight: bold;
  color: #2a2a2a;
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: #333;
  margin-top: 6px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  text-align: left;
  padding: 4px 8px;
  font-weight: normal;
  color: #555;
  font-size: 12px;
  border-bottom: 1px solid #bce890;
}

tbody td {
  padding: 5px 8px;
  vertical-align: middle;
}

tbody tr + tr td {
  border-top: 1px solid #d4f5b0;
}

.name-link {
  color: #1a5096;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
}

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

.action-link {
  color: #1a5096;
  text-decoration: none;
  cursor: pointer;
}

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

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  background: #5090cc;
  color: white;
  border-radius: 50%;
  font-size: 9px;
  font-style: italic;
  font-weight: bold;
  cursor: pointer;
  margin-left: 2px;
  vertical-align: middle;
  font-family: Georgia, serif;
}

.error-dot {
  width: 20px;
  height: 20px;
  background: radial-gradient(circle at 38% 35%, #ff5555, #aa0000);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  vertical-align: middle;
}

/* Phase 4 specifics */
.phase4-note {
  font-size: 12px;
  color: #333;
  margin-bottom: 10px;
  line-height: 1.5;
}

.funding-bar {
  background: #edffd4;
  border: 1px solid #c6eea0;
  border-radius: 3px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.funding-label {
  font-weight: bold;
}

.funding-amount {
  margin-left: 4px;
}

.funding-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

select.period-select {
  padding: 2px 5px;
  font-size: 12px;
  border: 1px solid #aaa;
  border-radius: 3px;
  background: #fff;
}

.btn-show {
  padding: 2px 10px;
  font-size: 12px;
  background: #e8e8e8;
  border: 1px solid #aaa;
  border-radius: 3px;
  cursor: pointer;
}

.btn-show:hover {
  background: #d8d8d8;
}

/* Forms */
.form-group {
  margin-bottom: 10px;
}

.form-group label {
  display: block;
  font-size: 12px;
  color: #555;
  margin-bottom: 3px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 5px 8px;
  font-size: 13px;
  border: 1px solid #bbb;
  border-radius: 4px;
  font-family: Arial, Helvetica, sans-serif;
}

.form-group textarea {
  height: 60px;
  resize: vertical;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
}

.form-actions {
  margin-top: 14px;
  display: flex;
  gap: 8px;
}

/* Messages */
.msg-success {
  background: #d4ffd4;
  border: 1px solid #88cc88;
  padding: 8px 12px;
  border-radius: 5px;
  margin-bottom: 12px;
  font-size: 12px;
}

.msg-error {
  background: #ffd4d4;
  border: 1px solid #cc8888;
  padding: 8px 12px;
  border-radius: 5px;
  margin-bottom: 12px;
  font-size: 12px;
}

/* Tooltip for info icon */
.info-tooltip {
  position: relative;
  display: inline-block;
}

.info-tooltip .tooltip-text {
  visibility: hidden;
  width: 220px;
  background-color: #333;
  color: #fff;
  text-align: left;
  border-radius: 5px;
  padding: 8px;
  position: absolute;
  z-index: 10;
  bottom: 125%;
  left: 50%;
  margin-left: -110px;
  font-size: 11px;
  font-style: normal;
  font-weight: normal;
  line-height: 1.4;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.info-tooltip:hover .tooltip-text {
  visibility: visible;
}
