* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.header {
    background: white;
    color: #1a1a1a;
    padding: 40px;
    text-align: center;
    position: relative;
    border-bottom: 1px solid #e5e5e5;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.header p {
    opacity: 0.9;
    font-size: 1.1em;
}

.header button {
    position: absolute;
    top: 20px;
    right: 20px;
    width: auto;
}

.role-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 40px;
}

.role-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.role-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(43, 124, 255, 0.2);
    border-color: #2b7cff;
}

.role-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.role-card h2 {
    color: #333;
    margin-bottom: 10px;
}

.role-card p {
    color: #6c757d;
}

.login-form {
    padding: 40px;
    max-width: 400px;
    margin: 0 auto;
}

.login-form h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

input[type="text"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #667eea;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

button {
    width: 100%;
    padding: 14px 24px;
    background: #2b7cff;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin: 5px 0;
}

button:hover {
    background: #1a6ae8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(43, 124, 255, 0.3);
}

button:active {
    transform: translateY(0);
}

button.secondary {
    background: white;
    color: #666;
    border: 1px solid #e5e5e5;
}

button.secondary:hover {
    background: #fafafa;
    color: #1a1a1a;
    box-shadow: none;
}

button.danger {
    background: #ff4444;
}

button.danger:hover {
    background: #e63939;
}

.error {
    color: #ff4444;
    margin-top: 10px;
    text-align: center;
    font-size: 0.9em;
}

.tabs {
    display: flex;
    background: #f8f9fa;
    padding: 0;
}

.tab {
    flex: 1;
    padding: 15px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.3s;
}

.tab.active {
    color: #2b7cff;
    border-bottom-color: #2b7cff;
    background: white;
}

.tab-content {
    padding: 40px;
}

.poll-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
}

.poll-card h3 {
    color: #333;
    margin-bottom: 10px;
}

.poll-meta {
    display: flex;
    gap: 15px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.poll-meta span {
    background: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    color: #2b7cff;
    border: 1px solid #e5e5e5;
}

.poll-results {
    margin: 20px 0;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: white;
    margin: 5px 0;
    border-radius: 8px;
}

.poll-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.poll-actions button {
    flex: 1;
}

.codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.code-item {
    background: #2b7cff;
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    font-family: monospace;
    font-size: 1.2em;
}

.poll-info {
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
    margin-bottom: 30px;
}

.poll-info h2 {
    color: #333;
    margin-bottom: 10px;
}

.vote-option {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
}

.vote-option:hover {
    border-color: #2b7cff;
    background: #f8fbff;
}

.vote-option input {
    width: auto;
    margin: 0 15px 0 0;
    cursor: pointer;
}

.vote-option label {
    flex: 1;
    cursor: pointer;
    font-size: 1.1em;
}

.empty-state,
.success-state {
    text-align: center;
    padding: 60px 20px;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: #2b7cff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    margin: 0 auto 20px;
}

label {
    display: block;
    margin: 15px 0 5px;
    color: #1a1a1a;
    font-weight: 600;
}

label .required {
    color: #ff4444;
    margin-right: 4px;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #2b7cff;
}
