:root {
    --primary: #2c7a7b;
    --primary-dark: #234e52;
    --secondary: #38a3a5;
    --success: #48bb78;
    --warning: #ed8936;
    --danger: #e53e3e;
    --light: #f7fafc;
    --dark: #1a202c;
    --gray: #718096;
    --border: #e2e8f0;
}

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

body {
    font-family: 'Noto Sans Malayalam', 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
}

body, body * {
    font-family: inherit;
}

label, td, th, input, select, textarea, button {
    font-family: 'Noto Sans Malayalam', 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

input, select, textarea, button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 4px;
}

select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}

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

.navbar {
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    gap: 1rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.nav-menu a:hover {
    background: rgba(255,255,255,0.2);
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 1rem;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44,122,123,0.1);
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--light);
    font-weight: 600;
}

tr:hover {
    background: #f8fafc;
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #c6f6d5;
    color: #22543d;
}

.alert-error {
    background: #fed7d7;
    color: #742a2a;
}

.alert-warning {
    background: #feebc8;
    color: #7c2d12;
}

.rating-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.rating-option {
    flex: 1;
    min-width: 80px;
    text-align: center;
}

.rating-option input {
    display: none;
}

.rating-option label {
    display: block;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.rating-option input:checked + label {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: var(--gray);
    font-size: 0.875rem;
}

.heatmap-cell {
    width: 70px;
    height: 60px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: white;
    border-radius: 4px;
    padding: 2px;
    text-align: center;
}

.heatmap-excellent { background: #22543d; }
.heatmap-good { background: #48bb78; }
.heatmap-average { background: #ecc94b; color: var(--dark); }
.heatmap-poor { background: #ed8936; }
.heatmap-bad { background: #e53e3e; }

.language-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.language-toggle button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    border-radius: 4px;
}

.language-toggle button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.thank-you {
    text-align: center;
    padding: 3rem;
}

.thank-you h1 {
    color: var(--success);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.reference-no {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--light);
    padding: 1rem;
    border-radius: 8px;
    display: inline-block;
    margin: 1rem 0;
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-menu a {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .container {
        padding: 10px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .rating-group {
        flex-direction: column;
    }
    
    .rating-option {
        min-width: 100%;
    }
    
    table {
        font-size: 0.875rem;
    }
    
    th, td {
        padding: 0.5rem;
    }
    
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .card-header {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    input, select, textarea {
        padding: 0.5rem;
        font-size: 16px;
    }
    
    .tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        white-space: nowrap;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 0.75rem;
    }
    
    .alert {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    .feedback-form {
        padding: 0.5rem;
    }
    
    .feedback-header h1 {
        font-size: 1.25rem;
    }
    
    .language-toggle {
        flex-wrap: wrap;
    }
    
    .thank-you {
        padding: 1.5rem;
    }
    
    .thank-you h1 {
        font-size: 1.5rem;
    }
    
    .reference-no {
        font-size: 1.25rem;
        padding: 0.75rem;
    }
    
    .heatmap-cell {
        width: 30px;
        height: 30px;
        font-size: 0.625rem;
    }
    
    .modal-content {
        padding: 1rem;
        margin: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 5px;
    }
    
    .navbar {
        padding: 0.75rem;
    }
    
    .nav-brand {
        font-size: 1rem;
    }
    
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .card {
        padding: 0.75rem;
        border-radius: 4px;
    }
    
    h1 {
        font-size: 1.25rem;
    }
    
    h2 {
        font-size: 1.1rem;
    }
    
    .btn {
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    form[style="display:inline"] .btn {
        width: auto;
    }
    
    .tabs {
        margin-bottom: 1rem;
    }
    
    .tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .feedback-header h1 {
        font-size: 1.1rem;
    }
    
    .rating-option label {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
}