.sds-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.sds-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.sds-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 28px;
}

.sds-limits {
    display: flex;
    gap: 15px;
}

.sds-limit {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.sds-upload-section {
    margin-bottom: 40px;
}

.sds-upload-area {
    border: 2px dashed #007cba;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sds-upload-area:hover {
    border-color: #005a87;
    background: #e9ecef;
}

.sds-upload-area.dragover {
    border-color: #28a745;
    background: #d4edda;
}

.sds-upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.sds-upload-area p {
    margin: 10px 0;
    color: #495057;
}

.sds-upload-note {
    font-size: 14px;
    color: #6c757d;
}

.sds-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.sds-btn-primary {
    background: #007cba;
    color: white;
}

.sds-btn-primary:hover {
    background: #005a87;
}

.sds-btn-secondary {
    background: #6c757d;
    color: white;
}

.sds-btn-secondary:hover {
    background: #545b62;
}

.sds-btn-danger {
    background: #dc3545;
    color: white;
}

.sds-btn-danger:hover {
    background: #c82333;
}

.sds-btn-success {
    background: #28a745;
    color: white;
}

.sds-btn-success:hover {
    background: #218838;
}

.sds-progress {
    margin-top: 20px;
}

.sds-progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.sds-progress-fill {
    height: 100%;
    background: #007cba;
    width: 0%;
    transition: width 0.3s ease;
}

.sds-progress-text {
    display: block;
    text-align: center;
    margin-top: 10px;
    color: #6c757d;
    font-size: 14px;
}

.sds-files-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.sds-files-list {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.sds-file-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    transition: background 0.2s ease;
}

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

.sds-file-item:hover {
    background: #f8f9fa;
}

.sds-file-info {
    flex: 1;
}

.sds-file-name {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 5px;
}

.sds-file-meta {
    font-size: 12px;
    color: #6c757d;
}

.sds-file-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    margin-right: 10px;
}

.sds-status-uploaded {
    background: #d1ecf1;
    color: #0c5460;
}

.sds-status-split {
    background: #d4edda;
    color: #155724;
}

.sds-file-actions {
    display: flex;
    gap: 10px;
}

.sds-btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* Modal styles moved to bottom of file */

/* Modal content styles moved to bottom of file */

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

.sds-modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.sds-modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    line-height: 1;
}

.sds-modal-close:hover {
    color: #2c3e50;
}

.sds-modal-body {
    padding: 20px;
}

.sds-form-group {
    margin-bottom: 20px;
}

.sds-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c3e50;
}

.sds-form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.sds-form-group small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 12px;
}

.sds-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 30px;
}

.sds-loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.sds-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

.sds-success {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

.sds-split-results {
    margin-top: 20px;
}

.sds-split-file {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 10px;
}

.sds-split-file:last-child {
    margin-bottom: 0;
}

.sds-background-progress {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.sds-background-progress h4 {
    margin: 0 0 15px 0;
    color: #1976d2;
}

.sds-background-progress .sds-progress-bar {
    background: #bbdefb;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.sds-background-progress .sds-progress-fill {
    background: linear-gradient(90deg, #2196f3, #1976d2);
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 6px;
}

.sds-background-progress p {
    margin: 0;
    color: #1976d2;
    font-weight: 500;
}

.sds-system-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
}

.sds-system-info h4 {
    margin: 0 0 10px 0;
    color: #495057;
}

.sds-system-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.sds-system-info-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #e9ecef;
}

.sds-system-info-item:last-child {
    border-bottom: none;
}

.sds-system-info-label {
    font-weight: 500;
    color: #495057;
}

.sds-system-info-value {
    color: #6c757d;
}

.sds-performance-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 12px;
    border-radius: 4px;
    margin: 15px 0;
}

.sds-performance-critical {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.sds-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.sds-warning a {
    color: #856404;
    text-decoration: underline;
}

.sds-info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.sds-info-table td {
    padding: 8px;
    border-bottom: 1px solid #e9ecef;
}

.sds-info-table td:first-child {
    font-weight: 500;
    width: 40%;
}

.sds-info-note {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 4px;
    padding: 12px;
    margin-top: 15px;
}

.sds-info-note p {
    margin: 0;
    color: #1976d2;
}

.sds-upload-options {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.sds-upload-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6c757d;
    cursor: pointer;
}

.sds-upload-options input[type="checkbox"] {
    margin: 0;
}

/* Login/Signup Modal Styles */
.sds-login-modal-content {
    max-width: 600px;
    width: 90%;
}

.sds-auth-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

.sds-auth-tab {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sds-auth-tab.active {
    border-bottom-color: #007cba;
    color: #007cba;
}

.sds-auth-tab:hover {
    background: #f8f9fa;
}

.sds-auth-content {
    margin-bottom: 30px;
}

.sds-auth-form {
    display: none;
}

.sds-auth-form.active {
    display: block;
}

.sds-auth-form p {
    margin-bottom: 20px;
    color: #6c757d;
    font-size: 14px;
}

.sds-form-group {
    margin-bottom: 15px;
}

.sds-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.sds-form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.sds-form-group input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.25);
}

.sds-form-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 25px;
}

.sds-auth-links {
    margin-top: 15px;
    text-align: center;
}

.sds-auth-links a {
    color: #007cba;
    text-decoration: none;
    font-size: 14px;
}

.sds-auth-links a:hover {
    text-decoration: underline;
}

.sds-auth-benefits {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.sds-auth-benefits h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 16px;
}

.sds-auth-benefits ul {
    margin: 0;
    padding-left: 20px;
}

.sds-auth-benefits li {
    margin-bottom: 8px;
    color: #495057;
    font-size: 14px;
}

.sds-auth-benefits li:last-child {
    margin-bottom: 0;
}

/* Login required message styles removed - section is now hidden for non-logged-in users */

/* Loading states for auth buttons */
#sds-login-btn.loading,
#sds-register-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

#sds-login-btn.loading::after,
#sds-register-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Fullwidth buttons for all auth forms */
.sds-form-actions .sds-btn,
.sds-auth-benefits .sds-btn {
    width: 100%;
    margin: 0;
}

/* Ensure modal covers entire screen immediately */
.sds-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: opacity, visibility;
}

/* Modal content positioning */
.sds-modal-content {
    position: relative;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.sds-modal.show {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
}

.sds-modal.show .sds-modal-content {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .sds-wrapper {
        padding: 15px;
    }

    .sds-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .sds-limits {
        flex-wrap: wrap;
    }

    .sds-file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .sds-file-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .sds-auth-tabs {
        flex-direction: column;
    }

    .sds-auth-tab {
        text-align: center;
    }

    .sds-auth-benefits {
        padding: 15px;
    }
}