/* Global admin/public styles */
:root {
    --color-primary: #4361ee;
    --color-primary-dark: #3f37c9;
    --color-secondary: #7209b7;
    --color-accent: #4cc9f0;
    --color-success: #2ec4b6;
    --color-warning: #ff9f1c;
    --color-danger: #e71d36;
    --color-light: #f8f9fa;
    --color-dark: #212529;
    --color-gray-100: #f8f9fa;
    --color-gray-800: #343a40;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--color-light);
    color: var(--color-dark);
    line-height: 1.6;
}

header,
main {
    padding: 1.5rem;
}

.btn,
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.btn-primary,
button,
input[type="submit"] {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover,
button:hover,
input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card {
    background: #ffffff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    margin-bottom: 1.5rem;
}

.grid {
    display: grid;
    gap: 1rem;
}

.grid.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
    background: #fff;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

table thead {
    background: #f8fafc;
}

.health-calculator {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: #f8fafc;
}

.health-calculator h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.health-calculator label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.health-calculator select,
.health-calculator input,
.health-calculator textarea {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid #cbd5f5;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.95rem;
}

.health-calculator textarea {
    min-height: 80px;
}

.health-calculator__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.health-calculator__actions button {
    border: none;
    border-radius: 0.5rem;
    padding: 0.85rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-secondary {
    background: #e2e8f0;
    color: #0f172a;
}

.health-calculator__result {
    margin-top: 1.5rem;
    border-radius: 0.75rem;
    padding: 1rem;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
}

.health-calculator__details {
    margin-top: 1rem;
    border-top: 1px solid #d1d5db;
    padding-top: 1rem;
}

.health-calculator__details .detail-card {
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    background: #fff;
}

@media (max-width: 768px) {
    header,
    main {
        padding: 1rem;
    }

    .grid.grid-3 {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    table th,
    table td {
        padding: 0.65rem 0.8rem;
        font-size: 0.9rem;
    }
}
