:root {
    --primary: #3B82F6;
    --primary-dark: #1E40AF;
    --secondary: #10B981;
    --accent: #F59E0B;
    --dark: #0F172A;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gray-900: #0F172A;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Background geometric shapes */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    opacity: 0.08;
    animation: float 25s ease-in-out infinite;
    pointer-events: none;
}

body::before {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    top: -150px;
    right: -150px;
    animation-delay: -10s;
}

body::after {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    bottom: -100px;
    left: -100px;
    animation-delay: -5s;
}

.geometric-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: -1;
}

.geometric-shape {
    position: absolute;
    opacity: 0.06;
    animation: float 30s ease-in-out infinite;
}

.geometric-shape:nth-child(1) {
    width: 120px;
    height: 120px;
    background: linear-gradient(45deg, var(--primary), transparent);
    border-radius: 20px;
    top: 20%;
    left: 10%;
    animation-delay: -12s;
    transform: rotate(45deg);
}

.geometric-shape:nth-child(2) {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, var(--secondary), transparent);
    border-radius: 50%;
    top: 60%;
    right: 15%;
    animation-delay: -8s;
}

.geometric-shape:nth-child(3) {
    width: 150px;
    height: 150px;
    background: linear-gradient(45deg, var(--accent), transparent);
    border-radius: 30px;
    top: 40%;
    left: 70%;
    animation-delay: -15s;
    transform: rotate(-30deg);
}

.geometric-shape:nth-child(4) {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--primary-dark), transparent);
    border-radius: 50%;
    top: 80%;
    left: 30%;
    animation-delay: -3s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(90deg);
    }
    50% {
        transform: translateY(-10px) rotate(180deg);
    }
    75% {
        transform: translateY(-30px) rotate(270deg);
    }
}

@keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.auth-container {
    max-width: 450px;
    margin: 100px auto;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

.auth-container h1 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.auth-container h2 {
    color: var(--gray-700);
    font-weight: 600;
    margin-bottom: 2rem;
    font-size: 1.25rem;
}

.auth-container input {
    width: 100%;
    padding: 1rem;
    margin: 0.75rem 0;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.auth-container input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

.auth-container button {
    width: 100%;
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.auth-container button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.auth-container button:hover::before {
    left: 100%;
}

.auth-container button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.auth-container p {
    margin-top: 1.5rem;
    color: var(--gray-600);
}

.auth-container a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-container a:hover {
    color: var(--primary-dark);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header div {
    display: flex;
    align-items: center;
    gap: 1rem;
}

header div a {
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

header div a:hover {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
}

.plan {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-right: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.plan.free { 
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.plan.pro { 
    background: linear-gradient(135deg, var(--secondary), #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    border-left: 4px solid;
    backdrop-filter: blur(10px);
}

.alert.success { 
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
    color: #059669;
    border-left-color: var(--secondary);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.1);
}

.alert.error { 
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
    color: #dc2626;
    border-left-color: #ef4444;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.1);
}

.add-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.add-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

.add-form form {
    display: flex;
    gap: 1rem;
    align-items: end;
}

.add-form input {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.add-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

.add-form small {
    display: block;
    margin-top: 1rem;
    color: var(--gray-600);
    font-size: 0.875rem;
}

.add-form small a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.add-form small a:hover {
    text-decoration: underline;
}

button {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

button:hover::before {
    left: 100%;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: var(--gray-400);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

button:disabled::before {
    display: none;
}

.remove {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.remove:hover {
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.refresh-btn {
    background: linear-gradient(135deg, var(--secondary), #059669);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.company {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    transition: all 0.3s ease;
}

.company:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}


.company-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--gray-200);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.02), rgba(16, 185, 129, 0.02));
}

.company-header h3 {
    margin: 0;
    color: var(--gray-900);
    font-weight: 700;
    font-size: 1.25rem;
}

.filing-stats {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

.company-header div:last-child {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.filings {
    padding: 1.5rem 2rem;
}

.no-filings {
    color: var(--gray-500);
    font-style: italic;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--gray-50), rgba(241, 245, 249, 0.5));
    border-radius: 12px;
    border: 1px dashed var(--gray-300);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

th, td {
    text-align: left;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

th {
    background: linear-gradient(135deg, var(--gray-50), rgba(241, 245, 249, 0.8));
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

tr:hover {
    background: rgba(59, 130, 246, 0.02);
}

td a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: inline-block;
}

td a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

.empty {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.empty h3 {
    color: var(--gray-700);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.empty p {
    color: var(--gray-600);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.pricing {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.pricing .plan {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    display: block;
    transition: all 0.3s ease;
    overflow: hidden;
}

.pricing .plan::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

.pricing .plan:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.pricing .plan.pro {
    border: 2px solid var(--primary);
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15);
}

.pricing .plan.pro:hover {
    transform: scale(1.05) translateY(-10px);
    box-shadow: 0 30px 50px rgba(59, 130, 246, 0.2);
}

.pricing .plan.pro::after {
    content: "POPULAR";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.pricing .plan h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.price {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 1.5rem 0;
    line-height: 1;
}

.price span {
    font-size: 1rem;
    color: var(--gray-500);
    font-weight: 500;
}

.pricing .plan ul {
    list-style: none;
    margin: 2rem 0;
    text-align: left;
}

.pricing .plan li {
    padding: 0.75rem 0;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.pricing .plan li::before {
    content: "✓";
    color: var(--secondary);
    font-weight: 700;
    font-size: 1.1rem;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    flex-shrink: 0;
}

.testimonial {
    text-align: center;
    margin: 3rem 0;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.testimonial::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

.testimonial p {
    font-size: 1.25rem;
    color: var(--gray-700);
    margin-bottom: 1rem;
    font-style: italic;
    line-height: 1.6;
}

.testimonial small {
    color: var(--gray-500);
    font-weight: 500;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
    filter: blur(1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .pricing {
        grid-template-columns: 1fr;
    }
    
    .pricing .plan.pro {
        transform: none;
    }
    
    .pricing .plan.pro:hover {
        transform: translateY(-10px);
    }
    
    .add-form form {
        flex-direction: column;
    }
    
    header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    header div {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .company-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    table {
        font-size: 0.875rem;
    }
    
    th, td {
        padding: 0.75rem;
    }
}

/* Additional animations */
@keyframes subtle-pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 4px 15px rgba(59, 130, 246, 0.5);
    }
}

button:not(:disabled):not(.remove):not(.refresh-btn) {
    animation: subtle-pulse 3s ease-in-out infinite;
}

button:hover {
    animation: none;
}

/* Add Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');