/* S4 Change Control – Stylesheet */

.s4cc-wrap {
    max-width: 860px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1a1a2e;
}

.s4cc-wrap h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.6rem;
}

.s4cc-sub {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1.4rem;
}

/* Form */
.s4cc-form label {
    display: block;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin: 1rem 0 0.3rem;
}

.s4cc-req { color: #ef4444; }

.s4cc-form input[type="text"],
.s4cc-form select,
.s4cc-form textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95rem;
    box-sizing: border-box;
    background: #f8fafc;
    transition: border-color 0.2s;
}

.s4cc-form input:focus,
.s4cc-form select:focus,
.s4cc-form textarea:focus {
    outline: none;
    border-color: #6366f1;
    background: #fff;
}

/* Buttons */
.s4cc-btn {
    display: inline-block;
    padding: 0.55rem 1.2rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.15s;
}
.s4cc-btn:hover { opacity: 0.85; }

.s4cc-btn { background: #6366f1; color: #fff !important; margin-top: 1rem; }
.s4cc-btn-approve { background: #16a34a; color: #fff !important; margin-top: 0; }
.s4cc-btn-reject  { background: #dc2626; color: #fff !important; margin-top: 0; }
.s4cc-btn-abstain { background: #94a3b8; color: #fff !important; margin-top: 0; }
.s4cc-btn-ghost   { background: transparent; color: #64748b !important; border: 1px solid #cbd5e1; }
.s4cc-btn-sm      { padding: 0.35rem 0.8rem; font-size: 0.8rem; }

/* Messages */
.s4cc-success {
    background: #f0fdf4; border: 1px solid #86efac; color: #166534;
    padding: 0.6rem 1rem; border-radius: 6px; margin-bottom: 1rem;
}
.s4cc-error {
    background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b;
    padding: 0.6rem 1rem; border-radius: 6px; margin-bottom: 1rem;
}
.s4cc-empty {
    color: #64748b; padding: 2rem; text-align: center;
    border: 2px dashed #e2e8f0; border-radius: 8px;
}

/* Proposal cards */
.s4cc-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.4rem;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.s4cc-card-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.6rem;
}

.s4cc-meta {
    font-size: 0.8rem;
    color: #94a3b8;
}

.s4cc-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.s4cc-desc {
    color: #475569;
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Tally bar */
.s4cc-tally { margin-bottom: 1rem; }

.s4cc-tally-bar {
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.s4cc-tally-fill {
    height: 100%;
    background: #16a34a;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.s4cc-tally-counts {
    display: flex;
    gap: 1rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.s4cc-approve-count { color: #16a34a; }
.s4cc-reject-count  { color: #dc2626; }
.s4cc-needed        { color: #94a3b8; margin-left: auto; }

/* Voter grid */
.s4cc-voter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.s4cc-voter {
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.s4cc-voted-approve { background: #f0fdf4; border-color: #86efac; color: #166534; }
.s4cc-voted-reject  { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.s4cc-voted-abstain { background: #f8fafc; border-color: #cbd5e1; color: #64748b; }
.s4cc-pending       { opacity: 0.6; }

.s4cc-voter-comment {
    display: block;
    font-weight: 400;
    font-style: italic;
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 2px;
}

.s4cc-my-vote {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

/* Vote form */
.s4cc-vote-form textarea {
    width: 100%;
    padding: 0.5rem 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.88rem;
    box-sizing: border-box;
    background: #f8fafc;
    resize: vertical;
    margin-bottom: 0.6rem;
}

.s4cc-vote-btns {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.s4cc-withdraw-form { margin-top: 0.8rem; }

/* Badges */
.s4cc-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Category badges */
.s4cc-cat-strategy    { background: #ede9fe; color: #5b21b6; }
.s4cc-cat-spending    { background: #fef3c7; color: #92400e; }
.s4cc-cat-partnership { background: #dbeafe; color: #1e40af; }
.s4cc-cat-product     { background: #dcfce7; color: #166534; }
.s4cc-cat-operations  { background: #f1f5f9; color: #334155; }
.s4cc-cat-personnel   { background: #fce7f3; color: #9d174d; }
.s4cc-cat-general     { background: #f1f5f9; color: #475569; }

/* Status badges */
.s4cc-status-approved  { background: #dcfce7; color: #166534; }
.s4cc-status-rejected  { background: #fef2f2; color: #991b1b; }
.s4cc-status-withdrawn { background: #f1f5f9; color: #64748b; }

/* Decision table */
.s4cc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.s4cc-table th {
    background: #f1f5f9;
    text-align: left;
    padding: 0.6rem 0.8rem;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    border-bottom: 2px solid #e2e8f0;
}

.s4cc-table td {
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}

.s4cc-table tr:hover td { background: #f8fafc; }
