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

body {
    font-family: Arial, sans-serif;
    background:
        radial-gradient(circle at top, #172033 0%, #090d15 55%, #05070b 100%);
    color: #ffffff;
    min-height: 100vh;
}

.mobile-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    padding: 20px 16px 30px;
}

.mobile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 4px 24px;
}

.logo {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.mobile-header h1 {
    font-size: 20px;
}

.mobile-header p {
    color: #8d98aa;
    font-size: 12px;
    margin-top: 4px;
}

.welcome-card,
.search-card,
.result-card,
.image-card,
.details-card,
.warning-card {
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
}

.welcome-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.status-dot {
    width: 10px;
    height: 10px;
    margin-top: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.8);
}

h2 {
    font-size: 18px;
}

.welcome-card p,
.empty-state p,
.warning-card p {
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.6;
    margin-top: 6px;
}

.search-card label {
    display: block;
    color: #94a3b8;
    font-size: 12px;
    margin-bottom: 8px;
}

.search-row {
    display: flex;
    gap: 8px;
}

.search-row input {
    min-width: 0;
    flex: 1;
    border: 1px solid #334155;
    background: #0b1120;
    color: #ffffff;
    border-radius: 10px;
    padding: 13px;
    outline: none;
    font-size: 14px;
}

.search-row input:focus {
    border-color: #3b82f6;
}

.search-row button {
    border: 0;
    border-radius: 10px;
    padding: 0 15px;
    background: #2563eb;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.search-status {
    min-height: 18px;
    color: #f59e0b;
    font-size: 12px;
    margin-top: 8px;
}

.result-section {
    margin-top: 14px;
}

.result-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.small-label {
    color: #64748b;
    font-size: 11px;
    letter-spacing: 1px;
}

.result-card h2 {
    margin-top: 5px;
}

.result-badge {
    border-radius: 12px;
    padding: 9px 12px;
    background: #1d4ed8;
    font-size: 12px;
    font-weight: bold;
}

.confidence-box {
    display: flex;
    justify-content: space-between;
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.confidence-box span {
    color: #94a3b8;
    font-size: 13px;
}

.confidence-box strong {
    font-size: 18px;
}

.image-card h3 {
    font-size: 14px;
    margin-bottom: 12px;
}

.image-placeholder {
    min-height: 220px;
    border-radius: 12px;
    background: #050914;
    border: 1px dashed #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #64748b;
    font-size: 12px;
    text-align: center;
}

.image-placeholder img {
    width: 100%;
    height: auto;
    display: block;
}

.details-card {
    display: grid;
    gap: 15px;
}

.details-card div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.details-card span {
    color: #64748b;
    font-size: 11px;
}

.details-card strong {
    font-size: 14px;
}

.pdf-button {
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 15px;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: white;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 14px;
}

.warning-card {
    border-color: rgba(245, 158, 11, 0.2);
}

.warning-card strong {
    color: #f59e0b;
    font-size: 13px;
}

.empty-state {
    text-align: center;
    padding: 45px 20px;
}

.empty-icon {
    font-size: 42px;
    color: #475569;
    margin-bottom: 12px;
}

footer {
    text-align: center;
    padding: 25px 0 5px;
    color: #475569;
    font-size: 11px;
}

footer span {
    display: block;
    margin-top: 4px;
}

.hidden {
    display: none !important;
}

@media (max-width: 430px) {
    .mobile-container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .search-row {
        flex-direction: column;
    }

    .search-row button {
        min-height: 44px;
    }
}



#patientPortal {
    margin: 24px auto;
    max-width: 900px;
}

.patient-login-card,
.patient-studies-panel {
    background: rgba(13, 27, 45, 0.96);
    border: 1px solid rgba(77, 163, 255, 0.25);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.20);
}

.patient-login-header h2,
.patient-studies-header h3 {
    margin: 6px 0;
    color: #f4f8ff;
}

.patient-login-header p {
    margin: 8px 0 20px;
    color: #8fa4bb;
}

.patient-login-label {
    display: block;
    color: #43d9ff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.patient-login-row {
    display: flex;
    gap: 12px;
}

#patientIdInput {
    flex: 1;
    min-width: 0;
    padding: 13px 15px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: #07111f;
    color: #f4f8ff;
    outline: none;
    font-size: 14px;
}

#patientIdInput:focus {
    border-color: #43d9ff;
    box-shadow: 0 0 0 3px rgba(67, 217, 255, 0.10);
}

#patientLoginButton,
#patientLogoutButton {
    border: 1px solid rgba(67, 217, 255, 0.35);
    background: rgba(67, 217, 255, 0.10);
    color: #43d9ff;
    border-radius: 10px;
    padding: 12px 20px;
    font-weight: 800;
    cursor: pointer;
}

#patientLoginButton:hover,
#patientLogoutButton:hover {
    background: rgba(67, 217, 255, 0.18);
}

#patientLoginButton:disabled {
    opacity: 0.5;
    cursor: wait;
}

.patient-login-status {
    min-height: 20px;
    margin-top: 12px;
    color: #8fa4bb;
    font-size: 13px;
}

.patient-studies-panel {
    margin-top: 18px;
}

.patient-studies-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 18px;
}

.patient-studies-list {
    display: grid;
    gap: 12px;
}

.patient-study-card {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 17px 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
    background: rgba(16, 36, 58, 0.85);
    color: #f4f8ff;
    text-align: left;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.patient-study-card:hover {
    transform: translateY(-2px);
    border-color: rgba(67, 217, 255, 0.45);
    background: rgba(16, 36, 58, 1);
}

.study-card-main {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.study-card-main strong {
    color: #43d9ff;
    font-size: 14px;
}

.study-card-main span {
    color: #8fa4bb;
    font-size: 12px;
}

.study-card-arrow {
    color: #43d9ff;
    font-size: 22px;
    font-weight: 700;
}

@media (max-width: 600px) {

    #patientPortal {
        margin: 15px 10px;
    }

    .patient-login-card,
    .patient-studies-panel {
        padding: 18px;
    }

    .patient-login-row {
        flex-direction: column;
    }

    #patientLoginButton {
        width: 100%;
    }

    .patient-studies-header {
        align-items: flex-start;
        flex-direction: column;
    }

    #patientLogoutButton {
        width: 100%;
    }
}

