﻿:root {
    --stock-bg: #060a14;
    --stock-panel: #0c1324;
    --stock-panel-soft: #111a30;
    --stock-border: rgba(95, 163, 232, 0.16);
    --stock-border-strong: rgba(95, 163, 232, 0.28);
    --stock-text: #eef2ff;
    --stock-muted: #8a9abb;
    --stock-soft: #51617f;
    --stock-blue: #378add;
    --stock-blue-soft: rgba(55, 138, 221, 0.14);
    --stock-orange: #e0922a;
    --stock-green: #3b9e6e;
    --stock-red: #dd4b4b;
    --stock-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

body {
    overflow-x: hidden;
}

.main-content {
    min-height: 100vh;
}

.stock-app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
    background: radial-gradient(circle at 12% 8%, rgba(55,138,221,0.16), transparent 28%), radial-gradient(circle at 88% 4%, rgba(224,146,42,0.12), transparent 24%), linear-gradient(145deg, #050812 0%, #081120 50%, #050812 100%);
    color: var(--stock-text);
}

    .stock-app-shell.light-mode {
        --stock-bg: #eef3fb;
        --stock-panel: #ffffff;
        --stock-panel-soft: #f4f7fb;
        --stock-border: rgba(35, 75, 125, 0.14);
        --stock-border-strong: rgba(35, 75, 125, 0.24);
        --stock-text: #142033;
        --stock-muted: #5c6b82;
        --stock-soft: #6d7c91;
        background: linear-gradient(145deg, #eef3fb 0%, #f7f9fd 100%);
    }

.stock-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px 18px;
    border-right: 1px solid var(--stock-border);
    background: rgba(6, 10, 20, 0.72);
    backdrop-filter: blur(18px);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.light-mode .stock-sidebar {
    background: rgba(255, 255, 255, 0.72);
}

.stock-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    padding: 10px;
    border-radius: 18px;
}

    .stock-brand:hover {
        background: var(--stock-blue-soft);
    }

.stock-brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--stock-blue), #7f77dd);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 12px 34px rgba(55, 138, 221, 0.28);
}

.stock-brand strong,
.stock-brand small {
    display: block;
}

.stock-brand strong {
    font-size: 15px;
}

.stock-brand small {
    margin-top: 2px;
    color: var(--stock-muted);
    font-size: 11px;
}

.stock-menu {
    display: grid;
    gap: 8px;
}

.stock-menu-item {
    border: 0;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 14px;
    border-radius: 14px;
    background: transparent;
    color: var(--stock-muted);
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: 0.2s ease;
}

    .stock-menu-item span {
        width: 24px;
        height: 24px;
        display: grid;
        place-items: center;
        border-radius: 8px;
        background: rgba(255,255,255,0.04);
    }

    .stock-menu-item:hover,
    .stock-menu-item.active {
        color: var(--stock-text);
        background: var(--stock-blue-soft);
    }

        .stock-menu-item.active span {
            background: var(--stock-blue);
            color: #fff;
        }

.stock-sidebar-card {
    margin-top: auto;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--stock-border);
    background: rgba(17, 25, 46, 0.58);
    display: flex;
    gap: 12px;
}

.light-mode .stock-sidebar-card {
    background: rgba(244, 247, 251, 0.9);
}

.stock-sidebar-card strong {
    font-size: 13px;
}

.stock-sidebar-card p {
    margin-top: 5px;
    color: var(--stock-muted);
    font-size: 12px;
    line-height: 1.45;
}

.stock-status-dot {
    width: 10px;
    height: 10px;
    margin-top: 4px;
    border-radius: 50%;
    background: var(--stock-green);
    box-shadow: 0 0 0 6px rgba(59, 158, 110, 0.12);
    flex-shrink: 0;
}

.stock-main {
    padding: 28px;
    min-width: 0;
}

.stock-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.stock-eyebrow {
    color: var(--stock-orange);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.stock-topbar h1 {
    font-size: clamp(28px, 3vw, 48px);
    line-height: 1;
    margin: 0 0 8px;
    letter-spacing: -1.6px;
}

.stock-topbar span {
    color: var(--stock-muted);
}

.stock-topbar-actions,
.stock-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stock-icon-btn,
.stock-primary-btn,
.stock-soft-btn,
.quick-actions button,
.row-remove {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.stock-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--stock-panel);
    color: var(--stock-text);
    border: 1px solid var(--stock-border);
}

.stock-primary-btn,
.stock-soft-btn {
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 700;
}

