/* Typography ve genel görünüm */
html,
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
        "Segoe UI", sans-serif;
    background-color: #f1f5f9; /* slate-100 */
    color: #0f172a; /* slate-900 */
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

/* Basit utility'ler */
.text-muted {
    color: #64748b; /* slate-500 */
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
    font-weight: 600;
}

.font-semibold {
    font-weight: 600;
}

/* Spacing utilities (gerektikçe kullanırız) */
.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-1 { margin-bottom: 0.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 1rem; }

.text-dark { color: #1e293b; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.025em; }

/* =========================================
   FORMS (Healthcare Grade)
   ========================================= */

/* Layout Helper for focused forms */
.layout-centered-form {
    max-width: 540px;
    margin: 0; /* Align left or auto for center depending on pref, usually left in dashboards */
}

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Labels */
.form-label {
    display: block;
    font-size: 0.875rem; /* 14px */
    font-weight: 500;
    color: #1e293b; /* Slate 800 */
    margin-bottom: 0.5rem;
}

/* Inputs */
.form-control {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem; /* Comfortable touch area */
    font-size: 0.95rem; /* Legible input text */
    line-height: 1.5;
    color: #0f172a;
    background-color: #ffffff;
    background-clip: padding-box;
    border: 1px solid #cbd5e1; /* Slate 300 - Soft border */
    border-radius: 0.5rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #0f172a;
    background-color: #fff;
    border-color: #6366f1; /* Primary Brand Color */
    outline: 0;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); /* Soft focus ring */
}

.form-control::placeholder {
    color: #94a3b8; /* Slate 400 */
    opacity: 1;
}

/* Validation States */
.form-control.is-invalid {
    border-color: #ef4444; /* Red 500 */
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23ef4444'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linecap='round' d='M6 3.5v3M6 8.5h0'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-error {
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #dc2626; /* Red 600 */
}

/* Hints */
.form-hint {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #64748b; /* Slate 500 */
    line-height: 1.4;
}

/* Utilities used in Blade */
.border-t { border-top: 1px solid #f1f5f9; }
.pt-4 { padding-top: 1rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-3 { gap: 0.75rem; }

/* Ensure select elements match text inputs in forms */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25em 1.25em;
    padding-right: 2.5rem; /* Space for the chevron */
}

/* Helper for the edit context */
.font-semibold {
    font-weight: 600;
}