/* ============================================================
   TYPanel — Ana Stil Dosyası
   Dark Industrial UI — Turuncu Aksanlı
   ============================================================ */

:root {
    /* Renkler */
    --orange:        #E8650A;
    --orange-light:  #FF7A1A;
    --orange-dim:    #C4530A;
    --orange-glow:   rgba(232, 101, 10, 0.18);
    --orange-subtle: rgba(232, 101, 10, 0.08);

    --bg:            #0D0E11;
    --bg-2:          #111318;
    --bg-3:          #16181F;
    --bg-4:          #1C1F28;
    --bg-card:       #151820;

    --border:        rgba(255,255,255,0.07);
    --border-orange: rgba(232, 101, 10, 0.30);

    --text-1:        #F0F1F5;
    --text-2:        #9BA3B8;
    --text-3:        #5C6480;

    --green:         #22C97A;
    --red:           #E84040;
    --blue:          #3B8BFF;
    --yellow:        #F5A623;

    /* Sidebar */
    --sidebar-w:     260px;
    --topbar-h:      58px;

    /* Fontlar */
    --font-main:     'Syne', sans-serif;
    --font-mono:     'DM Mono', monospace;

    /* Geçişler */
    --ease:          cubic-bezier(0.4, 0, 0.2, 1);
    --dur:           180ms;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; }
body {
    font-family: var(--font-main);
    background: var(--bg);
    color: var(--text-1);
    min-height: 100vh;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── SHELL ── */
.shell {
    display: flex;
    min-height: 100vh;
}

/* ══════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════ */
.sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: var(--bg-2);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 100;
    transition: transform var(--dur) var(--ease);
    overflow: hidden;
}

/* Marka alanı */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 20px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.brand-icon {
    position: relative;
    width: 38px; height: 38px;
    background: var(--orange);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(232,101,10,0.35);
}
.brand-letter {
    font-weight: 800;
    font-size: 18px;
    color: #fff;
    line-height: 1;
}
.brand-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 13px;
    border: 2px solid var(--orange);
    opacity: 0;
    animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
    0%,100% { opacity: 0; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(1.08); }
}
.brand-text { display: flex; flex-direction: column; }
.brand-name  { font-size: 15px; font-weight: 800; color: var(--text-1); letter-spacing: 0.5px; }
.brand-sub   { font-size: 10px; color: var(--text-3); font-weight: 500; letter-spacing: 0.3px; margin-top: 1px; }

/* Nav grubu */
.sidebar-nav {
    flex: 1;
    padding: 12px 12px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--bg-4) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 4px; }

.nav-group { margin-bottom: 4px; }
.nav-group + .nav-group { margin-top: 16px; }
.nav-group-label {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-3);
    padding: 0 10px 6px;
    display: block;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--dur) var(--ease);
    position: relative;
    margin-bottom: 2px;
}
.nav-item:hover {
    background: var(--bg-4);
    color: var(--text-1);
}
.nav-item.active {
    background: var(--orange-subtle);
    color: var(--orange-light);
    border: 1px solid var(--border-orange);
}
.nav-item.active .nav-icon { color: var(--orange); }
.nav-icon {
    width: 18px;
    text-align: center;
    font-size: 13px;
    flex-shrink: 0;
    color: var(--text-3);
    transition: color var(--dur);
}
.nav-item:hover .nav-icon { color: var(--text-2); }
.nav-label { flex: 1; }
.nav-badge {
    background: var(--orange);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 20px;
    font-family: var(--font-mono);
}
.nav-tag {
    font-size: 9px;
    font-weight: 700;
    font-family: var(--font-mono);
    background: var(--orange-subtle);
    color: var(--orange);
    border: 1px solid var(--border-orange);
    padding: 1px 5px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

/* Sidebar footer */
.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.sf-avatar {
    width: 32px; height: 32px;
    background: var(--orange-dim);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    flex-shrink: 0;
}
.sf-info { flex: 1; min-width: 0; }
.sf-name {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sf-role { display: block; font-size: 10px; color: var(--text-3); }
.sf-logout {
    color: var(--text-3);
    font-size: 14px;
    width: 28px; height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--dur);
    flex-shrink: 0;
}
.sf-logout:hover { color: var(--red); background: rgba(232,64,64,0.1); }

/* ══════════════════════════════════════════
   MAIN WRAP
══════════════════════════════════════════ */
.main-wrap {
    margin-left: var(--sidebar-w);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--dur) var(--ease);
}

/* ── TOPBAR ── */
.topbar {
    height: var(--topbar-h);
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }

.sidebar-toggle {
    display: flex;
    flex-direction: column;
    gap: 4.5px;
    padding: 6px;
    border-radius: 6px;
    transition: background var(--dur);
}
.sidebar-toggle:hover { background: var(--bg-4); }
.sidebar-toggle span {
    display: block;
    width: 18px; height: 2px;
    background: var(--text-2);
    border-radius: 2px;
    transition: all var(--dur);
}

