/*
  iop.css — İş Ortağı Panel Stilleri
  admin.html tasarımından esinlenilmiştir.
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary:       #0f172a;
    --accent:        #10b981;
    --accent-hover:  #059669;
    --accent-light:  #d1fae5;
    --danger:        #ef4444;
    --success:       #22c55e;
    --warning:       #f59e0b;
    --bg:            #f1f5f9;
    --bg-secondary:  #f8fafc;
    --card-bg:       #ffffff;
    --border:        #e2e8f0;
    --text:          #1e293b;
    --text-light:    #64748b;
    --shadow:        0 1px 4px rgba(0,0,0,0.08);
    --shadow-hover:  0 4px 16px rgba(0,0,0,0.12);
    --radius:        8px;
    --sidebar-w:     230px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.hidden { display: none !important; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s;
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary  { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline  { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg); border-color: #94a3b8; }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 5px 11px; font-size: 0.8rem; }
.btn-lg { padding: 12px 24px; font-size: 1rem; }

/* ===== COUPONS ===== */
.iop-coupon-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.iop-coupon-stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: .3px;
}
.iop-coupon-stat-value {
    font-size: 1.4rem;
    font-weight: 700;
}
.iop-coupon-stat-active { color: var(--success); }
.iop-coupon-stat-used { color: #334155; }
.iop-coupon-stat-expired { color: var(--danger); }
.iop-coupon-code {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: #d1fae5;
    color: #065f46;
    font-weight: 800;
    letter-spacing: 0.08em;
    font-size: 0.76rem;
}
.iop-coupon-pill,
.iop-coupon-batch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
}
.iop-coupon-pill.type {
    background: #ecfeff;
    color: #0f766e;
}
.iop-coupon-pill.active {
    background: #dcfce7;
    color: #166534;
}
.iop-coupon-pill.used {
    background: #e2e8f0;
    color: #334155;
}
.iop-coupon-pill.expired {
    background: #fee2e2;
    color: #b91c1c;
}
.iop-coupon-batch {
    background: #f8fafc;
    border: 1px solid var(--border);
    color: var(--text-light);
}

/* ===== FORM ===== */
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--text-light); }
.form-group input,
.form-group select,
.form-group textarea {
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 9px 12px;
    font-size: 0.9rem;
    color: var(--text);
    background: var(--card-bg);
    outline: none;
    transition: border-color 0.15s;
    width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); }

