/* Clean and Premium Orange-White Theme for Evaluation System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Prompt:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #f97316;
    --primary-hover: #ea580c;
    --primary-light: #fff7ed;
    --primary-border: #ffedd5;
    --primary-accent: #fed7aa;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --success: #16a34a;
    --success-light: #f0fdf4;
    --error: #dc2626;
    --error-light: #fef2f2;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Prompt', 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    padding-bottom: 40px;
}

/* Header & Containers */
header {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    padding: 24px 16px;
    text-align: center;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
}

header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 6px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header p {
    font-size: 0.9rem;
    opacity: 0.95;
    font-weight: 300;
}

.container {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 0 16px;
}

.container-wide {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Cards & Containers */
.card {
    background-color: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #431407;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--primary-border);
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-bottom: 12px;
}

.lang-btn {
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

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

/* Form Elements */
label.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-main);
}

.form-group {
    margin-bottom: 20px;
}

.form-control, select, textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    background-color: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

/* Option Cards (Grid for selecting Housekeeper or Security Guard) */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.personnel-option {
    position: relative;
}

.personnel-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.personnel-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    background: #ffffff;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    height: 100%;
}

.personnel-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 2px solid var(--border-color);
    transition: border-color 0.2s;
}

.personnel-card .name {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
    margin-bottom: 4px;
}

.personnel-card .nickname {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Selected personnel state */
.personnel-option input[type="radio"]:checked + .personnel-card {
    background-color: var(--primary-light);
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.personnel-option input[type="radio"]:checked + .personnel-card img {
    border-color: var(--primary);
}

/* Touch-friendly rating scales (Likert Scale) */
.question-block {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.question-block:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.question-text {
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-main);
}

.rating-scale {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.rating-option {
    flex: 1;
    position: relative;
}

.rating-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.rating-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 6px;
    background: #f8fafc;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.25rem;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 60px;
}

.rating-label .rating-text {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.2;
}

/* Checked styling for Likert buttons */
.rating-option input[type="radio"]:checked + .rating-label {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.rating-option input[type="radio"]:checked + .rating-label .rating-text {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Selection list chips (for Status, Toilet Gender, Floor, etc.) */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.chip-option {
    position: relative;
}

.chip-option input[type="radio"], .chip-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.chip-label {
    display: inline-block;
    padding: 10px 20px;
    background: #ffffff;
    border: 2px solid var(--border-color);
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
    text-align: center;
}

.chip-option input[type="radio"]:checked + .chip-label,
.chip-option input[type="checkbox"]:checked + .chip-label {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Buttons */
.btn-primary {
    display: block;
    width: 100%;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 6px -1px rgba(249, 115, 22, 0.2);
}

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

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

.btn-secondary {
    display: inline-block;
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
    color: #1e293b;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* Notifications & Messages */
.alert {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: var(--success-light);
    border-color: #bbf7d0;
    color: #15803d;
}

.alert-danger {
    background-color: var(--error-light);
    border-color: #fecaca;
    color: #b91c1c;
}

/* Success page styling */
.success-hero {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background-color: var(--success-light);
    color: var(--success);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin-bottom: 24px;
}

/* ADMIN PANEL STYLING */
.admin-navbar {
    background-color: #ffffff;
    border-bottom: 2px solid var(--primary-border);
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-hover);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-nav-links {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all 0.2s;
}

.admin-nav-links a:hover, .admin-nav-links a.active {
    background-color: var(--primary-light);
    color: var(--primary-hover);
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .admin-grid {
        grid-template-columns: 280px 1fr;
    }
}

/* Stats Dashboard widgets */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-widget {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border-left: 5px solid var(--primary);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.stat-val {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-hover);
    line-height: 1.2;
    margin: 8px 0;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
}

/* Tables */
.table-container {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-top: 10px;
}

table.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

table.admin-table th {
    background-color: #f8fafc;
    color: var(--text-main);
    font-weight: 600;
    padding: 14px 16px;
    border-bottom: 2px solid var(--border-color);
}

table.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

table.admin-table tr:hover {
    background-color: #f8fafc;
}

/* QR Code Section */
.qr-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 16px;
}

.qr-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border-color);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.qr-placeholder {
    width: 200px;
    height: 200px;
    margin: 20px auto;
    background-color: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #cbd5e1;
}

.qr-card h3 {
    color: #431407;
    margin-bottom: 8px;
}

/* Ratings Badge styling */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.badge-primary {
    background-color: var(--primary-light);
    color: var(--primary-hover);
}

.badge-success {
    background-color: var(--success-light);
    color: var(--success);
}

/* Modal and layout utilities */
.flex-space-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.d-flex {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Details and comments section */
.comment-bubble {
    background-color: #f8fafc;
    border-left: 3px solid var(--primary-accent);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--text-main);
    margin-top: 6px;
    word-break: break-all;
}

/* Print Styles */
@media print {
    body { background: white; color: black; padding: 0; }
    .no-print { display: none !important; }
    .qr-card { border: none; box-shadow: none; page-break-inside: avoid; }
    .container, .container-wide { max-width: 100%; padding: 0; }
}
