/* School Voting System - Modern Android-Inspired Stylesheet */

/* Reset and Base Styles */
/* Scoped reset only for our plugin containers */
.svs-container *,
.voting-screen-container *,
.candidate-list-container *,
body.svs-voting-page * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Scoped body styles only for our plugin pages */
.svs-container,
.voting-screen-container,
.candidate-list-container,
body.svs-voting-page {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* Fallback for standalone pages */
body:not(.wp-admin):not(.wp-core-ui) {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #333;
    line-height: 1.6;
}

.svs-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px;
    min-height: 100vh;
}

/* Compact Header Styles - Maximum 10% of viewport height */
.svs-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 12px 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 8px;
    z-index: 100;
    max-height: 10vh;
    min-height: 60px;
}

.svs-header h1 {
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: 600;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

/* Compact Status Indicator */
.svs-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.status-label {
    font-weight: 500;
    color: #666;
    font-size: 0.75rem;
    display: none;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 25px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .status-label {
        display: block;
    }
    
    .svs-status-indicator {
        gap: 12px;
        padding: 8px 16px;
    }
    
    .status-badge {
        padding: 6px 16px;
        font-size: 0.75rem;
    }
}

.status-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.status-badge:hover::before {
    left: 100%;
}

.status-ready {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    animation: pulse-green 2s infinite;
}

.status-not-ready {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(76, 175, 80, 0.6); }
}

/* EVM-Style Modern Cards */
.svs-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.svs-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(135deg, #007cba 0%, #0056b3 100%);
    border-radius: 20px 20px 0 0;
}

.svs-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 123, 186, 0.2);
    border-color: rgba(0, 123, 186, 0.3);
}

.svs-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s;
    pointer-events: none;
}

.svs-card:hover::after {
    left: 100%;
}

.svs-card h2, .svs-card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
}

/* Responsive Grid Layouts */
.svs-control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

/* Two-Column Control Layout */
.svs-control-section {
    margin-bottom: 32px;
}

.svs-control-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.svs-control-column {
    display: flex;
    flex-direction: column;
}

.svs-control-column h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid rgba(0, 123, 186, 0.1);
    padding-bottom: 10px;
}

/* Tablet View (768px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .svs-control-row {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .svs-card {
        padding: 20px;
    }
}

/* Mobile View - Single Column */
@media (max-width: 768px) {
    .svs-control-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .svs-control-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .svs-container {
        padding: 12px;
    }
    
    .svs-header {
        padding: 20px 24px;
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .svs-card {
        padding: 24px 20px;
    }
}

@media (max-width: 480px) {
    .svs-control-grid {
        grid-template-columns: 1fr;
    }
    
    .svs-control-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .svs-header h1 {
        font-size: 1.8rem;
    }
    
    .svs-status-indicator {
        flex-direction: column;
        gap: 8px;
    }
}

/* EVM-Style Form Elements */
.svs-form-group {
    margin-bottom: 20px;
    position: relative;
}

.svs-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.svs-input, .svs-select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    font-weight: 500;
}

.svs-input:focus, .svs-select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 4px rgba(0, 123, 186, 0.15), 0 8px 25px rgba(0, 123, 186, 0.1);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
}

