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

:root {
    --primary: #0D9488;
    --primary-light: #14B8A6;
    --primary-dark: #0F766E;
    --accent: #5EEAD4;
    --bg-start: #F0FDFA;
    --bg-end: #E0F2FE;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.5);
    --text-primary: #134E4A;
    --text-secondary: #5F7A78;
    --shadow: 0 8px 32px rgba(13, 148, 136, 0.12);
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-end) 100%);
    min-height: 100vh;
    min-height: -webkit-fill-available;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.app-container {
    min-height: 100vh;
    min-height: -webkit-fill-available;
    display: flex;
    flex-direction: column;
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.app-header {
    display: flex;
    justify-content: center;
    padding: 16px 0 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.logo-icon {
    font-size: 36px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Stepper */
.stepper-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 24px 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.step-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    font-size: 20px;
}

.step-current {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.2);
    animation: pulse 2s infinite;
}

.step-completed {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-color: transparent;
}

.checkmark {
    color: white;
    font-weight: 700;
    font-size: 22px;
}

.step-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    display: none;
}

.step-label-active {
    color: var(--primary);
    font-weight: 600;
}

.step-connector {
    width: 32px;
    height: 3px;
    background: var(--glass-border);
    border-radius: 2px;
}

.connector-completed {
    background: var(--primary);
}

@media (min-width: 768px) {
    .step-label {
        display: block;
    }
    .step-connector {
        width: 48px;
    }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.2); }
    50% { box-shadow: 0 0 0 8px rgba(13, 148, 136, 0.1); }
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.step-content {
    width: 100%;
    max-width: 600px;
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.welcome-text {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.icon-header {
    text-align: center;
    margin-bottom: 16px;
}

.header-icon {
    font-size: 48px;
    display: inline-block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.step-title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 32px;
}

/* Floating Input */
.input-container {
    position: relative;
    margin-top: 24px;
}

.floating-input {
    width: 100%;
    padding: 20px 24px;
    font-size: 20px;
    border: 2px solid var(--glass-border);
    border-radius: 16px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.floating-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

.floating-input:focus + .floating-label,
.floating-input:not(:placeholder-shown) + .floating-label {
    top: -10px;
    left: 16px;
    font-size: 14px;
    background: white;
    padding: 0 8px;
    color: var(--primary);
}

.floating-label {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.3s ease;
}

/* Phone Input */
.phone-input-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 16px;
    padding: 8px 16px;
    backdrop-filter: blur(10px);
}

.phone-input-container:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

.country-code {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
    padding: 12px 16px;
    background: rgba(13, 148, 136, 0.1);
    border-radius: 10px;
}

.phone-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 24px;
    font-weight: 500;
    outline: none;
    font-family: inherit;
    letter-spacing: 2px;
    padding: 12px;
}

/* Toggle */
.toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 24px;
    background: var(--glass-bg);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.toggle-label {
    font-size: 18px;
    font-weight: 500;
}

.toggle-switch {
    width: 64px;
    height: 36px;
    border-radius: 18px;
    border: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.toggle-off {
    background: #CBD5E1;
}

.toggle-on {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

.toggle-knob {
    position: absolute;
    width: 28px;
    height: 28px;
    background: white;
    border-radius: 50%;
    top: 4px;
    left: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.toggle-on .toggle-knob {
    left: 32px;
}

/* Insurance Form */
.insurance-form {
    margin-top: 24px;
    animation: slideIn 0.3s ease-out;
}

.chip-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.chip {
    padding: 12px 20px;
    border-radius: 24px;
    border: 2px solid var(--glass-border);
    background: var(--glass-bg);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.chip:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.chip-selected {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border-color: transparent;
}

.no-insurance-text {
    text-align: center;
    font-size: 18px;
    color: var(--text-secondary);
    margin-top: 24px;
    padding: 24px;
    background: var(--glass-bg);
    border-radius: 16px;
}

/* Location Grid */
.location-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 600px) {
    .location-grid {
        grid-template-columns: 1fr;
    }
}

.location-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 24px;
    border-radius: 20px;
    border: 2px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    position: relative;
}

.location-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.location-card:active {
    transform: scale(0.98);
}

.location-selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.1) 0%, rgba(20, 184, 166, 0.1) 100%);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.15);
}

.location-icon {
    font-size: 40px;
}

.location-name {
    font-size: 18px;
    font-weight: 600;
}