.page-breadcrumb { display: flex; align-items: center; gap: 8px; }
.bc-root  { font-size: 12px; color: var(--text-3); font-weight: 600; }
.bc-sep   { font-size: 9px; color: var(--text-3); }
.bc-current { font-size: 12px; font-weight: 700; color: var(--text-2); }

.tb-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 7px;
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 600;
    transition: all var(--dur);
}
.tb-btn:hover {
    border-color: var(--border-orange);
    color: var(--orange-light);
    background: var(--orange-subtle);
}
.tb-btn.spinning i { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.tb-divider { width: 1px; height: 20px; background: var(--border); }

.tb-status { display: flex; align-items: center; gap: 6px; }
.status-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
}
.status-dot.green { background: var(--green); box-shadow: 0 0 6px var(--green); }
.status-dot.red   { background: var(--red);   box-shadow: 0 0 6px var(--red); }
.status-text { font-size: 11.5px; color: var(--text-3); font-weight: 600; }

/* ── ALERTS ── */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    font-size: 13px;
    font-weight: 500;
    border-bottom: 1px solid var(--border);
}
.alert-success { background: rgba(34,201,122,0.08); color: var(--green); }
.alert-error   { background: rgba(232,64,64,0.08);  color: var(--red); }
.alert-close {
    margin-left: auto;
    color: currentColor;
    opacity: 0.6;
    font-size: 12px;
    transition: opacity var(--dur);
}
.alert-close:hover { opacity: 1; }

/* ── CONTENT ── */
.content {
    flex: 1;
    padding: 28px 28px;
}

/* ══════════════════════════════════════════
   DASHBOARD BİLEŞENLERİ
══════════════════════════════════════════ */

/* Sayfa başlığı */
.page-header {
    margin-bottom: 24px;
}
.page-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-1);
    letter-spacing: -0.3px;
}
.page-title span { color: var(--orange); }
.page-desc {
    font-size: 12.5px;
    color: var(--text-3);
    margin-top: 4px;
    font-weight: 500;
}

/* Stat kartları */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: border-color var(--dur), transform var(--dur);
}
.stat-card:hover {
    border-color: var(--border-orange);
    transform: translateY(-1px);
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--orange);
    opacity: 0;
    transition: opacity var(--dur);
}
.stat-card:hover::before { opacity: 1; }

.stat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.stat-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-3);
    letter-spacing: 0.6px;
    text-transform: uppercase;
}
.stat-icon {
    width: 34px; height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.stat-icon.orange { background: var(--orange-subtle); color: var(--orange); }
.stat-icon.green  { background: rgba(34,201,122,0.1);  color: var(--green); }
.stat-icon.blue   { background: rgba(59,139,255,0.1);  color: var(--blue); }
.stat-icon.yellow { background: rgba(245,166,35,0.1);  color: var(--yellow); }

.stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-1);
    font-family: var(--font-mono);
    line-height: 1;
}
.stat-change {
    font-size: 11px;
    font-weight: 600;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.stat-change.up   { color: var(--green); }
.stat-change.down { color: var(--red); }
.stat-change.neutral { color: var(--text-3); }

/* İçerik grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 16px;
}

/* Panel kart */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.panel-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-1);
    display: flex;
    align-items: center;
    gap: 8px;
}
.panel-title i { color: var(--orange); font-size: 12px; }
.panel-action {
    font-size: 11px;
    color: var(--orange);
    font-weight: 600;
    transition: color var(--dur);
}
.panel-action:hover { color: var(--orange-light); }
.panel-body { padding: 0; }

/* Sipariş listesi */
.order-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 20px;
    border-bottom: 1px solid var(--border);
    transition: background var(--dur);
}
.order-item:last-child { border-bottom: none; }
.order-item:hover { background: var(--bg-3); }

.order-id {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--orange);
    font-weight: 500;
    flex-shrink: 0;
    width: 80px;
}
.order-info { flex: 1; min-width: 0; }
.order-product {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.order-meta { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.order-price {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--green);
    flex-shrink: 0;
}
.order-status {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 5px;
    flex-shrink: 0;
    letter-spacing: 0.3px;
}
.order-status.new      { background: rgba(59,139,255,0.15); color: var(--blue); }
.order-status.shipping { background: rgba(245,166,35,0.15); color: var(--yellow); }
.order-status.done     { background: rgba(34,201,122,0.15); color: var(--green); }

/* Stok uyarı listesi */
.stock-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
}
.stock-item:last-child { border-bottom: none; }
.stock-thumb {
    width: 36px; height: 36px;
    border-radius: 7px;
    background: var(--bg-4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
    font-size: 14px;
    flex-shrink: 0;
}
.stock-info { flex: 1; min-width: 0; }
.stock-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stock-sku { font-size: 10.5px; color: var(--text-3); font-family: var(--font-mono); }
.stock-count {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}
.stock-count.critical { color: var(--red); }
.stock-count.low      { color: var(--yellow); }

/* Sync log */
.sync-line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 11.5px;
}
.sync-line:last-child { border-bottom: none; }
.sync-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    margin-top: 3px;
    flex-shrink: 0;
}
.sync-dot.ok  { background: var(--green); }
.sync-dot.err { background: var(--red); }
.sync-dot.inf { background: var(--blue); }
.sync-text { flex: 1; color: var(--text-2); }
.sync-time { color: var(--text-3); font-family: var(--font-mono); font-size: 10.5px; flex-shrink: 0; }

