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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo img {
    max-width: 500px;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 0;
    max-width: 750px;
    width: 100%;
    overflow: hidden;
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.tab-btn:hover {
    background: #eee;
    color: #333;
}

.tab-btn.active {
    background: white;
    color: #667eea;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tab-content {
    padding: 40px;
}

.tab-pane {
    display: none;
}

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

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
    text-align: center;
}

.subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
}

/* Input Mode Toggle */
.input-mode-toggle {
    display: flex;
    margin-bottom: 25px;
    background: #f5f5f5;
    border-radius: 10px;
    padding: 4px;
}

.mode-btn {
    flex: 1;
    padding: 10px 15px;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
}

.mode-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.input-section {
    display: none;
}

.input-section.active {
    display: block;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    color: #555;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

input[type="text"],
input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.help-text {
    color: #888;
    font-size: 12px;
    margin-top: 5px;
}

/* File Upload Styles */
.file-upload-area {
    border: 2px dashed #e0e0e0;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: #f5f5ff;
}

.file-upload-area.dragover {
    border-color: #667eea;
    background: #f0f0ff;
}

.file-upload-area.has-file {
    border-color: #28a745;
    background: #f0fff4;
}

.file-upload-icon {
    font-size: 40px;
    color: #999;
    margin-bottom: 10px;
}

.file-upload-text {
    color: #666;
    font-size: 14px;
}

.file-upload-text strong {
    color: #667eea;
}

.file-name {
    margin-top: 10px;
    padding: 8px 15px;
    background: white;
    border-radius: 5px;
    font-size: 13px;
    color: #333;
    display: inline-block;
}

.file-input {
    display: none;
}

.button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    display: none;
}

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

