:root {
    --bg-page: #F4F5F7;
    --midas-blue: #3A5AFE;
    --midas-blue-rgb: 58, 90, 254;
    --header-bg: #3A5AFE;
    --header-fg: #FFFFFF;
    --header-line: rgba(255, 255, 255, 0.35);
    --bg-white: #FFFFFF;
    --text-primary: #1C1C1E;
    --text-secondary: #8E8E93;
    --border-color: #E5E5EA;
}

* { box-sizing: border-box; }

body.haber-detail-page {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 12px 20px;
    display: flex;
    justify-content: center;
    height: auto !important;
    min-height: 100%;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

body.haber-detail-page .app-container {
    width: 100%;
    max-width: 1300px;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

body.haber-detail-page .app-body {
    overflow: visible !important;
    flex: 1 0 auto !important;
    min-height: auto !important;
    padding: 16px 0 32px;
}

.app-header {
    position: relative;
    background-color: var(--header-bg);
    border-radius: 20px 20px 0 0;
    padding: 0 32px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 24px;
    color: var(--header-fg);
    min-height: 72px;
}

.header-left {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    min-width: 0;
    align-self: stretch;
}

.header-title {
    display: flex;
    align-items: center;
    height: 100%;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.header-nav {
    flex: 0 0 auto;
    display: flex;
    gap: 0;
    align-items: center;
    align-self: stretch;
}

.header-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--header-fg);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
}

.header-nav-divider {
    width: 1px;
    height: 18px;
    margin: 0 16px;
    background: var(--header-line);
    flex-shrink: 0;
}

.header-right {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    align-self: stretch;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
}

.footer-copy {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    text-align: left;
}

.footer-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #1C1C1E;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-dot {
    color: var(--text-secondary);
    font-size: 13px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.25s ease;
    padding: 24px;
    box-sizing: border-box;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: #FFFFFF;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow: hidden;
    border-radius: 24px;
    transform: scale(0.96);
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-content--compact {
    max-width: 400px;
}

.modal-header {
    padding: 24px 24px 16px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--modal-header-bg, #FAFAFC);
}

.modal-header .m-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background-color: var(--modal-icon-bg, #EEF0FF);
    color: var(--modal-icon-color, var(--midas-blue));
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-date,
.modal-header .modal-date {
    margin: 4px 0 0;
    font-size: 13px;
    color: #48484A;
    font-weight: 500;
}

.modal-body {
    padding: 24px;
    overflow: auto;
    max-height: calc(90vh - 140px);
}

.modal-close-btn {
    width: 100%;
    padding: 14px;
    background-color: #F2F2F7;
    color: #1C1C1E;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-close-btn:hover {
    background-color: #E5E5EA;
}

.selection-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.selection-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background-color: #FAFAFC;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.selection-item:hover,
.selection-item.selected {
    border-color: var(--midas-blue);
    background-color: var(--calendar-soft-hover, #F0F4FF);
}

.selection-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.selection-info strong {
    font-size: 15px;
    color: var(--text-primary);
}

.selection-info span {
    font-size: 12px;
    color: var(--text-secondary);
}

.selection-prices {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    color: var(--text-secondary);
}

.haber-article {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 49px;
    text-align: left;
    box-sizing: border-box;
}

.haber-article-header,
.haber-article-body {
    text-align: left;
}

.haber-back {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1;
    color: var(--midas-blue);
    background: rgba(var(--midas-blue-rgb), 0.1);
    text-decoration: none;
    white-space: nowrap;
    z-index: 1;
}

.haber-back > i,
.haber-back > svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--midas-blue);
    stroke: var(--midas-blue);
}

.haber-back:hover { opacity: 0.85; }

.haber-cover {
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 20px;
    aspect-ratio: 16 / 9;
    background: #EEF0FF;
}

.haber-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.haber-article-header {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    min-height: 72px;
}

.haber-article-title-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    text-align: left;
    gap: 16px;
    width: 100%;
    max-width: 820px;
    padding: 0 110px;
    box-sizing: border-box;
}

.haber-article-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(var(--midas-blue-rgb), 0.1);
    color: var(--midas-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.haber-article-icon > i,
.haber-article-icon > svg {
    display: block;
    width: 28px;
    height: 28px;
    color: var(--midas-blue);
    stroke: var(--midas-blue);
}

.haber-article-title-text {
    min-width: 0;
    flex: 0 1 auto;
    width: auto;
    max-width: 640px;
}

.haber-article-header h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.3;
    color: var(--text-primary);
    text-align: left;
}

.haber-article-date {
    margin: 2px 0 0;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text-secondary);
    text-align: left;
}

.haber-article-prose.prose {
    font-size: 15px;
    line-height: 1.7;
    color: #3A3A3C;
    margin-bottom: 24px;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.haber-article-prose.prose h1 {
    margin: 0 0 0.75em;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.35;
}

.haber-article-prose.prose h2 {
    margin: 1.4em 0 0.5em;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.35;
}

.haber-article-prose.prose h3 {
    margin: 1.25em 0 0.45em;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.015em;
    line-height: 1.35;
}

.haber-article-prose.prose p {
    margin: 0 0 0.9em;
}

.haber-article-prose.prose ul,
.haber-article-prose.prose ol {
    margin: 0 0 0.9em;
    padding-left: 1.25em;
}

.haber-article-prose.prose li {
    margin-bottom: 0.25em;
}

.haber-article-prose.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1em 0;
}

