/**
 * 💰 Treasury System Styles
 * Democratic fund distribution and voting
 */

/* ===== Treasury Overview ===== */
.treasury-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.treasury-stat-card {
  background: linear-gradient(135deg, rgba(245, 87, 108, 0.1), rgba(240, 147, 251, 0.1));
  border: 2px solid rgba(245, 87, 108, 0.3);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.stat-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9em;
  margin-bottom: 8px;
}

.stat-value {
  color: #f5576c;
  font-size: 1.8em;
  font-weight: bold;
}

/* ===== Treasury Tabs ===== */
.treasury-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

.treasury-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 10px 20px;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
}

.treasury-tab-btn:hover {
  background: rgba(245, 87, 108, 0.2);
  border-color: rgba(245, 87, 108, 0.5);
}

.treasury-tab-btn.active {
  background: linear-gradient(135deg, rgba(245, 87, 108, 0.3), rgba(240, 147, 251, 0.3));
  border-color: #f5576c;
  border-bottom-color: transparent;
}

.treasury-tab-content {
  display: none;
}

.treasury-tab-content.active {
  display: block;
}

/* ===== Proposal Cards ===== */
.proposal-card {
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.proposal-card:hover {
  border-color: rgba(245, 87, 108, 0.5);
  transform: translateY(-2px);
}

.proposal-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 15px;
}

.proposal-title {
  color: white;
  font-size: 1.3em;
  font-weight: bold;
  margin: 0 0 8px 0;
}

.proposal-category {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(245, 87, 108, 0.2);
  border: 1px solid rgba(245, 87, 108, 0.5);
  border-radius: 20px;
  font-size: 0.85em;
  color: #f5576c;
  margin-bottom: 10px;
}

.proposal-amount {
  color: #f5576c;
  font-size: 1.5em;
  font-weight: bold;
}

.proposal-description {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: 15px;
}

.proposal-recipient {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9em;
  margin-bottom: 15px;
}

.proposal-progress {
  margin-bottom: 15px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9em;
}

.progress-bar-container {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  height: 20px;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, #f093fb, #f5576c);
  height: 100%;
  transition: width 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8em;
  font-weight: bold;
  color: white;
}

.proposal-voting {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}

.vote-option {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.vote-count {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 4px;
}

.vote-count.for { color: #4caf50; }
.vote-count.against { color: #f44336; }
.vote-count.abstain { color: #9e9e9e; }

.vote-label {
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.6);
}

.proposal-actions {
  display: flex;
  gap: 10px;
}

.btn-sign, .btn-vote {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.btn-sign {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.btn-sign:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-sign.signed {
  background: rgba(76, 175, 80, 0.3);
  border: 2px solid #4caf50;
  cursor: default;
}

.btn-vote {
  background: linear-gradient(135deg, #f093fb, #f5576c);
  color: white;
}

.btn-vote:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

/* ===== Create Proposal Form ===== */
.create-proposal-form {
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 30px;
}

.create-proposal-form h4 {
  color: white;
  margin-bottom: 10px;
}

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

.create-proposal-form label {
  display: block;
  color: white;
  margin-bottom: 8px;
  font-weight: bold;
}

.create-proposal-form input,
.create-proposal-form select,
.create-proposal-form textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-family: inherit;
  font-size: 1em;
  transition: all 0.3s ease;
}

.create-proposal-form input:focus,
.create-proposal-form select:focus,
.create-proposal-form textarea:focus {
  outline: none;
  border-color: #f5576c;
  box-shadow: 0 0 15px rgba(245, 87, 108, 0.3);
}

.create-proposal-form select option {
  background: #1a1a2e;
  color: white;
}

.create-proposal-form textarea {
  resize: vertical;
  min-height: 120px;
}

.create-proposal-form .btn-primary {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #f093fb, #f5576c);
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: bold;
  font-size: 1.1em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.create-proposal-form .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 87, 108, 0.4);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .treasury-overview {
    grid-template-columns: 1fr;
  }

  .treasury-tabs {
    flex-direction: column;
  }

  .proposal-voting {
    grid-template-columns: 1fr;
  }

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