/* =========================================
   1. SHARED COMPONENT STYLES (from component.css)
   ========================================= */

/* Header Styles for SSSAHAM Emiten Pages */

#app.container,
.container,
.chat-wrapper {
    max-width: 1440px;
    margin: 0 auto;
}

body {
    font-size: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* Navbar Branding */
.navbar {
    background-color: var(--navbar-bg) !important;
    transition: transform 0.3s ease-in-out;
    position: sticky;
    top: 0;
    z-index: 1030;
    padding: 0.5rem 1rem;
    color: var(--navbar-text);
}

.navbar.hidden {
    transform: translateY(-100%);
}

.navbar i.fa-chevron-left {
    font-size: 1rem;
    color: var(--navbar-text);
}

.nav-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--navbar-text);
    transition: opacity 0.3s ease;
    opacity: 1;
    font-size: 0.9rem;
    font-weight: 700;
}

.nav-title.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Unified Tab Styling */
.nav-tabs {
    /*border-bottom: 1px solid var(--border);*/
    border-bottom: 0px;
}

.nav-tabs .nav-link {
    border: none;
    color: var(--text-muted);
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    font-size: 0.9rem
}

.nav-tabs .nav-link:hover {
    color: var(--text);
    border: none;
    background: transparent;
}

.nav-tabs .nav-link.active {
    color: var(--text);
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--accent-warning);
    margin-bottom: -2px;
}

/* Page Title Standardization */
.page-title {
    font-weight: 600;
    font-size: 1rem;
}

.section-heading {
    color: var(--text);
    font-weight: 700;
    font-size: 0.9rem;
}

/* Navbar Icon Sizing */
.navbar i {
    font-size: 0.9rem;
    color: var(--navbar-text);
    cursor: pointer;
}

/* Search Panel */
#search-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--search-panel-bg);
    z-index: 2000;
    transition: right 0.3s ease-in-out;
    padding: 20px;
    color: var(--search-panel-text);
}

#search-panel.open {
    right: 0;
}

@media (min-width: 768px) {
    #search-panel {
        width: 350px;
        right: -350px;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }
}

.search-input {
    width: 100%;
    background: var(--search-input-bg);
    border: 1px solid var(--search-input-border);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--search-input-text);
    font-size: 1rem;
    outline: none;
}

.search-input::placeholder {
    color: var(--search-input-placeholder);
}

.search-input:focus {
    background: var(--search-input-bg);
    border-color: var(--search-input-border);
    box-shadow: 0 0 0 0.2rem var(--focus-ring);
}

.search-history-item {
    background: var(--search-history-bg);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
    color: var(--search-panel-text);
}

.search-history-item:hover {
    background: var(--search-history-hover);
}

/* =========================================
   2. DASHBOARD FEED SPECIFIC STYLES
   ========================================= */