.stock-primary-btn {
    background: linear-gradient(135deg, var(--stock-blue), #7f77dd);
    color: #fff;
    box-shadow: 0 16px 40px rgba(55, 138, 221, 0.22);
}

    .stock-primary-btn.full {
        width: 100%;
    }

.stock-soft-btn {
    background: var(--stock-blue-soft);
    color: var(--stock-text);
}

.stock-panel {
    display: none;
}

    .stock-panel.active {
        display: block;
        animation: stockPanelIn 0.25s ease;
    }

@keyframes stockPanelIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stock-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.stock-kpi-card,
.stock-card,
.account-card {
    border: 1px solid var(--stock-border);
    background: rgba(12, 19, 36, 0.82);
    border-radius: 24px;
    box-shadow: var(--stock-shadow);
}

.light-mode .stock-kpi-card,
.light-mode .stock-card,
.light-mode .account-card {
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 18px 50px rgba(54, 76, 108, 0.12);
}

.stock-kpi-card {
    padding: 20px;
    overflow: hidden;
    position: relative;
}

    .stock-kpi-card::after {
        content: '';
        position: absolute;
        width: 100px;
        height: 100px;
        right: -42px;
        top: -42px;
        border-radius: 50%;
        background: rgba(55, 138, 221, 0.18);
    }

    .stock-kpi-card.warning::after {
        background: rgba(224, 146, 42, 0.2);
    }

    .stock-kpi-card.success::after {
        background: rgba(59, 158, 110, 0.2);
    }

    .stock-kpi-card span,
    .stock-kpi-card small {
        display: block;
        color: var(--stock-muted);
        font-size: 13px;
    }

    .stock-kpi-card strong {
        display: block;
        font-size: 28px;
        margin: 10px 0 6px;
    }

.stock-dashboard-grid,
.stock-invoice-grid,
.report-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 16px;
}

.report-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stock-card {
    padding: 22px;
}

.stock-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 18px;
}

    .stock-card-head.compact {
        margin-bottom: 16px;
    }

.stock-card h2,
.account-card h3 {
    margin: 0;
}

.stock-card-head p,
.stock-card p,
.report-card small {
    color: var(--stock-muted);
    line-height: 1.55;
}

.stock-timeline {
    display: grid;
    gap: 14px;
}

    .stock-timeline div {
        display: grid;
        grid-template-columns: 16px 1fr;
        column-gap: 10px;
        row-gap: 3px;
        align-items: center;
        padding: 13px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.035);
    }

.light-mode .stock-timeline div {
    background: #f5f7fb;
}

.stock-timeline small {
    grid-column: 2;
    color: var(--stock-muted);
}

.timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

    .timeline-dot.green {
        background: var(--stock-green);
    }

    .timeline-dot.orange {
        background: var(--stock-orange);
    }

    .timeline-dot.blue {
        background: var(--stock-blue);
    }

    .timeline-dot.red {
        background: var(--stock-red);
    }

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

    .quick-actions button {
        min-height: 68px;
        border-radius: 18px;
        background: var(--stock-panel-soft);
        color: var(--stock-text);
        border: 1px solid var(--stock-border);
        font-weight: 800;
    }

        .quick-actions button:hover {
            border-color: var(--stock-border-strong);
            transform: translateY(-1px);
        }

.stock-search,
.stock-select,
.stock-input {
    min-height: 42px;
    border-radius: 14px;
    border: 1px solid var(--stock-border);
    background: var(--stock-panel-soft);
    color: var(--stock-text);
    padding: 0 14px;
    outline: none;
    min-width: 180px;
}

    .stock-search:focus,
    .stock-select:focus,
    .stock-input:focus {
        border-color: var(--stock-blue);
    }

.stock-table-wrap {
    overflow: auto;
    border: 1px solid var(--stock-border);
    border-radius: 18px;
}

.stock-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

    .stock-table th,
    .stock-table td {
        padding: 15px 16px;
        text-align: left;
        border-bottom: 1px solid var(--stock-border);
    }

    .stock-table th {
        color: var(--stock-muted);
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        background: rgba(255, 255, 255, 0.03);
    }

.light-mode .stock-table th {
    background: #f6f8fc;
}

.stock-table tr:last-child td {
    border-bottom: 0;
}

.stock-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
}

    .stock-badge.success {
        color: #9de8c1;
        background: rgba(59, 158, 110, 0.16);
    }

    .stock-badge.danger {
        color: #ffb4b4;
        background: rgba(221, 75, 75, 0.16);
    }

.light-mode .stock-badge.success {
    color: #16784a;
}

.light-mode .stock-badge.danger {
    color: #b52828;
}

.account-grid {
    display: grid;
    gap: 12px;
}

.account-card {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 16px;
}

.account-avatar {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: var(--stock-blue-soft);
    color: var(--stock-blue);
    font-weight: 900;
}

.account-info span,
.account-info p,
.account-balance small {
    color: var(--stock-muted);
    font-size: 12px;
}

.account-info h3 {
    margin: 3px 0;
    font-size: 16px;
}

