/* Enhanced EverTrust Insurance Management System Styles */

/* CSS Custom Properties */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --info-color: #0891b2;
    --light-bg: #f8fafc;
    --dark-bg: #1e293b;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-warning: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --gradient-danger: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

/* Global Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    color: #222;
    font-family: 'Times New Roman', 'Arial', serif;
}

/* Enhanced Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.75rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    font-weight: 600;
    color: var(--text-primary) !important;
    padding: 0.75rem 1.25rem !important;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
    opacity: 0.1;
}

.navbar-nav .nav-link:hover::before {
    left: 0;
}

.navbar-nav .nav-link:hover {
    transform: translateY(-2px);
    color: var(--primary-color) !important;
}

/* Enhanced Cards */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.card-header {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1.5rem 2rem;
    font-weight: 700;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

.card-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.3;
}

.card-body {
    padding: 2rem;
}

/* Enhanced Buttons */
.btn {
    border-radius: 1rem;
    font-weight: 700;
    padding: 0.875rem 2rem;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    color: white;
}

.btn-success {
    background: var(--gradient-success);
    color: white;
}

.btn-info {
    background: var(--gradient-secondary);
    color: white;
}

.btn-warning {
    background: var(--gradient-warning);
    color: white;
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Enhanced Form Controls */
.form-control {
    border-radius: 1rem;
    border: 2px solid var(--border-color);
    padding: 1rem 1.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
    background: white;
}

.form-control-lg {
    font-size: 1.125rem;
    padding: 1.25rem 1.75rem;
}

.form-label {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Enhanced Alerts */
.alert {
    border-radius: 1rem;
    border: none;
    padding: 1.5rem 2rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: currentColor;
    opacity: 0.3;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

/* Enhanced Badges */
.badge {
    border-radius: 2rem;
    padding: 0.5rem 1rem;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-sm);
}

.badge.bg-success {
    background: var(--gradient-success) !important;
}

.badge.bg-danger {
    background: var(--gradient-danger) !important;
}

.badge.bg-warning {
    background: var(--gradient-warning) !important;
}

.badge.bg-info {
    background: var(--gradient-secondary) !important;
}

/* Enhanced Tables */
.table {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: white;
}

.table thead th {
    background: var(--gradient-primary);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
    padding: 1.5rem 2rem;
    border: none;
}

.table tbody td {
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: var(--light-bg);
    transform: scale(1.01);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Hero Section Enhancements */
.hero-icon {
    animation: float 4s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    50% { 
        transform: translateY(-20px) rotate(5deg); 
    }
}

.feature-icon {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.1));
}

.feature-icon:hover {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.2));
}

/* Status Badges */
.status-valid {
    background: var(--gradient-success);
    animation: pulse 2s infinite;
    box-shadow: 0 0 20px rgba(5, 150, 105, 0.3);
}

.status-invalid {
    background: var(--gradient-danger);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
}

@keyframes pulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7); 
    }
    70% { 
        box-shadow: 0 0 0 20px rgba(5, 150, 105, 0); 
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); 
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { 
        transform: rotate(360deg); 
    }
}

/* Enhanced Footer */
footer {
    background: var(--dark-bg);
    color: white;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="footer-pattern" width="50" height="50" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23footer-pattern)"/></svg>');
    opacity: 0.5;
}

