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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.nav-tabs {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-tab {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-tab.active {
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

.nav-auth {
    display: flex;
    align-items: center;
}

.btn-auth {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-auth:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Dashboard */
.dashboard {
    display: grid;
    gap: 2rem;
}

.dashboard h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.dashboard h3 {
    color: #34495e;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

/* Account card */
.account-card, .auth-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid #e1e8ed;
}

.account-details {
    display: grid;
    gap: 1rem;
}

.account-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f3f4;
}

.account-row:last-child {
    border-bottom: none;
}

.label {
    font-weight: 600;
    color: #5f6368;
}

.value {
    font-weight: 500;
    color: #202124;
}

.value.currency {
    color: #137333;
    font-weight: 600;
}

.status-active {
    color: #137333;
    background: #e6f4ea;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.value.active {
    color: #137333;
}

.value.blocked {
    color: #d93025;
}

/* Loading and error states */
.loading {
    text-align: center;
    padding: 2rem;
    color: #5f6368;
    font-style: italic;
}

.error {
    text-align: center;
    padding: 2rem;
    color: #d93025;
}

.error p {
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    background: #1a73e8;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background: #1557b0;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #5f6368;
}

.btn-secondary:hover {
    background: #4a4f54;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Form styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #5f6368;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #1a73e8;
}

/* Action buttons */
.actions-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid #e1e8ed;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Modal styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    padding: 1.5rem 2rem 1rem;
    border-bottom: 1px solid #e1e8ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 1rem 2rem 2rem;
}

/* Auth required styles */
.auth-required {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

/* Trading page styles */
.trading-page {
    max-width: 1200px;
    margin: 0 auto;
}

.trading-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.ai-suggestions-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid #e1e8ed;
}

.ai-suggestions-section h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.3rem;
}

.suggestions-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid #667eea;
}

.suggestions-content {
    color: #333;
}

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

.suggestions-timestamp {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

.suggestions-text {
    line-height: 1.6;
}

.suggestion-item {
    margin: 0.75rem 0;
    font-size: 1.05rem;
    color: #2c3e50;
}

.suggestion-detail {
    margin: 0.25rem 0 0.25rem 1rem;
    color: #555;
    font-size: 0.95rem;
}

.suggestion-text {
    margin: 0.5rem 0;
    color: #444;
}

.suggestions-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

/* Loading progress bar */
.loading-progress {
    margin: 1rem 0;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: #e1e8ed;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    animation: loading-progress 2s ease-in-out infinite;
}

@keyframes loading-progress {
    0% {
        width: 0%;
        margin-left: 0%;
    }
    50% {
        width: 75%;
        margin-left: 10%;
    }
    100% {
        width: 0%;
        margin-left: 100%;
    }
}

.progress-text {
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 500;
}

/* Loading status */
.loading-status {
    color: #667eea;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Disabled button state */
.btn-disabled {
    background: #ccc !important;
    color: #666 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

.btn-disabled:hover {
    background: #ccc !important;
    transform: none !important;
}

/* Stored trades section */
.stored-trades-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid #e1e8ed;
}

.stored-trades-section h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.3rem;
}

.trades-container {
    margin-bottom: 1rem;
}

.trades-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.trade-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid #667eea;
    transition: all 0.2s ease;
}

.trade-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.trade-card.buy {
    border-left-color: #28a745;
}

.trade-card.sell {
    border-left-color: #dc3545;
}

.trade-card.hold {
    border-left-color: #ffc107;
}

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

.trade-symbol {
    font-size: 1.1rem;
}

.trade-symbol strong {
    color: #2c3e50;
    margin-right: 0.5rem;
}

.company-name {
    color: #666;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.trade-risk {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.risk-low {
    background: #d4edda;
    color: #155724;
}

.risk-medium {
    background: #fff3cd;
    color: #856404;
}

.risk-high {
    background: #f8d7da;
    color: #721c24;
}

.risk-unknown {
    background: #e2e3e5;
    color: #6c757d;
}

.trade-details {
    margin-bottom: 1rem;
}

.trade-rationale,
.trade-impact {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.trade-rationale strong,
.trade-impact strong {
    color: #2c3e50;
}

.trade-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
}

.trade-status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: capitalize;
}

.status-pending {
    background: #e2e3e5;
    color: #6c757d;
}

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

.status-completed {
    background: #cce5ff;
    color: #004085;
}

.trades-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.trades-summary {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e1e8ed;
    color: #666;
    font-size: 0.9rem;
}

