/* =============================================================
   STEAMGRIND — Pure CSS3 Design System
   Sürüm: 2.0 (cPanel / Pure PHP MVP)
   Follows Specification Section 31, 35 & 36
   ============================================================= */

:root {
    --bg-main: #08090b;
    --bg-panel: #111318;
    --bg-panel-hover: #171a21;
    --bg-input: #0c0e12;
    --border-color: #242832;
    --border-light: #2e3442;
    
    --steam-blue: #1a9fff;
    --steam-blue-light: #66c0f4;
    --steam-blue-glow: rgba(26, 159, 255, 0.25);
    
    --steam-green: #a4d007;
    --steam-green-glow: rgba(164, 208, 7, 0.25);
    --steam-orange: #ff9800;
    --steam-red: #ff4757;
    --steam-purple: #9b59b6;
    --steam-cyan: #00d2d3;
    
    --text-main: #e1e7ec;
    --text-muted: #8f98a0;
    --text-dark: #626a73;
    --text-heading: #ffffff;
    
    --sidebar-width: 240px;
    --header-height: 64px;
    --radius-card: 14px;
    --radius-sm: 8px;
    --radius-pill: 9999px;
    
    --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    
    --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: var(--steam-blue-light);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: #ffffff;
}

/* App Layout */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-panel);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-color);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #ffffff;
}

.brand-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--steam-blue), #0d5a99);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 0 15px var(--steam-blue-glow);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dark);
    padding: 12px 12px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition);
}
.nav-item:hover {
    background-color: var(--bg-panel-hover);
    color: var(--text-main);
}
.nav-item.active {
    background: linear-gradient(90deg, rgba(26, 159, 255, 0.15), rgba(26, 159, 255, 0.05));
    color: var(--steam-blue-light);
    border-left: 3px solid var(--steam-blue);
    font-weight: 600;
}
.nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.nav-badge {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    background-color: var(--steam-blue);
    color: #ffffff;
}
.nav-badge.danger {
    background-color: var(--steam-red);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background-color: rgba(0,0,0,0.15);
}

.connected-account {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-main);
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}
.account-avatar {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--steam-blue);
}
.account-info {
    flex: 1;
    min-width: 0;
}
.account-name {
    font-weight: 600;
    color: var(--text-heading);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.account-sub {
    font-size: 0.72rem;
    color: var(--steam-green);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Main Area */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Top Header */
.top-header {
    height: var(--header-height);
    background-color: var(--bg-panel);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-heading);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Account Switcher Dropdown */
.account-switcher {
    position: relative;
}
.account-btn {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
}
.account-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    min-width: 220px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 150;
    overflow: hidden;
}
.account-dropdown-menu.show {
    display: block;
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-muted);
    transition: var(--transition);
}
.dropdown-item:hover {
    background: var(--bg-panel-hover);
    color: #ffffff;
}
.dropdown-item.active {
    background: rgba(26, 159, 255, 0.1);
    color: var(--steam-blue-light);
}

/* Notification Icon */
.notification-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}
.notification-btn:hover {
    color: #ffffff;
    border-color: var(--border-light);
    background: var(--bg-panel-hover);
}
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--steam-red);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-panel);
}

/* Content Container */
.page-container {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Stat Cards Row */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
}

.stat-card {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}
.stat-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.stat-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}
.stat-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    color: var(--steam-blue-light);
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
}
.stat-sub {
    font-size: 0.8rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}
.stat-sub.positive {
    color: var(--steam-green);
}

/* Dashboard Panels & Cards */
.panel {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}
.panel-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-heading);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
}
.btn-primary {
    background: linear-gradient(135deg, var(--steam-blue), #0d5a99);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--steam-blue-glow);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #2ba8ff, #116bb8);
    box-shadow: 0 6px 20px var(--steam-blue-glow);
    color: #ffffff;
}
.btn-success {
    background: linear-gradient(135deg, var(--steam-green), #5c7e10);
    color: #ffffff;
}
.btn-warning {
    background: linear-gradient(135deg, var(--steam-orange), #d35400);
    color: #ffffff;
}
.btn-danger {
    background: linear-gradient(135deg, var(--steam-red), #c0392b);
    color: #ffffff;
}
.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-main);
}
.btn-outline:hover {
    background: var(--bg-panel-hover);
    border-color: var(--border-light);
    color: #ffffff;
}
.btn-sm {
    padding: 5px 12px;
    font-size: 0.78rem;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.badge-blue {
    background: rgba(26, 159, 255, 0.15);
    color: var(--steam-blue-light);
    border: 1px solid rgba(26, 159, 255, 0.3);
}
.badge-green {
    background: rgba(164, 208, 7, 0.15);
    color: var(--steam-green);
    border: 1px solid rgba(164, 208, 7, 0.3);
}
.badge-purple {
    background: rgba(155, 89, 182, 0.2);
    color: #d7b5f5;
    border: 1px solid rgba(155, 89, 182, 0.4);
}
.badge-warning {
    background: rgba(255, 152, 0, 0.15);
    color: var(--steam-orange);
    border: 1px solid rgba(255, 152, 0, 0.3);
}
.badge-danger {
    background: rgba(255, 71, 87, 0.15);
    color: var(--steam-red);
    border: 1px solid rgba(255, 71, 87, 0.3);
}
.badge-muted {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}
.badge-foil {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.25), rgba(230, 126, 34, 0.25));
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.4);
    box-shadow: 0 0 10px rgba(241, 196, 15, 0.2);
}

/* Pulsing Status Dot */
.dot-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}
.dot-green {
    background-color: var(--steam-green);
    box-shadow: 0 0 8px var(--steam-green);
}
.dot-blue {
    background-color: var(--steam-blue);
    box-shadow: 0 0 8px var(--steam-blue);
}
.dot-warning {
    background-color: var(--steam-orange);
}
.dot-danger {
    background-color: var(--steam-red);
}
.dot-cyan {
    background-color: var(--steam-cyan);
}

/* Progress Bars */
.progress-container {
    width: 100%;
    height: 8px;
    background: var(--bg-main);
    border-radius: var(--radius-pill);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
}
.progress-bar {
    height: 100%;
    border-radius: var(--radius-pill);
    background: linear-gradient(90deg, var(--steam-blue), var(--steam-blue-light));
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.progress-bar-green {
    background: linear-gradient(90deg, #5c7e10, var(--steam-green));
}
.progress-bar-purple {
    background: linear-gradient(90deg, #8e44ad, #9b59b6);
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.table th {
    padding: 12px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
    background: rgba(0,0,0,0.15);
}
.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}
.table tbody tr {
    transition: var(--transition);
}
.table tbody tr:hover {
    background-color: var(--bg-panel-hover);
}

.mono {
    font-family: var(--font-mono);
}

/* Filters & Inputs */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 14px 18px;
}

.input-search, .select-custom {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition);
}
.input-search:focus, .select-custom:focus {
    border-color: var(--steam-blue);
    box-shadow: 0 0 0 2px var(--steam-blue-glow);
}
.input-search {
    flex: 1;
    min-width: 200px;
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 20px;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* Toasts */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}
.toast {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    animation: slideIn 0.3s ease-out;
}
.toast.success { border-left: 4px solid var(--steam-green); }
.toast.error { border-left: 4px solid var(--steam-red); }
.toast.info { border-left: 4px solid var(--steam-blue); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 0 0 50px rgba(0,0,0,0.8);
    }
    .main-content {
        margin-left: 0;
    }
    .mobile-menu-btn {
        display: block;
    }
    .page-container {
        padding: 18px;
    }
}
