/* ==================== CUSTOM CSS FOR DOCUMENT PORTAL ==================== */

/* ==================== LUXE THEME (Issuer Portal) ==================== */
/* Deep emerald/charcoal base with gold accents + glassmorphism. */

.luxe-bg {
    background-color: #06100c;
    background-image:
        radial-gradient(60rem 60rem at 85% -10%, rgba(16, 185, 129, 0.18), transparent 60%),
        radial-gradient(50rem 50rem at -10% 110%, rgba(217, 119, 6, 0.14), transparent 55%),
        linear-gradient(160deg, #06100c 0%, #04130e 45%, #05100b 100%);
    position: relative;
}

/* faint luxury grid overlay */
.luxe-grid::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse at center, black, transparent 80%);
    mask-image: radial-gradient(ellipse at center, black, transparent 80%);
    pointer-events: none;
}

.luxe-card {
    background: rgba(255, 255, 255, 0.045);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 24px 70px -28px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.luxe-card-soft {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.luxe-hover {
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.luxe-hover:hover {
    transform: translateY(-3px);
    border-color: rgba(251, 191, 36, 0.35);
    box-shadow: 0 30px 80px -30px rgba(16, 185, 129, 0.45);
}

.luxe-input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ecfdf5;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.luxe-input::placeholder { color: #5b7065; }
.luxe-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(251, 191, 36, 0.55);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.14);
}

/* Gold gradient text + hairline divider */
.gold-text {
    background: linear-gradient(135deg, #FDE68A 0%, #F59E0B 55%, #B45309 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.luxe-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.35), transparent);
}

/* Gold CTA button */
.btn-gold {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: #1a1205;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 12px 30px -10px rgba(245, 158, 11, 0.6);
}
.btn-gold:hover { filter: brightness(1.06); box-shadow: 0 16px 40px -10px rgba(245, 158, 11, 0.7); }
.btn-gold:active { transform: scale(0.98); }

/* Emerald glass CTA */
.btn-emerald-glass {
    background: linear-gradient(135deg, rgba(16,185,129,0.95), rgba(5,150,105,0.95));
    color: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 12px 30px -10px rgba(16, 185, 129, 0.55);
}
.btn-emerald-glass:hover { filter: brightness(1.06); }
.btn-emerald-glass:active { transform: scale(0.98); }

/* Shimmer for skeletons on dark */
.luxe-shimmer {
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.09) 37%, rgba(255,255,255,0.04) 63%);
    background-size: 400% 100%;
    animation: luxeShimmer 1.4s ease infinite;
}
@keyframes luxeShimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* Glass Effects */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animation-delay-2000 {
    animation-delay: 2s;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Selection styles */
::selection {
    background-color: #0ea5e9;
    color: white;
}

/* Focus styles */
.focus-visible:focus {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

/* Grid background pattern */
.bg-grid-slate-200\/50 {
    background-image: url("data:image/svg+xml,%3csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3e%3cg fill='%23e2e8f0' fill-opacity='0.5' fill-rule='evenodd'%3e%3cpath d='m0 40 40-40h-40v40zm40 0v-40h-40l40 40z'/%3e%3c/g%3e%3c/svg%3e");
}

/* Hero pattern background */
.bg-hero-pattern {
    background-image: url('https://images.unsplash.com/photo-1557683311-eac922347aa1?q=80&w=2029&auto=format&fit=crop');
}

/* Responsive Sidebar */
@media (max-width: 768px) {
    #sidebar {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }
    
    #sidebar.open {
        transform: translateX(0);
    }
}

/* Toast Notifications */
.toast {
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.toast.show {
    transform: translateX(0);
}

/* Loading States */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Status Colors */
.status-verified {
    color: #10b981;
    background-color: #d1fae5;
    border-color: #a7f3d0;
}

.status-rejected {
    color: #ef4444;
    background-color: #fee2e2;
    border-color: #fecaca;
}

.status-pending {
    color: #f59e0b;
    background-color: #fef3c7;
    border-color: #fde68a;
}

/* Document Cards */
.document-card {
    transition: all 0.2s ease-in-out;
}

.document-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Form Styles */
.form-input {
    transition: all 0.2s ease-in-out;
}

.form-input:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    transition: all 0.2s ease-in-out;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    transform: translateY(-1px);
    box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.4);
}

.btn-secondary {
    transition: all 0.2s ease-in-out;
}

.btn-secondary:hover {
    transform: translateY(-1px);
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* QR Scanner Styles */
#qr-reader {
    width: 100%;
    height: 100%;
}

#qr-reader video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

/* File Upload Styles */
.file-upload-area {
    transition: all 0.2s ease-in-out;
}

.file-upload-area:hover {
    background-color: #f0f9ff;
    border-color: #0ea5e9;
}

.file-upload-area.dragover {
    background-color: #e0f2fe;
    border-color: #0284c7;
    transform: scale(1.02);
}

/* Modal Styles */
.modal {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Statistics Cards */
.stat-card {
    transition: all 0.2s ease-in-out;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Navigation Active State */
.nav-item.active {
    background-color: #f0f9ff;
    color: #0369a1;
}

/* Responsive Design */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .action-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .stat-grid {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .glass,
    .glass-dark {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(255, 255, 255, 0.95);
        border: 2px solid #000;
    }
}

/* Focus Indicators for Keyboard Navigation */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

/* Loading Spinner */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0ea5e9;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

/* Utility Classes */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Custom Checkbox and Radio Styles */
.custom-checkbox,
.custom-radio {
    appearance: none;
    -webkit-appearance: none;
    width: 1rem;
    height: 1rem;
    border: 2px solid #d1d5db;
    border-radius: 0.25rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.custom-checkbox:checked,
.custom-radio:checked {
    background-color: #0ea5e9;
    border-color: #0ea5e9;
}

.custom-radio {
    border-radius: 50%;
}

/* Tooltip Styles */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1f2937;
    color: white;
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-in-out;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}