html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top left, #e0f2fe, transparent 35%), linear-gradient(135deg, #0f172a 0%, #1e293b 45%, #0369a1 100%);
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 28px;
    padding: 38px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    text-align: center;
}

.brand-icon {
    width: 74px;
    height: 74px;
    margin: 0 auto 18px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    font-size: 36px;
    box-shadow: 0 12px 30px rgba(2, 132, 199, 0.35);
}

.login-card h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
    color: #0f172a;
}

.subtitle {
    color: #64748b;
    margin: 8px 0 28px;
}

.form-group {
    text-align: left;
    margin-bottom: 18px;
}

    .form-group label {
        display: block;
        margin-bottom: 7px;
        font-size: 14px;
        font-weight: 700;
        color: #334155;
    }

.form-control {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 14px 15px;
    font-size: 15px;
    outline: none;
    transition: all 0.2s ease;
}

    .form-control:focus {
        border-color: #0284c7;
        box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.18);
    }

.btn-login {
    width: 100%;
    border: none;
    border-radius: 16px;
    padding: 15px;
    margin-top: 8px;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: white;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(2, 132, 199, 0.32);
}

    .btn-login:disabled {
        opacity: 0.7;
        cursor: not-allowed;
    }

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 600;
}

.version {
    margin-top: 22px;
    font-size: 12px;
    color: #94a3b8;
}


.scheduler-shell {
    min-height: 100vh;
    display: flex;
    background: #f1f5f9;
}

.scheduler-sidebar {
    width: 280px;
    background: linear-gradient(180deg, #0f172a 0%, #075985 100%);
    color: white;
    padding: 28px;
}

.sidebar-brand {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 38px;
}

.sidebar-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.sidebar-brand h2 {
    margin: 0;
    font-size: 20px;
}

.sidebar-brand span {
    font-size: 13px;
    color: #bae6fd;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .sidebar-menu a {
        padding: 13px 16px;
        border-radius: 14px;
        color: #e0f2fe;
        text-decoration: none;
        cursor: pointer;
    }

        .sidebar-menu a.active,
        .sidebar-menu a:hover {
            background: rgba(255, 255, 255, 0.14);
        }

.scheduler-main {
    flex: 1;
    padding: 34px;
}

.scheduler-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

    .scheduler-header h1 {
        margin: 0;
        color: #0f172a;
        font-size: 32px;
    }

    .scheduler-header p {
        margin: 6px 0 0;
        color: #64748b;
    }

.btn-new-appointment {
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: white;
    padding: 14px 20px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(2, 132, 199, 0.28);
}

.calendar-card {
    background: white;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.fc {
    font-family: inherit;
}

    .fc .fc-toolbar-title {
        font-size: 22px;
        font-weight: 800;
        color: #0f172a;
    }

    .fc .fc-button-primary {
        background: #0284c7;
        border-color: #0284c7;
        border-radius: 10px;
    }

        .fc .fc-button-primary:hover {
            background: #0369a1;
            border-color: #0369a1;
        }

.fc-event {
    border: none;
    border-radius: 10px;
    padding: 3px 6px;
    font-weight: 700;
}

@media (max-width: 900px) {
    .scheduler-shell {
        flex-direction: column;
    }

    .scheduler-sidebar {
        width: 100%;
    }

    .scheduler-main {
        padding: 20px;
    }

    .scheduler-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}
/* Evita que el texto de las horas bloqueadas invada otras celdas */
.fc .fc-event-title,
.fc .fc-event-title-container,
.fc .fc-event-main {
    min-width: 0;
    overflow: hidden;
}

.fc .fc-event-title {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =========================================================
   PLATFORM ADMINISTRATION
   ========================================================= */

.platform-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background:
        radial-gradient(
            circle at top right,
            rgba(37, 99, 235, 0.14),
            transparent 35%),
        linear-gradient(
            135deg,
            #f8fafc 0%,
            #e2e8f0 100%);
}

.platform-login-card {
    width: min(100%, 440px);
    padding: 2.25rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    box-shadow:
        0 24px 60px rgba(15, 23, 42, 0.12);
}

.platform-login-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.platform-login-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: #eff6ff;
    font-size: 1.9rem;
}

.platform-login-header h1 {
    margin: 0;
    color: #0f172a;
    font-size: 1.55rem;
}

.platform-login-header p {
    margin: 0.2rem 0 0;
    color: #64748b;
}

.platform-login-description {
    margin-bottom: 1.5rem;
    color: #475569;
}

.platform-form-group {
    margin-bottom: 1rem;
}

.platform-form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: #334155;
    font-weight: 600;
}

.platform-login-button {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.8rem 1rem;
    border: 0;
    border-radius: 10px;
    background: #1d4ed8;
    color: #ffffff;
    font-weight: 700;
}

.platform-login-button:hover:not(:disabled) {
    background: #1e40af;
}

.platform-login-button:disabled {
    opacity: 0.65;
}

.platform-alert-error {
    margin-bottom: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    background: #fef2f2;
    color: #b91c1c;
}

.platform-clinic-login-link {
    display: block;
    margin-top: 1.25rem;
    color: #2563eb;
    text-align: center;
    text-decoration: none;
}

.platform-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    background: #f8fafc;
}

