/*
Theme Name: TemettuPro
Theme URI: https://temettu.pro
Author: TemettuPro Geliştirme Ekibi
Author URI: https://temettu.pro
Description: Türk yatırımcılar için temettü yatırım portalı teması. BIST hisse analizi, temettü takvimi ve AI destekli içerik otomasyonu.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: temettu-pro
Tags: financial, stocks, dividend, dark-mode, responsive
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
    --tp-primary:        #1A3C5E;
    --tp-primary-light:  #2563EB;
    --tp-accent:         #10C98F;
    --tp-negative:       #EF4444;
    --tp-warning:        #F59E0B;
    --tp-bg:             #F8FAFC;
    --tp-bg-card:        #FFFFFF;
    --tp-bg-dark:        #0A0F1E;
    --tp-text:           #1E293B;
    --tp-text-muted:     #64748B;
    --tp-border:         #E2E8F0;
    --tp-radius:         8px;
    --tp-radius-lg:      12px;
    --tp-shadow:         0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --tp-shadow-md:      0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --tp-font-sans:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --tp-font-mono:      'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    --tp-transition:     all .2s ease;
}

[data-theme="dark"] {
    --tp-bg:         #0A0F1E;
    --tp-bg-card:    #111827;
    --tp-text:       #E8EDF5;
    --tp-text-muted: #6B7A9A;
    --tp-border:     #1F2D45;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--tp-font-sans);
    background: var(--tp-bg);
    color: var(--tp-text);
    font-size: 14px;
    line-height: 1.6;
    transition: background .3s, color .3s;
}
a { color: var(--tp-primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
table { border-collapse: collapse; width: 100%; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--tp-text);
}
h1 { font-size: clamp(1.5rem, 3vw, 2rem); }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }

.tp-mono { font-family: var(--tp-font-mono); }
.tp-text-up    { color: var(--tp-accent) !important; }
.tp-text-down  { color: var(--tp-negative) !important; }
.tp-text-muted { color: var(--tp-text-muted) !important; }

/* ============================================================
   LAYOUT
   ============================================================ */