.account-balance {
    text-align: right;
    color: #9de8c1;
}

    .account-balance.negative {
        color: #ffb4b4;
    }

.light-mode .account-balance {
    color: #16784a;
}

    .light-mode .account-balance.negative {
        color: #b52828;
    }

.stock-form-grid {
    display: grid;
    grid-template-columns: 1.4fr 1.4fr 0.6fr auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 18px;
}

    .stock-form-grid label {
        display: grid;
        gap: 7px;
        color: var(--stock-muted);
        font-size: 12px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.8px;
    }

.add-row-btn {
    min-height: 42px;
}

.invoice-summary {
    align-self: start;
    position: sticky;
    top: 28px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--stock-border);
    color: var(--stock-muted);
}

    .summary-line strong {
        color: var(--stock-text);
    }

    .summary-line.total {
        margin-bottom: 18px;
        color: var(--stock-text);
        font-size: 18px;
    }

.invoice-message {
    margin-top: 14px;
    font-size: 13px;
}

.empty-row {
    text-align: center !important;
    color: var(--stock-muted);
}

.row-remove {
    background: rgba(221, 75, 75, 0.14);
    color: #ffb4b4;
    border-radius: 10px;
    padding: 7px 10px;
}

.report-card {
    min-height: 290px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.report-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--stock-blue-soft);
    color: var(--stock-blue);
    font-weight: 900;
}

.fake-chart {
    margin-top: auto;
    height: 120px;
    display: flex;
    gap: 10px;
    align-items: end;
    padding: 14px;
    border-radius: 18px;
    background: var(--stock-panel-soft);
}

    .fake-chart i {
        flex: 1;
        display: block;
        border-radius: 999px 999px 6px 6px;
        background: linear-gradient(180deg, var(--stock-blue), #7f77dd);
    }

.fake-progress {
    height: 12px;
    border-radius: 999px;
    background: var(--stock-panel-soft);
    overflow: hidden;
    margin-top: auto;
}

    .fake-progress span {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg, var(--stock-orange), var(--stock-blue));
    }

.mini-list {
    display: grid;
    gap: 10px;
    margin-top: auto;
}

    .mini-list b {
        padding: 12px 14px;
        border-radius: 14px;
        background: var(--stock-panel-soft);
    }

@media (max-width: 1120px) {
    .stock-app-shell {
        grid-template-columns: 1fr;
    }

    .stock-sidebar {
        position: relative;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--stock-border);
    }

    .stock-menu {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        overflow-x: auto;
    }

    .stock-menu-item {
        white-space: nowrap;
    }

    .stock-sidebar-card {
        display: none;
    }

    .stock-kpi-grid,
    .report-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stock-dashboard-grid,
    .stock-invoice-grid {
        grid-template-columns: 1fr;
    }

    .invoice-summary {
        position: static;
    }
}

@media (max-width: 760px) {
    .stock-main {
        padding: 18px;
    }

    .stock-topbar,
    .stock-card-head.responsive-head,
    .stock-tools {
        flex-direction: column;
        align-items: stretch;
    }

    .stock-topbar-actions {
        width: 100%;
    }

    .stock-primary-btn {
        flex: 1;
    }

    .stock-kpi-grid,
    .report-grid,
    .quick-actions,
    .stock-form-grid {
        grid-template-columns: 1fr;
    }

    .stock-menu {
        grid-template-columns: 1fr 1fr;
    }

    .account-card {
        grid-template-columns: 48px 1fr;
    }

    .account-balance {
        grid-column: 2;
        text-align: left;
    }

    .stock-search,
    .stock-select,
    .stock-input {
        width: 100%;
        min-width: 0;
    }
}

