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

:root {
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --error-color: #f44336;
    --success-color: #4CAF50;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --text-primary: #333;
    --text-secondary: #666;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
}

.hidden {
    display: none !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: var(--card-bg);
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--primary-color);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-greeting {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.user-greeting svg {
    color: var(--primary-color);
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--card-bg);
    color: var(--danger-color);
    border: 2px solid var(--danger-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: var(--danger-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-logout:active {
    transform: translateY(0);
}

.btn-logout svg {
    flex-shrink: 0;
}

.header-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.studies-header .header-buttons {
    gap: 0.75rem;
}

.studies-header .btn-primary {
    padding: 0.7rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3);
    border: none;
    position: relative;
    overflow: hidden;
}

.studies-header .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.studies-header .btn-primary:hover::before {
    left: 100%;
}

.studies-header .btn-primary:hover {
    background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    transform: translateY(-2px);
}

.studies-header .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3);
}

.studies-header .btn-primary svg {
    width: 18px;
    height: 18px;
}

.studies-header h2 svg {
    color: var(--primary-color);
    stroke-width: 2;
    flex-shrink: 0;
}

/* Specific button styles */
.btn-add-study {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.btn-refresh {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.3);
}

.btn-refresh:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.btn-refresh:active {
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.3);
}

/* Rotate animation for refresh button */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.btn-refresh:active svg {
    animation: rotate 0.5s ease-in-out;
}

/* Pulse animation for add button on hover */
@keyframes pulse {
    0% {
        box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3);
    }
    50% {
        box-shadow: 0 4px 16px rgba(76, 175, 80, 0.5);
    }
    100% {
        box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3);
    }
}

/* Add subtle hover effects */
.studies-header .btn-primary {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.studies-header .btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.btn-refresh:focus {
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}

main {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.upload-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    max-width: 900px;
    margin: 0 auto;
}

h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.upload-area {
    border: 3px dashed var(--border-color);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fafafa;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--primary-color);
    background: #f0f8f0;
    transform: translateY(-2px);
}

.upload-icon {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-area h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.upload-area p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.progress-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-header h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.progress-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #66bb6a);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.stat-success {
    color: var(--success-color);
    font-weight: 500;
}

.stat-error {
    color: var(--error-color);
    font-weight: 500;
}

.file-list {
    margin-top: 2rem;
    max-height: 400px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 4px solid var(--border-color);
}

.file-item.success {
    border-left-color: var(--success-color);
    background: #f1f8f4;
}

.file-item.error {
    border-left-color: var(--error-color);
    background: #fef1f0;
}

.file-item.uploading {
    border-left-color: var(--secondary-color);
    background: #e3f2fd;
}

.file-name {
    flex: 1;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.file-status.success {
    color: var(--success-color);
}

.file-status.error {
    color: var(--error-color);
}

.file-status.uploading {
    color: var(--secondary-color);
}

.results-section {
    margin-top: 2rem;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 8px;
    text-align: center;
}

.results-summary {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
}

.result-item.success {
    background: #e8f5e9;
    color: var(--success-color);
}

.result-item.error {
    background: #ffebee;
    color: var(--error-color);
}

footer {
    background: var(--card-bg);
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
    margin-top: 2rem;
}

.footer-note {
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Spinner animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* Scrollbar styles */
.file-list::-webkit-scrollbar {
    width: 8px;
}

.file-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.file-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.file-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Studies Section */
.studies-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

.studies-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1.5rem;
}

.studies-header h2 {
    margin: 0;
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
}

.studies-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

.study-count {
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.studies-table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.studies-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.studies-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid var(--border-color);
}

.studies-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    white-space: nowrap;
}

.studies-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.studies-table tbody tr:hover {
    background-color: #f8f9fa;
}

.studies-table td {
    padding: 1rem;
    font-size: 0.9rem;
    color: var(--text-primary);
}

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

