/* ============================================
   PDF Portal — Tailwind-matched Styles
   ============================================ */

/* Nav links */
.nav-link {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    transition: all 0.2s;
}
.nav-link:hover {
    color: #4f46e5;
    background: #eef2ff;
}
.nav-link.active {
    color: #4f46e5;
    background: #eef2ff;
}
.nav-link-mobile {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
}
.nav-link-mobile:hover {
    background: #f3f4f6;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    text-decoration: none;
}
.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
    color: white;
    text-decoration: none;
}
.btn-primary.disabled, .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    text-decoration: none;
}

.btn-success {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    text-decoration: none;
}
.btn-success:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
    color: white;
    text-decoration: none;
}

/* Tool cards */
.tool-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}
.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
    border-color: #4f46e5;
    text-decoration: none;
    color: inherit;
}

/* Dropzone */
.dropzone {
    border: 2px dashed #d1d5db;
    border-radius: 1rem;
    padding: 3rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    background: #f9fafb;
}
.dropzone:hover, .dropzone.dragover {
    border-color: #4f46e5;
    background: #eef2ff;
}

/* Spinner */
.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Sections */
.section-title {
    font-size: 1.875rem;
    font-weight: 800;
    color: #1f2937;
}
.section-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
}

.hero-gradient {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
}

/* Forms */
input, select, textarea {
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
    outline: none;
    transition: all 0.2s;
    width: 100%;
    font-size: 0.875rem;
}
input:focus, select:focus, textarea:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* Stat cards */
.stat-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s;
}
.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
}
.table-container table {
    width: 100%;
    border-collapse: collapse;
}
.table-container th {
    background: #f9fafb;
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
}
.table-container td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.875rem;
}

/* File preview */
.file-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-top: 1rem;
}
.file-card .file-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fee2e2;
    color: #dc2626;
    flex-shrink: 0;
}
.file-card .file-info { flex: 1; min-width: 0; }
.file-card .file-name {
    font-weight: 500;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.file-card .file-size { color: #6b7280; font-size: 0.75rem; }
.file-card .file-remove {
    color: #9ca3af;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 0.875rem;
    padding: 4px;
    transition: color 0.2s;
}
.file-card .file-remove:hover { color: #dc2626; }

/* Progress */
.progress-container { display: none; margin-top: 1.5rem; }
.progress-bar-wrap {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Download section */
.download-section { display: none; margin-top: 1.5rem; }
.download-card {
    background: #f0fdf4;
    border: 2px solid #86efac;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
}

/* Auth box */
.auth-box {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 2.5rem;
    max-width: 420px;
    margin: 0 auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* FAQ */
.faq-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
}
.faq-item .accordion-button {
    background: white;
    color: #1f2937;
    border: none;
    padding: 1rem 1.25rem;
    font-weight: 500;
    font-size: 0.9375rem;
    box-shadow: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}
.faq-item .accordion-button:not(.collapsed) {
    color: #4f46e5;
    background: white;
}
.faq-item .accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}
.faq-item .accordion-body {
    padding: 0 1.25rem 1rem;
    color: #6b7280;
    line-height: 1.7;
    font-size: 0.9375rem;
}

/* Pricing */
.pricing-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    position: relative;
    height: 100%;
}
.pricing-card.pop {
    border: 2px solid #4f46e5;
    transform: scale(1.02);
    box-shadow: 0 8px 32px rgba(79, 70, 229, 0.15);
}
.pricing-card.pop::before {
    content: 'Most Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    padding: 2px 16px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}
.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0,0,0,0.1);
}
.pricing-card.pop:hover {
    transform: scale(1.02) translateY(-4px);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25em 0.65em;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}
.badge-green { background: #dcfce7; color: #166534; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-gray { background: #f3f4f6; color: #374151; }

/* Toast */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
}
.toast {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 0.5rem;
    animation: slideIn 0.3s ease;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Loading overlay */
.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 50;
    align-items: center;
    justify-content: center;
}
.loading-overlay.show {
    display: flex;
}
.loading-box {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    max-width: 20rem;
    margin: 0 1rem;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
