/**
 * Pothrack Publishing - Main Stylesheet
 */

/* General Styles */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* Login/Register Pages */
.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    max-width: 450px;
    width: 100%;
    margin: 2rem;
}

.auth-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 2rem;
}

.auth-card .card-header h3 {
    margin-bottom: 0;
}

/* Step Progress Indicator */
.steps-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 150px;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 3px;
    background-color: #dee2e6;
    z-index: 0;
}

.step.completed:not(:last-child)::after {
    background-color: #28a745;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #dee2e6;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.step.active .step-circle {
    background-color: #0d6efd;
    color: white;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.2);
}

.step.completed .step-circle {
    background-color: #28a745;
    color: white;
}

.step-label {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #6c757d;
    text-align: center;
}

.step.active .step-label {
    color: #0d6efd;
    font-weight: 600;
}

.step.completed .step-label {
    color: #28a745;
}

/* Book Cards */
.book-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.book-cover-preview {
    height: 200px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.book-cover-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.book-cover-preview .placeholder-cover {
    color: #adb5bd;
    font-size: 4rem;
}

/* Status Badges */
.status-badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #dee2e6;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -24px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #dee2e6;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #dee2e6;
}

.timeline-item.completed .timeline-marker {
    background-color: #28a745;
    box-shadow: 0 0 0 2px #28a745;
}

.timeline-item.active .timeline-marker {
    background-color: #0d6efd;
    box-shadow: 0 0 0 2px #0d6efd;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 2px #0d6efd; }
    50% { box-shadow: 0 0 0 6px rgba(13, 110, 253, 0.3); }
    100% { box-shadow: 0 0 0 2px #0d6efd; }
}

.timeline-content {
    padding-left: 10px;
}

.timeline-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.timeline-date {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Dashboard Stats Cards */
.stat-card {
    border: none;
    border-radius: 10px;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Notification Bell */
.notification-dropdown {
    width: 350px;
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-item.unread {
    background-color: #e7f3ff;
}

.notification-item:last-child {
    border-bottom: none;
}

/* File Upload */
.file-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.05);
}

.file-upload-area .upload-icon {
    font-size: 3rem;
    color: #adb5bd;
    margin-bottom: 1rem;
}

/* Cost Breakdown Table */
.cost-table {
    background-color: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
}

.cost-table td {
    padding: 0.75rem 1rem;
    border: none;
}

.cost-table tr:not(:last-child) td {
    border-bottom: 1px solid #dee2e6;
}

.cost-table .total-row {
    background-color: #e9ecef;
    font-weight: 600;
}

.cost-table .profit-row {
    background-color: #d4edda;
    color: #155724;
}

/* Print Info Cards */
.print-info-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 10px;
    padding: 1.5rem;
}

.print-info-card .info-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.print-info-card .info-value {
    font-weight: 600;
    color: #2d3748;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .step-label {
        font-size: 0.75rem;
    }
    
    .step-circle {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .notification-dropdown {
        width: 100%;
        max-width: 350px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Form Validation Styles */
.form-control.is-valid,
.form-select.is-valid {
    border-color: #28a745;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
}

/* Loading Spinner */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* PDF Preview */
.pdf-preview {
    width: 100%;
    height: 400px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

/* Quick Actions */
.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border-radius: 10px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.quick-action:hover {
    background-color: #e9ecef;
    transform: translateY(-3px);
    text-decoration: none;
    color: inherit;
}

.quick-action .action-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #0d6efd;
}

.quick-action .action-label {
    font-weight: 500;
}
