/* Main styles for Bank Details Extractor */

:root {
    --primary-color: #4a6fa5;
    --primary-dark: #3a5a8c;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-color: #dee2e6;
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.site-header {
    background-color: white;
    border-bottom: 1px solid #f1f1f4;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    padding: 0 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #111827;
    font-weight: 600;
    font-size: 1.125rem;
    transition: color 0.15s ease-in-out;
}

.logo:hover {
    color: var(--primary-color);
}

.logo i {
    margin-right: 0.5rem;
    font-size: 1.25rem;
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    font-size: 0.875rem;
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    transition: color 0.15s ease-in-out;
    position: relative;
    padding: 0.25rem 0;
}

.nav-link:hover {
    color: #111827;
}

.nav-link.active {
    color: #111827;
    font-weight: 600;
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.375rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
    text-decoration: none;
}

.btn-admin {
    background-color: #e0e7ff;
    color: #4f46e5;
}

.btn-admin:hover {
    background-color: #c7d2fe;
}

.btn-logout {
    border: 1px solid #ef4444;
    color: #ef4444;
    background-color: transparent;
}

.btn-logout:hover {
    background-color: #fee2e2;
}

/* Mobile menu */
.mobile-menu-toggle {
    display: none;
    font-size: 1.25rem;
    color: #111827;
    cursor: pointer;
}

.mobile-dropdown {
    display: none;
    position: absolute;
    top: 64px;
    right: 0;
    background-color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-radius: 0.5rem;
    width: 16rem;
    z-index: 100;
    padding: 0.75rem 0;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-in-out;
}

.mobile-dropdown.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-user-info {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
}

.mobile-nav-link {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #4b5563;
    transition: all 0.15s ease-in-out;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.mobile-nav-link:hover {
    background-color: #f9fafb;
    color: #111827;
}

.mobile-nav-link.admin-link {
    color: #4f46e5;
}

.mobile-nav-link.admin-link:hover {
    background-color: #e0e7ff;
}

@media (max-width: 768px) {
    .nav-container {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-dropdown {
        display: block;
    }
}

@media (min-width: 769px) {

    .mobile-menu-toggle,
    .mobile-dropdown {
        display: none;
    }
}

/* Main content */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 140px);
}

/* Dashboard */
.dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.welcome-section {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.welcome-section h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.subscription-info {
    color: var(--secondary-color);
}

.subscription-tier {
    text-transform: capitalize;
    font-weight: 600;
    color: var(--primary-color);
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-header h2 {
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.section-header p {
    color: var(--secondary-color);
}

.upload-section,
.results-section {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

/* File upload styling */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background-color: #f8f9fa;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 1rem;
    position: relative;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background-color: rgba(74, 111, 165, 0.05);
}

.upload-area.highlight {
    border-color: var(--primary-color);
    background-color: rgba(74, 111, 165, 0.1);
    transform: scale(1.01);
}

.upload-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    transition: color 0.3s;
}

.upload-area:hover .upload-icon,
.upload-area.highlight .upload-icon {
    color: var(--primary-color);
}

.upload-message {
    text-align: center;
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    transition: color 0.3s;
}

.upload-area:hover .upload-message,
.upload-area.highlight .upload-message {
    color: var(--primary-dark);
}

.upload-instructions {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-list {
    margin-top: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    transition: background-color 0.2s;
}

.file-item:hover {
    background-color: #e9ecef;
}

.file-name {
    display: flex;
    align-items: center;
}

.file-name i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.remove-file {
    color: var(--danger-color);
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.remove-file:hover {
    opacity: 1;
}

/* Buttons */
.upload-controls {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #5a6268;
}

/* Results */
.results-container {
    margin-top: 1rem;
}

.results-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
    color: var(--secondary-color);
    text-align: center;
}

.results-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.results-table-container {
    overflow-x: auto;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th,
.results-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.results-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.results-table tr:hover {
    background-color: #f8f9fa;
}

/* Export section */
.export-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.export-section h3 {
    margin-bottom: 1rem;
}

/* Dynamic table enhancements */
.results-table td.json-data {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    background-color: #f8f9fa;
    border-radius: 3px;
    padding: 0.5rem;
    white-space: pre-wrap;
    word-break: break-all;
    max-width: 300px;
}

.results-table td.empty-value {
    color: #999;
    font-style: italic;
}

.results-table th[data-field] {
    position: relative;
}

.results-table th[data-field]:hover::after {
    content: attr(data-field);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    white-space: nowrap;
    z-index: 1000;
}

/* Responsive table improvements */
@media (max-width: 768px) {
    .results-table {
        font-size: 0.9em;
    }

    .results-table th,
    .results-table td {
        padding: 0.5rem 0.3rem;
    }

    .results-table td.json-data {
        max-width: 200px;
        font-size: 0.8em;
    }
}

.export-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(74, 111, 165, 0.25);
}

.custom-control {
    position: relative;
    display: block;
    min-height: 1.5rem;
    padding-left: 1.5rem;
}

.custom-control-input {
    position: absolute;
    left: 0;
    z-index: -1;
    width: 1rem;
    height: 1rem;
    opacity: 0;
}

.custom-control-label {
    position: relative;
    margin-bottom: 0;
    vertical-align: top;
    cursor: pointer;
}

.custom-control-label::before {
    position: absolute;
    top: 0.25rem;
    left: -1.5rem;
    display: block;
    width: 1rem;
    height: 1rem;
    pointer-events: none;
    content: "";
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
}

.custom-control-input:checked~.custom-control-label::before {
    color: #fff;
    border-color: var(--primary-color);
    background-color: var(--primary-color);
}

.custom-control-label::after {
    position: absolute;
    top: 0.25rem;
    left: -1.5rem;
    display: block;
    width: 1rem;
    height: 1rem;
    content: "";
    background: no-repeat 50% / 50% 50%;
}

.custom-control-input:checked~.custom-control-label::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26l2.974 2.99L8 2.193z'/%3e%3c/svg%3e");
}

.export-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn-export {
    background-color: #f8f9fa;
    color: var(--dark-color);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.btn-export i {
    margin-right: 0.5rem;
}

.btn-export:hover {
    background-color: #e9ecef;
}

/* Drive export specific */
.drive-link {
    display: inline-flex;
    align-items: center;
    color: #4285F4;
    text-decoration: none;
    font-weight: 500;
    margin-top: 0.5rem;
}

.drive-link i {
    margin-right: 0.5rem;
}

.success-message {
    text-align: center;
    color: var(--success-color);
    margin: 1rem 0;
}

/* Footer */
.site-footer {
    background-color: white;
    padding: 3rem 0 2rem;
    border-top: 1px solid #f1f1f4;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}

.footer-brand {
    flex: 1;
    min-width: 200px;
}

.footer-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #111827;
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.footer-logo i {
    margin-right: 0.5rem;
    font-size: 1.25rem;
}

.copyright {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 1rem;
}

.footer-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}

.footer-links-group {
    min-width: 120px;
}

.footer-heading {
    color: #111827;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-link {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.15s ease-in-out;
}

.footer-link:hover {
    color: #111827;
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-links-container {
        gap: 2rem;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .mobile-dropdown {
        display: block;
    }

    .export-buttons {
        flex-direction: column;
    }

    .export-options {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* Login page */
.landing-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.hero-section {
    text-align: center;
    padding: 4rem 0;
}

.app-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.google-login-btn {
    display: inline-flex;
    align-items: center;
    background-color: #4285f4;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
}

.google-login-btn i {
    margin-right: 0.75rem;
}

.google-login-btn:hover {
    background-color: #3367d6;
}

.features-section {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin: 4rem 0;
}

.feature {
    flex: 1;
    text-align: center;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.feature h3 {
    margin-bottom: 0.5rem;
}

.how-it-works {
    text-align: center;
    margin: 4rem 0;
}

.how-it-works h2 {
    margin-bottom: 2rem;
}

.steps {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.step {
    flex: 1;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.step-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.pricing-section {
    text-align: center;
    margin: 4rem 0;
}

.pricing-section h2 {
    margin-bottom: 2rem;
}

.pricing-cards {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
}

.pricing-card {
    flex: 1;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 2rem;
    text-align: center;
}

.pricing-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
}

.price-period {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.features-list {
    list-style: none;
    margin-bottom: 2rem;
}

.features-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.features-list li:last-child {
    border-bottom: none;
}

.get-started-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
}

.get-started-btn:hover {
    background-color: var(--primary-dark);
}

@media (max-width: 768px) {

    .features-section,
    .steps,
    .pricing-cards {
        flex-direction: column;
    }
}

/* Admin link styling */
.admin-link {
    background-color: #fce4ec;
    color: #880e4f !important;
    font-weight: 600;
    border-radius: 4px;
    padding: 5px 10px !important;
    transition: background-color 0.3s;
}

.admin-link:hover {
    background-color: #f8bbd0;
}