.platform-sidebar {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    background: #0f172a;
    color: #ffffff;
}

.platform-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0 0.75rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.platform-brand-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 1.4rem;
}

.platform-brand strong,
.platform-brand span {
    display: block;
}

.platform-brand span {
    margin-top: 0.15rem;
    color: #94a3b8;
    font-size: 0.78rem;
}

.platform-navigation {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 1.5rem;
}

.platform-navigation a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    border-radius: 10px;
    color: #cbd5e1;
    text-decoration: none;
}

.platform-navigation a:hover,
.platform-navigation a.active {
    background: #1e293b;
    color: #ffffff;
}

.platform-logout-button {
    margin-top: auto;
    padding: 0.75rem 1rem;
    border: 1px solid #334155;
    border-radius: 10px;
    background: transparent;
    color: #e2e8f0;
}

.platform-content {
    min-width: 0;
    padding: 2rem;
}

.platform-page-header {
    margin-bottom: 1.75rem;
}

.platform-page-eyebrow {
    color: #2563eb;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.platform-page-header h1 {
    margin: 0.35rem 0 0;
    color: #0f172a;
}

.platform-page-header p {
    margin: 0.4rem 0 0;
    color: #64748b;
}

.platform-summary-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.platform-summary-card {
    display: flex;
    gap: 1rem;
    min-height: 150px;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    box-shadow:
        0 8px 24px rgba(15, 23, 42, 0.05);
}

.platform-summary-card:hover {
    border-color: #93c5fd;
    transform: translateY(-2px);
}

.platform-summary-icon {
    font-size: 1.7rem;
}

.platform-summary-card strong {
    display: block;
    margin-bottom: 0.35rem;
    color: #0f172a;
    font-size: 1.05rem;
}

.platform-summary-card p {
    margin: 0;
    color: #64748b;
}

.platform-welcome-card {
    margin-top: 1rem;
    padding: 1.5rem;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: #eff6ff;
}

.platform-welcome-card h2 {
    margin-top: 0;
    color: #1e3a8a;
}

.platform-welcome-card p {
    margin-bottom: 0;
    color: #1e40af;
}

.platform-loading {
    min-height: 70vh;
    display: grid;
    place-items: center;
    color: #64748b;
}

@media (max-width: 900px) {
    .platform-shell {
        grid-template-columns: 1fr;
    }

    .platform-sidebar {
        min-height: auto;
    }

    .platform-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   PLATFORM ADMINISTRATION
   ========================================================= */

.platform-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background:
        radial-gradient(
            circle at top right,
            rgba(37, 99, 235, 0.14),
            transparent 35%),
        linear-gradient(
            135deg,
            #f8fafc 0%,
            #e2e8f0 100%);
}

.platform-login-card {
    width: min(100%, 440px);
    padding: 2.25rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    box-shadow:
        0 24px 60px rgba(15, 23, 42, 0.12);
}

.platform-login-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.platform-login-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: #eff6ff;
    font-size: 1.9rem;
}

.platform-login-header h1 {
    margin: 0;
    color: #0f172a;
    font-size: 1.55rem;
}

.platform-login-header p {
    margin: 0.2rem 0 0;
    color: #64748b;
}

.platform-login-description {
    margin-bottom: 1.5rem;
    color: #475569;
}

.platform-form-group {
    margin-bottom: 1rem;
}

