/* Chiro Medische Fiche - Styles */
:root {
    --chiro-red: #e30613;
    --chiro-dark: #b3050f;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --green-500: #22c55e;
    --green-700: #15803d;
    --blue-500: #3b82f6;
    --blue-700: #1d4ed8;
    --red-100: #fee2e2;
    --red-700: #b91c1c;
    --yellow-100: #fef3c7;
    --yellow-700: #a16207;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
}

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

/* Header */
.header {
    background: white;
    border-bottom: 3px solid var(--chiro-red);
    padding: 15px 0;
    margin-bottom: 30px;
}

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

.header h1 {
    font-size: 1.4rem;
    color: var(--chiro-red);
}

.header .subtitle {
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* Form sections */
.form-section {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.form-section h2 {
    color: var(--chiro-red);
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gray-200);
}

.form-section h3 {
    font-size: 1rem;
    margin: 15px 0 10px;
    color: var(--gray-700);
}

/* Form fields */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.form-group label .required {
    color: var(--chiro-red);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--chiro-red);
    box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.1);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-group .help-text {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 4px;
}

/* Checkboxes */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}

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

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--chiro-red);
}

.checkbox-item label {
    font-weight: normal;
    margin-bottom: 0;
}

/* Radio buttons */
.radio-group {
    display: flex;
    gap: 20px;
    align-items: center;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.radio-item input[type="radio"] {
    accent-color: var(--chiro-red);
}

/* Conditional fields */
.conditional-field {
    display: none;
    margin-top: 10px;
    padding-left: 25px;
    border-left: 3px solid var(--gray-200);
}

.conditional-field.visible {
    display: block;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

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

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

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

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

.btn-success:hover {
    background: var(--green-700);
}

.btn-small {
    padding: 6px 14px;
    font-size: 0.85rem;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-success {
    background: #dcfce7;
    color: var(--green-700);
    border: 1px solid #86efac;
}

.alert-error {
    background: var(--red-100);
    color: var(--red-700);
    border: 1px solid #fca5a5;
}

.alert-warning {
    background: var(--yellow-100);
    color: var(--yellow-700);
    border: 1px solid #fde68a;
}

.alert-info {
    background: #dbeafe;
    color: var(--blue-700);
    border: 1px solid #93c5fd;
}

/* Steps indicator */
.steps {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    gap: 0;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.85rem;
    color: var(--gray-500);
}

.step.active {
    color: var(--chiro-red);
    font-weight: 600;
}

.step.completed {
    color: var(--green-700);
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    background: var(--gray-200);
    color: var(--gray-500);
}

.step.active .step-number {
    background: var(--chiro-red);
    color: white;
}

.step.completed .step-number {
    background: var(--green-500);
    color: white;
}

.step-connector {
    width: 30px;
    height: 2px;
    background: var(--gray-200);
    align-self: center;
}

/* Privacy policy */
.privacy-box {
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
    font-size: 0.85rem;
    line-height: 1.7;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: var(--gray-500);
    font-size: 0.8rem;
    margin-top: 30px;
}

/* Admin styles */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 240px;
    background: var(--gray-900);
    color: white;
    padding: 20px 0;
    flex-shrink: 0;
}

.admin-sidebar h2 {
    padding: 0 20px 15px;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 10px;
}

.admin-sidebar a {
    display: block;
    padding: 10px 20px;
    color: var(--gray-300);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.admin-content {
    flex: 1;
    padding: 30px;
    overflow-x: auto;
}

.admin-content h1 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.9rem;
}

.data-table th {
    background: var(--gray-100);
    font-weight: 600;
    white-space: nowrap;
}

.data-table tr:hover {
    background: var(--gray-50);
}

/* Status badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: #dcfce7;
    color: var(--green-700);
}

.badge-warning {
    background: var(--yellow-100);
    color: var(--yellow-700);
}

.badge-danger {
    background: var(--red-100);
    color: var(--red-700);
}

/* Stats cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 5px;
}

/* Filter/search bar */
.toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.toolbar input,
.toolbar select {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .form-section {
        padding: 18px;
    }

    .checkbox-group {
        grid-template-columns: 1fr;
    }

    .steps {
        flex-wrap: wrap;
    }

    .step-connector {
        display: none;
    }

    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
    }

    .toolbar {
        flex-direction: column;
    }

    .data-table {
        font-size: 0.8rem;
    }

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