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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.user-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
}

.user-info h2 {
    margin: 0 0 10px 0;
    font-size: 2rem;
    font-weight: 700;
}

.user-info p {
    margin: 0;
    font-size: 1.2rem;
    opacity: 0.9;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.hidden {
    display: none !important;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    border: none;
    background: none;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: bold;
}

.tab-btn:hover {
    background: #f8f9ff;
}

/* Forms */
.form-container {
    display: none;
}

.form-container.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* Dashboard */
.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9ff;
    border-radius: 10px;
    margin-bottom: 30px;
}

.user-info p {
    font-size: 1.2rem;
    font-weight: 600;
    color: #667eea;
}

/* Tokens Section */
.tokens-section {
    margin-bottom: 30px;
}

.create-token-form {
    background: #f8f9ff;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.tokens-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.token-card {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
}

.token-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.token-card.active {
    border-color: #28a745;
    background: #f8fff9;
}

.token-card.inactive {
    border-color: #dc3545;
    background: #fff8f8;
    opacity: 0.7;
}

.token-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.token-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}

.token-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.token-status.active {
    background: #d4edda;
    color: #155724;
}

.token-status.inactive {
    background: #f8d7da;
    color: #721c24;
}

.token-description {
    color: #666;
    margin-bottom: 15px;
    font-style: italic;
}

.token-value {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    word-break: break-all;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
}

.token-actions {
    display: flex;
    gap: 10px;
}

.token-actions .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* API Instructions */
.api-instructions {
    background: #f8f9ff;
    padding: 25px;
    border-radius: 10px;
}

.instruction-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.instruction-box h4 {
    color: #667eea;
    margin-bottom: 10px;
    margin-top: 20px;
}

.instruction-box h4:first-child {
    margin-top: 0;
}

.instruction-box code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #e83e8c;
}

.instruction-box pre {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-top: 10px;
    border: 1px solid #e9ecef;
}

.instruction-box pre code {
    background: none;
    padding: 0;
    color: #333;
}

/* Loading */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.loading p {
    color: white;
    font-size: 1.2rem;
}

/* Message */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 1001;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.message.success {
    background: #28a745;
}

.message.error {
    background: #dc3545;
}

.message.warning {
    background: #ffc107;
    color: #856404;
}

.message.warning a {
    color: #007bff;
    text-decoration: underline;
    font-weight: bold;
}

.message.info {
    background: #17a2b8;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .section {
        padding: 20px;
    }
    
    .user-info {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .tokens-grid {
        grid-template-columns: 1fr;
    }
    
    .token-actions {
        flex-direction: column;
    }
    
    .config-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .config-item span {
        margin: 0;
        width: 100%;
    }
}

/* Webhook Configuration */
.webhook-section {
    margin-bottom: 30px;
}

.webhook-config-form {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.webhook-config-form h4 {
    color: #495057;
    margin-bottom: 20px;
}

.webhook-examples {
    margin-top: 20px;
    padding: 15px;
    background: #e9ecef;
    border-radius: 6px;
}

.webhook-examples h5 {
    color: #495057;
    margin-bottom: 10px;
}

.webhook-examples ul {
    list-style: none;
    padding: 0;
}

.webhook-examples li {
    margin: 5px 0;
}

.webhook-examples code {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.current-config {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.current-config h4 {
    color: #155724;
    margin-bottom: 15px;
}

.config-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #c3e6cb;
}

.config-item:last-child {
    border-bottom: none;
}

.config-item strong {
    color: #155724;
    min-width: 120px;
}

.config-item span {
    color: #495057;
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 4px;
    flex: 1;
    margin: 0 10px;
    word-break: break-all;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.8em;
    min-width: auto;
}

.help-text {
    font-size: 0.9em;
    color: #6c757d;
    margin-top: 5px;
    display: block;
}

/* API Instructions */
.api-instructions {
    margin-top: 30px;
}

.instruction-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
}

.instruction-box h4 {
    color: #495057;
    margin-bottom: 10px;
}

.instruction-box code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    display: block;
    margin: 10px 0;
}

.instruction-box pre {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    overflow-x: auto;
    margin: 10px 0;
}

.instruction-box pre code {
    background: none;
    padding: 0;
    margin: 0;
}

.instruction-box ol {
    margin: 10px 0;
    padding-left: 20px;
}

.instruction-box ol li {
    margin: 5px 0;
}

/* Bank Account Styles */
.bank-accounts-section {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.add-bank-form {
    margin-bottom: 30px;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.bank-accounts-list {
    margin-top: 20px;
}

.bank-account-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.bank-account-item.default {
    border-color: #4CAF50;
    background-color: #f1f8e9;
}

.bank-account-item:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bank-account-info h6 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 16px;
}

.bank-account-info p {
    margin: 2px 0;
    color: #666;
    font-size: 14px;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-links a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 6px;
    position: relative;
}

.nav-links a:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.nav-links a.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.15);
    font-weight: 600;
}

.nav-links .btn {
    margin-left: 10px;
}

/* Mobile menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
}

.bank-account-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 4px;
}

.btn-danger {
    background-color: #f44336;
    color: white;
    border: none;
}

.btn-danger:hover {
    background-color: #d32f2f;
}

/* Google Login Button */
.btn-google {
    background: white;
    color: #333;
    border: 1px solid #dadce0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 10px;
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #dadce0;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
}

.divider span {
    background: white;
    padding: 0 15px;
    color: #666;
    font-size: 14px;
}

