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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

header h1 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.status-panel {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-label {
    font-weight: 600;
    color: #666;
}

.status-value {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
}

.status-value.ok {
    background: #d4edda;
    color: #155724;
}

.status-value.error {
    background: #f8d7da;
    color: #721c24;
}

.status-value.pending {
    background: #fff3cd;
    color: #856404;
}

main {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-button {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1em;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-button:hover {
    color: #333;
}

.tab-button.active {
    color: #007bff;
    border-bottom-color: #007bff;
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.2s;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
    background: #0056b3;
}

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

.btn-success:hover:not(:disabled) {
    background: #218838;
}

.format-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.format-selector label {
    font-weight: 500;
}

.format-selector select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    min-width: 300px;
}

.search-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.info-box {
    padding: 15px;
    background: #e7f3ff;
    border-left: 4px solid #007bff;
    border-radius: 4px;
    margin-bottom: 20px;
    display: none;
}

.info-box.show {
    display: block;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f8f9fa;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    font-weight: 600;
    color: #555;
}

tbody tr:hover {
    background: #f8f9fa;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

.jobs-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.job-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
}

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

.job-id {
    font-family: monospace;
    color: #666;
    font-size: 0.9em;
}

.job-status {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
}

.job-status.pending {
    background: #fff3cd;
    color: #856404;
}

.job-status.running {
    background: #cfe2ff;
    color: #084298;
}

.job-status.completed {
    background: #d4edda;
    color: #155724;
}

.job-status.failed {
    background: #f8d7da;
    color: #721c24;
}

.job-items {
    margin-top: 10px;
}

.job-item {
    padding: 10px;
    background: white;
    border-radius: 4px;
    margin-bottom: 8px;
}

.job-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.job-logs {
    max-height: 200px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.85em;
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 10px;
    border-radius: 4px;
    margin-top: 8px;
}

.job-log-line {
    margin-bottom: 2px;
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Auth Panel Styles */
.auth-panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    border: 2px solid #007bff;
}

.auth-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 8px 8px 0 0;
}

.auth-panel-header h2 {
    margin: 0;
    font-size: 1.2em;
    color: #2c3e50;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    color: #333;
}

.auth-panel-content {
    padding: 20px;
}

.auth-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-step {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-step strong {
    color: #555;
    margin-bottom: 5px;
}

.auth-select,
.auth-input {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    width: 100%;
    max-width: 600px;
}

.auth-input:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

.auth-instructions {
    color: #666;
    font-size: 0.9em;
    margin: 5px 0;
}

.auth-instructions strong {
    color: #333;
}

.auth-error {
    margin-top: 15px;
    padding: 12px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    border-left: 4px solid #dc3545;
}

.auth-success {
    margin-top: 15px;
    padding: 12px;
    background: #d4edda;
    color: #155724;
    border-radius: 4px;
    border-left: 4px solid #28a745;
}

/* Settings Tab Styles */
.settings-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.settings-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}

.settings-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.settings-row:last-child {
    margin-bottom: 0;
}

.settings-row label {
    font-weight: 600;
    color: #555;
}

.settings-input {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    max-width: 500px;
}

.settings-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.settings-info {
    color: #666;
    font-size: 0.9em;
    margin: 0;
    line-height: 1.5;
}

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

.btn-danger:hover:not(:disabled) {
    background: #c82333;
}

/* Login Screen Styles */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

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

.login-container h1 {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.login-box {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 1.8em;
}

.login-description {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1em;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-form label {
    font-weight: 600;
    color: #555;
    font-size: 0.95em;
}

.login-input {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.2s;
    width: 100%;
}

.login-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-large {
    padding: 14px 24px;
    font-size: 1.1em;
    width: 100%;
}

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

.login-status {
    padding: 12px;
    background: #e7f3ff;
    border-left: 4px solid #007bff;
    border-radius: 4px;
    color: #004085;
    text-align: center;
}

.login-error {
    padding: 12px;
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    border-radius: 4px;
    color: #721c24;
    text-align: center;
}

.login-help {
    margin-top: 10px;
    color: #666;
    font-size: 0.9em;
    text-align: center;
    line-height: 1.5;
}

/* Header with user info */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-display {
    color: #555;
    font-weight: 500;
    font-size: 0.95em;
}

.shared-users-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shared-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.shared-user-card strong {
    flex: 1;
}

.transfers-list table {
    width: 100%;
}

.badge.suggested-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 0.75em;
    font-weight: 600;
    border-radius: 4px;
    background: #e2e3e5;
    color: #383d41;
}