.platform-form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: #334155;
    font-weight: 600;
}

.platform-login-button {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.8rem 1rem;
    border: 0;
    border-radius: 10px;
    background: #1d4ed8;
    color: #ffffff;
    font-weight: 700;
}

.platform-login-button:hover:not(:disabled) {
    background: #1e40af;
}

.platform-login-button:disabled {
    opacity: 0.65;
}

.platform-alert-error {
    margin-bottom: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    background: #fef2f2;
    color: #b91c1c;
}

.platform-clinic-login-link {
    display: block;
    margin-top: 1.25rem;
    color: #2563eb;
    text-align: center;
    text-decoration: none;
}

.platform-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    background: #f8fafc;
}

.platform-sidebar {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    background: #0f172a;
    color: #ffffff;
}

.platform-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0 0.75rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.platform-brand-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 1.4rem;
}

.platform-brand strong,
.platform-brand span {
    display: block;
}

.platform-brand span {
    margin-top: 0.15rem;
    color: #94a3b8;
    font-size: 0.78rem;
}

.platform-navigation {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 1.5rem;
}

.platform-navigation a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    border-radius: 10px;
    color: #cbd5e1;
    text-decoration: none;
}

.platform-navigation a:hover,
.platform-navigation a.active {
    background: #1e293b;
    color: #ffffff;
}

.platform-logout-button {
    margin-top: auto;
    padding: 0.75rem 1rem;
    border: 1px solid #334155;
    border-radius: 10px;
    background: transparent;
    color: #e2e8f0;
}

.platform-content {
    min-width: 0;
    padding: 2rem;
}

.platform-page-header {
    margin-bottom: 1.75rem;
}

.platform-page-eyebrow {
    color: #2563eb;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.platform-page-header h1 {
    margin: 0.35rem 0 0;
    color: #0f172a;
}

.platform-page-header p {
    margin: 0.4rem 0 0;
    color: #64748b;
}

.platform-summary-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.platform-summary-card {
    display: flex;
    gap: 1rem;
    min-height: 150px;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    box-shadow:
        0 8px 24px rgba(15, 23, 42, 0.05);
}

.platform-summary-card:hover {
    border-color: #93c5fd;
    transform: translateY(-2px);
}

.platform-summary-icon {
    font-size: 1.7rem;
}

.platform-summary-card strong {
    display: block;
    margin-bottom: 0.35rem;
    color: #0f172a;
    font-size: 1.05rem;
}

.platform-summary-card p {
    margin: 0;
    color: #64748b;
}

.platform-welcome-card {
    margin-top: 1rem;
    padding: 1.5rem;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: #eff6ff;
}

.platform-welcome-card h2 {
    margin-top: 0;
    color: #1e3a8a;
}

.platform-welcome-card p {
    margin-bottom: 0;
    color: #1e40af;
}

.platform-loading {
    min-height: 70vh;
    display: grid;
    place-items: center;
    color: #64748b;
}

@media (max-width: 900px) {
    .platform-shell {
        grid-template-columns: 1fr;
    }

    .platform-sidebar {
        min-height: auto;
    }

    .platform-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   PLATFORM CLINICS
   ========================================================= */

.platform-page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.platform-primary-button,
.platform-secondary-button,
.platform-danger-outline-button,
.platform-success-outline-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.65rem 1rem;
    border-radius: 9px;
    font-weight: 700;
    cursor: pointer;
}

.platform-primary-button {
    border: 1px solid #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.platform-primary-button:hover:not(:disabled) {
    background: #1d4ed8;
}

.platform-secondary-button {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
}

.platform-secondary-button:hover:not(:disabled) {
    background: #f8fafc;
}

.platform-danger-outline-button {
    border: 1px solid #fecaca;
    background: #ffffff;
    color: #b91c1c;
}

.platform-danger-outline-button:hover:not(:disabled) {
    background: #fef2f2;
}

.platform-success-outline-button {
    border: 1px solid #bbf7d0;
    background: #ffffff;
    color: #15803d;
}

.platform-success-outline-button:hover:not(:disabled) {
    background: #f0fdf4;
}

.platform-primary-button:disabled,
.platform-secondary-button:disabled,
.platform-danger-outline-button:disabled,
.platform-success-outline-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.platform-message {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 10px;
}

