/* Global Styles */
:root {
    /* MyScribe-inspired green palette */
    --primary-color: #00B894;
    --primary-dark: #00966F;
    --primary-light: #55EFC4;
    --secondary-color: #2D3436;
    --success-color: #00B894;
    --warning-color: #FDCB6E;
    --danger-color: #D63031;
    --bg-primary: #F9FAFB;
    --bg-secondary: #FFFFFF;
    --text-primary: #2D3436;
    --text-secondary: #636E72;
    --border-color: #DFE6E9;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(360deg, #D5F5EE 0%, #E8F8F5 40%, #F0F9F6 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 184, 148, 0.08) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-30px, 30px) rotate(5deg); }
    66% { transform: translate(30px, -30px) rotate(-5deg); }
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    background: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 184, 148, 0.15), 0 0 0 1px rgba(0, 184, 148, 0.1);
    overflow: hidden;
    border: 2px solid rgba(0, 184, 148, 0.2);
    position: relative;
    z-index: 1;
}
.highlight{
    color: var(--primary-dark);
}

/* Header */
header {
    background: linear-gradient(360deg, rgba(0, 184, 148, 0.12) 0%, rgba(85, 239, 196, 0.08) 50%, rgba(255, 255, 255, 0.95) 100%);
    color: var(--text-primary);
    padding: 24px;
    text-align: center;
    border-bottom: 2px solid rgba(0, 184, 148, 0.15);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(0, 184, 148, 0.1) 0%, transparent 50%);
    animation: headerGlow 15s ease-in-out infinite;
}

@keyframes headerGlow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(5%, 5%); }
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-weight: 700;
    background: linear-gradient(360deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
    height: calc(100vh - 185px);
}

@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* Panel Styles */
.conversation-panel,
.data-panel {
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 184, 148, 0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 2px solid rgba(0, 184, 148, 0.15);
    transition: var(--transition);
}

.conversation-panel:hover,
.data-panel:hover {
    box-shadow: 0 12px 32px rgba(0, 184, 148, 0.18);
    border-color: rgba(0, 184, 148, 0.25);
}

.panel-header {
    background: linear-gradient(360deg, rgba(0, 184, 148, 0.1) 0%, rgba(85, 239, 196, 0.06) 50%, rgba(255, 255, 255, 1) 100%);
    padding: 12px;
    border-bottom: 2px solid rgba(0, 184, 148, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.panel-header-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.panel-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 50%, var(--primary-color) 100%);
    transform: scaleX(0);
    transition: transform 0.6s ease;
}

.conversation-panel:hover .panel-header::after,
.data-panel:hover .panel-header::after {
    transform: scaleX(1);
}

.panel-header h2 {
    font-size: 1.3rem;
    color: var(--text-primary);
    font-weight: 700;
    background: linear-gradient(360deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Start Form */
.start-form {
    padding: 30px;
}

.start-form h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group .form-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
    opacity: 0.8;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(0, 184, 148, 0.2);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: var(--transition);
    background: linear-gradient(360deg, rgba(255, 255, 255, 1) 0%, rgba(248, 255, 253, 1) 100%);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 184, 148, 0.15), 0 4px 12px rgba(0, 184, 148, 0.1);
    background: white;
    transform: translateY(-1px);
}

/* Operation-specific fields */
.operation-fields {
    margin-top: 20px;
    padding: 24px;
    background: linear-gradient(360deg, rgba(0, 184, 148, 0.08) 0%, rgba(85, 239, 196, 0.06) 50%, var(--bg-primary) 100%);
    border-radius: 10px;
    border: 2px solid rgba(0, 184, 148, 0.2);
    box-shadow: 0 4px 16px rgba(0, 184, 148, 0.1);
    position: relative;
    overflow: hidden;
    animation: slideInFields 0.4s ease-out;
}

/* Template Info */
.template-info {
    margin-top: 20px;
    padding: 20px 24px;
    background: linear-gradient(360deg, rgba(0, 184, 148, 0.08) 0%, rgba(85, 239, 196, 0.06) 50%, var(--bg-primary) 100%);
    border-radius: 10px;
    border: 2px solid rgba(0, 184, 148, 0.2);
    box-shadow: 0 4px 16px rgba(0, 184, 148, 0.1);
    position: relative;
    overflow: hidden;
    animation: slideInFields 0.4s ease-out;
    margin: 20px;
}

