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

:root {
    --primary-color: #29AB87;
    --secondary-color: #1F8A70;
    --success-color: #16a34a;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --light-bg: #e8f5e9;
    --dark-text: #1a3a2a;
    --light-text: #5a7a6a;
    --border-color: #c8e6c9;
    --shadow: 0 4px 6px rgba(41, 171, 135, 0.15);
    --transition: all 0.3s ease;
    --jungle-green: #29AB87;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f9fffe 0%, #f0fdf9 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--dark-text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
    min-height: 90vh;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.logo i {
    font-size: 2.5rem;
}

.logo h1 {
    font-size: 28px;
    font-weight: 600;
}

.stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.stat-item i {
    font-size: 1.2rem;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: space-between;
    padding: 30px 40px;
    background: var(--light-bg);
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 40px;
    right: 40px;
    height: 2px;
    background: var(--border-color);
    transform: translateY(-50%);
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--light-text);
    margin-bottom: 10px;
    transition: var(--transition);
}

.step-label {
    font-size: 14px;
    color: var(--light-text);
    font-weight: 500;
}

.step.active .step-number {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

/* Form Container */
.form-container {
    padding: 40px;
    min-height: 500px;
}

.form-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.form-step.active {
    display: block;
}

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

fieldset {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    background: white;
    transition: var(--transition);
}

fieldset:hover {
    border-color: var(--primary-color);
}

legend {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--secondary-color);
    padding: 0 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Form Elements */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 14px;
}

.form-group label i {
    color: var(--primary-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: var(--transition);
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--light-text);
    font-size: 12px;
}

.error-message {
    color: var(--danger-color);
    font-size: 12px;
    margin-top: 5px;
    min-height: 20px;
}

/* Geolocation Section */
.geolocation-section {
    margin-top: 30px;
    padding: 20px;
    background: var(--light-bg);
    border-radius: 8px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.btn-geolocate {
    padding: 12px 24px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-geolocate:hover {
    background: #219653;
    transform: translateY(-2px);
}

.location-status {
    padding: 15px;
    background: #e3f2fd;
    border-radius: 8px;
    color: #1565c0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.map-preview {
    height: 200px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 20px;
}

.map-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--light-text);
}

.map-placeholder i {
    font-size: 3rem;
    margin-bottom: 10px;
}

/* Signature */
.signature-container {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    background: white;
}

#signatureCanvas {
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: white;
    cursor: crosshair;
    display: block;
    margin: 0 auto;
    touch-action: none;
}

