/* Z:\_dev\_python\_gamma_exposure\web_page_assets\style.css */

/* --- Global styles --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
    display: flex;
    justify-content: center;
    font-size: 14px;
}

.container {
    width: 98%;
    max-width: 1900px;
    margin-top: 10px;
    margin-bottom: 20px;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

/* --- Header --- */
.header {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 8px 15px;
    overflow-x: auto;
}

/* Header Top Row - H1 and Tabs */
.header-top-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    margin-bottom: 8px;
    flex-wrap: nowrap;
}

.header .title {
    font-size: 1.3em;
    font-weight: bold;
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
    color: #ecf0f1;
    line-height: 1.2;
}

/* Tab Container */
.tab-container {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Individual Tabs */
.tab {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background-color: #95a5a6;
    color: #2c3e50;
    cursor: pointer;
    border: none;
    font-size: 0.75em;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
    user-select: none;
    position: relative;
    min-height: 28px;
    box-sizing: border-box;
}

.tab:first-child {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.tab:last-child {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.tab.active {
    background-color: #3498db;
    color: #ffffff;
    font-weight: 600;
}

.tab:not(.locked):not(.active):hover {
    background-color: #7f8c8d;
    color: #ffffff;
}

.tab.locked {
    background-color: #bdc3c7;
    color: #7f8c8d;
    cursor: not-allowed;
    opacity: 0.8;
}

.tab.locked.debug-unlocked {
    cursor: pointer;
    opacity: 1;
    background-color: #e67e22;
    color: #ffffff;
}

.tab.locked.debug-unlocked:hover {
    background-color: #d35400;
}

.tab-text {
    line-height: 1.1;
}

.lock-icon {
    font-size: 0.7em;
    opacity: 0.7;
}

.tab.locked.debug-unlocked .lock-icon {
    display: none;
}

/* Controls Row - Modified for better spacing */
.controls {
    display: flex;
    align-items: flex-end;
    flex-wrap: nowrap;
    gap: 24px;
    overflow-x: auto;
}

.control-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
    flex-shrink: 0;
}

.control-group label {
    font-weight: normal;
    font-size: 0.7em;
    color: #bdc3c7;
    margin-left: 3px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Common style for select, text inputs, and buttons */
.controls select,
.controls input[type="text"],
.controls .nav-button {
    padding: 3px 6px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
    font-size: 0.85em;
    cursor: pointer;
    height: 30px;
    box-sizing: border-box;
}

.controls select:disabled,
.controls input[type="text"]:disabled,
.controls .nav-button:disabled {
    cursor: not-allowed;
    background-color: #e9ecef;
    opacity: 0.7;
}

/* Specific widths for controls */
#instrumentSelect {
    min-width: 150px;
    max-width: 250px;
}

#expirationFilterSelect {
    min-width: 120px;
}

#displayStrikesSelect {
    min-width: 70px;
}

/* Wrapper for horizontally grouped controls */
.input-group-row {
    display: flex;
    align-items: center;
    gap: 4px !important;
}

.input-group-row>* {
    border-radius: 4px !important;
    height: 30px;
    box-sizing: border-box;
}

#timestampSelect {
    width: 140px;
    flex-shrink: 0;
}

#chartDaysInput {
    width: 35px;
    text-align: center;
    padding: 3px;
}

/* Navigation buttons */
.nav-button {
    min-width: 28px;
    padding: 3px 6px;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.8em;
}

/* Custom Date Filter block */
.custom-filter-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    flex-wrap: nowrap;
}

.custom-filter-wrapper .control-group {
    flex-shrink: 0;
}

.custom-filter-wrapper input[type="text"] {
    width: 80px;
}

.controls .nav-button.action-button {
    background-color: #1abc9c;
    color: #fff;
    border-color: #16a085;
    font-weight: bold;
    min-width: 50px;
    padding: 3px 6px;
}

.controls .nav-button.action-button:hover:not(:disabled) {
    background-color: #16a085;
}

/* --- Summary Table --- */
.summary-table-container {
    padding: 6px 15px;
    background-color: #ecf0f1;
    border-bottom: 1px solid #bdc3c7;
}