.no-trades {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

.coming-soon-section {
    display: flex;
    align-items: flex-start;
}

.placeholder-card {
    background: white;
    border-radius: 12px;
    padding: 3rem 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid #e1e8ed;
    text-align: center;
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.placeholder-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.placeholder-card p {
    color: #5f6368;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.placeholder-card ul {
    text-align: left;
    max-width: 300px;
    margin: 0 auto;
    color: #5f6368;
}

.placeholder-card li {
    margin-bottom: 0.5rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
        margin: 1rem auto;
    }
    
    .navbar {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-brand h1 {
        font-size: 1.25rem;
    }
    
    .nav-tabs {
        gap: 1rem;
    }
    
    .nav-tab {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .account-card,
    .actions-section,
    .placeholder-card {
        padding: 1.5rem;
    }
    
    .account-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .modal-content {
        margin: 20% auto;
        width: 95%;
    }
    
    .modal-header,
    .modal-body {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .placeholder-card {
        padding: 2rem 1.5rem;
    }
    
    .placeholder-icon {
        font-size: 3rem;
    }
    
    .trading-sections {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .ai-suggestions-section,
    .stored-trades-section {
        padding: 1.5rem;
    }
    
    .suggestions-card {
        padding: 1rem;
    }
    
    .trade-card {
        padding: 1rem;
    }
    
    .trade-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .trade-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Profile Page Styles */
.profile-content {
    max-width: 800px;
    margin: 0 auto;
}

.profile-description {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.profile-form {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.form-section:last-of-type {
    margin-bottom: 20px;
    padding-bottom: 0;
    border-bottom: none;
}

.form-section h3 {
    color: #6B46C1;
    margin-bottom: 20px;
    font-size: 1.2em;
}

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

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

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #6B46C1;
    box-shadow: 0 0 0 2px rgba(107, 70, 193, 0.1);
}

select.form-control {
    cursor: pointer;
    background-color: white;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    line-height: 1.5;
}

.form-help {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 14px;
}

.form-actions {
    margin-top: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-loading {
    display: none;
}

.form-message {
    flex: 1;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
    display: none;
}

.form-message:not(:empty) {
    display: block;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 400px;
    position: relative;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.modal-close {
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 20px;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-body .form-group {
    margin-bottom: 15px;
}

.modal-body .btn {
    width: 100%;
    margin-top: 10px;
}

/* Responsive Design for Profile */
@media (max-width: 768px) {
    .profile-form {
        padding: 20px;
    }
    
    .form-section h3 {
        font-size: 1.1em;
    }
    
    .form-control {
        font-size: 16px; /* Prevent zoom on mobile */
    }
}

/* AI Suggestions Modal Specific Styles */
.suggestions-modal-content {
    max-width: 95vw !important;
    width: 95vw !important;
    max-height: 90vh;
    margin: 2.5vh auto !important;
}

.suggestions-scroll-container {
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: auto;
}

.suggestions-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 0.9rem;
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    overflow: hidden;
}

.suggestions-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 2px solid #e1e8ed;
}

.suggestions-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #e1e8ed;
    vertical-align: top;
    word-wrap: break-word;
    white-space: normal;
}

.suggestion-row:hover {
    background-color: #f8f9fa;
}

.suggestions-table .action-cell,
.suggestions-table .symbol-cell,
.suggestions-table .risk-cell {
    white-space: nowrap;
    width: 1%;
}

.suggestions-table .rationale-cell,
.suggestions-table .impact-cell {
    min-width: 200px;
    max-width: 300px;
    word-wrap: break-word;
    white-space: normal;
}

.suggestions-table .cell-content {
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.4;
}

.suggestions-raw {
    padding: 1rem;
    max-height: 70vh;
    overflow-y: auto;
}

/* Main Trades Table Styles */
.trades-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 0.9rem;
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    overflow: hidden;
}

.trades-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    border-bottom: 2px solid #e1e8ed;
}

.trades-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #e1e8ed;
    vertical-align: top;
    word-wrap: break-word;
    white-space: normal;
}

.trade-row:hover {
    background-color: #f8f9fa;
}

.trades-table .action-cell,
.trades-table .symbol-cell,
.trades-table .price-cell,
.trades-table .risk-cell,
.trades-table .status-cell {
    white-space: nowrap;
    width: 1%;
}

.trades-table .rationale-cell,
.trades-table .impact-cell {
    min-width: 200px;
    max-width: 300px;
    word-wrap: break-word;
    white-space: normal;
}

.trades-table .date-cell {
    white-space: nowrap;
    width: 1%;
}

.trades-table .company-cell {
    min-width: 120px;
    max-width: 180px;
    word-wrap: break-word;
    white-space: normal;
}

.table-loading {
    text-align: center;
    padding: 2rem;
    color: #5f6368;
}

.no-trades-message {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* Action and Risk Badge Styles */
.action-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.action-badge.buy {
    background: #d4edda;
    color: #155724;
}

.action-badge.sell {
    background: #f8d7da;
    color: #721c24;
}

.action-badge.hold {
    background: #fff3cd;
    color: #856404;
}

.risk-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.risk-badge.risk-low {
    background: #d4edda;
    color: #155724;
}

.risk-badge.risk-medium {
    background: #fff3cd;
    color: #856404;
}

.risk-badge.risk-high {
    background: #f8d7da;
    color: #721c24;
}

.risk-badge.risk-unknown {
    background: #e2e3e5;
    color: #6c757d;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    display: inline-block;
}

.status-badge.status-pending {
    background: #e2e3e5;
    color: #6c757d;
}

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

.status-badge.status-completed {
    background: #cce5ff;
    color: #004085;
}

/* Price Display Styles */
.price-available {
    color: #28a745;
    font-weight: 600;
}

.price-loading {
    color: #6c757d;
    font-style: italic;
}

.price-unavailable {
    color: #6c757d;
}

.price-error {
    color: #dc3545;
}

/* Status Actions Styles */
.status-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}

.action-buttons {
    display: flex;
    gap: 0.25rem;
}

.btn-accept {
    background: #28a745;
    color: white;
    border: none;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

.btn-accept:hover {
    background: #218838;
}

.btn-reject {
    background: #dc3545;
    color: white;
    border: none;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

.btn-reject:hover {
    background: #c82333;
}

/* Order Modal Styles */
.order-modal-content {
    max-width: 900px !important;
    width: 95% !important;
}

.order-details {
    max-height: 70vh;
    overflow-y: auto;
}

.order-summary {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #667eea;
}

.order-summary h4 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.order-summary p {
    margin-bottom: 0.25rem;
    color: #5f6368;
}

.order-confirmation {
    background: #e6f4ea;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid #c3e6cb;
}

.order-confirmation h5 {
    margin-bottom: 0.5rem;
    color: #155724;
}

.estimated-cost p {
    margin: 0;
    color: #155724;
}

.order-result {
    text-align: center;
    padding: 2rem;
}

.order-success {
    color: #155724;
}

.order-success h4 {
    margin-bottom: 1rem;
}

.order-error {
    color: #721c24;
}

.order-error h4 {
    margin-bottom: 1rem;
}

#order-confirmation-details p,
#order-error-details p {
    margin-bottom: 0.5rem;
    text-align: left;
}

/* Trading Header Styles */
.trading-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e1e8ed;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.profile-prompt {
    margin-bottom: 2rem;
}

.prompt-card {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.prompt-card h4 {
    margin-bottom: 0.5rem;
    color: #856404;
}

.prompt-card p {
    margin-bottom: 1rem;
    color: #856404;
}

/* Loading Modal Styles */
.loading-modal-content {
    max-width: 400px !important;
    text-align: center;
}

.loading-progress {
    padding: 2rem;
}

.loading-progress .progress-text {
    margin-bottom: 1rem;
    color: #667eea;
    font-weight: 600;
}

.loading-progress p {
    color: #666;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* News Page Specific Styles */
.news-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.news-header {
    text-align: center;
    margin-bottom: 2rem;
}

.news-header h2 {
    color: #333;
    margin-bottom: 0.5rem;
}

.news-header p {
    color: #666;
    font-size: 1.1rem;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 1rem;
    background: #e7f3ff;
    border-radius: 6px;
    color: #004085;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e3f2fd;
    border-top: 2px solid #2196f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.article-item {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: white;
    transition: box-shadow 0.3s ease;
}

.article-item:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.article-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
    color: #666;
    font-size: 0.9rem;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}


.article-url {
    margin-top: 0.75rem;
}

.article-url a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
}

.article-url a:hover {
    text-decoration: underline;
}

.loading-message {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

.no-articles {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.pagination span {
    font-weight: 600;
    color: #333;
}

/* Form styles for News page */
.form-group {
    margin-bottom: 1.5rem;
}

.form-text {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive design for News page */
@media (max-width: 768px) {
    .news-page {
        padding: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* Position Details Styles */
.position-details {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.position-details h5 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.position-details h6 {
    color: #6c757d;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.position-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.position-summary p {
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.position-summary strong {
    color: #495057;
}

.position-lots {
    margin-top: 1rem;
}

.position-lots-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-size: 0.85rem;
}

.position-lots-table th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    padding: 0.75rem 0.5rem;
    text-align: left;
    border-bottom: 2px solid #e9ecef;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.position-lots-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
}

.position-lots-table tr:hover {
    background: #f8f9fa;
}

.position-lots-table .profit {
    color: #28a745;
    font-weight: 600;
}

.position-lots-table .loss {
    color: #dc3545;
    font-weight: 600;
}

.position-empty {
    text-align: center;
    padding: 1.5rem;
    color: #6c757d;
    font-style: italic;
}

/* Responsive adjustments for position details */
@media (max-width: 768px) {
    .order-modal-content {
        max-width: 95% !important;
        width: 95% !important;
    }
    
    .position-summary {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .position-lots-table {
        font-size: 0.75rem;
    }
    
    .position-lots-table th,
    .position-lots-table td {
        padding: 0.5rem 0.25rem;
    }
}