/* Reset dan Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background-color: #2c3e50;
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: #3498db;
    margin-bottom: 5px;
}

.logo h2 {
    font-size: 1.2rem;
    font-weight: normal;
    color: #ecf0f1;
}

/* Form Styles */
.form-section {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.form-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.instruction {
    color: #7f8c8d;
    margin-bottom: 20px;
    font-style: italic;
}

/* Table Styles */
.survey-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.survey-table th {
    background-color: #3498db;
    color: white;
    padding: 12px;
    text-align: center;
    font-weight: 600;
}

.survey-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.survey-table tbody tr:hover {
    background-color: #f8f9fa;
}

.survey-table input[type="radio"] {
    transform: scale(1.2);
    cursor: pointer;
}

/* Score Display */
.score-display {
    font-weight: bold;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-block;
    min-width: 50px;
}

.rating-excellent { background-color: #d4edda; color: #155724; }
.rating-good { background-color: #d1ecf1; color: #0c5460; }
.rating-average { background-color: #fff3cd; color: #856404; }
.rating-poor { background-color: #f8d7da; color: #721c24; }

/* Button Styles */
.button-group {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin: 20px 0;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-success {
    background-color: #2ecc71;
    color: white;
}

.btn-success:hover {
    background-color: #27ae60;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-logout {
    background-color: #e74c3c;
    color: white;
    padding: 8px 15px;
}

.btn-logout:hover {
    background-color: #c0392b;
}

/* Result Preview */
.result-preview {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid #3498db;
}

.preview-table {
    width: 100%;
    margin: 15px 0;
    border-collapse: collapse;
}

.preview-table th,
.preview-table td {
    padding: 8px;
    border: 1px solid #ddd;
}

.preview-summary {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    font-weight: bold;
}

/* Admin Dashboard */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #3498db;
}

.admin-nav a {
    padding: 10px 20px;
    text-decoration: none;
    color: #2c3e50;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s;
}

.admin-nav a:hover,
.nav-active {
    background-color: #3498db;
    color: white !important;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1rem;
}

.card-value {
    font-size: 2rem;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 10px;
}

.card p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.dashboard-section {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.dashboard-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.chart-container {
    height: 300px;
    margin: 20px 0;
}

.table-container {
    overflow-x: auto;
}

/* Results Page */
.results-controls {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group label {
    font-weight: 600;
    color: #2c3e50;
}

.filter-group select,
.filter-group input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 200px;
}

.results-summary {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.summary-card {
    text-align: center;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.summary-card h4 {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.results-detail {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

#resultsTable {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

#resultsTable th {
    background-color: #3498db;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
}

#resultsTable td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

#resultsTable tbody tr:hover {
    background-color: #f8f9fa;
}

.rating-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.score-badge {
    background-color: #3498db;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
    min-width: 60px;
    text-align: center;
}

.btn-view {
    background-color: #2ecc71;
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.btn-view:hover {
    background-color: #27ae60;
}

.no-data {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    padding: 30px !important;
}

.results-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
}

.chart-section {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #2c3e50, #3498db);
}

.login-container {
    width: 100%;
    max-width: 400px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    overflow: hidden;
}

.login-header {
    background-color: #2c3e50;
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.login-header h1 {
    color: #3498db;
    margin-bottom: 10px;
}

.login-header h2 {
    font-size: 1rem;
    font-weight: normal;
    color: #ecf0f1;
}

.login-form {
    padding: 30px;
}

.login-form h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.form-links {
    margin-top: 15px;
    text-align: center;
}

.form-links a {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
}

.form-links a:hover {
    text-decoration: underline;
}

.login-footer {
    text-align: center;
    padding: 15px;
    background-color: #f8f9fa;
    color: #7f8c8d;
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-row,
    .dashboard-cards,
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .results-charts {
        grid-template-columns: 1fr;
    }
    
    .survey-table {
        font-size: 12px;
    }
    
    .survey-table th,
    .survey-table td {
        padding: 8px 4px;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group select,
    .filter-group input {
        width: 100%;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .admin-nav {
        justify-content: center;
    }
    
    .header-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 10px;
    }
}

@media print {
    .no-print {
        display: none !important;
    }
}