footer .container {
    position: relative;
    z-index: 1;
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .btn-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-group .btn {
        border-radius: 1rem !important;
        margin: 0 !important;
    }
    
    .hero-icon {
        font-size: 3rem !important;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .table-responsive {
        border-radius: 1rem;
        overflow: hidden;
    }
}

/* Print Styles */
@media print {
    body, html {
        background: #fff !important;
        min-height: 297mm !important;
    }
    
    .navbar, .footer, .btn, .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
    }
    
    .table {
        box-shadow: none !important;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 10px;
    border: 2px solid var(--light-bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.slide-in {
    animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
    from { 
        transform: translateX(-100%); 
        opacity: 0;
    }
    to { 
        transform: translateX(0); 
        opacity: 1;
    }
}

.bounce-in {
    animation: bounceIn 0.8s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Utility Classes */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

.bg-gradient-secondary {
    background: var(--gradient-secondary);
}

.bg-gradient-success {
    background: var(--gradient-success);
}

.bg-gradient-warning {
    background: var(--gradient-warning);
}

.bg-gradient-danger {
    background: var(--gradient-danger);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.shadow-glow {
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.2);
}

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

/* Enhanced Form Groups */
.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group .form-control {
    width: 100%;
}

.form-group .help-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Enhanced Modal Styles */
.modal-content {
    border-radius: 1.5rem;
    border: none;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-header {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 2rem;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border: none;
    padding: 2rem;
    background: var(--light-bg);
}

/* Enhanced Tooltip */
.tooltip {
    font-size: 0.875rem;
    font-weight: 600;
}

.tooltip-inner {
    background: var(--dark-bg);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow-lg);
}

/* Enhanced Progress Bars */
.progress {
    height: 1rem;
    border-radius: 0.5rem;
    background: var(--light-bg);
    overflow: hidden;
}

.progress-bar {
    background: var(--gradient-primary);
    border-radius: 0.5rem;
    transition: width 0.6s ease;
}

/* Enhanced Pagination */
.pagination {
    gap: 0.5rem;
}

.page-link {
    border-radius: 0.75rem;
    border: none;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

/* Coverage Summary Styles */
.coverage-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.summary-item {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.summary-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.summary-item:hover::before {
    transform: scaleY(1);
}

.summary-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.95);
}

.summary-label {
    display: block;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.summary-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.summary-description {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    font-style: italic;
}

/* Certificate Detail Specific Styles */
.certificate-section {
    margin-bottom: 2rem;
}

.certificate-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    position: relative;
}

.certificate-section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--gradient-primary);
}

.certificate-info-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.certificate-info-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.certificate-info-table td:last-child {
    border-bottom: none;
}

.certificate-info-table .label {
    font-weight: 700;
    color: var(--text-primary);
    width: 40%;
    background: rgba(37, 99, 235, 0.05);
}

.certificate-info-table .value {
    font-weight: 600;
    color: var(--text-secondary);
}

.certificate-info-table .value.amount {
    color: var(--success-color);
    font-weight: 700;
}

/* Certificate Seal Styles */
.certificate-seal {
    position: absolute;
    right: 40px;
    bottom: 40px;
    text-align: right;
    z-index: 10;
    margin: 0;
}

.certificate-seal.print-seal-center {
    position: absolute;
    right: 40px;
    left: auto;
    margin: 0;
    align-items: flex-end;
    justify-content: flex-end;
}

.seal-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    display: block;
    margin: 0 0 4px auto;
    filter: drop-shadow(0 2px 8px rgba(30, 64, 175, 0.15));
}

@media print {
    .certificate-seal,
    .certificate-seal.print-seal-center {
        position: static !important;
        display: block !important;
        text-align: right !important;
        margin: 24px 0 0 0 !important;
        right: 0 !important;
        left: auto !important;
        bottom: 0 !important;
    }
    .seal-img {
        width: 100px;
        height: 100px;
        filter: none;
        margin: 0 0 2px auto;
    }
}

.seal-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border: 4px solid #991b1b;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 10px;
}

.seal-circle::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: linear-gradient(45deg, #fbbf24, #f59e0b, #d97706);
    z-index: -1;
    opacity: 0.8;
}

.seal-inner {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1b 100%);
    border: 3px solid #991b1b;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.seal-text {
    text-align: center;
    color: white;
    font-weight: bold;
    line-height: 1.2;
}

