/* style.css */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: #f5f5f5;
  margin: 0;
  padding: 12px;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif;
  font-size: 16px;
}

h1 {
  color: #333;
  text-align: center;
  margin: 0 0 12px;
  font-size: 1.3rem;
}

.stats-bar {
  position: sticky;
  z-index: 100;
  background: #fff;
  border-radius: 12px;
  margin-bottom: 12px;
  padding: 12px;
  top: 0;
  box-shadow: 0 2px 8px #0000001a;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: .9rem;
}

.stats-row:last-child {
  margin-bottom: 0;
}

.stat-label {
  color: #666;
}

.stat-value {
  font-weight: 600;
}

.stat-value.success {
  color: #22c55e;
}

.stat-value.danger {
  color: #ef4444;
}

.stat-value.warning {
  color: #f59e0b;
}

.progress-bar {
  overflow: hidden;
  background: #e5e5e5;
  border-radius: 5px;
  height: 10px;
  margin-top: 8px;
}

.progress-fill {
  height: 100%;
  transition: width .3s;
}

.progress-fill.quorum {
  background: #3b82f6;
}

.progress-fill.quorum.success {
  background: #22c55e;
}

.progress-fill.quorum.danger {
  background: #ef4444;
}

.voting-progress-bar {
  overflow: hidden;
  display: flex;
  background: #e5e5e5;
  border-radius: 5px;
  height: 10px;
  margin-top: 8px;
}

.voting-progress-pro {
  background: #22c55e;
  height: 100%;
  transition: width .3s;
}

.voting-progress-proti {
  background: #ef4444;
  height: 100%;
  transition: width .3s;
}

.progress-labels {
  display: flex;
  color: #666;
  justify-content: space-between;
  margin-top: 4px;
  font-size: .75rem;
}

.progress-label-pro {
  color: #22c55e;
  font-weight: 600;
}

.progress-label-proti {
  color: #ef4444;
  font-weight: 600;
}

.section {
  background: #fff;
  border-radius: 12px;
  margin-bottom: 12px;
  padding: 12px;
  box-shadow: 0 2px 8px #0000001a;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  margin-bottom: 12px;
}

.section-title {
  color: #333;
  font-size: 1rem;
  font-weight: 600;
}

.owner-card {
  background: #f9f9f9;
  border-left: 4px solid #ddd;
  border-radius: 8px;
  margin-bottom: 8px;
  padding: 10px 12px;
}

.owner-card.present {
  background: #eff6ff;
  border-left-color: #3b82f6;
}

.owner-card.pro {
  background: #f0fdf4;
  border-left-color: #22c55e;
}

.owner-card.proti {
  background: #fef2f2;
  border-left-color: #ef4444;
}

.owner-card.zdrzel {
  background: #fffbeb;
  border-left-color: #f59e0b;
}

.owner-header {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  margin-bottom: 6px;
}

.owner-name {
  font-size: .95rem;
  font-weight: 600;
}

.owner-name.me {
  color: #3b82f6;
}

.owner-info {
  color: #666;
  font-size: .8rem;
}

.owner-controls {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.btn {
  cursor: pointer;
  border: none;
  border-radius: 6px;
  flex: 1;
  padding: 10px 8px;
  transition: all .2s;
  font-size: .85rem;
  font-weight: 500;
}

.btn-attendance {
  color: #666;
  background: #e5e5e5;
}

.btn-attendance.active {
  color: #fff;
  background: #3b82f6;
}

.btn-pro {
  color: #666;
  background: #e5e5e5;
}

.btn-pro.active {
  color: #fff;
  background: #22c55e;
}

.btn-proti {
  color: #666;
  background: #e5e5e5;
}

.btn-proti.active {
  color: #fff;
  background: #ef4444;
}

.btn-zdrzel {
  color: #666;
  background: #e5e5e5;
}

.btn-zdrzel.active {
  color: #fff;
  background: #f59e0b;
}

.voting-section {
  display: none;
}

.voting-section.active {
  display: block;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.tab {
  cursor: pointer;
  color: #666;
  background: #e5e5e5;
  border: none;
  border-radius: 8px;
  flex: 1;
  padding: 12px;
  font-size: .9rem;
  font-weight: 600;
}

.tab.active {
  color: #fff;
  background: #3b82f6;
}

.config-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 16px;
  padding: 12px;
}

.config-title {
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #94a3b8;
  margin-bottom: 10px;
  font-size: .75rem;
  font-weight: 600;
}

.majority-toggle {
  display: flex;
  gap: 8px;
}

.majority-btn {
  cursor: pointer;
  background: #fff;
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  flex: 1;
  padding: 10px;
  font-size: .85rem;
}

.majority-btn.active {
  color: #3b82f6;
  background: #eff6ff;
  border-color: #3b82f6;
  font-weight: 600;
}

.results-section {
  background: none;
  border: none;
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 0 4px 12px;
}

.results-section.success, .results-section.failure {
  border-color: #0000;
}

.results-title {
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #94a3b8;
  margin-bottom: 8px;
  font-size: .75rem;
  font-weight: 600;
}

.voting-result {
  display: none;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.summary-item {
  text-align: center;
  background: #f1f5f9;
  border-radius: 6px;
  padding: 8px 4px;
}

.summary-item.pro {
  color: #166534;
  background: #dcfce7;
}

.summary-item.proti {
  color: #991b1b;
  background: #fee2e2;
}

.summary-item.zdrzel {
  color: #92400e;
  background: #fef3c7;
}

.summary-value {
  font-size: 1.1rem;
  font-weight: 700;
}

.summary-label {
  opacity: .8;
  margin-top: 2px;
  font-size: .7rem;
  font-weight: 600;
}

.voters-section {
  background: #fff;
  border-radius: 12px;
  margin-bottom: 12px;
  padding: 12px;
  box-shadow: 0 2px 8px #0000001a;
}

.voters-title {
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #94a3b8;
  margin-bottom: 12px;
  font-size: .75rem;
  font-weight: 600;
}

.reset-btn {
  color: #991b1b;
  cursor: pointer;
  background: #fee2e2;
  border: none;
  border-radius: 8px;
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  font-size: .9rem;
  font-weight: 600;
}

.all-btns {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.all-btn {
  cursor: pointer;
  border: none;
  border-radius: 6px;
  flex: 1;
  padding: 10px;
  font-size: .8rem;
  font-weight: 500;
}

.all-btn.present {
  color: #fff;
  background: #3b82f6;
}

.all-btn.absent {
  color: #666;
  background: #e5e5e5;
}

.needed-votes-row {
  text-align: center;
  color: #666;
  margin-top: 10px;
  font-size: .85rem;
}

.needed-votes-value {
  color: #333;
  font-weight: 600;
}