.template-info .info-text {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.template-info strong {
    color: var(--primary-color);
    font-weight: 600;
}

@keyframes slideInFields {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.operation-fields::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

.operation-fields h4 {
    margin-bottom: 18px;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.operation-fields h4::before {
    content: '⚕️';
    font-size: 1.2rem;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(360deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(360deg, var(--primary-dark) 0%, #008569 100%);
    box-shadow: 0 8px 20px rgba(0, 184, 148, 0.4);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid rgba(0, 184, 148, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(360deg, rgba(0, 184, 148, 0.1) 0%, var(--bg-primary) 100%);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.15);
}

/* Chat Container */
.chat-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    display: flex;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.assistant {
    flex-direction: row;
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.message.assistant .message-avatar {
    background: linear-gradient(360deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
    animation: avatarPulse 3s ease-in-out infinite;
}

@keyframes avatarPulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3); }
    50% { box-shadow: 0 4px 20px rgba(0, 184, 148, 0.5); }
}

.message.user .message-avatar {
    background: linear-gradient(360deg, var(--secondary-color) 0%, #1a1f21 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(45, 52, 54, 0.3);
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 8px;
    word-wrap: break-word;
}

.message.assistant .message-content {
    background: linear-gradient(360deg, rgba(0, 184, 148, 0.08) 0%, rgba(85, 239, 196, 0.05) 50%, var(--bg-primary) 100%);
    border: 2px solid rgba(0, 184, 148, 0.15);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.08);
}

.message.user .message-content {
    background: linear-gradient(360deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.message-notice {
    background: var(--warning-color);
    color: white;
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
}

/* Input Area */
.input-area {
    padding: 20px 24px;
    background: linear-gradient(to top, rgba(0, 184, 148, 0.05) 0%, var(--bg-secondary) 100%);
    border-top: 2px solid rgba(0, 184, 148, 0.15);
    display: flex;
    gap: 12px;
}

.input-area textarea {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid rgba(0, 184, 148, 0.2);
    border-radius: 8px;
    font-size: 0.95rem;
    resize: none;
    font-family: inherit;
    transition: var(--transition);
    background: white;
}

.input-area textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 184, 148, 0.15), 0 4px 12px rgba(0, 184, 148, 0.1);
    transform: translateY(-1px);
}

/* Conflict Resolution */
.conflict-resolution {
    background: linear-gradient(360deg, #FFF9E6 0%, #FFF3CD 50%, #FFFAED 100%);
    border: 2px solid var(--warning-color);
    border-radius: 12px;
    padding: 24px;
    margin: 20px;
    box-shadow: 0 8px 24px rgba(253, 203, 110, 0.2);
}

.conflict-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.conflict-icon {
    font-size: 2rem;
}

.conflict-details {
    background: white;
    padding: 14px;
    border-radius: 6px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
}

.conflict-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#customConflictInput {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

#customConflictInput input {
    flex: 1;
    padding: 11px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: var(--transition);
}

#customConflictInput input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 184, 148, 0.1);
}

/* Verification UI */
.verification-ui {
    background: linear-gradient(360deg, rgba(0, 184, 148, 0.12) 0%, rgba(85, 239, 196, 0.08) 50%, #E8F8F5 100%);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 24px;
    margin: 20px;
    box-shadow: 0 8px 24px rgba(0, 184, 148, 0.2);
    animation: verifyGlow 2s ease-in-out infinite;
}

@keyframes verifyGlow {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(0, 184, 148, 0.2);
    }
    50% {
        box-shadow: 0 8px 32px rgba(0, 184, 148, 0.3);
    }
}

.verification-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.verification-icon {
    font-size: 2rem;
    color: var(--success-color);
    animation: checkBounce 0.6s ease-out;
}

@keyframes checkBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.verification-details {
    background: white;
    padding: 14px;
    border-radius: 6px;
    margin-bottom: 15px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.verification-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#correctionInput textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 10px;
    transition: var(--transition);
}

#correctionInput textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 184, 148, 0.1);
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    gap: 20px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(0, 184, 148, 0.2);
    border-top-color: var(--primary-color);
    border-right-color: var(--primary-light);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    box-shadow: 0 0 20px rgba(0, 184, 148, 0.3);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Data Panel */
.session-id {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: monospace;
}

.status-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 2px solid;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.status-badge.asking {
    background: linear-gradient(360deg, rgba(0, 184, 148, 0.15) 0%, rgba(85, 239, 196, 0.1) 100%);
    color: var(--primary-dark);
    border-color: rgba(0, 184, 148, 0.3);
}

.status-badge.verify {
    background: linear-gradient(360deg, rgba(0, 184, 148, 0.2) 0%, rgba(85, 239, 196, 0.15) 100%);
    color: var(--primary-dark);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.2);
}

.status-badge.complete {
    background: linear-gradient(360deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border-color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

.status-badge.conflict {
    background: linear-gradient(360deg, #FFF9E6 0%, #FFF3CD 100%);
    color: #D68910;
    border-color: var(--warning-color);
}

/* Final Report */
.final-report {
    padding: 20px;
    background: linear-gradient(360deg, rgba(0, 184, 148, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
    border-top: 2px solid rgba(0, 184, 148, 0.3);
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.1);
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.report-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-weight: 600;
}

.report-badge {
    background: linear-gradient(360deg, var(--success-color) 0%, #00C9A7 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.3);
}

.final-report h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
    font-weight: 600;
}

.report-content-scroll {
    background: white;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    margin-bottom: 15px;
    max-height: 400px;
    overflow-y: auto;
}

#reportContent {
    background: white;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    margin-bottom: 15px;
    min-height: calc(100% - 126px);
    overflow-y: auto;
}

.report-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    justify-content: space-between;
}

.report-hint {
    margin: 10px 0 0 0;
    padding: 10px;
    background: rgba(0, 184, 148, 0.08);
    border-left: 3px solid var(--primary-color);
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

.report-section {
    margin-bottom: 20px;
}

.report-section h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.report-section ul {
    padding-left: 20px;
}

.report-section li {
    margin-bottom: 8px;
}

.structured-data {
    background: var(--bg-primary);
    padding: 14px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
    border: 1px solid var(--border-color);
}

/* Microphone Button */
.btn-mic {
    background: linear-gradient(360deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 12px 16px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    box-shadow: 0 4px 16px rgba(0, 184, 148, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-mic::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.6s;
}

.btn-mic:hover::before {
    transform: translate(-50%, -50%) scale(1.5);
}

.btn-mic:hover {
    background: linear-gradient(360deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    box-shadow: 0 6px 24px rgba(0, 184, 148, 0.5);
    transform: scale(1.05);
}

.btn-mic:active {
    transform: scale(0.95);
}

.btn-mic.recording {
    background: linear-gradient(360deg, var(--danger-color) 0%, #C0392B 100%);
    animation: recordPulse 1.5s infinite;
}

@keyframes recordPulse {
    0%, 100% { 
        box-shadow: 0 4px 16px rgba(214, 48, 49, 0.4);
    }
    50% { 
        box-shadow: 0 6px 24px rgba(214, 48, 49, 0.6), 0 0 0 8px rgba(214, 48, 49, 0.2);
    }
}

.btn-mic.recording:hover {
    background: linear-gradient(360deg, #C0392B 0%, #A93226 100%);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Recording Indicator */
.recording-indicator {
    padding: 14px 24px;
    background: linear-gradient(360deg, var(--danger-color) 0%, #C0392B 100%);
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    font-weight: 600;
    border-top: 2px solid #A93226;
    box-shadow: 0 -4px 16px rgba(214, 48, 49, 0.3);
}

.recording-dot {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #C0392B;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.85rem;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Billing Optimization Styles */
.billing-result {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.1);
    border: 2px solid rgba(0, 184, 148, 0.2);
}

.billing-badge {
    background: linear-gradient(360deg, #f39c12 0%, #e67e22 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
}

.billing-content-scroll {
    max-height: 600px;
    overflow-y: auto;
    padding: 10px;
}

.billing-summary {
    background: linear-gradient(360deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.billing-summary h4 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

.revenue-total {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.billing-section {
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(0, 184, 148, 0.03);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.billing-section h4 {
    margin: 0 0 15px 0;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.billing-table {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.billing-item {
    background: white;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 184, 148, 0.15);
    transition: all 0.2s;
}

.billing-item:hover {
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.15);
    border-color: var(--primary-color);
}

.drg-item {
    background: linear-gradient(360deg, rgba(52, 152, 219, 0.1) 0%, rgba(41, 128, 185, 0.05) 100%);
    border-color: #3498db;
}

.billing-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 5px;
}

.billing-code {
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 80px;
    text-align: center;
}

.billing-description {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.billing-value {
    background: linear-gradient(360deg, #f39c12 0%, #e67e22 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    min-width: 90px;
    text-align: right;
}

.billing-details {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 5px;
    padding-left: 92px;
}

.billing-reasoning {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 5px;
    padding: 8px;
    background: rgba(0, 184, 148, 0.05);
    border-radius: 6px;
    font-style: italic;
}

.billing-type {
    display: inline-block;
    background: rgba(52, 152, 219, 0.1);
    color: #2980b9;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 5px;
}

.billing-analysis {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(0, 184, 148, 0.15);
    color: var(--text-primary);
    line-height: 1.6;
}

.billing-recommendations {
    list-style: none;
    padding: 0;
    margin: 0;
}

.billing-recommendations li {
    background: white;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    border-left: 3px solid #f39c12;
    color: var(--text-primary);
}

.billing-recommendations li:before {
    content: "💡 ";
    margin-right: 5px;
}

.billing-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-success {
    background: linear-gradient(360deg, #f39c12 0%, #e67e22 100%);
    color: white;
    font-weight: 600;
}

.btn-success:hover {
    background: linear-gradient(360deg, #e67e22 0%, #d35400 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

/* Tabs Styles */
.results-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.1);
    display: flex !important;
    flex-direction: column;
    height: calc(100% - 108px);
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(0, 184, 148, 0.15);
    flex-shrink: 0;
}

.tab-button {
    background: transparent;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    position: relative;
    margin-bottom: -2px;
}

.tab-button:hover {
    color: var(--primary-color);
    background: rgba(0, 184, 148, 0.05);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(0, 184, 148, 0.08);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.billing-badge-inactive {
    background: linear-gradient(360deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
}

.billing-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.billing-placeholder p {
    margin: 10px 0;
    font-size: 1rem;
}

.billing-placeholder p:first-child {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-warning {
    background: linear-gradient(360deg, #f39c12 0%, #e67e22 100%);
    color: white;
    font-weight: 600;
}

.btn-warning:hover {
    background: linear-gradient(360deg, #e67e22 0%, #d35400 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}