.summary-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 3px 0px;
    table-layout: fixed;
    font-size: 0.75em;
}

.summary-table td {
    padding: 2px 6px;
    border: none;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.summary-table td:nth-child(1) {
    width: 20%;
}

.summary-table td:nth-child(2) {
    width: 17%;
}

.summary-table td:nth-child(3) {
    width: 17%;
}

.summary-table td:nth-child(4) {
    width: 17%;
}

.summary-table td:nth-child(5) {
    width: auto;
    font-style: italic;
    color: #7f8c8d;
}

/* --- Main Content & Grid --- */
.dashboard-content {
    padding: 15px;
    background-color: #fff;
}

.message {
    padding: 15px;
    text-align: center;
    font-size: 1em;
    border-radius: 4px;
    margin: 15px;
}

.loading-message {
    color: #2c3e50;
    background-color: #e0e7ef;
}

.error-message {
    color: #a94442;
    background-color: #f2dede;
    border: 1px solid #ebccd1;
}

.nodata-message {
    color: #8a6d3b;
    background-color: #fcf8e3;
    border: 1px solid #faebcc;
}

/* Tab Content Areas */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Locked Content Styling */
.locked-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    padding: 40px 20px;
}

.locked-message {
    text-align: center;
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 40px;
    max-width: 500px;
}

.locked-message h3 {
    margin-top: 0;
    color: #495057;
    font-size: 1.4em;
}

.locked-message p {
    color: #6c757d;
    margin-bottom: 15px;
    line-height: 1.5;
}

.unlock-button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.unlock-button:hover:not(:disabled) {
    background-color: #218838;
}

.unlock-button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* User Management Styling */
.user-management {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.user-section h3 {
    margin-top: 0;
    margin-bottom: 30px;
    text-align: center;
    color: #2c3e50;
}

.auth-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.auth-section h4 {
    margin-top: 0;
    color: #495057;
}

.auth-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.auth-button:hover {
    background-color: #0056b3;
}

.auth-button.secondary {
    background-color: #6c757d;
}

.auth-button.secondary:hover {
    background-color: #545b62;
}

/* Membership Plans */
.membership-plans {
    margin-top: 40px;
}

.membership-plans h4 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 1.5em;
    font-weight: 600;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: start;
    max-width: 1000px;
    margin: 0 auto;
}

.plan-card {
    background-color: #fff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.plan-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.plan-card.current {
    border-color: #28a745;
    background-color: #f8fff9;
}

.plan-card.popular {
    border-color: #007bff;
    background-color: #f8f9ff;
}

.popular-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #007bff;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
}

.plan-card h5 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.3em;
    color: #2c3e50;
}

.price {
    font-size: 1.5em;
    font-weight: 700;
    color: #495057;
    margin-bottom: 20px;
}

.plan-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    text-align: left;
}

.plan-card li {
    padding: 5px 0;
    color: #6c757d;
    font-size: 0.9em;
}

.plan-button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.plan-button {
    background-color: #007bff;
    color: white;
}

.plan-button:hover:not(:disabled) {
    background-color: #0056b3;
}

.plan-button.selected {
    background-color: #28a745;
    color: white;
}

.plan-button:disabled {
    background-color: #6c757d;
    color: white;
    cursor: not-allowed;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    align-items: start;
}

.grid-item {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chart-container {
    min-height: 360px;
}

.chart-title {
    flex-shrink: 0;
    font-weight: bold;
    padding: 6px 10px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
    font-size: 0.85em;
    line-height: 1.2;
}

.chart-content {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    min-height: 310px;
}

.chart-content canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}

.chart-container.full-width {
    grid-column: 1 / -1;
    min-height: 350px;
}

/* Authentication Modal Styles - Add to your existing style.css */

/* Modal Overlay */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(3px);
}

/* Modal Container */
.auth-modal {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Content */
.auth-modal-content {
    padding: 30px;
}

.auth-modal-content h2 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.5em;
    text-align: center;
    line-height: 1.3;
}