.haber-article-prose.prose a {
    color: var(--midas-blue);
}

.haber-article-prose.prose blockquote {
    margin: 1.1em 0;
    padding: 10px 14px;
    border-left: 3px solid var(--midas-blue);
    background: #F8FAFF;
    color: #3A3A3C;
    font-size: 14px;
}

.haber-article-prose.prose .haber-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.25em 0;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #fff;
}

.haber-article-prose.prose table {
    width: 100%;
    min-width: 480px;
    border-collapse: collapse;
    table-layout: auto;
    font-size: 14px;
    line-height: 1.5;
    color: #3A3A3C;
    margin: 1.25em 0;
}

.haber-article-prose.prose .haber-table-wrap > table {
    margin: 0;
    min-width: 520px;
    border: 0;
}

.haber-article-prose.prose thead {
    background: #F4F5F7;
}

.haber-article-prose.prose th,
.haber-article-prose.prose td {
    border: 1px solid var(--border-color);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
}

.haber-article-prose.prose th {
    font-weight: 600;
    color: var(--text-primary);
    background: #F4F5F7;
}

.haber-article-prose.prose tbody tr:nth-child(even) td {
    background: #FAFBFC;
}

.haber-article-prose.prose .haber-table-wrap th:first-child,
.haber-article-prose.prose .haber-table-wrap td:first-child {
    border-left: 0;
}

.haber-article-prose.prose .haber-table-wrap th:last-child,
.haber-article-prose.prose .haber-table-wrap td:last-child {
    border-right: 0;
}

.haber-article-prose.prose .haber-table-wrap thead tr:first-child th {
    border-top: 0;
}

.haber-article-prose.prose .haber-table-wrap tbody tr:last-child td {
    border-bottom: 0;
}

.haber-empty {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.haber-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(28, 28, 30, 0.08);
}

.haber-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(var(--midas-blue-rgb), 0.1);
    color: var(--midas-blue);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

/* Pop-up ile aynı özet kartları (biraz daha kompakt) */
.haber-summary {
    max-width: 560px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(28, 28, 30, 0.08);
}

.haber-article-prose + .haber-summary {
    margin-top: 32px;
}

.haber-summary .haber-section {
    margin-bottom: 14px;
}

.haber-summary .haber-section-head {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 5px;
}

.haber-summary .haber-section-head > i,
.haber-summary .haber-section-head > svg {
    flex-shrink: 0;
    color: #1C1C1E;
}

.haber-summary .haber-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1C1C1E;
    margin-bottom: 5px;
}

.haber-summary .haber-section-head .haber-label {
    margin-bottom: 0;
}

.haber-summary .haber-section > p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #3A3A3C;
    font-weight: 400;
}

.haber-summary .haber-scenario {
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: none;
}

.haber-summary .haber-scenario--up {
    background: rgba(52, 199, 89, 0.08);
}

.haber-summary .haber-scenario--down {
    background: rgba(255, 59, 48, 0.08);
}

.haber-summary .haber-scenario--neutral {
    background: rgba(142, 142, 147, 0.08);
}

.haber-summary .haber-scenario .haber-label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 6px;
}

.haber-summary .trend-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 50%;
    line-height: 0;
}

.haber-summary .trend-indicator > i,
.haber-summary .trend-indicator > svg {
    display: block;
    width: 13px;
    height: 13px;
}

.haber-summary .trend-indicator.up {
    color: #34C759;
    background-color: rgba(52, 199, 89, 0.12);
}

.haber-summary .trend-indicator.down {
    color: #FF3B30;
    background-color: rgba(255, 59, 48, 0.12);
}

.haber-summary .trend-indicator.flat {
    color: #8E8E93;
    background-color: rgba(142, 142, 147, 0.12);
}

.haber-summary .haber-scenario p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #3A3A3C;
    font-weight: 400;
}

@media (max-width: 900px) {
    body.haber-detail-page { padding: 0; }
    body.haber-detail-page .app-body { padding: 12px 0 28px; }
    .haber-article { padding: 0 14px; }

    .haber-article-header {
        align-items: center;
        justify-content: flex-start;
        min-height: 0;
        gap: 14px;
        margin-bottom: 18px;
    }

    .haber-back {
        display: none !important;
    }

    .haber-article-title-row {
        justify-content: center;
        align-items: center;
        flex-direction: column;
        text-align: center;
        max-width: none;
        padding: 0;
        gap: 10px;
        width: 100%;
    }

    .haber-article-title-text {
        flex: 0 1 auto;
        max-width: none;
        text-align: center;
    }

    .haber-article-header h1 {
        font-size: 22px;
        text-align: center;
    }

    .haber-article-date {
        font-size: 13px;
        text-align: center;
    }

    .haber-article-prose.prose { font-size: 14px; }
    .haber-article-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }
    .haber-article-icon > i,
    .haber-article-icon > svg {
        width: 24px;
        height: 24px;
    }

    .footer-inner {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .footer-copy { text-align: center; }

    .footer-links {
        justify-content: center;
    }
}
