/* Allgemeine Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
header {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.1em;
}

/* Section */
.section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Login Tabs */
.login-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    font-size: 1.1em;
    cursor: pointer;
    color: #7f8c8d;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: bold;
}

.tab-btn:hover {
    background: #f8f9fa;
}

/* Login Form */
.login-form {
    max-width: 400px;
    margin: 0 auto;
}

.login-form h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-success {
    background: #27ae60;
    color: white;
    margin-bottom: 20px;
}

.btn-success:hover {
    background: #229954;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #e67e22;
}

.btn-small {
    padding: 8px 15px;
    font-size: 0.9em;
    margin-left: 10px;
}

/* Header Bar */
.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.header-bar h2 {
    color: #2c3e50;
}

/* Admin Tabs */
.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.admin-tab-btn {
    padding: 12px 20px;
    background: #ecf0f1;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    color: #2c3e50;
}

.admin-tab-btn.active {
    background: #667eea;
    color: white;
}

.admin-tab-btn:hover {
    background: #667eea;
    color: white;
}

/* Admin Content */
.admin-content {
    animation: fadeIn 0.3s;
}

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

.admin-content h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.8em;
}

.admin-content h4 {
    color: #34495e;
    margin-bottom: 15px;
    font-size: 1.3em;
}

/* Form Card */
.form-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
}

/* Import Section */
.import-section {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #ddd;
}

.help-text {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-top: 10px;
}

/* Table */
.table-container {
    margin-top: 30px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

thead {
    background: #34495e;
    color: white;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #ecf0f1;
}

tbody tr:hover {
    background: #f8f9fa;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 600;
}

.status-open {
    background: #27ae60;
    color: white;
}

.status-closed {
    background: #95a5a6;
    color: white;
}

.status-voting {
    background: #f39c12;
    color: white;
}

/* Participant Area */
.participant-auth {
    max-width: 500px;
    margin: 30px auto;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
}

.participant-info {
    background: #e8f5e9;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #27ae60;
}

#votingArea h3 {
    color: #2c3e50;
    margin-bottom: 20px;
}

/* Voting Card */
.voting-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid #667eea;
}

.voting-card h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.voting-card .agenda-number {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-weight: bold;
}

.voting-card .agenda-description {
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
}

.vote-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.vote-buttons .btn {
    flex: 1;
}

.vote-status {
    margin-top: 15px;
    padding: 12px;
    background: #e8f5e9;
    border-radius: 5px;
    text-align: center;
    font-weight: 600;
    color: #27ae60;
}

/* Results Display */
.result-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.result-item h4 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.result-summary {
    display: flex;
    gap: 30px;
    margin-bottom: 15px;
}

.result-stat {
    flex: 1;
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 5px;
}

.result-stat .label {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.result-stat .value {
    font-size: 2em;
    font-weight: bold;
    color: #2c3e50;
}

.result-stat.yes .value {
    color: #27ae60;
}

.result-stat.no .value {
    color: #e74c3c;
}

.result-stat.abstain .value {
    color: #95a5a6;
}

.result-details {
    margin-top: 15px;
}

.result-details table {
    width: 100%;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

/* Action Buttons in Table */
.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    padding: 6px 12px;
    font-size: 0.85em;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.empty-state p {
    font-size: 1.1em;
}

/* Sort Buttons */
.sort-buttons {
    display: flex;
    gap: 5px;
}

.sort-buttons .btn {
    padding: 4px 8px;
    font-size: 0.9em;
    min-width: 30px;
}

/* Agenda Proposal */
.agenda-proposal {
    background: #fff3cd;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    border-left: 4px solid #ffc107;
}

/* Result Sublabel */
.result-stat .sublabel {
    font-size: 0.8em;
    color: #7f8c8d;
    margin-top: 5px;
}

.total-shares {
    text-align: center;
    padding: 10px;
    background: #e8f5e9;
    border-radius: 5px;
    margin: 15px 0;
    font-weight: bold;
    color: #27ae60;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    .admin-tabs {
        flex-direction: column;
    }
    
    .vote-buttons {
        flex-direction: column;
    }
    
    .result-summary {
        flex-direction: column;
        gap: 15px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
}