.signature-controls {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    align-items: center;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.signature-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.signature-preview {
    margin-top: 30px;
    padding: 20px;
    background: var(--light-bg);
    border-radius: 8px;
}

.preview-container {
    padding: 20px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    margin-top: 10px;
}

.preview-container img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Review Section */
.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.review-group {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
}

.review-group h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.review-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.review-item:last-child {
    border-bottom: none;
}

.review-item .label {
    font-weight: 600;
    color: var(--secondary-color);
}

.review-item .value {
    color: var(--dark-text);
}

/* Terms and Conditions */
.terms-section {
    margin-top: 30px;
}

.terms-container {
    background: var(--light-bg);
    padding: 25px;
    border-radius: 8px;
}

.terms-content {
    max-height: 200px;
    overflow-y: auto;
    padding: 15px;
    background: white;
    border-radius: 5px;
    margin: 15px 0;
    border: 1px solid var(--border-color);
}

.terms-content ul {
    padding-left: 20px;
    margin: 10px 0;
}

.terms-content li {
    margin-bottom: 8px;
}

.terms-agreement {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-top: 20px;
}

.terms-agreement input[type="checkbox"] {
    margin-top: 5px;
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
}

.terms-agreement label {
    flex: 1;
    font-weight: normal;
    cursor: pointer;
}

/* Step Actions */
.step-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.btn-prev,
.btn-next,
.btn-submit {
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-prev {
    background: var(--light-bg);
    color: var(--secondary-color);
}

.btn-prev:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

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

.btn-next:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

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

.btn-submit:hover {
    background: #219653;
    transform: translateY(-2px);
}

.btn-secondary {
    padding: 12px 24px;
    background: #7f8c8d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: #6c7b7d;
    transform: translateY(-2px);
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 60px 40px;
    display: none;
}

.success-icon i {
    font-size: 5rem;
    color: var(--success-color);
    margin-bottom: 30px;
}

.success-message h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.success-message p {
    font-size: 1.2rem;
    color: var(--light-text);
    margin-bottom: 40px;
}

.success-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    padding: 15px 40px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: var(--secondary-color);
    color: white;
    padding: 25px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.version {
    font-size: 12px;
    opacity: 0.7;
}

/* Admin Panel */
.admin-panel-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 1000;
}

.admin-panel-toggle:hover {
    transform: scale(1.1);
}

.admin-panel {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 400px;
    max-height: 500px;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    z-index: 999;
    overflow: hidden;
}

.admin-panel.active {
    display: flex;
}

.admin-header {
    background: var(--secondary-color);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

.admin-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Admin Tabs */
.admin-tabs {
    display: flex;
    gap: 0;
    background: var(--light-bg);
    border-bottom: 2px solid var(--border-color);
    padding: 0;
}

.admin-tab-btn {
    flex: 1;
    padding: 15px;
    background: transparent;
    border: none;
    color: var(--light-text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.admin-tab-btn:hover {
    color: var(--primary-color);
    background: rgba(41, 171, 135, 0.05);
}

.admin-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

.admin-section {
    margin-bottom: 25px;
}

.admin-section h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

/* Settings Group */
.settings-group {
    padding: 15px;
    background: var(--light-bg);
    border-radius: 6px;
    margin-bottom: 15px;
}

.setting-toggle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.setting-checkbox {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.toggle-label {
    font-weight: 600;
    color: var(--dark-text);
    display: block;
}

.setting-toggle small {
    font-size: 12px;
    color: var(--light-text);
    display: block;
    margin-top: 4px;
}

#adminSearch {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
    transition: var(--transition);
}

#adminSearch:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(41, 171, 135, 0.1);
}

.search-results {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

/* Responsive Design */

/* Large Tablets and Small Desktops (1024px and below) */
@media (max-width: 1024px) {
    .container {
        max-width: 95%;
    }

    .admin-panel {
        width: 500px;
    }

    .admin-table {
        font-size: 11px;
    }

    .admin-table th,
    .admin-table td {
        padding: 10px;
    }
}

/* Tablets (768px and below) */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 20px 25px;
    }

    .logo h1 {
        font-size: 24px;
    }

    .logo i {
        font-size: 2rem;
    }

    .stats {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }

    .stat-item {
        padding: 10px 15px;
        font-size: 14px;
    }

    .progress-steps {
        padding: 20px 15px;
        overflow-x: auto;
    }

    .progress-steps::before {
        left: 15px;
        right: 15px;
    }

    .step {
        min-width: 80px;
    }

    .step-label {
        font-size: 11px;
    }

    .step-number {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }

    .form-container {
        padding: 25px 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 15px;
    }

    fieldset {
        padding: 20px 15px;
    }

    legend {
        font-size: 1.1rem;
    }

    .form-group input,
    .form-group select {
        font-size: 15px;
        padding: 13px;
    }

    .review-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .step-actions {
        flex-direction: column;
        gap: 15px;
    }

    .btn-prev,
    .btn-next,
    .btn-submit {
        width: 100%;
        justify-content: center;
        padding: 14px 30px;
        font-size: 15px;
    }

    .signature-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .signature-actions {
        flex-direction: column;
    }

    .signature-actions button {
        width: 100%;
    }

    #signatureCanvas {
        width: 100%;
        max-width: 100%;
    }

    .geolocation-section {
        padding: 15px;
    }

    .section-header {
        flex-direction: column;
        gap: 15px;
    }

    .btn-geolocate {
        width: 100%;
        justify-content: center;
    }

    .success-actions {
        flex-direction: column;
        width: 100%;
    }

    .success-actions button {
        width: 100%;
    }

    .admin-panel {
        width: calc(100% - 30px);
        right: 15px;
        left: 15px;
        bottom: 80px;
        max-height: 70vh;
    }

    .admin-panel-toggle {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
        font-size: 1.3rem;
    }

    .export-buttons {
        flex-direction: column;
    }

    .export-btn {
        width: 100%;
        min-width: auto;
    }

    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-table {
        min-width: 800px;
        font-size: 10px;
    }

    .admin-table th,
    .admin-table td {
        padding: 8px;
        white-space: nowrap;
    }
}

/* Mobile Devices (480px and below) */
@media (max-width: 480px) {
    body {
        padding: 0;
        font-size: 14px;
    }

    .container {
        border-radius: 0;
        min-height: 100vh;
    }

    .header {
        padding: 15px;
        border-radius: 0;
    }

    .logo h1 {
        font-size: 20px;
    }

    .logo i {
        font-size: 1.8rem;
    }

    .stats {
        gap: 10px;
    }

    .stat-item {
        padding: 8px 12px;
        font-size: 12px;
    }

    .stat-item i {
        font-size: 1rem;
    }

    .progress-steps {
        padding: 15px 10px;
    }

    .step {
        min-width: 65px;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
        border-width: 2px;
    }

    .step-label {
        font-size: 10px;
        display: none;
    }

    .step.active .step-label {
        display: block;
    }

    .form-container {
        padding: 20px 15px;
    }

    fieldset {
        padding: 15px;
        margin-bottom: 20px;
    }

    legend {
        font-size: 1rem;
        padding: 0 10px;
    }

    legend i {
        font-size: 0.9rem;
    }

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

    .form-group label {
        font-size: 13px;
    }

    .form-group input,
    .form-group select {
        font-size: 14px;
        padding: 12px;
    }

    .form-group small {
        font-size: 11px;
    }

    .btn-prev,
    .btn-next,
    .btn-submit {
        padding: 12px 25px;
        font-size: 14px;
    }

    .btn-secondary {
        padding: 10px 20px;
        font-size: 13px;
    }

    .btn-geolocate {
        padding: 10px 20px;
        font-size: 13px;
    }

    #signatureCanvas {
        width: 100%;
        height: 180px;
    }

    .signature-controls input[type="range"],
    .signature-controls input[type="color"] {
        width: 100%;
    }

    .control-group label {
        font-size: 12px;
    }

    .geolocation-section {
        padding: 12px;
        margin-top: 20px;
    }

    .section-header h3 {
        font-size: 1rem;
    }

    .location-status {
        padding: 12px;
        font-size: 12px;
    }

    .map-preview {
        height: 150px;
    }

    .review-group {
        padding: 15px;
    }

    .review-group h4 {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .review-item {
        font-size: 13px;
        padding: 8px 0;
    }

    .terms-content {
        max-height: 150px;
        padding: 12px;
        font-size: 13px;
    }

    .terms-agreement input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }

    .terms-agreement label {
        font-size: 13px;
    }

    .success-message {
        padding: 30px 20px;
    }

    .success-icon i {
        font-size: 4rem;
        margin-bottom: 20px;
    }

    .success-message h2 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .success-message p {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .footer {
        padding: 20px 15px;
        font-size: 12px;
    }

    .version {
        font-size: 10px;
    }

    .admin-panel {
        width: 90%;
        right: 5%;
        max-height: 70vh;
    }

    .admin-content {
        padding: 18px;
    }

    .export-buttons {
        flex-direction: column;
    }

    .export-btn {
        width: 100%;
        min-width: unset;
    }

    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-table {
        font-size: 11px;
    }

    .admin-table th,
    .admin-table td {
        padding: 10px 8px;
    }
}

/* Tablets and Below (768px and below) */
@media (max-width: 768px) {
    .container {
        margin: 20px auto;
        padding: 0 10px;
        border-radius: 10px;
    }

    .header {
        padding: 20px;
        text-align: center;
    }

    .logo h1 {
        font-size: 20px;
    }

    .logo i {
        font-size: 1.8rem;
    }

    .header-stats {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .stat-item {
        font-size: 12px;
        padding: 8px 12px;
        width: 100%;
        justify-content: center;
    }

    .form-container {
        padding: 25px;
    }

    fieldset {
        padding: 15px;
    }

    legend {
        font-size: 1rem;
        padding: 0 10px;
    }

    .form-row {
        flex-direction: column;
    }

    .progress-steps {
        flex-wrap: wrap;
        gap: 15px;
        padding: 20px 15px;
    }

    .progress-step {
        flex: 1 1 calc(50% - 15px);
        min-width: 140px;
    }

    .step-label {
        display: none;
    }

    .step-actions {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .btn-prev,
    .btn-next,
    .btn-submit {
        width: 100%;
        justify-content: center;
    }

    .signature-controls {
        flex-direction: column;
        gap: 12px;
    }

    .control-group {
        width: 100%;
    }

    .signature-actions {
        flex-wrap: wrap;
    }

    .signature-actions button {
        flex: 1 1 calc(50% - 5px);
        min-width: 120px;
    }

    .review-grid {
        grid-template-columns: 1fr;
    }

    .form-group label {
        font-size: 13px;
    }

    .form-group input,
    .form-group select {
        font-size: 14px;
        padding: 12px;
    }

    .form-group small {
        font-size: 11px;
    }

    .btn-prev,
    .btn-next,
    .btn-submit {
        padding: 12px 25px;
        font-size: 14px;
    }

    .btn-secondary {
        padding: 10px 20px;
        font-size: 13px;
    }

    .btn-geolocate {
        padding: 10px 20px;
        font-size: 13px;
    }

    #signatureCanvas {
        width: 100%;
        height: 180px;
    }

    .signature-controls input[type="range"],
    .signature-controls input[type="color"] {
        width: 100%;
    }

    .control-group label {
        font-size: 12px;
    }

    .geolocation-section {
        padding: 12px;
        margin-top: 20px;
    }

    .section-header h3 {
        font-size: 1rem;
    }

    .location-status {
        padding: 12px;
        font-size: 12px;
    }

    .map-preview {
        height: 150px;
    }

    .review-group {
        padding: 15px;
    }

    .review-group h4 {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .review-item {
        font-size: 13px;
        padding: 8px 0;
    }

    .terms-content {
        max-height: 150px;
        padding: 12px;
        font-size: 13px;
    }

    .terms-agreement input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }

    .terms-agreement label {
        font-size: 13px;
    }

    .success-message {
        padding: 30px 20px;
    }

    .success-icon i {
        font-size: 4rem;
        margin-bottom: 20px;
    }

    .success-message h2 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .success-message p {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .footer {
        padding: 20px 15px;
        font-size: 12px;
    }

    .version {
        font-size: 10px;
    }

    /* Admin Panel Tablet Responsive */
    .admin-panel {
        width: 100%;
        right: 0;
        left: 0;
        bottom: 0;
        max-height: 80vh;
        border-radius: 15px 15px 0 0;
    }

    .admin-panel-toggle {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
        font-size: 1.3rem;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }

    .admin-header {
        padding: 16px;
    }

    .admin-header h3 {
        font-size: 1.1rem;
    }

    .btn-close {
        font-size: 1.4rem;
        padding: 5px;
        min-width: 35px;
        min-height: 35px;
    }

    .admin-content {
        padding: 16px;
    }

    .admin-section {
        margin-bottom: 20px;
    }

    .admin-section h4 {
        font-size: 0.95rem;
        margin-bottom: 12px;
    }

    #adminSearch {
        padding: 12px;
        font-size: 14px;
        border-width: 2px;
    }

    .export-buttons {
        gap: 8px;
    }

    .export-btn {
        padding: 12px 15px;
        font-size: 12px;
        width: 100%;
        min-width: unset;
    }

    .btn-sm {
        padding: 10px 15px;
        font-size: 13px;
        width: 100%;
    }

    .table-wrapper {
        margin: 0 -16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .admin-table {
        font-size: 10px;
        min-width: 650px;
    }

    .admin-table th,
    .admin-table td {
        padding: 8px 6px;
        white-space: nowrap;
    }

    .admin-table th:first-child,
    .admin-table td:first-child {
        padding-left: 16px;
        position: sticky;
        left: 0;
        background: white;
        z-index: 1;
    }

    .admin-table thead th:first-child {
        background: var(--light-bg);
        z-index: 2;
    }

    .admin-table .action-btn {
        padding: 6px 10px;
        font-size: 10px;
        white-space: nowrap;
    }

    #adminStats {
        gap: 6px;
    }

    #adminStats p {
        font-size: 12px;
        padding: 8px;
    }

    .search-results {
        max-height: 180px;
    }

    .search-result-item {
        padding: 12px;
        font-size: 13px;
    }

    .result-name {
        font-size: 14px;
    }

    .result-meta {
        font-size: 11px;
        margin-top: 4px;
    }
}

/* Extra Small Devices (360px and below) */
@media (max-width: 360px) {
    .logo h1 {
        font-size: 18px;
    }

    .logo i {
        font-size: 1.5rem;
    }

    .stat-item {
        font-size: 11px;
        padding: 6px 10px;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }

    .form-group input,
    .form-group select {
        font-size: 13px;
        padding: 10px;
    }

    .btn-prev,
    .btn-next,
    .btn-submit {
        padding: 10px 20px;
        font-size: 13px;
    }

    fieldset {
        padding: 12px;
    }

    legend {
        font-size: 0.95rem;
    }

    #signatureCanvas {
        height: 150px;
    }

    /* Admin Panel Extra Small Devices */
    .admin-panel-toggle {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
        font-size: 1.1rem;
    }

    .admin-header {
        padding: 12px;
    }

    .admin-header h3 {
        font-size: 0.95rem;
    }

    .btn-close {
        font-size: 1.2rem;
        padding: 4px;
    }

    .admin-content {
        padding: 12px;
    }

    .admin-section {
        margin-bottom: 15px;
    }

    .admin-section h4 {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }

    #adminSearch {
        padding: 10px;
        font-size: 13px;
    }

    .export-btn {
        padding: 10px 12px;
        font-size: 11px;
    }

    .btn-sm {
        padding: 8px 12px;
        font-size: 12px;
    }

    .admin-table {
        font-size: 9px;
        min-width: 600px;
    }

    .admin-table th,
    .admin-table td {
        padding: 6px 4px;
    }

    .admin-table th:first-child,
    .admin-table td:first-child {
        padding-left: 12px;
    }

    .admin-table .action-btn {
        padding: 5px 8px;
        font-size: 9px;
    }

    #adminStats p {
        font-size: 11px;
        padding: 6px;
    }

    .search-result-item {
        padding: 10px;
        font-size: 12px;
    }

    .result-name {
        font-size: 13px;
    }

    .result-meta {
        font-size: 10px;
    }
}

