:root {
    --fshzh-orange: #F05A28;
    --fshzh-orange-dark: #d44d1f;
    --fshzh-orange-light: #fff3ef;
}

body {
    background-color: #f4f6f9;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.btn-fshzh {
    background-color: var(--fshzh-orange);
    border-color: var(--fshzh-orange);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.btn-fshzh:hover, .btn-fshzh:focus {
    background-color: var(--fshzh-orange-dark);
    border-color: var(--fshzh-orange-dark);
    color: #fff;
}

.text-fshzh { color: var(--fshzh-orange); }

.toast-container {
    position: fixed; bottom: 1.5rem; left: 50%;
    transform: translateX(-50%); z-index: 9999;
    display: flex; justify-content: center;
}

.toast-msg {
    background: #212529; color: #fff; padding: 0.85rem 1.5rem;
    border-radius: 10px; font-size: 0.95rem; font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    animation: toastIn 0.3s ease;
}

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

.table-count {
    margin-left: auto; color: #6c757d;
    font-size: 0.9rem; font-weight: 600; white-space: nowrap;
}

.row-number-cell {
    width: 3.5rem; min-width: 3.5rem; text-align: right !important;
    color: #6c757d; font-weight: 600; white-space: nowrap;
}

.badge-completed, .badge-approved, .badge-rejected {
    display: inline-block; padding: 0.2rem 0.6rem;
    border-radius: 20px; font-size: 0.78rem; font-weight: 600;
}

.badge-completed { background: #e7f1ff; color: #0d6efd; }
.badge-approved { background: #e9f7ef; color: #198754; }
.badge-rejected { background: #fdecec; color: #dc3545; }

.empty-state {
    text-align: center; padding: 3rem 1rem; color: #6c757d;
    background: #ffffff; border-radius: 12px; border: 1px dashed #dee2e6;
}

.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); display: flex;
    align-items: center; justify-content: center; z-index: 1000;
}

.modal-content {
    background: white; border-radius: 12px; padding: 2rem;
    max-width: 400px; width: 90%; box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-content h3 { margin-top: 0; color: #212529; }

.modal-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; }

.btn-primary {
    background: var(--fshzh-orange); color: white; border: none;
    padding: 0.6rem 1.2rem; border-radius: 6px; cursor: pointer; font-weight: 600;
}

.btn-primary:hover { background: #e8651a; }

.btn-secondary {
    background: #e9ecef; color: #212529; border: none;
    padding: 0.6rem 1.2rem; border-radius: 6px; cursor: pointer; font-weight: 600;
}

.btn-secondary:hover { background: #dee2e6; }

.photos-grid-readonly, .photos-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem;
}

.photo-grid-item {
    display: block; border-radius: 8px; overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative; width: 100%; padding-bottom: 100%;
}

.photo-grid-item img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; display: block;
}

.photo-grid-item:hover {
    transform: scale(1.05); box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
    .photos-grid-readonly, .photos-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .photos-grid-readonly, .photos-grid { grid-template-columns: 1fr; }
}

.live-table {
    width: 100%; border-collapse: collapse;
}

.live-table thead th {
    background: #f8f9fa; padding: 0.75rem 0.75rem; text-align: left;
    font-weight: 600; font-size: 0.82rem; color: #495057;
    text-transform: uppercase; letter-spacing: 0.3px;
    border-bottom: 2px solid #dee2e6; white-space: nowrap;
}

.live-table tbody td {
    padding: 0.7rem 0.75rem; font-size: 0.88rem;
    color: #212529; border-bottom: 1px solid #f1f3f5;
}

.live-table tbody tr:last-child td { border-bottom: none; }
.live-table tbody tr:hover { background: #f8f9fa; }

.live-table-action {
    padding: 0.35rem 0.7rem; background: var(--fshzh-orange);
    color: white; border: none; border-radius: 6px; cursor: pointer;
    font-size: 0.82rem; font-weight: 500; transition: background 0.15s; white-space: nowrap;
}

.live-table-action:hover { background: #e8651a; }

.form-detail-back {
    background: none; border: 1px solid #dee2e6; border-radius: 8px;
    padding: 0.5rem 1rem; cursor: pointer; font-size: 0.9rem;
    margin-bottom: 1rem; color: #495057;
}

.form-detail-back:hover { background: #f8f9fa; color: #212529; }

.form-detail-card, .project-info-card, .admin-assigned-card, .submission-info-card {
    background: #fff; border: 1px solid #e9ecef; border-radius: 12px;
    padding: 1.25rem 1.5rem; margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.form-section-header {
    font-weight: 700; font-size: 1.15rem; color: #212529;
    margin-top: 1.25rem; margin-bottom: 0.6rem;
    padding-bottom: 0.4rem; border-bottom: 2px solid #dee2e6;
}

.form-section-header:first-child { margin-top: 0; }

.form-question { margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid #f1f3f5; }
.form-question:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
