/* Hanterafaktura - Global Styles */

/* Page Headers */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Invoice specific header */
.invoice-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Cards */
.card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    border: none;
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
}

.info-card {
    border-left: 4px solid #667eea;
}

/* Forms */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control {
    max-width: 100%;
}

/* Badges */
.badge-lg {
    font-size: 1rem;
    padding: 0.5rem 1rem;
}

/* Tables */
.invoice-table {
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    border-radius: 0.5rem;
    overflow: hidden;
}

.invoice-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.invoice-table tbody tr:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

.invoice-table td {
    vertical-align: middle;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.invoice-table .status-cell {
    white-space: nowrap;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Better word wrap */
.card-body {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Sticky positioning - disable on mobile */
@media (max-width: 767px) {
    .position-sticky {
        position: relative !important;
        top: 0 !important;
    }
}

/* PDF/Image viewer improvements */
iframe {
    border-radius: 0 0 0.5rem 0.5rem;
}

.invoice-preview-image {
    max-width: 100%;
    height: auto;
    max-height: 800px;
    display: block;
    margin: 0 auto;
}

/* Flexbox layout order for Details page */
.invoice-details-left {
    order: 1;
}

.invoice-details-right {
    order: 2;
}

/* Stack vertically on small screens */
@media (max-width: 767px) {
    .invoice-details-left,
    .invoice-details-right {
        order: 0;
    }
}
