* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background-color: #000000;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.container {
    width: 100%;
    max-width: 64rem;
}

.card {
    background-color: #111827;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    border: 1px solid #374151;
}

/* Header */
.header {
    padding: 2rem;
    text-align: center;
}

.logo-container {
    width: 5rem;
    height: 5rem;
    background-color: #374151;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    padding: 0.5rem;
}

.logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.title {
    font-size: 1.875rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #d1d5db;
    margin-bottom: 1rem;
}

.back-link {
    display: inline-block;
    color: #60a5fa;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: #93c5fd;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid #374151;
}

.tab {
    flex: 1;
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    color: #9ca3af;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-bottom: 2px solid transparent;
}

.tab:hover {
    color: #ffffff;
    background-color: #374151;
}

.tab.active {
    color: #ffffff;
    background-color: #374151;
    border-bottom-color: #10b981;
}

.tab-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.badge {
    font-size: 0.75rem;
    background-color: #10b981;
    color: #ffffff;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    margin-left: 0.5rem;
}

/* Content */
.content {
    display: none;
    padding: 2rem;
}

.content.active {
    display: block;
}

.section {
    margin-bottom: 1.5rem;
}

.label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

/* Drop Zone */
.drop-zone {
    border: 3px dashed #6b7280;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background-color: #374151;
}

.drop-zone:hover {
    border-color: #10b981;
    background-color: #4b5563;
}

.drop-zone.dragging {
    border-color: #10b981;
    background-color: #4b5563;
    transform: scale(1.02);
}

.upload-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    color: #d1d5db;
}

.drop-text {
    color: #ffffff;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.drop-subtext {
    color: #9ca3af;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.browse-btn {
    padding: 0.5rem 1.5rem;
    background-color: #10b981;
    color: #ffffff;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.browse-btn:hover {
    background-color: #059669;
}

.file-info {
    color: #9ca3af;
    font-size: 0.75rem;
    margin-top: 1rem;
}

/* File Preview */
.file-preview {
    border: 2px solid #10b981;
    background-color: #374151;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.file-info-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.file-icon {
    width: 3rem;
    height: 3rem;
    background-color: #065f46;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.file-details {
    flex: 1;
    margin-left: 0.75rem;
}

.file-name {
    font-weight: 600;
    color: #ffffff;
}

.file-size {
    font-size: 0.875rem;
    color: #9ca3af;
}

.remove-btn {
    width: 2rem;
    height: 2rem;
    background-color: #7f1d1d;
    color: #fca5a5;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background-color: #991b1b;
}

.success-message {
    display: flex;
    align-items: center;
    color: #10b981;
}

.check-icon {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
}

/* Input */
.input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #374151;
    border: 1px solid #4b5563;
    border-radius: 0.5rem;
    color: #ffffff;
    font-size: 1rem;
}

.input::placeholder {
    color: #9ca3af;
}

.input:focus {
    outline: none;
    border-color: #10b981;
    ring: 2px;
    ring-color: #10b981;
}

.input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Buttons */
.primary-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to right, #10b981, #059669);
    color: #ffffff;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.primary-btn:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
}

.primary-btn:disabled {
    background: #4b5563;
    cursor: not-allowed;
    opacity: 0.5;
}

.record-btn {
    width: 100%;
    padding: 1rem;
    background-color: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.record-btn:hover {
    background-color: #1d4ed8;
    transform: scale(1.02);
}

.record-btn.recording {
    background-color: #dc2626;
}

.record-btn.recording:hover {
    background-color: #b91c1c;
}

.btn-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.add-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: #059669;
    color: #ffffff;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.add-btn:hover {
    background-color: #047857;
}

.export-btn {
    padding: 0.5rem 1rem;
    background-color: #4b5563;
    color: #ffffff;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.export-btn:hover {
    background-color: #6b7280;
}

/* Progress Box */
.progress-box {
    background-color: #374151;
    border: 1px solid #10b981;
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.spinner {
    width: 1.25rem;
    height: 1.25rem;
    border: 3px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Transcript Box */
.transcript-box {
    background-color: #374151;
    border: 1px solid #4b5563;
    border-radius: 0.75rem;
    padding: 1rem;
}

.transcript-textarea {
    width: 100%;
    background-color: #111827;
    color: #d1d5db;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    padding: 1rem;
    min-height: 10rem;
    max-height: 20rem;
    border: 1px solid #374151;
    resize: none;
    font-family: inherit;
}

.transcript-textarea:focus {
    outline: none;
    border-color: #10b981;
}

/* Entries Section */
.entries-section {
    background-color: #374151;
    border: 1px solid #4b5563;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-top: 1.5rem;
}

.entries-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.entries-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
}

.entries-table-container {
    overflow-x: auto;
    max-height: 24rem;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.entries-table {
    width: 100%;
    border-collapse: collapse;
}

.entries-table thead {
    background-color: #111827;
    position: sticky;
    top: 0;
    z-index: 10;
}

.entries-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    color: #ffffff;
    font-weight: 600;
    border-bottom: 1px solid #4b5563;
}

.entries-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #4b5563;
}

.entries-table tbody tr:hover {
    background-color: rgba(17, 24, 39, 0.5);
}

.patient-id-badge {
    font-size: 0.875rem;
    font-weight: 600;
    color: #10b981;
    background-color: rgba(16, 185, 129, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    display: inline-block;
}

.transcript-text {
    color: #d1d5db;
    font-size: 0.875rem;
    max-width: 32rem;
    overflow-x: auto;
    white-space: nowrap;
}

.delete-btn {
    padding: 0.5rem;
    background-color: rgba(127, 29, 29, 0.3);
    color: #fca5a5;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.delete-btn:hover {
    background-color: rgba(127, 29, 29, 0.5);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    color: #4b5563;
}

.empty-state p {
    color: #9ca3af;
}

/* Utility */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 1.5rem;
    }

    .title {
        font-size: 1.5rem;
    }

    .content {
        padding: 1.5rem;
    }

    .tab {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .entries-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .export-btn {
        width: 100%;
        justify-content: center;
    }
}