/* Loading States */
.loading {
    position: relative;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Admin Panel Styling */
.admin-panel-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 1000;
}

.admin-panel-toggle:hover {
    transform: scale(1.1);
    background: var(--primary-color);
}

.admin-panel {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 600px;
    max-height: 80vh;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    z-index: 999;
    overflow: hidden;
}

.admin-panel.active {
    display: flex;
}

.admin-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.admin-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.btn-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-close:hover {
    transform: rotate(90deg);
}

.admin-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.admin-section {
    margin-bottom: 25px;
}

.admin-section h4 {
    margin: 0 0 15px 0;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

#adminSearch {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
    transition: var(--transition);
}

#adminSearch:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.search-results {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--light-bg);
}

.search-result-item {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.search-result-item:hover {
    background: white;
    padding-left: 16px;
}

.search-result-item:last-child {
    border-bottom: none;
}

.result-name {
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 5px;
}

.result-meta {
    font-size: 12px;
    color: var(--light-text);
}

.export-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.export-btn {
    padding: 10px 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

.export-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.export-btn:active {
    transform: translateY(0);
}

.table-controls {
    margin-bottom: 15px;
}

.btn-sm {
    padding: 10px 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-sm:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.admin-table thead {
    background: var(--light-bg);
    position: sticky;
    top: 0;
}

.admin-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.admin-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.admin-table tbody tr:hover {
    background: var(--light-bg);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table .action-btn {
    padding: 6px 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: var(--transition);
}

.admin-table .action-btn:hover {
    background: var(--secondary-color);
}

#adminStats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#adminStats p {
    margin: 0;
    font-size: 13px;
    padding: 8px;
    background: var(--light-bg);
    border-left: 3px solid var(--primary-color);
    border-radius: 4px;
}

#adminStats strong {
    color: var(--secondary-color);
}

/* Print Styles */
@media print {
    .header,
    .progress-steps,
    .step-actions,
    .footer,
    .admin-panel-toggle {
        display: none !important;
    }

    .container {
        box-shadow: none;
        max-width: none;
    }

    .form-container {
        padding: 0;
    }

    .success-message {
        padding: 0;
    }
}