.platform-message button {
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 1.25rem;
    cursor: pointer;
}

.platform-message-success {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.platform-message-error {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.platform-table-card {
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.platform-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.platform-search-wrapper {
    width: min(100%, 520px);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
}

.platform-search-input {
    width: 100%;
    min-height: 42px;
    border: 0;
    outline: none;
    background: transparent;
    color: #0f172a;
}

.platform-record-count {
    color: #64748b;
    font-size: 0.9rem;
}

.platform-table-scroll {
    overflow-x: auto;
}

.platform-data-table {
    width: 100%;
    border-collapse: collapse;
}

.platform-data-table th {
    padding: 0.85rem 1rem;
    background: #f8fafc;
    color: #475569;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.platform-data-table td {
    padding: 1rem;
    border-top: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.platform-data-table tbody tr:hover {
    background: #fafcff;
}

.platform-actions-column {
    text-align: right !important;
}

.platform-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.platform-clinic-identity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 190px;
}

.platform-clinic-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 12px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 800;
}

.platform-clinic-identity strong,
.platform-clinic-identity span,
.platform-connection-info strong,
.platform-connection-info span {
    display: block;
}

.platform-clinic-identity span,
.platform-connection-info span {
    margin-top: 0.15rem;
    color: #64748b;
    font-size: 0.85rem;
}

.platform-status,
.platform-environment {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
}

.platform-status-active {
    background: #dcfce7;
    color: #166534;
}

.platform-status-inactive {
    background: #f1f5f9;
    color: #64748b;
}

.platform-environment-prod {
    background: #dbeafe;
    color: #1e40af;
}

.platform-environment-qa {
    background: #f3e8ff;
    color: #7e22ce;
}

.platform-environment-test {
    background: #fef3c7;
    color: #92400e;
}

.platform-environment-dev {
    background: #e2e8f0;
    color: #334155;
}

.platform-muted-text {
    color: #94a3b8;
}

.platform-empty-state {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 2rem;
    color: #64748b;
    text-align: center;
}

.platform-empty-state strong {
    color: #334155;
}

.platform-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 2rem 1rem;
    background: rgba(15, 23, 42, 0.66);
}

.platform-modal {
    width: min(100%, 850px);
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.3);
}

.platform-modal-header,
.platform-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
}

.platform-modal-header {
    border-bottom: 1px solid #e2e8f0;
}

.platform-modal-header h2 {
    margin: 0.25rem 0 0;
    color: #0f172a;
}

.platform-modal-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 9px;
    background: #f1f5f9;
    color: #475569;
    font-size: 1.4rem;
    cursor: pointer;
}

.platform-modal-body {
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    padding: 1.5rem;
}

.platform-modal-footer {
    justify-content: flex-end;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.platform-form-section + .platform-form-section {
    margin-top: 1.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid #e2e8f0;
}

.platform-form-section-heading {
    margin-bottom: 1rem;
}

.platform-form-section-heading h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
}

.platform-form-section-heading p {
    margin: 0.25rem 0 0;
    color: #64748b;
    font-size: 0.88rem;
}

.platform-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.platform-form-field {
    min-width: 0;
}

.platform-form-field-full {
    grid-column: 1 / -1;
}

.platform-form-field label {
    display: block;
    margin-bottom: 0.4rem;
    color: #334155;
    font-weight: 700;
    font-size: 0.88rem;
}

.platform-form-field .validation-message {
    display: block;
    margin-top: 0.3rem;
    color: #b91c1c;
    font-size: 0.8rem;
}

.platform-checkbox-field {
    display: flex;
    align-items: flex-end;
    padding-bottom: 0.65rem;
}

.platform-checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.6rem;
    margin: 0 !important;
    cursor: pointer;
}

.platform-field-help {
    display: block;
    margin-top: 0.35rem;
    color: #64748b;
}

.platform-notes-input {
    min-height: 100px;
    resize: vertical;
}

@media (max-width: 760px) {
    .platform-page-header-row,
    .platform-table-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .platform-primary-button {
        width: 100%;
    }

    .platform-form-grid {
        grid-template-columns: 1fr;
    }

    .platform-form-field-full {
        grid-column: auto;
    }

    .platform-row-actions {
        min-width: 210px;
    }

    .platform-modal-backdrop {
        padding: 0;
    }

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