h1 {
  color: #0077b6;
}

/* ===== GENERAL MOBILE IMPROVEMENT ===== */
body{
    font-family: Arial;
    background:#f5f7fa;
    margin:0;
}

/* ===== GRID & CARDS (existing improved) ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.card {
  background: white;
  padding: 12px;
  border-radius: 12px; /* smoother */
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  margin-bottom:10px;
}

/* ===== NEW POLL CARD STRUCTURE ===== */
.row1{
    display:flex;
    justify-content:space-between;
    font-size:14px;
    margin-bottom:6px;
}

.row1 span{
    color:#777;
    font-size:12px;
}

.row2{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:6px;
}

/* ===== SUMMARY BOX ===== */
.summary{
    background:#e6f7ff;
    padding:10px;
    margin:10px;
    border-radius:10px;
    text-align:center;
    font-size:14px;
}

/* ===== TABLE (KEEP FOR DESKTOP FALLBACK) ===== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    width: 100%;
}

th, td {
    padding: 8px;
    text-align: center;
}

th {
    background: #cceeff;
}

/* ===== BUTTON BASE ===== */
.join-btn, .payment-btn, .pay-btn {
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    min-width: 70px;
    border:none;
    font-size:13px;
}

/* ===== JOINING COLORS ===== */
.join-btn.yes{
    background:#28a745;
    color:white;
}
.join-btn.no{
    background:#dc3545;
    color:white;
}
.join-btn.undecided{
    background:#6c757d;
    color:white;
}

/* ===== PAYMENT COLORS ===== */
.pay-btn.paid{
    background:#28a745;
    color:white;
}
.pay-btn.unpaid{
    background:#ffc107;
    color:black;
}

/* non-admin label */
.pay-label.paid{
    color:#28a745;
    font-weight:bold;
}
.pay-label.unpaid{
    color:#ffc107;
    font-weight:bold;
}

/* ===== VOTING CARD (KEEP EXISTING) ===== */
.vote-row {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: space-between;
    margin-bottom: 20px;
}

.vote-card {
    flex: 1 1 0;
    min-width: 0;
    cursor: pointer;
}

.vote-card input {
    display: none;
}

.card-content {
    border: 2px solid #ddd;
    border-radius: 15px;
    padding: 15px 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

.name {
    font-size: 16px;
    font-weight: bold;
}

.company {
    font-size: 12px;
    color: #777;
}

.vote-card:hover .card-content {
    border-color: #0077b6;
    transform: translateY(-3px);
}

.vote-card input:checked + .card-content {
    border-color: #0077b6;
    background: #e6f4ff;
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.btn-submit {
    background: #0077b6;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
}

/* ===== MEMBER CARD (KEEP EXISTING) ===== */
.card-container{
    display:flex;
    flex-direction:column;
    gap:15px;
}

.member-card{
    background:#fff;
    padding:15px;
    border-radius:12px;
    box-shadow:0 2px 8px rgba(0,0,0,0.08);
}

.card-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:10px;
    font-size:16px;
}

.status{
    font-size:12px;
    padding:3px 8px;
    border-radius:6px;
    background:#eee;
}

/* ===== MONTH GRID ===== */
.months-grid{
    display:grid;
    grid-template-columns: repeat(5, 1fr);
    gap:8px;
}

.month-box{
    text-align:center;
    font-size:12px;
}

.month-label{
    margin-bottom:4px;
    font-weight:bold;
}

.tick{
    padding:6px;
    border-radius:6px;
    background:#f0f0f0;
}

.tick.paid{
    background:#4CAF50;
    color:white;
    font-weight:bold;
}

/* ===== MOBILE OPTIMIZATION ===== */
@media (max-width:600px){

    .row1{
        flex-direction:column;
        align-items:flex-start;
    }

    .row2{
        flex-wrap:wrap;
        gap:8px;
    }

    .join-btn, .pay-btn{
        flex:1;
    }

    h2{
        text-align:center;
        font-size:18px;
    }
}