.location-check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    animation: pop 0.3s ease;
}

@keyframes pop {
    0% { transform: scale(0); }
    80% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Camera */
.camera-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.camera-viewfinder {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 4/3;
    background: #1a1a2e;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.face-guide {
    position: absolute;
    width: 50%;
    height: 70%;
    border: 3px dashed rgba(255,255,255,0.5);
    border-radius: 50%;
    pointer-events: none;
}

.capture-button {
    position: absolute;
    bottom: 20px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 4px solid white;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.capture-button:hover {
    transform: scale(1.05);
}

.capture-button:active {
    transform: scale(0.95);
}

.capture-icon {
    display: block;
    width: 56px;
    height: 56px;
    background: white;
    border-radius: 50%;
    margin: 4px;
}

.camera-error {
    text-align: center;
    color: white;
    padding: 32px;
}

.camera-error span {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
}

.retry-button {
    margin-top: 16px;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    font-family: inherit;
}

.photo-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.preview-image {
    width: 100%;
    max-width: 400px;
    border-radius: 24px;
    transform: scaleX(-1);
}

.retake-button {
    padding: 12px 32px;
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.retake-button:hover {
    background: var(--primary);
    color: white;
}

.hidden-canvas {
    display: none;
}

.privacy-text {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 16px;
}

/* Footer Navigation */
.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    gap: 16px;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 28px;
    background: transparent;
    border: 2px solid var(--glass-border);
    border-radius: 16px;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.back-button:hover {
    border-color: var(--text-secondary);
}

.next-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 36px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
    font-family: inherit;
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.3);
}

.next-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(13, 148, 136, 0.4);
}

.next-button:active {
    transform: scale(0.98);
}

