/* Global Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f9f8f6; /* Claude's signature off-white warm cream */
    color: #191919;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Console Header/Navbar */
.console-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2.5rem;
    background-color: #ffffff;
    border-bottom: 1px solid #e0dfdb;
    position: sticky;
    top: 0;
    z-index: 10;
}

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

.console-logo {
    font-family: 'Lora', Georgia, serif;
    font-weight: 500;
    font-size: 1.15rem;
    color: #191919;
}

.divider {
    color: #b5b5b0;
    font-size: 0.85rem;
}

.console-nav {
    display: flex;
    gap: 1rem;
}

/* Navigation Tabs */
.nav-tab-btn {
    background: none;
    border: none;
    padding: 0.4rem 0.8rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: #666666;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.nav-tab-btn:hover {
    color: #191919;
    background-color: #f2f2f0;
}

.nav-tab-btn.active {
    color: #191919;
    background-color: #e8e8e3;
    font-weight: 600;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-balance {
    font-size: 0.9rem;
    font-weight: 600;
    color: #10b981; /* Green balance indicator */
}

.user-email {
    color: #666666;
    font-size: 0.85rem;
}

/* Main Layout Container */
.console-container {
    max-width: 1100px;
    margin: 3rem auto;
    padding: 0 2rem;
}

/* Tab Panels Visibility */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.split-layout {
    display: flex;
    gap: 4rem;
}

/* Welcome Banner (Dashboard) */
.welcome-banner {
    margin-bottom: 2.5rem;
}

/* Dashboard Grid Styles */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3.5rem;
}

.dash-card {
    background-color: #ffffff;
    border: 1px solid #e0dfdb;
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.2s;
}

.dash-card:hover {
    border-color: #b5b5b0;
}

.dash-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #191919;
}

.dash-card p {
    font-size: 0.9rem;
    color: #666666;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.btn-dash-action {
    align-self: flex-start;
    padding: 0.5rem 1rem !important;
    font-size: 0.85rem !important;
}

/* Models Overview Section */
.models-overview-section {
    margin-top: 3rem;
}

.section-title-large {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: #191919;
}

.models-specs-table-container {
    background-color: #ffffff;
    border: 1px solid #e0dfdb;
    border-radius: 8px;
    overflow: hidden;
}

/* Left Side Payment Form */
.payment-form {
    flex: 1;
}

.main-heading {
    font-family: 'Lora', Georgia, serif;
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.25;
    margin-bottom: 0.5rem;
    color: #191919;
}

.subtitle {
    color: #666666;
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
}

/* Amount Selection Grid */
.amount-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.amount-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 1.2rem 1.25rem;
    background-color: #ffffff;
    border: 1px solid #e0dfdb;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease-in-out;
}

.amount-card:hover {
    border-color: #b5b5b0;
}

.amount-card.active {
    border: 2px solid #3b82f6;
    background-color: #eff6ff;
    padding: 1.15rem 1.2rem;
}

.amount-val {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #191919;
}

.amount-desc {
    font-size: 0.75rem;
    color: #666666;
}

/* Custom Amount Input */
.custom-amount-wrapper {
    margin-bottom: 2rem;
    padding: 1.25rem;
    background-color: #ffffff;
    border: 1px solid #e0dfdb;
    border-radius: 6px;
}

.custom-amount-wrapper label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #666666;
    margin-top: 0;
}

.input-prefix-container {
    display: flex;
    align-items: center;
    border: 1px solid #e0dfdb;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    background-color: #ffffff;
}

.currency-prefix {
    font-size: 1rem;
    color: #666666;
    margin-right: 0.5rem;
}

#custom-amount-input {
    border: none;
    outline: none;
    font-size: 1rem;
    width: 100%;
    color: #191919;
}

/* Accordions */
.accordion-item {
    background-color: #ffffff;
    border: 1px solid #e0dfdb;
    border-radius: 6px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1.1rem 1.5rem;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    color: #191919;
}

.accordion-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    border-top: 1px solid #f2f2f0;
}

.arrow-icon {
    font-size: 0.75rem;
    color: #666666;
}

/* Form Fields formatting */
label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
    color: #191919;
    margin-top: 1rem;
}

input[type="text"], input[type="number"] {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid #e0dfdb;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    background-color: #ffffff;
}

input[type="text"]:focus, input[type="number"]:focus {
    border-color: #b5b5b0;
}

.form-row-half {
    display: flex;
    gap: 1rem;
}