.svs-input:hover, .svs-select:hover {
    border-color: rgba(0, 123, 186, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.svs-select {
    cursor: pointer;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23007cba" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
    padding-right: 48px;
}

/* EVM-Style Modern Buttons */
.svs-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    min-width: 120px;
    min-height: 44px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
}

.svs-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.svs-btn:active::before {
    width: 300px;
    height: 300px;
}

.svs-btn-primary {
    background: linear-gradient(135deg, #007cba 0%, #0056b3 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 123, 186, 0.4);
}

.svs-btn-primary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    box-shadow: 0 8px 25px rgba(0, 123, 186, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.svs-btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

.svs-btn-secondary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #5a6268 0%, #3d4043 100%);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.svs-btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

.svs-btn-danger:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.svs-btn-small {
    padding: 12px 24px;
    font-size: 12px;
    min-width: 100px;
}

.svs-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.svs-btn:disabled:hover {
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.svs-button-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

@media (max-width: 480px) {
    .svs-button-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .svs-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Modern State Display */
.svs-state-display {
    display: grid;
    gap: 16px;
}

.state-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 249, 250, 0.9) 100%);
    border-radius: 16px;
    border-left: 4px solid #667eea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.state-item:hover {
    transform: translateX(4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-left-color: #764ba2;
}

.state-item strong {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.state-item span:last-child {
    font-weight: 500;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Voting Header Styles */
.voting-header {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 0 0 15px 15px;
    margin-bottom: 20px;
}

.voting-header.compact {
    padding: 6px 16px;
    min-height: auto;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.system-title {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.class-info {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.9;
}

.status-indicator {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-indicator.status-ready {
    background: #28a745;
    color: white;
}

.status-indicator.status-locked {
    background: #dc3545;
    color: white;
}

.current-time {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.9;
    text-align: center;
    margin-top: 4px;
}

/* EVM-Style Modern Results Section */
.svs-results-section {
    position: relative;
}

.results-header, .candidates-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 20px 0;
    border-bottom: 2px solid rgba(0, 123, 186, 0.1);
}

.results-header h2, .candidates-header h2 {
    margin: 0;
    background: linear-gradient(135deg, #007cba 0%, #0056b3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.svs-results {
    margin-top: 24px;
}

.svs-results h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    background: linear-gradient(135deg, #007cba, #0056b3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.svs-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(0, 123, 186, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.svs-result-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #007cba, #0056b3);
    transition: width 0.3s ease;
}

.svs-result-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 123, 186, 0.15);
    border-color: rgba(0, 123, 186, 0.3);
}

.svs-result-item:hover::before {
    width: 6px;
}

.svs-candidate-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
    text-transform: capitalize;
}

.svs-vote-count {
    font-weight: 700;
    color: #ffffff;
    font-size: 1rem;
    padding: 6px 14px;
    background: linear-gradient(135deg, #007cba, #0056b3);
    border-radius: 15px;
    min-width: 50px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 123, 186, 0.3);
 }

/* EVM-Style Candidate Display */
.post-section {
    margin-bottom: 30px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.post-header {
    background: linear-gradient(135deg, #007cba 0%, #0056b3 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-info {
    font-size: 0.9rem;
    opacity: 0.9;
}

.gender-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

@media (max-width: 768px) {
    .gender-sections {
        grid-template-columns: 1fr;
    }
}

.gender-section {
    padding: 20px;
    border-right: 1px solid #e1e5e9;
}

.gender-section:last-child {
    border-right: none;
}

.boys-section {
    background-color: #e3f2fd;
}

.girls-section {
    background-color: #fce4ec;
}

.gender-title {
    margin: 0 0 15px 0;
    text-align: center;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.gender-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}

.gender-title:hover::before {
    left: 100%;
}

.results-gender-section.boys-section .gender-title {
    background: linear-gradient(135deg, #007cba 0%, #0056b3 100%);
    box-shadow: 0 4px 15px rgba(0, 123, 186, 0.3);
}

.results-gender-section.girls-section .gender-title {
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3);
}

.status-text {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
    min-height: 20px;
}

.candidates-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.evm-card {
    border: 2px solid #ddd;
    border-radius: 10px;
    background: white;
    padding: 12px 16px;
    display: grid;
    grid-template-columns: 50px 1fr auto;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 60px;
}

.evm-card:hover {
    border-color: #007cba;
    box-shadow: 0 4px 12px rgba(0, 123, 186, 0.15);
    transform: translateY(-1px);
}

.candidate-avatar {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #dee2e6;
    flex-shrink: 0;
}

.candidate-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #dee2e6;
    flex-shrink: 0;
}

.candidate-info {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.candidate-name {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    text-transform: capitalize;
    text-align: left;
    line-height: 1.2;
}

.evm-vote-btn {
    background: linear-gradient(135deg, #007cba 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 60px;
}

.evm-vote-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 123, 186, 0.3);
}

.evm-vote-btn:active {
    transform: scale(0.98);
}

.no-candidates {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
    background: rgba(108, 117, 125, 0.1);
    border-radius: 8px;
    border: 1px dashed #6c757d;
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 1000;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.6);
}

.fab:active {
    transform: scale(0.95);
}

/* Statistics Cards */
.svs-statistics-section {
    margin-top: 32px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px 20px 0 0;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
}

/* Enhanced Statistics Panel Styles */
.statistics-content {
    padding: 20px;
}

.statistics-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

#export-statistics-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

#export-statistics-btn:hover {
    background: #218838;
}

.statistics-section {
    margin-bottom: 30px;
}

.statistics-section h4 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 2px solid #007cba;
    padding-bottom: 5px;
}

.statistics-table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.statistics-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 14px;
}

.statistics-table th,
.statistics-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.statistics-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.statistics-table tbody tr:hover {
    background: #f8f9fa;
}

.statistics-table .total-row {
    background: #e9ecef;
    font-weight: bold;
}

.statistics-table .total-row td {
    border-top: 2px solid #007cba;
}

/* Candidate Tables */
.post-section {
    margin-bottom: 25px;
}

.post-section h5 {
    color: #6c757d;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}

.candidates-table .winner-row {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.candidates-table .tie-row {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.winner-badge {
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.tie-badge {
    background: #ffc107;
    color: #212529;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.current-leader {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.voting-active-notice {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.voting-active-notice .notice-icon {
    font-size: 1.5em;
    flex-shrink: 0;
}

.voting-active-notice .notice-content {
    flex: 1;
}

.voting-active-notice .notice-content strong {
    color: #856404;
    display: block;
    margin-bottom: 4px;
}

.voting-active-notice .notice-content p {
    color: #856404;
    margin: 0;
    font-size: 0.9em;
}

.statistics-table .rank {
    text-align: center;
    font-weight: bold;
}

.statistics-table .vote-count,
.statistics-table .percentage {
    text-align: right;
    font-weight: 600;
}

.statistics-table .status {
    text-align: center;
}

/* Statistics Responsive Design */
@media (max-width: 768px) {
    .statistics-content {
        padding: 10px;
    }
    
    .statistics-table th,
    .statistics-table td {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .statistics-header {
        justify-content: center;
    }
}
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e1e5e9;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Messages */
.svs-messages {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 2000;
    max-width: 400px;
}

.svs-message {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #667eea;
    animation: slideIn 0.3s ease;
    transition: all 0.3s ease;
}

.svs-message:hover {
    transform: translateX(-4px);
}

.svs-message.success {
    border-left-color: #4CAF50;
}

.svs-message.error {
    border-left-color: #f44336;
}

.svs-message.warning {
    border-left-color: #ff9800;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Results Display */
.results-summary {
    margin-bottom: 32px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.summary-stats .stat-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.summary-stats .stat-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.summary-stats .stat-number {
    display: block;
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 5px;
    color: white;
}

.summary-stats .stat-label {
    font-size: 0.9em;
    opacity: 0.9;
    color: white;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .fab {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .fab-actions {
        bottom: 80px;
        right: 15px;
    }
    
    .svs-messages {
        top: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
    }
    
    .quick-settings-content {
        margin: 20px;
        min-width: auto;
    }
    
    .svs-control-grid {
        grid-template-columns: 1fr;
    }
    
    .svs-card {
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .results-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .svs-results-section .results-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .svs-results-section .results-header h2 {
        margin: 0;
    }
}
    
}

.results-summary {
    margin-bottom: 30px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
}

.stat-number {
    display: block;
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.9;
}

/* Pad Results - Grid Layout */
.results-pad-section {
    margin-bottom: 30px;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.results-pad-section .pad-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-pad-section .pad-header h3 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
}

.results-pad-section .pad-stats {
    display: flex;
    gap: 20px;
    font-size: 0.9em;
    opacity: 0.9;
}

.results-gender-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 0;
}

@media (max-width: 768px) {
    .results-gender-sections {
        grid-template-columns: 1fr;
    }
}

.results-gender-section {
    padding: 20px;
    border-right: 1px solid #e1e5e9;
    margin-bottom: 0;
}

.results-gender-section:last-child {
    border-right: none;
    margin-bottom: 0;
}

.results-gender-section.boys-section {
    background-color: #e3f2fd;
}

.results-gender-section.girls-section {
    background-color: #fce4ec;
}

.results-gender-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.results-gender-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.results-gender-section.boys-section .results-gender-header h4 {
    color: #007cba;
}

.results-gender-section.girls-section .results-gender-header h4 {
    color: #e91e63;
}

/* Enhanced Gender Title Styles for Poll Control Panel */
.gender-title {
    margin: 0 0 20px 0;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 1.4em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.results-gender-section.boys-section .gender-title {
    background: linear-gradient(135deg, #007cba 0%, #0056b3 100%);
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border-color: #005a9e;
}

.results-gender-section.girls-section .gender-title {
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border-color: #d81b60;
}

.gender-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.gender-title:hover::before {
    left: 100%;
}

.gender-title:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.results-position-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.results-position-block {
    border: 2px solid #ddd;
    border-radius: 10px;
    background: white;
    padding: 12px 16px;
    display: grid;
    grid-template-columns: 50px 1fr auto;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 60px;
}

.results-position-block:hover {
    border-color: #007cba;
    box-shadow: 0 4px 12px rgba(0, 123, 186, 0.15);
    transform: translateY(-1px);
}

.results-position-block.filled {
    border-color: #ddd;
    background: white;
}

.results-position-block.empty {
    border-style: dashed;
    border-color: #bdc3c7;
    background: white;
    color: #6c757d;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    grid-template-columns: 1fr;
}

.results-position-block.empty:hover {
    border-color: #95a5a6;
}

.results-position-content {
    width: 100%;
    text-align: center;
}

.results-candidate-info {
    display: contents;
}

.results-candidate-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
    border: 2px solid #ddd;
}

.results-candidate-photo.boy-photo {
    border-color: #007cba;
}

.results-candidate-photo.girl-photo {
    border-color: #e91e63;
}

.results-candidate-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 12px;
    border: 2px solid #ddd;
}

.results-candidate-avatar.boy-avatar {
    background-color: #e3f2fd;
    border-color: #007cba;
}

.results-candidate-avatar.girl-avatar {
    background-color: #fce4ec;
    border-color: #e91e63;
}

.results-candidate-details {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.results-candidate-name {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    text-transform: capitalize;
    text-align: left;
    line-height: 1.2;
}

.results-candidate-gender {
    color: #666;
    font-size: 0.9em;
    margin: 0;
}

.results-vote-info {
    background: linear-gradient(135deg, #007cba 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    min-width: 60px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.results-vote-count {
    font-weight: 600;
    color: white;
    font-size: 0.9em;
    margin: 0;
}

.results-vote-percentage {
    font-size: 0.7em;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.results-empty-block {
    text-align: center;
    color: #999;
    font-style: italic;
}

.results-empty-icon {
    font-size: 36px;
    margin-bottom: 8px;
    opacity: 0.5;
}

.results-empty-text {
    font-size: 14px;
    color: #666;
}

/* Legacy Pad Results (for backward compatibility) */
.pad-section {
    margin-bottom: 30px;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    overflow: hidden;
}

.pad-section h4 {
    margin: 0;
    padding: 18px 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #2c3e50;
    font-size: 1.4em;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.2);
    border: 2px solid #dee2e6;
    position: relative;
    overflow: hidden;
}

.pad-section h4::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(44,62,80,0.1), transparent);
    transition: left 0.6s;
}

.pad-section h4:hover::before {
    left: 100%;
}

.pad-results {
    padding: 20px;
}

.pad-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #666;
}

.candidate-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.candidate-photo-container {
    margin-right: 12px;
    flex-shrink: 0;
}

.results-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
}

.results-photo.boy-photo {
    border-color: #007cba;
}

.results-photo.girl-photo {
    border-color: #e91e63;
}

.results-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 2px solid #ddd;
}

.results-avatar.boy-avatar {
    background-color: #e3f2fd;
    border-color: #007cba;
}

.results-avatar.girl-avatar {
    background-color: #fce4ec;
    border-color: #e91e63;
}

.candidate-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.candidate-name {
    font-weight: 600;
    color: #2c3e50;
}

.candidate-gender {
    color: #666;
    font-size: 0.9em;
}

.candidate-votes {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.vote-count {
    font-weight: 600;
    color: #27ae60;
}

.vote-percentage {
    font-size: 0.9em;
    color: #666;
}

/* Number Update Animation */
.number-updated {
    animation: numberUpdate 1s ease-in-out, glow 0.8s ease-in-out;
    background-color: #fff3cd;
    border-radius: 4px;
    padding: 2px 6px;
    margin: -2px -6px;
}

@keyframes numberUpdate {
    0% {
        background-color: #d4edda;
        transform: scale(1.05);
    }
    50% {
        background-color: #c3e6cb;
        transform: scale(1.1);
    }
    100% {
        background-color: transparent;
        transform: scale(1);
    }
}

@keyframes glow {
    0% { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); }
    50% { text-shadow: 0 0 10px rgba(39, 174, 96, 0.6), 0 1px 2px rgba(0, 0, 0, 0.1); }
    100% { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); }
}

/* Voting Interface */
.voting-interface {
    position: relative;
    min-height: 600px;
}

.voting-interface.locked {
    pointer-events: none;
}

.voting-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
}

.voting-header h1 {
    margin: 0 0 20px 0;
    font-size: 2.5em;
}

.voting-status {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.class-info, .status-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.class-name {
    font-size: 1.3em;
    font-weight: 700;
}

.vote-weight {
    font-size: 0.9em;
    opacity: 0.9;
}

.status-indicator {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9em;
}

/* Lock Screen */
.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(5px);
}

.lock-content {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 400px;
}

.lock-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.lock-content h2 {
    color: #e74c3c;
    margin-bottom: 15px;
}

.waiting-animation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Voting Form */
.voting-instructions {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #e8f4fd;
    border-radius: 12px;
    border-left: 4px solid #3498db;
}

.pads-container {
    display: grid;
    gap: 30px;
    margin-bottom: 30px;
}

.pad-section {
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    overflow: hidden;
}

.pad-title {
    margin: 0;
    padding: 16px 20px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    font-size: 1.3em;
    text-align: center;
}

.gender-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

@media (max-width: 768px) {
    .gender-sections {
        grid-template-columns: 1fr;
    }
}

.gender-section {
    padding: 20px;
    border-right: 1px solid #e1e5e9;
}

.gender-section:last-child {
    border-right: none;
}

.boys-section {
    background-color: #e3f2fd;
}

.girls-section {
    background-color: #fce4ec;
}

.gender-title {
    margin: 0 0 20px 0;
    text-align: center;
    color: #2c3e50;
    font-size: 1.1em;
}

.candidates-grid {
    display: grid;
    gap: 25px;
}

.candidate-option {
    position: relative;
}

.candidate-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.candidate-label {
    display: block;
    cursor: pointer;
}

.candidate-card {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e1e5e9;
    border-radius: 16px;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-align: left;
}

/* Ensure results cards have consistent height - FORCE EQUAL HEIGHTS */
.pad-section .candidates-grid .candidate-option .results-card,
.pad-section .candidates-grid .candidate-option .candidate-card,
.results-card.candidate-card,
.candidate-option .results-card,
.candidate-option .candidate-card {
    height: 120px !important;
    min-height: 120px !important;
    max-height: 120px !important;
    display: grid !important;
    grid-template-columns: 100px 1fr auto !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 16px !important;
    box-sizing: border-box !important;
}

.candidate-card:hover {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.candidate-checkbox:checked + .candidate-label .candidate-card {
    border-color: #27ae60;
    background-color: #d4edda;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.2);
}

.candidate-avatar {
    font-size: 1.8em;
    margin-right: 12px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid #ffffff;
    flex-shrink: 0;
}

.boy-avatar {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
}

.girl-avatar {
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
}

.candidate-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    min-height: 40px;
    margin-left: 0;
}

.candidate-name {
    display: block;
    font-weight: 700;
    font-size: 1.1em;
    color: #2c3e50;
    margin-bottom: 3px;
    line-height: 1.2;
    letter-spacing: 0.2px;
    text-align: left;
    width: 100%;
}

.candidate-details {
    font-size: 0.9em;
    color: #5a6c7d;
    font-weight: 500;
    margin-bottom: 0;
    text-align: left;
    width: 100%;
    padding-left: 0;
}

.selection-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #27ae60;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
}

.candidate-checkbox:checked + .candidate-label .selection-indicator {
    opacity: 1;
    transform: scale(1);
}

.checkmark {
    font-weight: bold;
    font-size: 1.2em;
}

/* Voting Actions */
.voting-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e1e5e9;
}

.selected-summary {
    font-size: 1.1em;
    font-weight: 600;
    color: #2c3e50;
}

.action-buttons {
    display: flex;
    gap: 15px;
}

/* Success Screen */
.success-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.success-content {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    border: 3px solid #27ae60;
}

.success-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.success-content h2 {
    color: #27ae60;
    margin-bottom: 15px;
}

.vote-summary {
    margin: 20px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 12px;
    text-align: left;
}

.votes-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.vote-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e1e5e9;
}

.vote-item:last-child {
    border-bottom: none;
}

.vote-weight-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #27ae60;
    text-align: center;
    color: #27ae60;
}

