* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    min-height: 100vh;
    background-color: #f4f4f4;
    position: relative;
    padding: 15px;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    background: #fff;
    padding: 25px 20px;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 22px;
}

p {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
    font-size: 14px;
}

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

.form-section h3 {
    margin-bottom: 15px;
    font-size: 17px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    margin-bottom: 5px;
    color: #444;
}

input:not([type="checkbox"]) {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

input:not([type="checkbox"]):focus {
    border-color: #e60023;
    outline: none;
    box-shadow: 0 0 0 2px rgba(230, 0, 35, 0.1);
}

.form-row.consent-row {
    display: block;
    margin: 20px 0;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    margin-bottom: 24px;
}

input[type="checkbox"] {
    appearance: checkbox;
    -webkit-appearance: checkbox;
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
}

.checkbox-text {
    font-size: 14px;
    color: #333;
    line-height: 1.2;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background: #e60023;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.btn-submit:hover {
    background: #c4001d;
}

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

@media (min-width: 600px) {
    body {
        padding: 40px 20px;
    }

    .container {
        padding: 40px 50px;
    }

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

    .form-row .form-group {
        flex: 1;
    }

    .checkbox-text {
        font-size: 15px;
    }
}

.form-group, .consent-row {
    position: relative;
    display: flex;
    flex-direction: column;
}

.error-text {
    color: #e60023;
    font-size: 11px;
    margin-top: 4px;
    font-weight: bold;
    animation: fadeIn 0.2s ease-in;
}

.has-error input:not([type="checkbox"]) {
    border-color: #e60023 !important;
    background-color: #fff8f8;
}

.has-error .checkbox-text {
    color: #e60023;
}

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


/* message page */

.message-container {
    text-align: center;
    margin-top: 10vh;
}

.message-content {
    margin: 20px 0 30px;
    line-height: 1.6;
    color: #555;
}

.text-success {
    color: #28a745;
}

.text-danger {
    color: #e60023;
}

.btn-link {
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.actions {
    margin-top: 20px;
}

@media (max-width: 600px) {
    .message-container {
        margin-top: 50px;
        padding: 30px 20px;
    }
}


/* all doctors page */

.doctor-card {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    border-top: 4px solid #e60023;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.doctor-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.doctor-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.date-badge {
    font-size: 11px;
    color: #999;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
}

.info-item label {
    display: block;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.info-item span {
    color: #333;
    font-weight: 500;
}

details {
    border-top: 1px solid #eee;
    padding-top: 10px;
}

summary {
    cursor: pointer;
    color: #e60023;
    font-weight: bold;
    font-size: 14px;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

summary::before {
    content: '▼';
    font-size: 10px;
}

details[open] summary::before {
    content: '▲';
}

.patient-table {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse;
    font-size: 13px;
}

.patient-table td {
    padding: 8px;
    border-bottom: 1px solid #f9f9f9;
}

.pdf-btn {
    color: #e60023;
    text-decoration: none;
    border: 1px solid #e60023;
    padding: 2px 8px;
    border-radius: 4px;
    transition: 0.2s;
}

.pdf-btn:hover {
    background: #e60023;
    color: #fff;
}

.id-copy {
    font-family: monospace;
    color: #666;
    font-size: 11px;
}

.patient-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.patient-table th {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    padding: 8px;
    border-bottom: 2px solid #f4f4f4;
}

.patient-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #f9f9f9;
    vertical-align: middle;
}

.pdf-btn {
    display: inline-block;
    padding: 4px 10px;
    background: #fff;
    border: 1px solid #e60023;
    color: #e60023;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    transition: 0.3s;
}

.pdf-btn:hover {
    background: #e60023;
    color: #fff;
}


/* patient table scroll */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 10px;
}

.patient-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 450px;
}

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

@media (max-width: 480px) {
    .patient-table th {
        font-size: 10px;
    }
    .patient-table td {
        font-size: 12px;
    }
    .id-copy {
        font-size: 10px;
    }
}