/* ===== LOGIN ===== */
.iop-login-page {
    min-height: 100vh;
    display: flex;
    overflow: hidden;
}
.iop-brand-panel {
    width: 45%;
    background: linear-gradient(135deg, #0f172a 0%, #064e3b 60%, #065f46 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 48px 40px;
}
.iop-brand-content { position: relative; z-index: 1; max-width: 390px; width: 100%; }
.iop-brand-slider { display: flex; flex-direction: column; }
.iop-brand-slides { display: grid; }
.iop-brand-slide {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(28px, 0, 0);
    transition: opacity 0.55s ease, transform 0.55s ease, visibility 0.55s ease;
}
.iop-brand-slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
}
.iop-brand-logo {
    width: 78px;
    height: 78px;
    margin-bottom: 18px;
    border-radius: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ecfeff;
    background: linear-gradient(135deg, rgba(255,255,255,0.16), rgba(16,185,129,0.18));
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 18px 36px rgba(0,0,0,0.18);
}
.iop-brand-logo svg {
    width: 42px;
    height: 42px;
}
.iop-brand-title { font-size: 2rem; font-weight: 700; margin-bottom: 12px; line-height: 1.2; }
.iop-brand-desc { font-size: 0.95rem; color: rgba(255,255,255,0.7); margin-bottom: 32px; line-height: 1.6; }
.iop-brand-features { display: flex; flex-direction: column; gap: 12px; margin-bottom: 36px; }
.iop-brand-feature { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: rgba(255,255,255,0.85); }
.iop-brand-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    margin-bottom: 18px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.08);
    color: #d1fae5;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.iop-brand-story-title {
    font-size: 1.88rem;
    font-weight: 700;
    line-height: 1.18;
    margin-bottom: 14px;
}
.iop-brand-story-desc {
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.76);
    margin-bottom: 24px;
}
.iop-brand-visual-card {
    position: relative;
    overflow: hidden;
    margin-bottom: 22px;
    padding: 18px;
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(15,23,42,0.3));
    box-shadow: 0 20px 40px rgba(0,0,0,0.16), inset 0 1px 0 rgba(255,255,255,0.06);
}
.iop-brand-visual-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(255,255,255,0.12), transparent 42%);
    pointer-events: none;
}
.iop-brand-visual-card-alt {
    background: linear-gradient(180deg, rgba(16,185,129,0.16), rgba(15,23,42,0.28));
}
.iop-brand-visual-svg {
    display: block;
    width: 100%;
    height: auto;
}
.iop-brand-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.iop-brand-metric {
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(4px);
}
.iop-brand-metric-value {
    display: block;
    margin-bottom: 4px;
    color: #ecfeff;
    font-size: 0.98rem;
    font-weight: 700;
}
.iop-brand-metric-label {
    display: block;
    color: rgba(255,255,255,0.72);
    font-size: 0.73rem;
    line-height: 1.45;
}
.lbf-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #d1fae5;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.lbf-icon svg {
    width: 18px;
    height: 18px;
}
.iop-brand-back { display: inline-flex; align-items: center; gap: 8px; color: rgba(255,255,255,0.62); font-size: 0.85rem; text-decoration: none; transition: color 0.15s; }
.iop-brand-back-icon { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; }
.iop-brand-back-icon svg { width: 16px; height: 16px; }
.iop-brand-back:hover { color: #fff; }
.iop-brand-slider-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    margin-bottom: 16px;
}
.iop-brand-slider-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.35);
    background: transparent;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.iop-brand-slider-dot.is-active {
    background: #d1fae5;
    border-color: #d1fae5;
    transform: scale(1.18);
}
.iop-brand-slider-dot:hover {
    border-color: #ecfeff;
}
.iop-brand-orb {
    position: absolute;
    border-radius: 50%;
    background: rgba(16,185,129,0.15);
    pointer-events: none;
}
.iop-brand-orb-1 { width: 400px; height: 400px; top: -100px; right: -140px; }
.iop-brand-orb-2 { width: 260px; height: 260px; bottom: -60px; left: -80px; background: rgba(16,185,129,0.1); }

.iop-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    padding: 40px 24px;
}
.iop-login-box {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--border);
}
.iop-login-lang-wrap {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 999;
}
.iop-login-lang-wrap .iop-lang-picker {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #1e293b;
    font-size: 0.85rem;
    width: auto;
    padding: 5px 12px;
}
.iop-login-lang-wrap .iop-lang-picker:hover {
    border-color: #6366f1;
}
.iop-login-lang-wrap .iop-lang-picker .lang-picker-label { color: #1e293b; }
.iop-login-lang-wrap .iop-lang-picker .lang-arrow { color: #1e293b; }
.iop-login-lang-wrap .iop-lang-picker .lang-dropdown {
    top: calc(100% + 6px);
    bottom: auto;
    left: auto;
    right: 0;
    min-width: 170px;
}
.iop-login-header { margin-bottom: 28px; }
.iop-login-header h2 { font-size: 1.5rem; color: var(--text); margin-bottom: 4px; }
.iop-login-sub { font-size: 0.9rem; color: var(--text-light); }
.iop-login-error {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    display: none;
}
.iop-login-error.show { display: block; }

.google-auth-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
}

.google-auth-hint {
    margin: 0;
    font-size: 0.84rem;
    color: var(--text-light);
    line-height: 1.5;
}

.google-auth-button-slot {
    min-height: 40px;
}

.auth-action-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-top: 4px;
}

.auth-action-row .iop-submit-btn {
    flex: 1 1 auto;
    width: auto;
    margin-top: 0;
}

.google-auth-card-inline {
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
}