.study-description {
    color: var(--text-secondary);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.study-date,
.study-modality {
    color: var(--text-secondary);
}

.study-actions {
    display: flex;
    gap: 0.25rem;
    flex-wrap: nowrap;
    align-items: center;
}

.btn-action {
    padding: 0.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    position: relative;
    width: 32px;
    height: 32px;
}

.btn-action:hover {
    transform: scale(1.1);
}

.btn-action svg {
    width: 18px;
    height: 18px;
}

.btn-action-view {
    color: #1976d2;
}

.btn-action-view:hover {
    background: #e3f2fd;
}

.btn-action-share {
    color: #0288d1;
}

.btn-action-share:hover {
    background: #e1f5fe;
}

.btn-action-download {
    color: #7b1fa2;
}

.btn-action-download:hover {
    background: #f3e5f5;
}

.btn-action-modify {
    color: #f57c00;
}

.btn-action-modify:hover {
    background: #fff3e0;
}

.btn-action-delete {
    color: #d32f2f;
}

.btn-action-delete:hover {
    background: #ffebee;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.loading-spinner svg {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.empty-state svg {
    color: var(--border-color);
    margin-bottom: 1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.modal-upload {
    max-width: 800px;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.study-info-banner {
    background: #f0f8ff;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--secondary-color);
    font-size: 0.95rem;
}

.modify-section {
    margin-bottom: 2rem;
}

.modify-section h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.section-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 2rem 0;
}

.form-subsection {
    margin-bottom: 1.5rem;
}

.form-subsection h5 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

select.form-input {
    cursor: pointer;
}

/* Study Details Modal */
.modal-details {
    max-width: 900px;
}

.details-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.details-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.section-title svg {
    color: var(--primary-color);
    flex-shrink: 0;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 1rem;
    color: var(--text-primary);
    word-break: break-word;
    background: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    min-height: 2.5rem;
    display: flex;
    align-items: center;
}

.detail-value.mono {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.detail-value:empty::before {
    content: '-';
    color: var(--text-secondary);
}

/* Other Studies List */
.other-studies-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.loading-text {
    text-align: center;
    color: var(--text-secondary);
    padding: 1rem;
    font-style: italic;
}

.other-study-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.other-study-item:hover {
    border-color: var(--primary-color);
    background: #f0f8f0;
    transform: translateX(4px);
}

.other-study-info {
    flex: 1;
    min-width: 0;
}

.other-study-info strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.other-study-info small {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: block;
}

.other-study-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

.btn-view-other-study {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.btn-view-other-study:hover {
    background: #45a049;
    transform: scale(1.1);
}

.btn-view-other-study svg {
    width: 18px;
    height: 18px;
}

.other-study-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.no-other-studies {
    text-align: center;
    color: var(--text-secondary);
    padding: 1.5rem;
    font-style: italic;
}

/* Report Section Styles */
.report-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.report-upload-area {
    display: flex;
    justify-content: center;
    padding: 1rem;
}

.report-upload-area .btn-primary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.report-display-area {
    background: var(--bg-color);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.report-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.report-info svg {
    color: var(--error-color);
    flex-shrink: 0;
}

.report-info > div:first-of-type {
    flex: 1;
    min-width: 0;
}

.report-info strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.report-info small {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.report-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.report-upload-progress {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
}

.report-upload-progress .progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.report-upload-progress .progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.report-upload-progress span {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Video Download Section Styles */
.video-download-section {
    margin-top: 1rem;
}

.video-fps-selector {
    margin-bottom: 1.5rem;
}

.video-fps-selector label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.fps-input-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.fps-input-group input[type="number"] {
    width: 100px;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
}

.fps-input-group input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

.fps-slider {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
}

.fps-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.fps-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.video-download-progress {
    margin: 1rem 0;
    padding: 1rem;
}

.video-download-progress .progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.video-download-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #45a049);
    transition: width 0.3s ease;
}

.video-download-progress span {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: block;
}

#downloadVideoBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Patients Section Styles */
.patients-section {
    padding: 2rem;
}

.patients-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.patients-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    color: var(--text-primary);
}

.patients-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.patients-table-container {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: var(--shadow);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

/* Contact Modal Styles */
.modal-contact {
    max-width: 700px;
}

.contact-info-banner {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.contact-info-display {
    margin-bottom: 1.5rem;
}

.contact-info-display h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-info-display-item {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.contact-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.contact-info-row:last-child {
    border-bottom: none;
}

.contact-info-row strong {
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 150px;
}

.contact-info-row span {
    color: var(--text-primary);
    text-align: right;
    flex: 1;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.7rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Make table rows clickable */
.studies-table tbody tr {
    cursor: pointer;
}

.studies-table tbody tr:hover {
    background-color: #e8f5e9 !important;
}

/* Persistent Progress Bar */
.persistent-progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.15);
    z-index: 900;
    animation: slideUpBar 0.3s ease;
}

@keyframes slideUpBar {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.persistent-progress-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.persistent-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

/* Processing Overlay */
.processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 2rem;
    z-index: 2000;
}

.processing-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    width: 360px;
    box-shadow: 0 20px 40px rgba(33, 150, 243, 0.25);
    border: 1px solid rgba(33, 150, 243, 0.2);
    animation: slideIn 0.3s ease;
}

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

.processing-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.processing-header p {
    margin: 0.15rem 0 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.processing-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(33, 150, 243, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.processing-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.processing-progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(33, 150, 243, 0.15);
    border-radius: 999px;
    overflow: hidden;
}

.processing-progress-bar div {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), #42a5f5);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.processing-progress span {
    min-width: 40px;
    text-align: right;
    font-weight: 600;
    color: var(--text-primary);
}

.processing-note {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

@keyframes slideIn {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.persistent-progress-header > div {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.persistent-progress-header strong {
    font-size: 1rem;
    color: var(--text-primary);
}

.persistent-progress-header span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.persistent-progress-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.persistent-progress-toggle:hover {
    background: var(--border-color);
    color: var(--primary-color);
}

.persistent-progress-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0;
    }

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

    .header-buttons {
        width: 100%;
        justify-content: flex-start;
    }

    main {
        padding: 1rem;
    }

    .upload-section,
    .studies-section {
        padding: 1.5rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .studies-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .studies-header h2 {
        font-size: 1.5rem;
    }

    .studies-header h2 svg {
        width: 24px;
        height: 24px;
    }

    .studies-header .header-buttons {
        width: 100%;
        flex-direction: column;
    }

    .studies-header .btn-primary {
        width: 100%;
        justify-content: center;
        padding: 0.85rem 1.25rem;
    }

    .button-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .studies-filters {
        flex-direction: column;
        gap: 0.75rem;
    }

    .search-input {
        width: 100%;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .detail-item.full-width {
        grid-column: 1;
    }

    .modal-details {
        max-width: 100%;
        width: 95%;
    }

    .details-section {
        padding: 1rem;
    }

    .other-study-item {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .other-study-info {
        flex: 1 1 100%;
    }

    .other-study-actions {
        flex: 0 0 auto;
    }

    /* Patients table responsive */
    .patients-section {
        padding: 1rem;
    }

    .patients-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .patients-header h2 {
        font-size: 1.5rem;
    }

    .patients-header .header-buttons {
        width: 100%;
        flex-direction: column;
    }

    .patients-header .btn-primary,
    .patients-header .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .patients-filters {
        flex-direction: column;
        gap: 0.75rem;
    }

    .patients-filters .search-input {
        width: 100%;
    }

    .patients-table-container {
        padding: 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Ensure table is scrollable on mobile */
    .patients-table-container .studies-table {
        min-width: 900px; /* Minimum width to prevent too much compression */
        width: 100%;
    }

    .patients-table-container .studies-table thead th {
        font-size: 0.8rem;
        padding: 0.75rem 0.5rem;
    }

    .patients-table-container .studies-table tbody td {
        font-size: 0.85rem;
        padding: 0.75rem 0.5rem;
    }

    .patients-table-container .studies-table .study-actions {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .patients-table-container .studies-table .btn-action {
        width: 28px;
        height: 28px;
    }

    .patients-table-container .studies-table .btn-action svg {
        width: 16px;
        height: 16px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .studies-header .btn-primary {
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }
}

/* Share Modal Styles */
.modal-share {
    max-width: 650px;
}

.share-info-banner {
    background: #f8f9fa;
    border-left: 4px solid #0288d1;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.share-info-banner strong {
    color: #2c3e50;
    margin-right: 0.5rem;
}

.share-link-container {
    margin-bottom: 1.5rem;
}

.share-link-container label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.share-link-input-group {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.share-link-input {
    flex: 1;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    color: var(--text-primary);
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.share-link-input:focus {
    outline: none;
    border-color: #0288d1;
    background: white;
}

.btn-copy {
    padding: 0.875rem 1.5rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.share-whatsapp-container {
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.btn-whatsapp {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-whatsapp::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn-whatsapp:hover::before {
    left: 100%;
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
}

.btn-whatsapp:active {
    transform: translateY(0);
}

.btn-whatsapp:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-whatsapp svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.btn-whatsapp .spinner {
    animation: rotate 1s linear infinite;
}

.whatsapp-error {
    text-align: center;
    margin-top: 0.5rem;
}

.whatsapp-error.hidden {
    display: none;
}

.share-notice {
    background: #e3f2fd;
    border: 1px solid #0288d1;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.share-notice svg {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: #0288d1;
    margin-top: 2px;
}

.share-notice p {
    margin: 0;
    font-size: 0.9rem;
    color: #01579b;
    line-height: 1.5;
}

.share-notice strong {
    font-weight: 600;
}

/* Responsive adjustments for share modal */
@media (max-width: 768px) {
    .modal-share {
        width: 95%;
        max-width: 95%;
        padding: 1.5rem;
    }

    .share-link-input-group {
        flex-direction: column;
    }

    .btn-copy {
        width: 100%;
        justify-content: center;
    }

    .share-link-input {
        font-size: 0.85rem;
    }
}

/* Patient Details Modal Styles */
.modal-large {
    max-width: 900px;
}

.patient-row-clickable {
    transition: background-color 0.2s ease;
}

.patient-row-clickable:hover {
    background-color: #f5f5f5;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-item label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.info-item span {
    color: var(--text-primary);
    font-size: 1rem;
}

.patient-info-content,
.contact-info-content {
    margin-top: 1rem;
}

.patient-studies-list {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.patient-study-item {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.patient-study-item:hover {
    background: #f0f0f0;
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

/* Study with no report - red border and warning styling */
.patient-study-item.no-report {
    border: 2px solid #dc3545;
    background: #fff5f5;
}

.patient-study-item.no-report:hover {
    background: #ffe6e6;
    border-color: #c82333;
}

/* Study with report - subtle green accent */
.patient-study-item.has-report {
    border-left: 4px solid #28a745;
}

/* Report status badges */
.report-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.report-badge-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.report-badge-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.study-item-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.study-item-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), #45a049);
    border-radius: 8px;
    color: white;
}

.study-item-info {
    flex: 1;
    min-width: 0;
}

.study-item-info h5 {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.study-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.study-item-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.study-item-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Collapsible Section Styles for Admin Panel */
.collapsible-section-admin {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.collapsible-header-admin {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, transparent 100%);
    border-radius: 12px;
}

.collapsible-header-admin:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.collapsible-header-admin:focus {
    outline: 2px solid rgba(102, 126, 234, 0.4);
    outline-offset: 2px;
}

.collapsible-header-content-admin {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex: 1;
}

.collapsible-icon-admin {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.collapsible-header-admin:hover .collapsible-icon-admin {
    transform: scale(1.05);
}

.collapsible-text-admin h4 {
    margin: 0 0 0.2rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.collapsible-text-admin p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.collapsible-chevron-admin {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    color: #667eea;
}

.collapsible-header-admin:hover .collapsible-chevron-admin {
    background: rgba(102, 126, 234, 0.2);
    transform: scale(1.1);
}

.collapsible-chevron-admin svg {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.collapsible-section-admin.expanded .collapsible-chevron-admin svg {
    transform: rotate(180deg);
}

.collapsible-body-admin {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease;
    opacity: 0;
}

.collapsible-section-admin.expanded .collapsible-body-admin {
    max-height: 1500px;
    opacity: 1;
    padding: 0 1.25rem 1.25rem;
}

/* Mobile responsive adjustments for collapsible sections */
@media (max-width: 768px) {
    .collapsible-header-admin {
        padding: 0.875rem 1rem;
    }

    .collapsible-icon-admin {
        width: 36px;
        height: 36px;
    }

    .collapsible-text-admin h4 {
        font-size: 1rem;
    }

    .collapsible-text-admin p {
        font-size: 0.8rem;
    }

    .collapsible-section-admin.expanded .collapsible-body-admin {
        padding: 0 1rem 1rem;
    }
}

/* ============================================================================
   ACCOUNT MANAGEMENT STYLES
   ============================================================================ */

.accounts-section {
    padding: 2rem;
}

.accounts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1.5rem;
}

.accounts-header h2 {
    margin: 0;
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
}

.accounts-header h2 svg {
    color: var(--primary-color);
    stroke-width: 2;
    flex-shrink: 0;
}

.accounts-table-container {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}


.btn-accounts {
    padding: 0.6rem 1.2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-accounts:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-accounts svg {
    flex-shrink: 0;
}

/* Badge styles for user roles and status - consistent with design */
.badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.3px;
}

.badge-primary {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.badge-success {
    background-color: #e8f5e9;
    color: #388e3c;
    border: 1px solid #c8e6c9;
}

.badge-warning {
    background-color: #fff3e0;
    color: #f57c00;
    border: 1px solid #ffe0b2;
}

.badge-danger {
    background-color: #ffebee;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
}

.badge-info {
    background-color: #e0f7fa;
    color: #0288d1;
    border: 1px solid #b2ebf2;
}

.badge-secondary {
    background-color: #f5f5f5;
    color: #616161;
    border: 1px solid #e0e0e0;
}

/* User modal styles */
.modal-medium {
    max-width: 600px;
}

.modal-small {
    max-width: 450px;
}

.modal-large {
    max-width: 900px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.user-info {
    background-color: #f5f5f5;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.user-info p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.login-history-container {
    max-height: 500px;
    overflow-y: auto;
}

/* Auth page styles (invitation, forgot password, reset password) */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
}

.auth-container {
    width: 100%;
    max-width: 500px;
}

.auth-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.auth-header {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.auth-header .logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.auth-header h1 {
    font-size: 1.75rem;
    margin: 0 0 0.5rem 0;
}

.auth-header h2 {
    font-size: 1.5rem;
    margin: 1rem 0 0.5rem 0;
    font-weight: 600;
}

.auth-header .subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
    margin: 0;
}

.auth-form {
    padding: 2rem;
}

.auth-message {
    padding: 2rem;
    text-align: center;
}

.auth-message svg {
    margin-bottom: 1rem;
}

.auth-message h3 {
    color: #2c3e50;
    margin: 1rem 0 0.5rem 0;
}

.auth-message p {
    color: #666;
    margin: 0.5rem 0;
}

.success-message {
    color: #388e3c;
}

.success-message h3 {
    color: #388e3c;
}

.error-message {
    color: #d32f2f;
}

.error-message h3 {
    color: #d32f2f;
}

.auth-links {
    text-align: center;
    padding: 0 2rem 2rem;
}

.link-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.link-primary:hover {
    color: #764ba2;
    transform: translateX(-2px);
}

.link-secondary {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.link-secondary:hover {
    color: #667eea;
    text-decoration: underline;
}

.btn-full {
    width: 100%;
}

/* Button action colors - consistent with existing design */
.btn-edit {
    color: #1976d2;
    background: transparent;
}

.btn-edit:hover {
    background: #e3f2fd;
    color: #1565c0;
}

.btn-toggle {
    color: #f57c00;
    background: transparent;
}

.btn-toggle:hover {
    background: #fff3e0;
    color: #e65100;
}

.btn-password {
    color: #7b1fa2;
    background: transparent;
}

.btn-password:hover {
    background: #f3e5f5;
    color: #6a1b9a;
}

.btn-resend {
    color: #0288d1;
    background: transparent;
}

.btn-resend:hover {
    background: #e1f5fe;
    color: #0277bd;
}

.btn-history {
    color: #546e7a;
    background: transparent;
}

.btn-history:hover {
    background: #eceff1;
    color: #455a64;
}

.btn-delete {
    color: #d32f2f;
    background: transparent;
}

.btn-delete:hover {
    background: #ffebee;
    color: #c62828;
}

/* Responsive styles for accounts section */
@media (max-width: 768px) {
    .accounts-section {
        padding: 1rem;
    }

    .accounts-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .accounts-header h2 {
        font-size: 1.5rem;
    }

    .header-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .header-buttons button {
        width: 100%;
        justify-content: center;
    }

    .accounts-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .accounts-table-container .studies-table {
        min-width: 900px;
    }

    .auth-page {
        padding: 1rem;
    }

    .auth-form {
        padding: 1.5rem;
    }

    .modal-content.modal-large {
        max-width: 95vw;
    }
}