.form-col {
    flex: 1;
}

/* Payment Methods Styles */
.payment-method-section {
    margin-top: 2.5rem;
}

.section-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.payment-tabs {
    display: flex;
    border-bottom: 1px solid #e0dfdb;
    margin-bottom: 1.5rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.65rem 1.5rem 0.65rem 0;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: #666666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: #191919;
}

.tab-btn.active {
    color: #191919;
    border-bottom-color: #191919;
}

.payment-content {
    display: none;
}

.payment-content.active {
    display: block;
}

.payment-info-text {
    font-size: 0.85rem;
    color: #666666;
    margin-bottom: 1rem;
}

.upi-input-container {
    max-width: 400px;
}

/* Right Side Purchase Summary Sidebar */
.purchase-summary-sidebar {
    width: 320px;
    flex-shrink: 0;
}

.summary-box {
    background-color: #ffffff;
    border: 1px solid #e0dfdb;
    border-radius: 8px;
    padding: 2rem;
    position: sticky;
    top: 6rem;
}

.summary-heading {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #191919;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    color: #666666;
}

.summary-row.total-row {
    font-size: 1.05rem;
    font-weight: 600;
    color: #191919;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.summary-divider {
    height: 1px;
    background-color: #e0dfdb;
    margin: 1rem 0;
}

.terms-text {
    font-size: 0.75rem;
    color: #666666;
    line-height: 1.43;
    margin-bottom: 1.5rem;
}

/* API Keys & Tables layout styling */
.panel-header {
    margin-bottom: 2rem;
}

.key-creation-form {
    background-color: #ffffff;
    border: 1px solid #e0dfdb;
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    max-width: 500px;
}

.table-container {
    background-color: #ffffff;
    border: 1px solid #e0dfdb;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.console-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.console-table th {
    background-color: #f2f2f0;
    color: #666666;
    font-weight: 600;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid #e0dfdb;
}

.console-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f2f2f0;
    color: #191919;
}

.console-table tr:last-child td {
    border-bottom: none;
}

/* Button Styling matching Claude Platform */
.btn-primary {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background-color: #9c9a96;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s;
    margin-bottom: 0.75rem;
}

.btn-primary.active-btn {
    background-color: #191919;
}

.btn-primary.active-btn:hover {
    background-color: #2e2e2e;
}

.btn-primary-dark {
    display: inline-block;
    padding: 0.65rem 1.25rem;
    background-color: #191919;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary-dark:hover {
    background-color: #2e2e2e;
}

.btn-secondary-light {
    display: inline-block;
    padding: 0.65rem 1.25rem;
    background-color: #ffffff;
    color: #666666;
    border: 1px solid #e0dfdb;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-secondary-light:hover {
    border-color: #b5b5b0;
    color: #191919;
}

.btn-text {
    display: block;
    width: 100%;
    padding: 0.5rem;
    background: none;
    border: none;
    color: #666666;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: color 0.2s;
}

.btn-text:hover {
    color: #191919;
}

.btn-copy {
    background: none;
    border: 1px solid #e0dfdb;
    padding: 0.25rem 0.5rem;
    font-family: inherit;
    font-size: 0.75rem;
    color: #666666;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 0.5rem;
}

.btn-copy:hover {
    border-color: #b5b5b0;
    color: #191919;
}

/* Authentication Page Styles */
.auth-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 1rem;
    text-align: center;
}

.auth-header {
    margin-bottom: 2rem;
}

.auth-card {
    background-color: #ffffff;
    border: 1px solid #e0dfdb;
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    text-align: left;
}

.oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.75rem !important;
}

.oauth-icon {
    font-size: 1.1rem;
    font-weight: 600;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
}

.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0dfdb;
}

.divider-text {
    padding: 0 0.75rem;
    font-size: 0.8rem;
    color: #666666;
}

/* Helper utilities */
.hidden {
    display: none !important;
}

.hidden-modal {
    display: none !important;
}

/* When modal is visible (hidden-modal class removed) */
div[id^="modal-"]:not(.hidden-modal) {
    display: flex !important;
}

/* Footer */
.footer {
    border-top: 1px solid #e0dfdb;
    padding: 2.5rem 5%;
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 5rem;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .console-container {
        margin: 1.5rem auto;
        padding: 0 1rem;
    }
    
    .split-layout {
        flex-direction: column;
        gap: 2rem;
    }
    
    .purchase-summary-sidebar {
        width: 100%;
    }
    
    .amount-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