/* ================================
   STOK CARI - MOBILE RESPONSIVE FIX
   Komple mobil/tablet uyumluluk düzeltmeleri
================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.stock-app-shell,
.stock-main,
.stock-panel,
.stock-card,
.stock-kpi-card,
.account-card,
.stock-table-wrap {
    max-width: 100%;
    min-width: 0;
}

.stock-card,
.stock-kpi-card,
.account-card {
    overflow: hidden;
}

/* Büyük tablet ve küçük laptop */
@media (max-width: 1120px) {
    .stock-app-shell {
        display: block;
        min-height: 100vh;
    }

    .stock-sidebar {
        position: relative;
        top: auto;
        height: auto;
        width: 100%;
        padding: 16px;
        border-right: 0;
        border-bottom: 1px solid var(--stock-border);
        gap: 14px;
    }

    .stock-brand {
        padding: 8px;
    }

    .stock-menu {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 6px;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .stock-menu-item {
        width: auto;
        min-width: max-content;
        flex: 0 0 auto;
        padding: 11px 13px;
        white-space: nowrap;
    }

    .stock-sidebar-card {
        display: none;
    }

    .stock-main {
        padding: 22px;
    }

    .stock-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stock-dashboard-grid,
    .stock-invoice-grid {
        grid-template-columns: 1fr;
    }

    .report-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .invoice-summary {
        position: static;
        top: auto;
    }

    .stock-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Telefon */
@media (max-width: 760px) {
    .stock-sidebar {
        padding: 12px;
    }

    .stock-brand {
        gap: 10px;
    }

    .stock-brand-mark {
        width: 40px;
        height: 40px;
        border-radius: 13px;
        font-size: 14px;
    }

    .stock-brand strong {
        font-size: 14px;
    }

    .stock-brand small {
        font-size: 10px;
    }

    .stock-menu {
        display: flex;
        grid-template-columns: none;
        margin: 0 -2px;
        padding: 2px 2px 6px;
    }

    .stock-menu-item {
        border-radius: 12px;
        padding: 10px 12px;
        font-size: 13px;
    }

        .stock-menu-item span {
            width: 22px;
            height: 22px;
            font-size: 12px;
            flex: 0 0 22px;
        }

    .stock-main {
        padding: 14px;
    }

    .stock-topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        margin-bottom: 16px;
    }

        .stock-topbar h1 {
            font-size: 28px;
            line-height: 1.08;
            letter-spacing: -0.8px;
        }

        .stock-topbar span {
            display: block;
            font-size: 14px;
            line-height: 1.5;
        }

    .stock-topbar-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 44px 1fr;
        gap: 10px;
    }

    .stock-icon-btn {
        width: 44px;
        height: 44px;
    }

    .stock-primary-btn,
    .stock-soft-btn {
        width: 100%;
        min-height: 44px;
        padding: 11px 14px;
        border-radius: 13px;
        font-size: 14px;
    }

    .stock-kpi-grid,
    .stock-dashboard-grid,
    .stock-invoice-grid,
    .report-grid,
    .quick-actions,
    .stock-form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stock-kpi-card,
    .stock-card,
    .account-card {
        border-radius: 18px;
    }

    .stock-kpi-card {
        padding: 16px;
    }

        .stock-kpi-card strong {
            font-size: 24px;
        }

    .stock-card {
        padding: 16px;
    }

    .stock-card-head,
    .stock-card-head.responsive-head,
    .stock-tools {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .stock-card h2 {
        font-size: 21px;
    }

    .stock-card-head p,
    .stock-card p {
        font-size: 14px;
    }

    .stock-search,
    .stock-select,
    .stock-input {
        width: 100%;
        min-width: 0;
        min-height: 44px;
        font-size: 14px;
    }

    .quick-actions button {
        min-height: 56px;
        border-radius: 15px;
        font-size: 14px;
    }

    .stock-table-wrap {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        border-radius: 15px;
    }

    .stock-table {
        min-width: 600px;
    }

        .stock-table th,
        .stock-table td {
            padding: 12px;
            font-size: 13px;
        }

    .account-card {
        grid-template-columns: 44px 1fr;
        align-items: flex-start;
        padding: 14px;
        gap: 12px;
    }

    .account-avatar {
        width: 44px;
        height: 44px;
        border-radius: 15px;
    }

    .account-info h3 {
        font-size: 15px;
    }

    .account-balance {
        grid-column: 1 / -1;
        text-align: left;
        padding-top: 8px;
        border-top: 1px solid var(--stock-border);
    }

    .stock-form-grid label {
        font-size: 11px;
    }

    .summary-line {
        padding: 12px 0;
        font-size: 14px;
    }

        .summary-line.total {
            font-size: 16px;
        }

    .report-card {
        min-height: auto;
    }

    .fake-chart {
        height: 100px;
        gap: 7px;
        padding: 12px;
    }

    .mini-list b {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Küçük telefonlar */
@media (max-width: 480px) {
    .stock-main {
        padding: 10px;
    }

    .stock-sidebar {
        padding: 10px;
    }

    .stock-topbar h1 {
        font-size: 24px;
    }

    .stock-eyebrow {
        font-size: 10px;
        letter-spacing: 1px;
    }

    .stock-topbar-actions {
        grid-template-columns: 40px 1fr;
    }

    .stock-icon-btn {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .stock-primary-btn,
    .stock-soft-btn {
        font-size: 13px;
        padding: 10px 12px;
    }

    .stock-card,
    .stock-kpi-card,
    .account-card {
        border-radius: 16px;
    }

    .stock-card {
        padding: 14px;
    }

    .stock-kpi-card {
        padding: 14px;
    }

    .stock-menu-item {
        padding: 9px 11px;
        font-size: 12px;
    }

    .stock-table {
        min-width: 540px;
    }

        .stock-table th,
        .stock-table td {
            padding: 10px;
            font-size: 12px;
        }

    .stock-badge {
        padding: 5px 8px;
        font-size: 11px;
    }
}
