/* 137.cloud for Credit Unions - Custom Styles */

:root {
    --color-primary: #059669;
    --color-primary-light: #34d399;
    --color-primary-dark: #047857;
    --color-accent: #06b6d4;
    --color-sidebar: #111827;
    --color-sidebar-hover: #1f2937;
    --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

body { font-family: var(--font-sans); }
code, pre, .font-mono { font-family: var(--font-mono); }

/* Navigation links */
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    color: #9ca3af;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
    text-decoration: none;
}
.nav-link:hover {
    color: #fff;
    background: var(--color-sidebar-hover);
}
.nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
}

/* Cards */
.card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: box-shadow 0.2s ease;
}
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.05); }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

/* Stat cards */
.stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.25rem;
}
.stat-card .stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}
.stat-card .stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}
.stat-card .stat-change {
    font-size: 0.75rem;
    margin-top: 0.5rem;
}
.stat-change.positive { color: #059669; }
.stat-change.negative { color: #dc2626; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    text-decoration: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}
.btn-secondary:hover { background: #e5e7eb; }
.btn-danger {
    background: #dc2626;
    color: #fff;
}
.btn-danger:hover { opacity: 0.9; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.75rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.375rem;
}
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-family: var(--font-sans);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: 0.75rem; color: #9ca3af; margin-top: 0.25rem; }
.form-error { font-size: 0.75rem; color: #dc2626; margin-top: 0.25rem; }

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e5e7eb;
}
.data-table td {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
}
.data-table tr:hover td { background: #fafafa; }

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 50;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-content {
    background: #fff;
    border-radius: 1rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
}

/* AI indicator */
.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: #6d28d9;
    border-radius: 9999px;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #e5e7eb;
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Tabs */
.tab-bar { display: flex; border-bottom: 2px solid #e5e7eb; gap: 0; }
.tab-item {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    text-decoration: none;
    transition: all 0.15s ease;
}
.tab-item:hover { color: #374151; }
.tab-item.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    justify-content: center;
}
.pagination a, .pagination span {
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    border: 1px solid #e5e7eb;
    color: #374151;
    text-decoration: none;
}
.pagination a:hover { background: #f3f4f6; }
.pagination .active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* Vote button */
.vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.15s ease;
    background: transparent;
    color: #6b7280;
}
.vote-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.vote-btn.voted { background: #ecfdf5; border-color: var(--color-primary); color: var(--color-primary); }

/* Risk level indicators */
.risk-low { color: #059669; }
.risk-medium { color: #d97706; }
.risk-high { color: #dc2626; }
.risk-critical { color: #7c2d12; font-weight: 700; }

/* Auth pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 50%, #ede9fe 100%);
}
.auth-card {
    background: #fff;
    border-radius: 1rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
}

/* Pricing cards */
.pricing-card {
    border: 2px solid #e5e7eb;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.2s ease;
}
.pricing-card:hover { border-color: var(--color-primary); transform: translateY(-4px); }
.pricing-card.featured {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary);
    position: relative;
}

/* Mobile responsive */
@media (max-width: 1023px) {
    .sidebar-mobile {
        position: fixed;
        inset: 0;
        z-index: 40;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .sidebar-mobile.open { transform: translateX(0); }
}