.seal-company {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.seal-type {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.seal-year {
    font-size: 14px;
    font-weight: 900;
    margin-top: 2px;
}

.seal-border {
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

.seal-label {
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

/* Print styles for seal */
@media print {
    .certificate-seal {
        position: absolute;
        bottom: 30px;
        right: 30px;
    }
    
    .seal-circle {
        width: 100px;
        height: 100px;
        border: 3px solid #991b1b;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .seal-inner {
        width: 80px;
        height: 80px;
        border: 2px solid #991b1b;
    }
    
    .seal-company {
        font-size: 10px;
    }
    
    .seal-type {
        font-size: 8px;
    }
    
    .seal-year {
        font-size: 12px;
    }
    
    .seal-label {
        font-size: 8px;
        color: #666;
    }
}

/* Seal animation for digital view */
@media screen {
    .seal-circle {
        animation: sealGlow 3s ease-in-out infinite alternate;
    }
    
    @keyframes sealGlow {
        0% {
            box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
        }
        100% {
            box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5);
        }
    }
    
    .seal-circle:hover {
        transform: scale(1.05);
        transition: transform 0.3s ease;
    }
    
    /* SVG Seal Styles */
    .seal-svg {
        width: 120px;
        height: 120px;
        filter: drop-shadow(0 4px 15px rgba(220, 38, 38, 0.3));
        transition: all 0.3s ease;
    }
    
    .seal-svg:hover {
        transform: scale(1.05);
        filter: drop-shadow(0 6px 20px rgba(220, 38, 38, 0.5));
    }
    
    @media print {
        .seal-svg {
            width: 100px;
            height: 100px;
            filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
        }
    }
}

.signature-img {
    display: block;
    margin: 0 auto 4px auto;
    max-width: 180px;
    height: 48px;
    object-fit: contain;
    filter: grayscale(0.2) contrast(1.2);
}

.print-seal-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: static !important;
    margin: 24px auto 0 auto;
}

@media print {
    .certificate-seal.print-seal-center {
        position: static !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 24px auto 0 auto !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
    }
}

.certificate-official, .printable-certificate, .certificate-container {
    background: url("/static/images/EverTrust_Travel_Insurance_Template.jpg") no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    position: relative;
    z-index: 1;
}

.certificate-overlay {
    background: rgba(255,255,255,0.88);
    border-radius: 18px;
    box-shadow: 0 2px 16px rgba(30,64,175,0.07);
    padding: 32px 32px 24px 32px;
    margin: 32px auto;
    max-width: 900px;
    position: relative;
    z-index: 2;
}

.certificate-official::before,
.printable-certificate::before,
.certificate-container::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: inherit;
    opacity: 0.25;
    z-index: 0;
    pointer-events: none;
}

.certificate-official, .printable-certificate, .certificate-container {
    overflow: hidden;
}

@media print {
    .certificate-official, .printable-certificate, .certificate-container {
        background: url("/static/images/EverTrust_Travel_Insurance_Template.jpg") no-repeat center center !important;
        background-size: cover !important;
        background-attachment: fixed !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .certificate-overlay {
        background: rgba(255,255,255,0.97) !important;
        box-shadow: none !important;
        padding: 24px 18px 18px 18px !important;
        margin: 18px auto !important;
    }
}

.classic-debit-note {
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(30,64,175,0.04);
    max-width: 540px;
    margin: 56px auto 0 auto;
    padding: 28px 28px 18px 28px;
    font-family: 'Segoe UI', 'Arial', sans-serif;
}
.debit-note-header-classic {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
}
.debit-note-logo-classic {
    height: 32px;
    width: auto;
    margin-right: 12px;
    opacity: 0.92;
}
.debit-note-title-classic {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e3a8a;
    letter-spacing: 0.5px;
}
.debit-note-table-classic {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 14px;
}
.debit-note-table-classic .label {
    font-weight: 600;
    color: #374151;
    padding: 7px 0;
    width: 140px;
    border-bottom: 1px solid #e5e7eb;
    background: none;
    font-size: 1rem;
}
.debit-note-table-classic .value {
    font-weight: 500;
    color: #222;
    padding: 7px 0;
    border-bottom: 1px solid #e5e7eb;
    background: none;
    font-size: 1rem;
}
.debit-note-amount-classic {
    margin: 18px 0 10px 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #059669;
    letter-spacing: 0.5px;
}
.amount-label {
    color: #1e3a8a;
    font-weight: 600;
    margin-right: 8px;
}
.amount-value {
    color: #059669;
    font-weight: 800;
    font-size: 1.25rem;
}
.debit-note-details-classic {
    font-size: 1rem;
    color: #222;
    margin-top: 8px;
    background: #f8fafc;
    border-radius: 6px;
    padding: 10px 12px;
}
@media print {
    .classic-debit-note {
        box-shadow: none !important;
        border: 1px solid #1e3a8a !important;
        background: #fff !important;
    }
    .debit-note-title-classic {
        color: #1e3a8a !important;
    }
    .debit-note-details-classic {
        background: #f8fafc !important;
    }
}

.debit-note-logo {
    display: block;
    margin: 0 auto 10px auto;
    max-width: 80px;
    height: auto;
    opacity: 0.92;
}

.signature-seal-row {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin: 32px 0 12px 0;
}
.certificate-signature {
    flex: 1 1 0;
    min-width: 220px;
    max-width: 320px;
    text-align: left;
}
.certificate-seal.print-seal-center {
    flex: 0 0 auto;
    min-width: 120px;
    text-align: right;
    position: static;
    margin: 0;
    align-items: flex-end;
    justify-content: flex-end;
}
@media (max-width: 700px) {
    .signature-seal-row {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
    }
    .certificate-signature, .certificate-seal.print-seal-center {
        text-align: center;
        min-width: 0;
        max-width: 100%;
    }
}
@media print {
    .signature-seal-row {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-end !important;
        justify-content: space-between !important;
        gap: 32px !important;
        margin: 32px 0 12px 0 !important;
    }
    .certificate-signature {
        text-align: left !important;
    }
    .certificate-seal.print-seal-center {
        text-align: right !important;
        position: static !important;
        margin: 0 !important;
    }
}

.pro-debit-note {
    background: #fff;
    border: 1.5px solid #e0e7ef;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(30,64,175,0.07);
    max-width: 420px;
    margin: 48px auto 0 auto;
    padding: 24px 24px 18px 24px;
    font-family: 'Segoe UI', 'Arial', sans-serif;
}
.debit-note-header-pro {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}
.debit-note-logo-pro {
    height: 32px;
    width: auto;
    opacity: 0.93;
}
.debit-note-header-text {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
}
.debit-note-company {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e3a8a;
    letter-spacing: 1px;
}
.debit-note-title-pro {
    font-size: 1.1rem;
    font-weight: 500;
    color: #374151;
    letter-spacing: 0.5px;
}
.debit-note-table-pro {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}
.debit-note-table-pro .label {
    font-weight: 600;
    color: #374151;
    padding: 6px 0;
    width: 120px;
    border-bottom: 1px solid #e5e7eb;
    background: none;
    font-size: 0.98rem;
}
.debit-note-table-pro .value {
    font-weight: 500;
    color: #222;
    padding: 6px 0;
    border-bottom: 1px solid #e5e7eb;
    background: none;
    font-size: 0.98rem;
}
.debit-note-amount-pro {
    margin: 14px 0 8px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #059669;
    letter-spacing: 0.5px;
    text-align: right;
}
.amount-label {
    color: #1e3a8a;
    font-weight: 600;
    margin-right: 8px;
}
.amount-value {
    color: #059669;
    font-weight: 800;
    font-size: 1.15rem;
}
.debit-note-details-pro {
    font-size: 0.98rem;
    color: #222;
    margin-top: 8px;
    background: #f8fafc;
    border-radius: 6px;
    padding: 10px 12px;
}
@media print {
    .pro-debit-note {
        box-shadow: none !important;
        border: 1.5px solid #1e3a8a !important;
        background: #fff !important;
    }
    .debit-note-company {
        color: #1e3a8a !important;
    }
    .debit-note-details-pro {
        background: #f8fafc !important;
    }
}

.certificate-header-flex {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 32px;
}
.header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}
.header-logo {
    width: 120px;
    margin-bottom: 0;
}
.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.qr-large {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    padding: 6px;
    margin-top: 4px;
}
.powered-by-footer {
    text-align: right;
    font-size: 0.98rem;
    color: #888;
    margin-top: 32px;
    letter-spacing: 1px;
    font-style: italic;
}
@media (max-width: 700px) {
    .certificate-header-flex {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    .header-left, .header-right {
        align-items: center;
        text-align: center;
    }
    .qr-large {
        width: 90px;
        height: 90px;
    }
    .powered-by-footer {
        text-align: center;
        margin-top: 18px;
    }
}

@page {
    size: A4 portrait;
    margin: 18mm;
}

.print-qr-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: 24px;
    margin-top: 2px;
}
.print-qr-label {
    font-size: 0.98rem;
    color: #1e3a8a;
    font-weight: 600;
    margin-bottom: 2px;
}
.print-qr-number {
    font-size: 1.05rem;
    color: #374151;
    font-weight: 500;
    margin-bottom: 4px;
}
.print-qr-img {
    width: 110px;
    height: 110px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 4px;
    margin-bottom: 2px;
}
@media print {
    .print-qr-img {
        width: 100px !important;
        height: 100px !important;
        margin-bottom: 0 !important;
    }
    .print-qr-block {
        margin-left: 0 !important;
        margin-top: 0 !important;
    }
}

.logo-box {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8fafc;
    border: 1.5px solid #e0e7ef;
    border-radius: 14px;
    padding: 18px 24px;
    margin: 0 auto 18px auto;
    max-width: 320px;
    box-shadow: 0 2px 8px rgba(30,64,175,0.06);
}
.logo-box img {
    max-width: 200px;
    height: auto;
    display: block;
}
@media print {
    .logo-box {
        background: #fff !important;
        border: 1.5px solid #0a3d62 !important;
        box-shadow: none !important;
        padding: 12px 16px !important;
        margin: 0 auto 12px auto !important;
        max-width: 220px !important;
    }
    .logo-box img {
        max-width: 160px !important;
    }
} 