/* Main Content Gradient */
.main-content {
    padding: 1.5rem 0;
    background: linear-gradient(135deg, #463CFF 0%, #7B68EE 50%, #00C6FF 100%);
    background-size: 200% 200%;
    animation: waveGradient 8s ease-in-out infinite;
}

@keyframes waveGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Filter Section */
.filter-section {
    background: var(--surface);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.filter-scroll {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filter-scroll::-webkit-scrollbar {
    display: none;
}

.filter-icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.filter-divider {
    width: 0.0625rem;
    height: 1.25rem;
    background: var(--border);
}

.filter-pill {
    background: var(--surface-alt);
    color: var(--text-muted);
    border: none;
    padding: 0.375rem 1rem;
    border-radius: 1.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s;
}

.filter-pill:hover {
    background: var(--table-hover-bg);
    color: var(--text);
}

.filter-pill.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline-line {
    position: absolute;
    left: 0.9375rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 0.0625rem;
    background: var(--border);
}

.timeline-dot {
    position: absolute;
    left: -1.3125rem;
    top: 0.375rem;
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
}

.timeline-dot.logo-dot {
    width: var(--logo-dot-size, 36px);
    height: var(--logo-dot-size, 36px);
    left: calc(-1.3125rem - ((var(--logo-dot-size, 36px) - 0.625rem) / 2));
    top: var(--logo-dot-top, 0.08rem);
    background: var(--surface-alt);
    border: 0px;
    overflow: hidden;
    z-index: 3;
}

.timeline-right .timeline-dot.logo-dot {
    right: calc(-1.3125rem - ((var(--logo-dot-size, 36px) - 0.625rem) / 2));
    left: auto;
    border: 0px;
}

.timeline-dot.logo-dot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    background: var(--surface-alt);
}

/* Timeline Right Variant (For Feed) */
.timeline-right {
    padding-left: 0;
    padding-right: 2rem;
}

.timeline-right .timeline-line {
    left: auto;
    right: 0.9375rem;
}

.timeline-right .timeline-dot {
    left: auto;
    right: -1.3125rem;
}

.timeline-right .timeline-time {
    text-align: right;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
    --logo-dot-size: 36px;
    --logo-dot-top: 0.08rem;
}

.timeline-dot.primary { background: var(--primary); }
.timeline-dot.warning { background: var(--accent-warning); }
.timeline-dot.success { background: var(--accent-positive); }

.timeline-dot.variant-blue { background: #3b82f6; }
.timeline-dot.variant-red { background: #ef4444; }
.timeline-dot.variant-purple { background: #8b5cf6; }

.timeline-time {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.timeline-card {
    background: var(--surface);
    border-radius: 0.75rem;
    padding: 1rem;
    border: 0px;
    box-shadow: none;
    color: var(--text);
    position: relative;
    z-index: 1;
}

.timeline-card.feed-clickable {
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.timeline-card.feed-clickable:hover {
    border-color: var(--accent-warning);
    transform: translateY(-1px);
}

.timeline-card.variant-blue {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.25);
}

.timeline-card.variant-red {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.25);
}

.timeline-card.variant-purple {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.25);
}

html[data-theme="dark"] .timeline-card.variant-blue {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
}

html[data-theme="dark"] .timeline-card.variant-red {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
}

html[data-theme="dark"] .timeline-card.variant-purple {
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.35);
}

.timeline-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.timeline-title.primary { color: var(--primary); }
.timeline-title.warning { color: var(--accent-warning); }
.timeline-title.success { color: var(--accent-positive); }
.timeline-title.variant-blue { color: #3b82f6; }
.timeline-title.variant-red { color: #ef4444; }
.timeline-title.variant-purple { color: #8b5cf6; }

.timeline-text {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.5;
    font-size: 0.9rem;
}

.timeline-item.upcoming {
    opacity: 1;
}

.timeline-tags {
    display: flex;
    gap: 0.75rem;
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.timeline-tags span {
    color: inherit;
}

.tag-hot { color: var(--accent-negative); }
.tag-bullish { color: var(--accent-positive); }
.tag-critical { color: var(--accent-negative); }
.tag-info { color: var(--primary); }

/* Content Section */
.content-section {
    padding: 1.5rem 0;
}

/* Trade Hour Clocks */
.trade-hour {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    justify-items: center;
}

.clock-wrapper {
    width: 100%;
    max-width: 10rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.clock {
    width: 100%;
    padding-bottom: 100%;
    /* Maintain square aspect ratio */
    border-radius: 50%;
    background: linear-gradient(145deg, var(--surface), var(--surface-alt));
    box-shadow: var(--shadow-elevated);
    position: relative;
    border: 0.25rem solid var(--border);
}

.clock::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8%;
    height: 8%;
    background: var(--text);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.clock-hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    border-radius: 0.125rem;
}

.clock-hand.hour {
    width: 4%;
    height: 22%;
    background: var(--text);
    margin-left: -2%;
}

.clock-hand.minute {
    width: 3%;
    height: 32%;
    background: var(--primary);
    margin-left: -1.5%;
}

.clock-label {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    margin-top: 0.5rem;
    color: var(--text);
}

.clock-time {
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    color: var(--text);
}

.clock-status {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    display: none;
}

.clock-status.open {
    background: var(--accent-positive);
    color: #fff;
}

.clock-status.closed {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-muted);
}