.status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status.processing {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.download-link {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
}

.download-link:hover {
    background: #218838;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,.1);
    border-radius: 50%;
    border-top-color: #0c5460;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
    vertical-align: middle;
}

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

.examples {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 13px;
}

.examples h4 {
    color: #555;
    margin-bottom: 8px;
    font-size: 14px;
}

.examples code {
    background: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #e83e8c;
}

/* Progress tracking for bulk uploads */
.progress-container {
    margin-top: 15px;
    display: none;
}

.progress-bar-wrapper {
    background: #e0e0e0;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s;
}

.progress-text {
    font-size: 13px;
    color: #666;
    text-align: center;
}

/* Results summary */
.results-summary {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.results-summary h4 {
    margin-bottom: 10px;
    color: #333;
}

.result-stat {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 14px;
}

.result-stat.success {
    color: #28a745;
}

.result-stat.failed {
    color: #dc3545;
}

/* Docket Scheduling Styles */
.docket-upload-area {
    border: 2px dashed #e0e0e0;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
    margin-bottom: 20px;
}

.docket-upload-area:hover {
    border-color: #667eea;
    background: #f5f5ff;
}

.docket-upload-area.dragover {
    border-color: #667eea;
    background: #f0f0ff;
}

.docket-upload-area.has-file {
    border-color: #28a745;
    background: #f0fff4;
}

.docket-upload-icon {
    font-size: 48px;
    color: #999;
    margin-bottom: 15px;
}

.docket-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.summary-stat {
    text-align: center;
    padding: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.summary-stat .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.summary-stat .stat-label {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.summary-stat.rescheduled .stat-value { color: #667eea; }
.summary-stat.no-change .stat-value { color: #6c757d; }
.summary-stat.skipped .stat-value { color: #ffc107; }

.docket-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.docket-filters select {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    background: white;
}

.docket-filters label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
}

.docket-table-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
}

.docket-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.docket-table th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.docket-table td {
    padding: 8px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.docket-table tr:hover {
    background: #f8f9fa;
}

.docket-table tr.rescheduled {
    background: #f0f5ff;
}

.docket-table tr.rescheduled:hover {
    background: #e6edff;
}

.extension-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.extension-badge.has-extension {
    background: #667eea;
    color: white;
}

.extension-badge.no-extension {
    background: #e0e0e0;
    color: #666;
}

.docket-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.docket-actions .button {
    flex: 1;
    max-width: 250px;
}

.docket-actions .button.secondary {
    background: #6c757d;
}

.docket-actions .button.secondary:hover {
    background: #5a6268;
}

.docket-info {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 13px;
}

.docket-info h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.docket-info ul {
    margin: 0;
    padding-left: 20px;
    color: #666;
}

.docket-info li {
    margin-bottom: 5px;
}

.docket-status {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    display: none;
}

.docket-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.docket-status.processing {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    display: block;
}

/* Job Status Panel */
.job-status-panel {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.job-status-panel h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.job-info {
    margin-bottom: 15px;
}

.job-info p {
    margin: 5px 0;
    font-size: 13px;
    color: #555;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

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

.status-badge.processing {
    background: #d1ecf1;
    color: #0c5460;
}

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

.status-badge.partial {
    background: #fff3cd;
    color: #856404;
}

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

.job-stats {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 14px;
}

.stat-label {
    color: #666;
}

.stat-value {
    font-weight: 600;
}

.stat-value.success {
    color: #28a745;
}

.stat-value.warning {
    color: #ffc107;
}

.stat-value.failed {
    color: #dc3545;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
}

.navbar-brand a {
    display: flex;
    align-items: center;
}

.navbar-logo {
    height: 40px;
    width: auto;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background 0.2s;
    font-size: 14px;
}

.navbar-link:hover {
    background: #f5f5ff;
}

.navbar-link-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.navbar-link-primary:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
}

/* User Dropdown */
.navbar-user {
    position: relative;
}

.user-menu-btn {
    background: #f5f5f5;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 14px;
    color: #333;
    transition: background 0.2s;
}

.user-menu-btn:hover {
    background: #eee;
}

.user-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 10px;
    color: #666;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    min-width: 220px;
    display: none;
    margin-top: 8px;
    overflow: hidden;
}

.user-dropdown.active {
    display: block;
}

.dropdown-header {
    padding: 12px 16px;
    background: #f8f9fa;
}

.user-email {
    font-size: 13px;
    color: #666;
    word-break: break-all;
}

.dropdown-divider {
    height: 1px;
    background: #e0e0e0;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

.logout-btn {
    color: #dc3545;
}

.logout-btn:hover {
    background: #fff5f5;
}

/* Adjust body for fixed navbar */
body {
    padding-top: 80px;
}

/* Hide logo on main page since we have navbar */
.main-content .logo {
    display: none;
}

/* ==========================================================================
   Flash Messages
   ========================================================================== */

.flash-messages {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    max-width: 500px;
    width: 90%;
}

.flash-message {
    padding: 15px 40px 15px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    position: relative;
    animation: slideDown 0.3s ease;
}

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

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

.flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.flash-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.flash-close {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.flash-close:hover {
    opacity: 1;
}

/* ==========================================================================
   Auth Container
   ========================================================================== */

.auth-container {
    max-width: 450px;
    margin: 0 auto;
    padding: 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.auth-title {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
}

.auth-description {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
    font-size: 14px;
}

.auth-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 13px;
}

.auth-info p {
    color: #666;
    margin-bottom: 8px;
}

.auth-info ul {
    margin: 0;
    padding-left: 20px;
    color: #333;
}

.auth-info li {
    margin-bottom: 4px;
}

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

.auth-form .form-row {
    display: flex;
    gap: 15px;
}

.auth-form .form-group.half {
    flex: 1;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
}

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

.form-error {
    display: block;
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
}

.form-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.auth-button {
    margin-top: 10px;
}

.auth-links {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: #666;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
}

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

.auth-links .separator {
    margin: 0 10px;
    color: #ccc;
}

.resend-verification {
    margin-top: 25px;
    padding: 20px;
    background: #fff3cd;
    border-radius: 8px;
    text-align: center;
}

.resend-verification p {
    color: #856404;
    margin-bottom: 10px;
    font-size: 14px;
}

.button.secondary {
    background: #6c757d;
}

.button.secondary:hover {
    background: #5a6268;
    box-shadow: 0 10px 20px rgba(108, 117, 125, 0.3);
}

.button.small {
    padding: 10px 20px;
    font-size: 14px;
    width: auto;
}

/* ==========================================================================
   Account Page
   ========================================================================== */

.account-info {
    margin-bottom: 30px;
}

.account-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.account-field:last-child {
    border-bottom: none;
}

.account-label {
    font-weight: 500;
    color: #666;
}

.account-value {
    color: #333;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge.success {
    background: #d4edda;
    color: #155724;
}

.badge.warning {
    background: #fff3cd;
    color: #856404;
}

.account-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.account-actions .button {
    flex: 1;
    max-width: 200px;
}