.google-auth-card-inline .google-auth-button-slot {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.google-auth-verified {
    display: none;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
}

.google-auth-avatar {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    overflow: hidden;
    background: #dbeafe;
    color: #1d4ed8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.google-auth-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.google-auth-user {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.google-auth-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}

.google-auth-email {
    font-size: 0.8rem;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.google-auth-signout {
    margin-left: auto;
    background: transparent;
    border: 1px solid rgba(29, 78, 216, 0.16);
    color: #1d4ed8;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.78rem;
    font-weight: 700;
}

.google-auth-signout:hover {
    background: rgba(29, 78, 216, 0.08);
}

.iop-input-group { margin-bottom: 18px; }
.iop-input-wrap { position: relative; display: flex; align-items: center; }
.iop-input-icon {
    position: absolute;
    left: 12px;
    color: var(--text-light);
    pointer-events: none;
    z-index: 1;
}
.iop-input-wrap input { padding-left: 38px; }
.iop-pw-toggle {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    padding: 4px;
    display: flex;
    align-items: center;
}
.iop-pw-toggle:hover { color: var(--text); }
.iop-submit-btn { width: 100%; justify-content: center; margin-top: 4px; }
.login-forgot-row {
    text-align: center;
    margin-top: 14px;
}
.login-forgot-link {
    color: #64748b;
    font-size: 0.84rem;
    text-decoration: none;
    transition: color 0.2s;
}
.login-forgot-link:hover {
    color: var(--primary);
    text-decoration: underline;
}
.iop-login-signup-row {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.iop-login-signup-label {
    font-size: 0.9rem;
    color: var(--text-light);
}
.iop-login-signup-btn {
    min-width: 126px;
    justify-content: center;
}

/* ===== LAYOUT ===== */
.iop-layout { display: flex; min-height: 100vh; }

.iop-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 40;
}
.iop-overlay.show { display: block; }

/* ===== SIDEBAR ===== */
.iop-sidebar {
    width: var(--sidebar-w);
    background: var(--primary);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 50;
    transition: transform 0.3s;
}
.iop-sidebar-header {
    padding: 20px 16px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.iop-sidebar-logo {
    width: 34px;
    height: 34px;
    margin: 0 auto 8px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #d1fae5;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
}
.iop-sidebar-logo svg { width: 20px; height: 20px; }
.iop-sidebar-header h2 { font-size: 0.85rem; font-weight: 700; color: #fff; line-height: 1.3; }
.iop-sidebar-user {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
    line-height: 1.45;
    word-break: break-word;
}
.iop-nav { flex: 1; padding: 6px 0; overflow-y: auto; }
.iop-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 0.85rem;
    transition: all 0.15s;
}
.iop-nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.iop-nav-item.active { background: var(--accent); color: #fff; }
/* Profil eksik badge */
.iop-nav-badge {
    display: inline;
    margin-left: 6px;
    color: #ef4444;
    font-weight: 900;
    font-size: 0.75rem;
    letter-spacing: -1px;
    vertical-align: middle;
    animation: iop-badge-pulse 1.4s ease-in-out infinite;
}
@keyframes iop-badge-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}
.iop-sidebar-footer { padding: 10px 16px; border-top: 1px solid rgba(255,255,255,0.1); }
.iop-sidebar-footer button { background: none; border: none; color: rgba(255,255,255,0.6); cursor: pointer; font-size: 0.85rem; display: flex; align-items: center; gap: 6px; }
.iop-sidebar-footer button:hover { color: #fff; }
.iop-logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
    margin-top: 4px;
}
.iop-logout-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

/* ===== MAIN ===== */
.iop-main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.iop-topbar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 30;
}
.iop-topbar h1 { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.iop-topbar-user {
    font-size: 0.82rem;
    color: var(--text-light);
    max-width: 48%;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.iop-mobile-menu-btn { display: none; background: none; border: none; font-size: 1.3rem; cursor: pointer; padding: 4px; }
.iop-content { flex: 1; padding: 24px; }

/* ===== FİNANSAL KARTLAR ===== */
.iop-fin-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}
.iop-fin-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 8px 10px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 7px;
    position: relative;
    overflow: hidden;
}
.iop-fin-icon { font-size: 1rem; flex-shrink: 0; }
.iop-fin-body { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.iop-fin-lbl { font-size: 0.62rem; color: var(--text-light); font-weight: 500; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }
.iop-fin-val { font-size: 0.95rem; font-weight: 800; letter-spacing: -0.3px; color: var(--text); white-space: nowrap; }
.iop-fin-sub { font-size: 0.58rem; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fin-satis-card { border-left: 3px solid #6366f1; border-top: none; }
.fin-satis-card .iop-fin-val { color: #6366f1; }
.fin-hakedis-card { border-left: 3px solid var(--accent); border-top: none; }
.fin-hakedis-card .iop-fin-val { color: var(--accent); }
.fin-odenen-card { border-left: 3px solid #0ea5e9; border-top: none; }
.fin-odenen-card .iop-fin-val { color: #0ea5e9; }
.fin-bakiye-card { border-left: 3px solid #f59e0b; border-top: none; }
.fin-bakiye-card .iop-fin-val { color: #f59e0b; }
@media (max-width: 900px) { .iop-fin-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .iop-fin-grid { grid-template-columns: repeat(2, 1fr); } }

/* ===== STATS ===== */
.iop-stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 0; }

/* Dashboard wrapper: sol (fin + stat kartlar) + sağ (grafikler) */
.iop-dashboard-wrapper { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.iop-dashboard-left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.iop-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 16px; min-width: 392px; }
.iop-donut-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: var(--card-bg); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); border: 1px solid var(--border); min-width: 180px; }
.iop-donut-wrap canvas { display: block; max-width: 100%; height: auto; }
.iop-donut-caption { font-size: 0.83rem; font-weight: 600; color: var(--text-light); text-align: center; }
.iop-chart-tooltip { position: fixed; z-index: 2000; min-width: 148px; max-width: 220px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(148,163,184,0.22); background: rgba(15,23,42,0.96); color: #f8fafc; box-shadow: 0 18px 40px rgba(15,23,42,0.28); pointer-events: none; }
.iop-chart-tooltip-title { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 700; }
.iop-chart-tooltip-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; }
.iop-chart-tooltip-value { margin-top: 6px; font-size: 1rem; font-weight: 700; }
.iop-chart-tooltip-sub { margin-top: 3px; font-size: 0.76rem; color: #cbd5e1; }
.iop-chart-tooltip-note { margin-top: 6px; font-size: 0.78rem; line-height: 1.35; color: #e2e8f0; }
.iop-stat-card { background: var(--card-bg); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); border: 1px solid var(--border); transition: border-color 0.15s, box-shadow 0.15s; }
.iop-stat-card.stat-active { border-color: var(--accent,#0ea5e9); box-shadow: 0 0 0 2px rgba(14,165,233,0.25); }
.iop-stat-label { font-size: 0.78rem; color: var(--text-light); margin-bottom: 4px; font-weight: 500; }
.iop-stat-value { font-size: 1.8rem; font-weight: 700; }
.iop-accent  { color: var(--accent); }
.iop-success { color: var(--success); }
.iop-warning { color: var(--warning); }
.iop-danger  { color: var(--danger); }

/* ===== CARD ===== */
.iop-card { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); padding: 20px; margin-bottom: 20px; }
.iop-card-title { font-size: 0.95rem; font-weight: 700; color: var(--text); display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }

.iop-card-recent-licenses {
    padding-left: 2px;
    padding-right: 2px;
}

.iop-card-recent-licenses .iop-card-title {
    padding-left: 18px;
    padding-right: 18px;
}

/* Müşterilerim card — compact */
#page-lisanslar > .iop-card { padding: 10px; }
#page-lisanslar > .iop-card > .table-wrap {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}
#page-lisanslar > .iop-card > .table-wrap table { width: 100%; }

/* ===== TABLE ===== */
.table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
thead th { background: var(--bg); padding: 10px 12px; text-align: left; font-size: 0.78rem; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: .4px; border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg); }
tfoot td { padding: 10px 12px; border-top: 2px solid var(--border); background: #eef2ff; color: var(--text); font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
#son-lisanslar-footer-odeme,
#son-lisanslar-footer-hakedis,
#lisanslar-footer-odeme,
#lisanslar-footer-hakedis,
#lisanslar-footer-odenen,
#lisanslar-footer-bakiye { color: var(--accent); }

/* ===== COLUMN FILTERS ===== */
.col-filter-th {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.col-filter-th:hover {
    background: rgba(79, 70, 229, 0.06);
}

.col-filter-icon {
    display: inline-block;
    margin-left: 5px;
    opacity: 0.45;
    vertical-align: middle;
    transition: opacity 0.15s, color 0.15s, transform 0.15s;
}

.col-filter-th:hover .col-filter-icon,
.col-filter-th.col-filter-active .col-filter-icon,
.col-filter-th.col-filter-open .col-filter-icon {
    opacity: 1;
}

.col-filter-th.col-filter-open .col-filter-icon {
    transform: rotate(180deg);
}

.col-filter-th.col-filter-active .col-filter-icon {
    color: var(--accent);
}

.col-filter-th.col-filter-active {
    position: relative;
}

.col-filter-th.col-filter-active::after {
    content: '';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 1.5px var(--card-bg, #fff);
    pointer-events: none;
}

.col-filter-dropdown {
    position: absolute;
    z-index: 9999;
    min-width: 220px;
    max-width: min(280px, calc(100vw - 24px));
    padding: 10px;
    background: var(--card-bg, #fff);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14);
    animation: iopColFilterIn 0.12s ease;
}

@keyframes iopColFilterIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.col-filter-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.col-filter-input {
    width: 100%;
    height: 32px;
    padding: 0 10px;
    font-size: 0.78rem;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--card-bg, #fff);
    color: var(--text);
    outline: none;
    box-sizing: border-box;
}

.col-filter-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.col-filter-input.col-filter-right {
    text-align: right;
}

.col-filter-clear {
    flex: 0 0 auto;
    width: 30px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--bg);
    color: var(--text-light);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.col-filter-clear:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(79, 70, 229, 0.06);
}

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.badge-active   { background: #dcfce7; color: #15803d; }
.badge-inactive { background: #f1f5f9; color: #64748b; }
.badge-expired  { background: #fef2f2; color: #dc2626; }

/* ===== PAGINATOR ===== */
.iop-paginator { display: flex; gap: 4px; flex-wrap: wrap; padding: 14px 0 0; }
.iop-paginator button { padding: 4px 10px; font-size: 0.8rem; border: 1px solid var(--border); background: var(--bg); border-radius: 5px; cursor: pointer; }
.iop-paginator button.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== TOAST ===== */
.iop-toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.iop-toast {
    background: var(--primary);
    color: #fff;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 0.875rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: toastIn 0.3s ease;
    max-width: 320px;
}
.iop-toast.success { background: #065f46; }
.iop-toast.error   { background: var(--danger); }
.iop-toast.warning { background: #92400e; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }

/* ===== PROFIL ALERT ===== */
.iop-alert { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; font-size: 0.9rem; }
.iop-alert-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.iop-alert-error   { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

/* ===== PROFIL SOCIAL ===== */
.iop-profile-split-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.iop-profile-split-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.iop-social-card .iop-card-title {
    align-items: center;
}

.iop-social-table-wrap {
    flex: 1;
}

.iop-social-table-wrap td:last-child,
.iop-social-table-wrap th:last-child {
    width: 132px;
    text-align: right;
}

.iop-social-platform {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text);
}

.iop-social-platform-icon {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1px solid var(--border);
    font-size: 0.9rem;
}

.iop-social-link {
    color: var(--accent);
    text-decoration: none;
    word-break: break-word;
}

.iop-social-link:hover {
    text-decoration: underline;
}

.iop-social-actions {
    display: inline-flex;
    justify-content: flex-end;
    gap: 8px;
}

.iop-social-actions .btn {
    min-width: 56px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .iop-brand-panel { display: none; }
    .iop-form-panel { width: 100%; }
    .iop-profile-split-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .iop-main { margin-left: 0; }
    .iop-sidebar { transform: translateX(-100%); }
    .iop-sidebar.open { transform: translateX(0); }
    .iop-mobile-menu-btn { display: block; }
    .iop-stat-grid { grid-template-columns: 1fr 1fr; }
    .iop-dashboard-wrapper { flex-direction: column; }
    .iop-chart-grid { width: 100%; min-width: 0; }
    .iop-donut-wrap { width: 100%; }
}
@media (max-width: 480px) {
    .iop-stat-grid { grid-template-columns: 1fr; }
    .iop-chart-grid { grid-template-columns: 1fr; }
    .iop-donut-wrap { flex-direction: column; }
    .iop-content { padding: 16px; }
    .iop-kazanc-amount { font-size: 2rem; }
    .iop-login-signup-row { flex-direction: column; }
    .iop-login-signup-btn { width: 100%; }
    .iop-brand-story-title { font-size: 1.6rem; }
    .iop-brand-metrics { grid-template-columns: 1fr; }
    .iop-social-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ===== TREE EXPAND ===== */
.iop-row-expand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    cursor: pointer;
    color: var(--accent);
    font-size: 0.6rem;
    user-select: none;
    margin-right: 5px;
    background: var(--accent-light);
    flex-shrink: 0;
    vertical-align: middle;
}
.iop-detail-child-row > td {
    background: #f8fafc !important;
    padding: 0 !important;
    border: 1.5px solid #111827 !important;
    border-top: 0 !important;
}
.iop-detail-inner {
    padding: 10px 16px 10px 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 18px 28px;
    border-left: 1.5px solid #111827;
    font-size: 0.82rem;
    animation: iopFadeIn 0.15s ease;
    box-shadow: inset 0 0 0 1px rgba(15,23,42,0.08);
}
@keyframes iopFadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.iop-detail-item { display: flex; flex-direction: column; gap: 2px; min-width: 130px; }
.iop-detail-label { font-size: 0.7rem; color: var(--text-light); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.iop-detail-value { color: var(--text); font-weight: 600; font-size: 0.84rem; }
.iop-detail-value a { color: var(--accent); text-decoration: none; }
.iop-detail-value a:hover { text-decoration: underline; }
.iop-detail-child-row > td:nth-child(2),
.iop-detail-child-row > td:nth-child(3) {
    text-align: right;
}
.lisans-row { cursor: pointer; }
.lisans-row td:first-child { white-space: nowrap; }
.lisans-row.row-expanded { background: #f8fafc; }
.lisans-row.row-expanded:hover { background: #f1f5f9 !important; }
.lisans-row.row-expanded + .iop-detail-child-row > td { border-top: 1.5px solid #111827 !important; }

/* ===== LANGUAGE SELECTOR ===== */
.iop-lang-wrap { margin-top: 10px; }

.iop-lang-picker {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 24px;
    padding: 5px 12px;
    cursor: pointer;
    font-size: 0.82rem;
    color: #fff;
    user-select: none;
    width: 100%;
    box-sizing: border-box;
}
.iop-lang-picker .lang-picker-flag { width: 1.2em; height: 0.9em; border-radius: 2px; flex-shrink: 0; }
.iop-lang-picker .lang-picker-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iop-lang-picker .lang-arrow { font-size: 0.6rem; opacity: 0.7; transition: transform 0.2s; margin-left: auto; }
.iop-lang-picker.open .lang-arrow { transform: rotate(180deg); }

.iop-lang-picker .lang-dropdown {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
    padding: 5px;
    display: none;
    max-height: 240px;
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 9999;
    animation: iop-fadeUp 0.18s ease;
}
.iop-lang-picker .lang-dropdown::-webkit-scrollbar { width: 4px; }
.iop-lang-picker .lang-dropdown::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.iop-lang-picker.open .lang-dropdown { display: block; }

.iop-lang-picker .lang-option {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 9px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #1e293b;
    transition: background 0.12s;
}
.iop-lang-picker .lang-option:hover { background: #f1f5f9; }
.iop-lang-picker .lang-option.active { background: #6366f1; color: #fff; }

@keyframes iop-fadeUp {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Profil sayfası dikey boşluk azaltma */
#page-profil .iop-card { padding: 14px 16px; }
#page-profil .iop-card-title { margin-bottom: 10px; }
#page-profil .form-group { gap: 3px; }
#page-profil .form-group label { font-size: 0.78rem; }
#page-profil .form-group input,
#page-profil .form-group select,
#page-profil .form-group textarea { padding: 6px 10px; font-size: 0.85rem; }

/* Profil formu responsive grid */
@media (max-width: 900px) {
    #page-profil .iop-card form [style*="repeat(4,1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 560px) {
    #page-profil .iop-card form [style*="repeat(4,1fr)"] {
        grid-template-columns: 1fr !important;
    }
}
.iop-lang-select option { color: #1e293b; background: #fff; }

/* reCAPTCHA v3 badge — yandan açılır */
.grecaptcha-badge {
    visibility: visible !important;
    opacity: 0.5 !important;
    transform: scale(0.95) !important;
    transform-origin: right bottom !important;
    box-shadow: none !important;
}
.grecaptcha-badge:hover {
    opacity: 1 !important;
}

/* ===== MODAL ===== */
.iop-modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45); z-index: 9000;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.iop-modal-overlay.hidden { display: none !important; }
.iop-modal {
    background: var(--card-bg); border-radius: 12px;
    padding: 24px; width: 100%; max-width: 560px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}
.iop-modal h3 {
    font-size: 1.05rem; margin: 0;
}
@media (max-width: 600px) {
    .iop-coupon-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .iop-coupon-summary-grid {
        grid-template-columns: 1fr;
    }

    .iop-modal { padding: 16px; max-width: 100%; }
    #alt-ortak-ozet-kartlar { grid-template-columns: repeat(2, 1fr) !important; }
}