.tp-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}
.tp-grid-2   { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tp-grid-3   { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tp-grid-4   { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tp-layout   { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
@media (max-width: 1024px) { .tp-layout { grid-template-columns: 1fr; } }
@media (max-width: 768px)  { .tp-grid-2, .tp-grid-3, .tp-grid-4 { grid-template-columns: 1fr; } }

/* ============================================================
   CARD COMPONENT
   ============================================================ */
.tp-card {
    background: var(--tp-bg-card);
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius-lg);
    box-shadow: var(--tp-shadow);
    overflow: hidden;
}
.tp-card-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--tp-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.tp-card-title { font-size: 13px; font-weight: 600; }
.tp-card-body  { padding: 16px 18px; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.tp-nav {
    background: var(--tp-primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.tp-nav-inner {
    display: flex;
    align-items: center;
    height: 56px;
    gap: 4px;
}
.tp-logo {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    margin-right: 20px;
    white-space: nowrap;
    text-decoration: none;
}
.tp-logo span { color: var(--tp-accent); }
.tp-nav-link {
    padding: 0 12px;
    height: 56px;
    display: flex;
    align-items: center;
    font-size: 13px;
    color: rgba(255,255,255,.7);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: var(--tp-transition);
    white-space: nowrap;
}
.tp-nav-link:hover, .tp-nav-link.active {
    color: #fff;
    border-bottom-color: var(--tp-accent);
    text-decoration: none;
}
.tp-nav-right  { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tp-btn        { padding: 7px 14px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; border: none; transition: var(--tp-transition); }
.tp-btn-ghost  { background: rgba(255,255,255,.1); color: #fff; }
.tp-btn-ghost:hover { background: rgba(255,255,255,.2); }
.tp-btn-primary { background: var(--tp-accent); color: #fff; }
.tp-btn-primary:hover { opacity: .9; }

/* Ticker bar */
.tp-ticker {
    background: #070C1A;
    border-bottom: 1px solid rgba(255,255,255,.06);
    padding: 6px 0;
    overflow: hidden;
    white-space: nowrap;
}
.tp-ticker-inner {
    display: flex;
    gap: 24px;
    animation: tickerScroll 40s linear infinite;
}
.tp-ticker-inner:hover { animation-play-state: paused; }
@keyframes tickerScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.tp-ticker-item { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-family: var(--tp-font-mono); }
.tp-ticker-sym  { color: rgba(255,255,255,.5); }
.tp-ticker-price { color: #fff; font-weight: 600; }

/* ============================================================
   BADGES
   ============================================================ */
.tp-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}
.tp-badge-green  { background: rgba(16,201,143,.12); color: #059669; }
.tp-badge-red    { background: rgba(239,68,68,.12);   color: #DC2626; }
.tp-badge-blue   { background: rgba(37,99,235,.1);    color: #1D4ED8; }
.tp-badge-amber  { background: rgba(245,158,11,.12);  color: #B45309; }
[data-theme="dark"] .tp-badge-green { color: var(--tp-accent); }
[data-theme="dark"] .tp-badge-blue  { color: #60A5FA; }

/* ============================================================
   FINANCIAL TABLE
   ============================================================ */
.tp-table { width: 100%; font-size: 13px; }
.tp-table th {
    padding: 10px 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--tp-text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    border-bottom: 1px solid var(--tp-border);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.tp-table th:hover { color: var(--tp-text); }
.tp-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--tp-border);
    vertical-align: middle;
}
.tp-table tbody tr:hover td { background: rgba(37,99,235,.03); }
.tp-table tbody tr:last-child td { border-bottom: none; }
.tp-table .tp-mono { font-family: var(--tp-font-mono); font-size: 12px; }

/* ============================================================
   STOCK AVATAR
   ============================================================ */
.tp-stock-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ============================================================
   CHART CONTAINERS
   ============================================================ */
.tp-chart-wrap { position: relative; }
.tp-chart-controls { display: flex; gap: 4px; margin-bottom: 8px; }
.tp-chart-btn {
    padding: 4px 10px;
    border: 1px solid var(--tp-border);
    border-radius: 4px;
    font-size: 11px;
    background: none;
    color: var(--tp-text-muted);
    cursor: pointer;
    transition: var(--tp-transition);
}
.tp-chart-btn.active,
.tp-chart-btn:hover { background: var(--tp-primary); color: #fff; border-color: var(--tp-primary); }

/* ============================================================
   HERO SECTION
   ============================================================ */
.tp-hero {
    background: linear-gradient(135deg, var(--tp-primary) 0%, #0F2744 100%);
    padding: 40px 0;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}
.tp-hero::after {
    content: '';
    position: absolute;
    right: -80px;
    top: -80px;
    width: 400px;
    height: 400px;
    background: var(--tp-accent);
    opacity: .04;
    border-radius: 50%;
}
.tp-hero-title { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 800; color: #fff; margin-bottom: 8px; }
.tp-hero-sub   { color: rgba(255,255,255,.65); font-size: 14px; margin-bottom: 20px; }
.tp-hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 640px) { .tp-hero-stats { grid-template-columns: 1fr 1fr; } }
.tp-stat-card {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    padding: 14px 16px;
}
.tp-stat-val { font-size: 22px; font-weight: 700; color: #fff; font-family: var(--tp-font-mono); }
.tp-stat-lbl { font-size: 11px; color: rgba(255,255,255,.55); margin-top: 3px; }

/* ============================================================
   DIVIDEND CALENDAR
   ============================================================ */
.tp-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}
.tp-cal-head { text-align: center; font-size: 11px; color: var(--tp-text-muted); padding: 6px 0; font-weight: 600; }
.tp-cal-day {
    border: 1px solid var(--tp-border);
    border-radius: 6px;
    padding: 6px;
    min-height: 70px;
    cursor: pointer;
    transition: var(--tp-transition);
    font-size: 11px;
}
.tp-cal-day:hover { border-color: var(--tp-primary-light); background: rgba(37,99,235,.03); }
.tp-cal-day.has-div { border-top: 2px solid var(--tp-accent); }
.tp-cal-day.today   { background: rgba(37,99,235,.06); border-color: var(--tp-primary-light); }
.tp-cal-day-num     { font-weight: 600; color: var(--tp-text-muted); font-size: 10px; margin-bottom: 4px; }
.tp-cal-event       { background: rgba(16,201,143,.1); color: #059669; border-radius: 3px; padding: 1px 4px; font-size: 9px; font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-theme="dark"] .tp-cal-event { color: var(--tp-accent); }

/* ============================================================
   AI ANALYSIS BOX
   ============================================================ */
.tp-ai-box {
    background: linear-gradient(135deg, rgba(37,99,235,.06), rgba(139,92,246,.06));
    border: 1px solid rgba(37,99,235,.2);
    border-radius: var(--tp-radius-lg);
    padding: 16px;
}
.tp-ai-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--tp-primary-light);
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.tp-ai-label::before { content: '🤖'; font-size: 13px; }

/* ============================================================
   SCREENER
   ============================================================ */
.tp-screener-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tp-filter-group { display: flex; flex-direction: column; gap: 4px; }
.tp-filter-label { font-size: 11px; color: var(--tp-text-muted); font-weight: 500; }
.tp-filter-input, .tp-filter-select {
    padding: 7px 10px;
    border: 1px solid var(--tp-border);
    border-radius: 6px;
    background: var(--tp-bg-card);
    color: var(--tp-text);
    font-size: 12px;
    transition: var(--tp-transition);
}
.tp-filter-input:focus, .tp-filter-select:focus {
    outline: none;
    border-color: var(--tp-primary-light);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

/* ============================================================
   DARK MODE TOGGLE
   ============================================================ */
.tp-dark-toggle {
    width: 36px;
    height: 20px;
    border-radius: 10px;
    background: rgba(255,255,255,.2);
    border: none;
    cursor: pointer;
    position: relative;
    transition: var(--tp-transition);
}
.tp-dark-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: var(--tp-transition);
}
[data-theme="dark"] .tp-dark-toggle::after { transform: translateX(16px); }

/* ============================================================
   FOOTER
   ============================================================ */
.tp-footer {
    background: var(--tp-primary);
    color: rgba(255,255,255,.6);
    padding: 40px 0 24px;
    margin-top: 60px;
}
.tp-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
@media (max-width: 768px) { .tp-footer-grid { grid-template-columns: 1fr 1fr; } }
.tp-footer h4 { color: #fff; font-size: 13px; margin-bottom: 12px; }
.tp-footer a  { color: rgba(255,255,255,.55); font-size: 12px; display: block; margin-bottom: 6px; text-decoration: none; }
.tp-footer a:hover { color: #fff; }
.tp-footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    flex-wrap: wrap;
    gap: 8px;
}
.tp-disclaimer {
    background: rgba(255,255,255,.05);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 11px;
    color: rgba(255,255,255,.45);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.tp-mb-4  { margin-bottom: 4px; }
.tp-mb-8  { margin-bottom: 8px; }
.tp-mb-16 { margin-bottom: 16px; }
.tp-mb-24 { margin-bottom: 24px; }
.tp-mt-16 { margin-top: 16px; }
.tp-flex  { display: flex; align-items: center; }
.tp-gap-8 { gap: 8px; }
.tp-hidden { display: none !important; }