/* ══════════════════════════════════════════
   TABLO
══════════════════════════════════════════ */
.table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
}
thead th {
    background: var(--bg-3);
    padding: 11px 16px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-3);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
tbody td {
    padding: 13px 16px;
    font-size: 12.5px;
    color: var(--text-2);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg-3); }

.td-mono { font-family: var(--font-mono); font-size: 11.5px; }
.td-bold { font-weight: 700; color: var(--text-1); }

/* ══════════════════════════════════════════
   FORM ELEMENTLERİ
══════════════════════════════════════════ */
.form-group { margin-bottom: 18px; }
.form-label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-2);
    margin-bottom: 7px;
    letter-spacing: 0.3px;
}
.form-control {
    width: 100%;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-1);
    outline: none;
    transition: border-color var(--dur), box-shadow var(--dur);
}
.form-control:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px var(--orange-glow);
}
.form-control::placeholder { color: var(--text-3); }
select.form-control { cursor: pointer; }

.form-hint { font-size: 11px; color: var(--text-3); margin-top: 5px; }

/* ══════════════════════════════════════════
   BUTONLAR
══════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    border: 1px solid transparent;
    white-space: nowrap;
}
.btn-primary {
    background: var(--orange);
    color: #fff;
    border-color: var(--orange);
}
.btn-primary:hover {
    background: var(--orange-light);
    border-color: var(--orange-light);
    box-shadow: 0 4px 14px rgba(232,101,10,0.35);
}
.btn-secondary {
    background: var(--bg-4);
    color: var(--text-2);
    border-color: var(--border);
}
.btn-secondary:hover {
    background: var(--bg-3);
    color: var(--text-1);
    border-color: rgba(255,255,255,0.15);
}
.btn-danger {
    background: transparent;
    color: var(--red);
    border-color: rgba(232,64,64,0.3);
}
.btn-danger:hover {
    background: rgba(232,64,64,0.1);
}
.btn-sm { padding: 6px 12px; font-size: 11.5px; }
.btn-icon { padding: 8px; }

/* ══════════════════════════════════════════
   BADGE / CHIP
══════════════════════════════════════════ */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.2px;
}
.chip-orange { background: var(--orange-subtle); color: var(--orange); border: 1px solid var(--border-orange); }
.chip-green  { background: rgba(34,201,122,0.1); color: var(--green); }
.chip-red    { background: rgba(232,64,64,0.1);  color: var(--red); }
.chip-blue   { background: rgba(59,139,255,0.1); color: var(--blue); }
.chip-gray   { background: var(--bg-4); color: var(--text-3); }

/* ══════════════════════════════════════════
   LOGIN SAYFASI
══════════════════════════════════════════ */
.login-page {
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.login-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(232,101,10,0.06) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 80% 80%, rgba(232,101,10,0.04) 0%, transparent 60%);
}
.login-grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.5;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 80%);
}
.login-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 40px;
    width: 380px;
    position: relative;
    z-index: 1;
    box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.login-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}
.login-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-1);
    margin-bottom: 6px;
}
.login-sub {
    font-size: 12px;
    color: var(--text-3);
    margin-bottom: 28px;
}
.login-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 11px;
    color: var(--text-3);
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-wrap { margin-left: 0; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .stats-grid { grid-template-columns: 1fr; }
    .content { padding: 16px; }
    .login-card { width: 90vw; padding: 28px 24px; }
}

/* ══════════════════════════════════════════
   YARDIMCI
══════════════════════════════════════════ */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-3);
}
.empty-state i { font-size: 36px; margin-bottom: 12px; display: block; opacity: 0.3; }
.empty-state p { font-size: 13px; }

.divider { height: 1px; background: var(--border); margin: 20px 0; }
.text-orange { color: var(--orange); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-muted  { color: var(--text-3); }
.fw-bold     { font-weight: 700; }
.mono        { font-family: var(--font-mono); }
.mt-4        { margin-top: 16px; }
.mb-4        { margin-bottom: 16px; }
.d-flex      { display: flex; }
.align-center{ align-items: center; }
.gap-2       { gap: 8px; }
.gap-3       { gap: 12px; }
.ms-auto     { margin-left: auto; }