.button-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Success Screen */
.success-screen {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    animation: confettiFall 3s ease-in-out infinite;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.success-content {
    text-align: center;
    z-index: 1;
}

.success-icon {
    width: 96px;
    height: 96px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    margin: 0 auto 24px;
    animation: successPop 0.5s ease-out;
}

@keyframes successPop {
    0% { transform: scale(0) rotate(-180deg); }
    80% { transform: scale(1.1) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.success-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text-primary);
}

.queue-badge {
    display: inline-flex;
    flex-direction: column;
    padding: 24px 48px;
    background: var(--glass-bg);
    border-radius: 24px;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.queue-label {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.queue-number {
    font-size: 72px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wait-time {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.wait-icon {
    font-size: 24px;
}

.reset-notice {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.next-patient-button {
    padding: 16px 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.next-patient-button:hover {
    transform: translateY(-2px);
}

/* Staff Panel */
.staff-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.staff-panel {
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.staff-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #E5E7EB;
}

.staff-header h2 {
    font-size: 24px;
    font-weight: 700;
}

.close-button {
    width: 40px;
    height: 40px;
    border: none;
    background: #F3F4F6;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.close-button:hover {
    background: #E5E7EB;
}

.staff-stats {
    display: flex;
    gap: 16px;
    padding: 24px;
}

.stat-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: var(--bg-start);
    border-radius: 16px;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.patient-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px;
}

.empty-queue {
    text-align: center;
    color: var(--text-secondary);
    padding: 48px 24px;
}

.patient-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-radius: 12px;
    background: #F9FAFB;
    margin-bottom: 12px;
}

.patient-served {
    opacity: 0.5;
    background: #F3F4F6;
}

.patient-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.patient-number {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.patient-name {
    font-weight: 500;
}

.patient-location {
    font-size: 14px;
    color: var(--text-secondary);
}

.serve-button {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}

.clear-queue-button {
    margin: 24px;
    padding: 16px;
    background: #FEE2E2;
    color: #DC2626;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

/* Autocomplete Suggestions */
.autocomplete-container {
    position: relative;
}

.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 100;
    margin-top: 4px;
    max-height: 240px;
    overflow-y: auto;
}

.suggestion-item {
    display: flex;
    flex-direction: column;
    padding: 14px 18px;
    cursor: pointer;
    border-bottom: 1px solid #F3F4F6;
    transition: background 0.15s;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: var(--bg-start);
}

.suggestion-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
}

.suggestion-phone {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.suggestion-last-visit {
    font-size: 12px;
    color: var(--primary);
    margin-top: 4px;
}

/* Staff Panel Tabs */
.staff-tabs {
    display: flex;
    border-bottom: 1px solid #E5E7EB;
}

.tab-button {
    flex: 1;
    padding: 16px;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.tab-button:hover {
    background: #F9FAFB;
}

.tab-active {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
    margin-bottom: -1px;
}

/* Queue Section */
.queue-section {
    padding: 16px 24px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.drag-hint {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(13, 148, 136, 0.08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.served-section {
    border-top: 1px solid #E5E7EB;
    background: #F9FAFB;
}

/* Draggable Items */
.patient-item.draggable {
    cursor: grab;
    display: flex;
    align-items: center;
    gap: 12px;
}

.patient-item.draggable:active {
    cursor: grabbing;
}

.patient-item.dragging {
    opacity: 0.6;
    background: #E0F2FE;
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(13, 148, 136, 0.2);
}

.patient-item.drag-over {
    border-top: 3px solid var(--primary);
    margin-top: -3px;
}

.patient-item.draggable:hover {
    background: #F0FDFA;
}

.drag-handle {
    color: #9CA3AF;
    font-size: 18px;
    letter-spacing: 2px;
    user-select: none;
}

.patient-info {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    cursor: pointer;
}

.has-notes {
    font-size: 14px;
}

.patient-charge {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    background: rgba(13, 148, 136, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.served-badge {
    font-size: 13px;
    color: #059669;
    font-weight: 500;
}

/* All Patients Section */
.all-patients-section {
    padding: 16px 24px;
    max-height: 500px;
    overflow-y: auto;
}

.patient-search-container {
    position: relative;
    margin-bottom: 16px;
}

.patient-search-input {
    width: 100%;
    padding: 14px 40px 14px 16px;
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.patient-search-input:focus {
    border-color: var(--primary);
}

.clear-search-button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
}

.patients-count {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.patient-db-item {
    cursor: pointer;
    transition: all 0.2s;
}

.patient-db-item:hover {
    background: var(--bg-start);
    transform: translateX(4px);
}

.patient-total-charges {
    font-size: 13px;
    font-weight: 600;
    color: #059669;
    background: rgba(5, 150, 105, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
}

.patient-phone {
    font-size: 14px;
    color: var(--text-secondary);
}

.patient-visits {
    font-size: 13px;
    color: var(--primary);
    background: rgba(13, 148, 136, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
}

.patient-last-visit {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    padding: 24px;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.25s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #E5E7EB;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
}

.patient-detail-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.detail-section {
    margin-bottom: 24px;
}

.detail-section h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.detail-section p {
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

/* Visit History */
.visit-history {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
}

.visit-item {
    padding: 12px;
    border-bottom: 1px solid #F3F4F6;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.visit-item:last-child {
    border-bottom: none;
}

.visit-date {
    font-weight: 600;
    font-size: 14px;
}

.visit-location {
    font-size: 13px;
    color: var(--text-secondary);
}

.visit-charge {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.visit-notes {
    width: 100%;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
    font-style: italic;
}

.total-charges-summary {
    font-size: 15px;
    font-weight: 600;
    color: #059669;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(5, 150, 105, 0.1);
    border-radius: 8px;
}

.current-visit-section {
    background: rgba(13, 148, 136, 0.05);
    padding: 16px;
    border-radius: 12px;
    border: 2px dashed rgba(13, 148, 136, 0.2);
}

/* Form Inputs in Modal */
.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.notes-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 2px solid var(--glass-border);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

.notes-textarea:focus {
    border-color: var(--primary);
}

.charge-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--glass-border);
    border-radius: 10px;
    font-size: 18px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.charge-input:focus {
    border-color: var(--primary);
}

/* Modal Footer */
.modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #E5E7EB;
    background: #F9FAFB;
}

.cancel-button {
    flex: 1;
    padding: 14px;
    background: transparent;
    border: 2px solid var(--glass-border);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
}

.cancel-button:hover {
    border-color: var(--text-secondary);
}

.save-button {
    flex: 1;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    font-family: inherit;
}

.save-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

/* Footer Link */
.footer-link {
    text-align: center;
    padding: 16px;
}

.footer-link a {
    color: var(--text-secondary);
    font-size: 13px;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.footer-link a:hover {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .app-container {
        padding: 16px;
    }
    
    .welcome-text {
        font-size: 26px;
    }
    
    .step-title {
        font-size: 24px;
    }
    
    .queue-number {
        font-size: 56px;
    }
}

.mt-6 {
    margin-top: 24px;
}