.success-note {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

/* Candidate Management */
.pad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
}

.pad-stats {
    display: flex;
    gap: 20px;
}

.stat {
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.9em;
}

.gender-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e1e5e9;
}

.candidates-list {
    display: grid;
    gap: 12px;
}

.candidate-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.candidate-item:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.candidate-details {
    margin-left: 12px;
}

.candidate-meta {
    font-size: 0.8em;
    color: #666;
}

.candidate-actions {
    display: flex;
    gap: 8px;
}

.no-candidates {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #e1e5e9;
}

/* Modal Styles */
.svs-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.small {
    max-width: 400px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e1e5e9;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background-color: #f8f9fa;
    color: #333;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e1e5e9;
    background-color: #f8f9fa;
}

/* Messages */
.svs-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    max-width: 400px;
}

.svs-message {
    padding: 16px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
}

.svs-message.success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.svs-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.svs-message.warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.svs-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Warning Messages */
.warning-message {
    padding: 12px 16px;
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    margin-bottom: 15px;
}

.warning-text {
    color: #e74c3c;
    font-size: 0.9em;
    margin: 10px 0;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mt-20 {
    margin-top: 20px;
}

.p-20 {
    padding: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .svs-container {
        padding: 15px;
    }
    
    .svs-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .svs-header h1 {
        font-size: 2em;
    }
    
    .voting-status {
        flex-direction: column;
        gap: 15px;
    }
    
    .voting-actions {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .action-buttons {
        justify-content: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .svs-messages {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .candidates-grid {
        grid-template-columns: 1fr;
    }
    
    .candidate-card {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .candidate-avatar {
        margin-right: 0;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
    }
    
    /* Results grid responsive */
    .results-position-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 10px;
    }
    
    .results-position-block {
        min-height: 100px;
        padding: 10px;
    }
    
    .results-candidate-info {
        flex-direction: column;
        text-align: center;
    }
    
    .results-candidate-photo,
    .results-candidate-avatar {
        margin-right: 0;
        margin-bottom: 8px;
    }
    
    .results-vote-info {
        flex-direction: column;
        gap: 4px;
    }
}

/* Photo Upload Styles */
.photo-upload-container {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: #f9f9f9;
    transition: border-color 0.3s ease;
}

.photo-upload-container:hover {
    border-color: #3498db;
}

.photo-preview {
    position: relative;
    display: inline-block;
    margin: 10px 0;
}

.photo-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.remove-photo {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: background-color 0.3s ease;
}

.remove-photo:hover {
    background: #c0392b;
}

.upload-buttons {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.candidate-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 2px solid #ddd;
    flex-shrink: 0;
}

.candidate-photo-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    border: 2px solid #ddd;
    font-size: 24px;
    color: #999;
    flex-shrink: 0;
}

.candidate-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.candidate-details {
    flex: 1;
}

.candidate-details h5 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
}

.candidate-details p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.candidate-actions {
    display: flex;
    gap: 8px;
    margin-left: 10px;
}

/* Enhanced message styles */
.svs-message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    min-width: 300px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 12px 20px;
    margin: 10px 0;
    border-radius: 4px;
    font-weight: 500;
}

.svs-message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.svs-message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.svs-message-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Responsive adjustments for photo upload */
@media (max-width: 768px) {
    .photo-preview img {
        max-width: 150px;
        max-height: 150px;
    }
    
    .candidate-photo,
    .candidate-photo-placeholder {
        width: 50px;
        height: 50px;
        margin-right: 10px;
    }
    
    .candidate-photo-placeholder {
        font-size: 20px;
    }
    
    .upload-buttons {
        flex-direction: column;
        gap: 10px;
    }
}

/* Vote Display in Results */
.vote-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    margin-top: 12px;
    border: 1px solid #e1e5e9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.vote-display:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.vote-display .vote-count {
    font-weight: 700;
    color: #27ae60;
    font-size: 1.3em;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.vote-display .vote-percentage {
    font-size: 1em;
    color: #495057;
    font-weight: 600;
    background-color: rgba(39, 174, 96, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
    border: 1px solid rgba(39, 174, 96, 0.2);
}

/* Material Design Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* FAB Actions */
.fab-actions {
    position: fixed;
    bottom: 90px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

.fab-actions.show {
    opacity: 1;
    transform: translateY(0);
}

.fab-actions .fab {
    transform: scale(0.8);
    animation: fab-scale-in 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fab-actions .fab:nth-child(1) { animation-delay: 0.1s; }
.fab-actions .fab:nth-child(2) { animation-delay: 0.2s; }
.fab-actions .fab:nth-child(3) { animation-delay: 0.3s; }

@keyframes fab-scale-in {
    to {
        transform: scale(1);
    }
}

.fab-open {
    transform: rotate(45deg);
}

/* Quick Settings Panel */
.quick-settings {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-settings.show {
    opacity: 1;
    visibility: visible;
}

.quick-settings-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    min-width: 300px;
    max-width: 90vw;
    box-shadow: 0 24px 38px rgba(0, 0, 0, 0.14), 0 9px 46px rgba(0, 0, 0, 0.12);
    transform: scale(0.8) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-settings.show .quick-settings-content {
    transform: scale(1) translateY(0);
}

.quick-settings h3 {
    margin: 0 0 20px 0;
    color: #1976d2;
    font-size: 20px;
    font-weight: 600;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.setting-item:last-of-type {
    border-bottom: none;
    margin-bottom: 20px;
}

.setting-item label {
    font-weight: 500;
    color: #333;
}

.setting-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #1976d2;
}

/* Enhanced Card Animations */
.slide-in {
    animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading-state {
    position: relative;
    overflow: hidden;
}

.loading-state::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.refresh-complete {
    animation: refresh-pulse 0.5s ease-out;
}

@keyframes refresh-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Enhanced Form States */
.svs-form-group.focused {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
}

.svs-form-group.focused .svs-input,
.svs-form-group.focused .svs-select {
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

/* Enhanced Button States */
.svs-btn.pressed {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* Results Candidate Grid Layout (matching voting page) */
.candidates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.results-candidate {
    display: flex;
    flex-direction: column;
}

.results-card {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 16px;
    text-align: left;
    transition: all 0.3s ease;
    height: 120px;
    min-height: 120px;
    max-height: 120px;
    display: grid;
    grid-template-columns: 100px 1fr auto;
    align-items: center;
    gap: 16px;
}

.results-card:hover {
    border-color: #007cba;
    box-shadow: 0 4px 12px rgba(0, 123, 186, 0.15);
    transform: translateY(-2px);
}

.results-card .candidate-photo-container {
    margin-bottom: 0;
    margin-right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100px;
    height: 100%;
}

.results-card .candidate-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ddd;
    flex-shrink: 0;
}

.results-card .candidate-photo.boy-photo {
    border-color: #007cba;
}

.results-card .candidate-photo.girl-photo {
    border-color: #e91e63;
}

.results-card .candidate-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    border: 3px solid #ddd;
    flex-shrink: 0;
}

.results-card .candidate-avatar.boy-avatar {
    background-color: #e3f2fd;
    border-color: #007cba;
}

.results-card .candidate-avatar.girl-avatar {
    background-color: #fce4ec;
    border-color: #e91e63;
}

.results-card .candidate-info {
    margin-bottom: 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
}

.results-card .candidate-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    text-transform: capitalize;
    line-height: 1.3;
    text-align: left;
    margin-bottom: 4px;
}

.results-card .vote-results {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    text-align: right;
    min-width: 80px;
}

.results-card .vote-count {
    font-size: 1.2rem;
    font-weight: 700;
    color: #27ae60;
}

.results-card .vote-percentage {
    font-size: 0.9rem;
    color: #666;
    background-color: #f8f9fa;
    padding: 4px 8px;
    border-radius: 12px;
}

/* Responsive adjustments for results grid layout */
@media (max-width: 768px) {
    .candidates-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 12px;
    }
    
    .results-card {
        padding: 12px;
        gap: 12px;
        height: 100px;
        min-height: 100px;
        max-height: 100px;
        grid-template-columns: 80px 1fr auto;
    }
    
    .pad-section .candidates-grid .candidate-option .results-card,
    .pad-section .candidates-grid .candidate-option .candidate-card,
    .results-card.candidate-card,
    .candidate-option .results-card,
    .candidate-option .candidate-card {
        height: 100px !important;
        min-height: 100px !important;
        max-height: 100px !important;
        grid-template-columns: 80px 1fr auto !important;
        gap: 12px !important;
        padding: 12px !important;
        box-sizing: border-box !important;
    }
    
    .results-card .candidate-photo-container {
        width: 80px;
    }
    
    .results-card .candidate-photo,
    .results-card .candidate-avatar {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .results-card .candidate-name {
        font-size: 1rem;
        line-height: 1.2;
    }
    
    .results-card .vote-count {
        font-size: 1rem;
    }
    
    .results-card .vote-percentage {
        font-size: 0.8rem;
        padding: 3px 6px;
    }
    
    .results-card .vote-results {
        min-width: 70px;
    }
}

@media (max-width: 480px) {
    .candidates-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .results-card {
        padding: 10px;
        gap: 10px;
        height: 80px;
        min-height: 80px;
        max-height: 80px;
        grid-template-columns: 60px 1fr auto;
    }
    
    .pad-section .candidates-grid .candidate-option .results-card,
    .pad-section .candidates-grid .candidate-option .candidate-card,
    .results-card.candidate-card,
    .candidate-option .results-card,
    .candidate-option .candidate-card {
        height: 80px !important;
        min-height: 80px !important;
        max-height: 80px !important;
        grid-template-columns: 60px 1fr auto !important;
        gap: 10px !important;
        padding: 10px !important;
        box-sizing: border-box !important;
    }
    
    .results-card .candidate-photo-container {
        width: 60px;
    }
    
    .results-card .candidate-photo,
    .results-card .candidate-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        border-width: 2px;
    }
    
    .results-card .candidate-name {
        font-size: 0.9rem;
        line-height: 1.1;
    }
    
    .results-card .vote-count {
        font-size: 0.9rem;
    }
    
    .results-card .vote-percentage {
        font-size: 0.7rem;
        padding: 2px 4px;
    }
    
    .results-card .vote-results {
         min-width: 60px;
     }
}

/* Pad Section Styles */
.pad-section {
    margin-bottom: 20px;
}

.pad-section h4 {
    padding: 10px 15px;
    font-size: 1.2rem;
    margin: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px 8px 0 0;
    border-bottom: 2px solid #dee2e6;
}

.pad-results {
    padding: 16px;
}

.pad-stats {
    font-size: 0.9rem;
    gap: 20px;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
}

/* Ensure all cards have equal height regardless of section */
.pad-section .results-card {
    height: 120px !important;
    min-height: 120px !important;
    max-height: 120px !important;
}

@media (max-width: 768px) {
    .pad-section .results-card {
        height: 100px !important;
        min-height: 100px !important;
        max-height: 100px !important;
    }
    
    .pad-section h4 {
        font-size: 1rem;
        padding: 8px 12px;
    }
    
    .pad-results {
        padding: 12px;
    }
    
    .pad-stats {
        font-size: 0.8rem;
        gap: 15px;
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .pad-section .results-card {
        height: 80px !important;
        min-height: 80px !important;
        max-height: 80px !important;
    }
    
    .pad-section h4 {
        font-size: 0.9rem;
        padding: 6px 10px;
    }
    
    .pad-results {
        padding: 8px;
    }
    
    .pad-stats {
        font-size: 0.75rem;
        gap: 10px;
        margin-bottom: 8px;
    }
}

/* FINAL OVERRIDE - Force absolute height consistency for all result cards */
.svs-results-section .candidates-grid > * > *,
.results-by-pad .candidates-grid > * > *,
.pad-section .candidates-grid > * > * {
    height: 120px !important;
    min-height: 120px !important;
    max-height: 120px !important;
    display: grid !important;
    grid-template-columns: 100px 1fr auto !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 16px !important;
    box-sizing: border-box !important;
}

@media (max-width: 768px) {
    .svs-results-section .candidates-grid > * > *,
    .results-by-pad .candidates-grid > * > *,
    .pad-section .candidates-grid > * > * {
        height: 100px !important;
        min-height: 100px !important;
        max-height: 100px !important;
        grid-template-columns: 80px 1fr auto !important;
        gap: 12px !important;
        padding: 12px !important;
    }
}

@media (max-width: 480px) {
    .svs-results-section .candidates-grid > * > *,
    .results-by-pad .candidates-grid > * > *,
    .pad-section .candidates-grid > * > * {
        height: 80px !important;
        min-height: 80px !important;
        max-height: 80px !important;
        grid-template-columns: 60px 1fr auto !important;
        gap: 10px !important;
        padding: 10px !important;
    }
}

/* Reserved Blocks Grid Styles for Results Page */
.reserved-blocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.reserved-block {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
    min-height: 120px;
    display: flex;
    align-items: center;
}

.reserved-block.filled {
    border-color: #007cba;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
}

.reserved-block.empty {
    border-style: dashed;
    border-color: #bdc3c7;
    background: #f8f9fa;
    justify-content: center;
    text-align: center;
}

.empty-block-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #6c757d;
}

.empty-block-icon {
    font-size: 2.5rem;
    opacity: 0.6;
    margin-bottom: 8px;
}

.empty-block-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
}

/* Responsive adjustments for reserved blocks */
@media (max-width: 768px) {
    .reserved-blocks-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .reserved-block {
        min-height: 100px;
        padding: 12px;
    }
    
    .empty-block-icon {
        font-size: 2rem;
    }
    
    .empty-block-text {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .reserved-block {
        min-height: 80px;
        padding: 10px;
    }
    
    .empty-block-icon {
        font-size: 1.5rem;
        margin-bottom: 4px;
    }
    
    .empty-block-text {
        font-size: 0.75rem;
    }
}

/* Collapsible Panel Styles */
.svs-collapsible-panel {
    margin-bottom: 20px;
}



.svs-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 16px 24px;
    margin: -24px -24px 0 -24px;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border-bottom: 2px solid rgba(0, 123, 186, 0.1);
    transition: all 0.3s ease;
}

.svs-panel-header:hover {
    background: linear-gradient(135deg, #f0f4ff 0%, #f8f9ff 100%);
}

.svs-panel-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    background: linear-gradient(135deg, #007cba 0%, #0056b3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.svs-panel-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.svs-toggle-icon {
    font-size: 1.2rem;
    font-weight: bold;
    color: #007cba;
    transition: transform 0.3s ease;
    user-select: none;
}

.svs-toggle-icon.collapsed {
    transform: rotate(-90deg);
}

.svs-panel-content {
    padding-top: 20px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.svs-panel-content.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

.svs-panel-content:not(.collapsed) {
    max-height: none;
    opacity: 1;
}

/* Responsive adjustments for collapsible panels */
@media (max-width: 768px) {
    .svs-panel-header {
        padding: 12px 16px;
        margin: -24px -24px 0 -24px;
    }
    
    .svs-panel-header h2 {
        font-size: 1.2rem;
    }
    
    .svs-toggle-icon {
        font-size: 1rem;
    }
}

/* Post Progress Styles */
.post-progress {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007cba 0%, #4facfe 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.post-counter {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.post-counter::before {
    content: '📊';
    margin-right: 4px;
}

/* Post Header Styles */
.post-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.post-title {
    margin: 0 0 8px 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    text-align: center;
}

.post-instruction {
    margin: 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    font-style: italic;
}

/* Responsive adjustments for post progress */
@media (max-width: 768px) {
    .post-progress {
        padding: 10px 12px;
        margin-bottom: 12px;
    }
    
    .progress-bar {
        height: 6px;
        margin-bottom: 6px;
    }
    
    .post-counter {
        font-size: 0.8rem;
    }
    
    .post-header {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .post-title {
        font-size: 1.5rem;
    }
    
    .post-instruction {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .post-progress {
        padding: 8px 10px;
        margin-bottom: 10px;
    }
    
    .post-counter {
        font-size: 0.75rem;
    }
    
    .post-header {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .post-title {
        font-size: 1.3rem;
    }
    
    .post-instruction {
        font-size: 0.85rem;
    }
}

/* Voting Toggle Switch Styles */
.voting-toggle-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0;
    justify-content: flex-start;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.toggle-input:checked + .toggle-slider {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.toggle-input:checked + .toggle-slider:before {
    transform: translateX(30px);
}

.toggle-label {
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    user-select: none;
}

.toggle-label.off {
    color: #e74c3c;
}

.toggle-label.on {
    color: #27ae60;
}

.toggle-input:checked ~ .toggle-label.off {
    opacity: 0.5;
}

.toggle-input:not(:checked) ~ .toggle-label.on {
    opacity: 0.5;
}

.toggle-status-text {
    margin-left: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #666;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.toggle-status-text #status-text {
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

/* Hover effects */
.toggle-slider:hover {
    transform: scale(1.05);
}

.toggle-input:checked + .toggle-slider:hover {
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.toggle-input:not(:checked) + .toggle-slider:hover {
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

/* Responsive adjustments for toggle */
@media (max-width: 768px) {
    .voting-toggle-container {
        gap: 8px;
    }
    
    .toggle-switch {
        width: 50px;
        height: 25px;
    }
    
    .toggle-slider:before {
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
    }
    
    .toggle-input:checked + .toggle-slider:before {
        transform: translateX(25px);
    }
    
    .toggle-label {
        font-size: 0.8rem;
    }
}

/* Selected Candidates Display Styles */
.selected-candidates-bar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid rgba(0, 123, 186, 0.2);
}

.selected-candidates-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.selected-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.selected-title::before {
    content: '✓';
    color: #27ae60;
    font-weight: bold;
}

.selected-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.selected-candidate-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.selected-candidate-item.last-selected {
    border-color: #007cba;
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
    box-shadow: 0 2px 8px rgba(0, 123, 186, 0.15);
}

.gender-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gender-badge:contains('Boy') {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

.gender-badge:contains('Girl') {
    background: linear-gradient(135deg, #E91E63, #C2185B);
    color: white;
}

.candidate-name {
    font-weight: 600;
    color: #2c3e50;
    flex: 1;
}

.post-name {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

.expand-candidates-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f2ff 100%);
    border: 1px solid #007cba;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 4px;
}

.expand-candidates-btn:hover {
    background: linear-gradient(135deg, #e8f2ff 0%, #d4edff 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 186, 0.2);
}

.expand-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: #007cba;
}

.expand-icon {
    font-size: 0.8rem;
    color: #007cba;
    transition: transform 0.3s ease;
}

.collapsed-candidates {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e1e5e9;
}

.collapsed-candidates .selected-candidate-item {
    opacity: 0.8;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

/* Responsive adjustments for selected candidates */
@media (max-width: 768px) {
    .selected-candidates-bar {
        padding: 12px 16px;
        margin-bottom: 16px;
    }
    
    .selected-candidate-item {
        padding: 10px 12px;
        gap: 8px;
    }
    
    .selected-title {
        font-size: 1rem;
    }
    
    .candidate-name {
        font-size: 0.9rem;
    }
    
    .post-name {
        font-size: 0.8rem;
    }
    
    .expand-candidates-btn {
        padding: 8px 12px;
    }
    
    .expand-text {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .selected-candidate-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .gender-badge {
        align-self: flex-start;
    }
}

/* Print Styles */
@media print {
    .svs-btn, .voting-actions, .modal-overlay, .svs-messages {
        display: none !important;
    }
    
    .svs-container {
        max-width: none;
        padding: 0;
    }
    
    .svs-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    /* Expand all panels for printing */
    .svs-panel-content {
        max-height: none !important;
        opacity: 1 !important;
        padding-top: 20px !important;
    }
    
    .svs-toggle-icon {
        display: none;
    }
    
    /* Show all selected candidates when printing */
    .collapsed-candidates {
        display: block !important;
    }
    
    .expand-candidates-btn {
        display: none !important;
    }
}

/* NOTA Block Styles */
.nota-block {
    margin-top: 15px;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%) !important;
}

.nota-card {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%) !important;
    border: 2px solid #ff6b6b !important;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.2) !important;
}

.nota-avatar {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%) !important;
    color: white !important;
    font-size: 2rem !important;
    border-color: #ff6b6b !important;
}

.nota-card .candidate-name {
    color: #d63031 !important;
    font-weight: 700 !important;
}

.nota-card .candidate-meta {
    color: #636e72 !important;
    font-style: italic;
}

.nota-card .vote-count {
    color: #d63031 !important;
    font-weight: 600 !important;
}

.nota-card .vote-percentage {
    background: #d63031 !important;
    color: white !important;
}

@media (max-width: 768px) {
    .nota-avatar {
        font-size: 1.5rem !important;
    }
}