.auth-modal-content p {
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 25px;
    line-height: 1.5;
}

/* Auth Form */
.auth-form {
    margin-bottom: 30px;
}

.auth-form input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    margin-bottom: 15px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.auth-form input[type="email"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.auth-primary-btn {
    width: 100%;
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.auth-primary-btn:hover:not(:disabled) {
    background-color: #2980b9;
}

.auth-primary-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.auth-secondary-btn {
    background-color: #95a5a6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    margin-right: 10px;
    transition: background-color 0.2s ease;
}

.auth-secondary-btn:hover {
    background-color: #7f8c8d;
}

/* Auth Actions */
.auth-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

/* Benefits List */
.auth-benefits,
.auth-upgrade-teaser {
    margin-bottom: 25px;
}

.auth-benefits h4,
.auth-upgrade-teaser h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1em;
    font-weight: 600;
}

.auth-upgrade-teaser h4 {
    color: #e67e22;
}

.auth-benefits ul,
.auth-upgrade-teaser ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-benefits li,
.auth-upgrade-teaser li {
    padding: 5px 0;
    color: #555;
    font-size: 0.9em;
    line-height: 1.4;
}

.auth-benefits li::before {
    content: "✓ ";
    color: #27ae60;
    font-weight: bold;
    margin-right: 5px;
}

.auth-upgrade-teaser li::before {
    content: "⭐ ";
    color: #e67e22;
    font-weight: bold;
    margin-right: 5px;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

.auth-footer small {
    color: #95a5a6;
    font-size: 0.8em;
    line-height: 1.4;
}

/* Error Messages */
.auth-error {
    background-color: #e74c3c;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    margin-top: 5px;
    margin-bottom: 10px;
    text-align: center;
}

/* Success Messages */
.auth-success {
    background-color: #27ae60;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    margin-top: 5px;
    margin-bottom: 10px;
    text-align: center;
}

/* Loading States */
.auth-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    .auth-modal {
        margin: 20px;
        width: calc(100% - 40px);
    }

    .auth-modal-content {
        padding: 20px;
    }

    .auth-modal-content h2 {
        font-size: 1.3em;
    }

    .auth-actions {
        flex-direction: column;
    }

    .auth-secondary-btn {
        margin-right: 0;
        margin-bottom: 10px;
        width: 100%;
    }
}

/* Enhanced User Section Styles */
.user-management {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.user-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
}

.user-section h3 {
    margin-top: 0;
    margin-bottom: 30px;
    text-align: center;
    color: #2c3e50;
    font-size: 1.8em;
}

/* Welcome Message for Unauthenticated Users */
.welcome-message {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.welcome-message h2 {
    margin: 0 0 15px 0;
    font-size: 2em;
}

.welcome-message p {
    font-size: 1.1em;
    margin-bottom: 25px;
    opacity: 0.9;
}

.welcome-cta {
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.welcome-cta:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Feature Preview */
.feature-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-card {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: #3498db;
}

.feature-card h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.2em;
}

.feature-card p {
    color: #7f8c8d;
    font-size: 0.9em;
    line-height: 1.5;
    margin: 0;
}

/* Authentication Status Indicator */
.auth-status {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #2c3e50;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8em;
    z-index: 1000;
    transition: all 0.3s ease;
}

.auth-status.authenticated {
    background-color: #27ae60;
}

.auth-status.unauthenticated {
    background-color: #e74c3c;
}

/* Upgrade Prompts */
.upgrade-prompt {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

.upgrade-prompt h4 {
    margin: 0 0 10px 0;
    font-size: 1.3em;
}

.upgrade-prompt p {
    margin: 0 0 15px 0;
    opacity: 0.9;
}

.upgrade-btn {
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upgrade-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* --- Responsive Adjustments --- */
@media (max-width: 1700px) {
    .analysis-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1200px) {
    .header-top-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .tab-container {
        align-self: flex-start;
    }

    .controls {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 992px) {
    .controls {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .analysis-grid {
        grid-template-columns: 1fr;
    }

    .membership-plans {
        grid-template-columns: 1fr;
    }
}