/* KumaşçıPro Dashboard - Tekstil Üretim Takip Sistemi v4.0 */

/* Prevent FOUC - Hide layouts until JavaScript loads */
body {
    visibility: hidden;
}

body.loaded {
    visibility: visible;
}

.dashboard-container,
.dashboard-layout {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.dashboard-container.loaded,
.dashboard-layout.loaded {
    opacity: 1;
}

/* Root Variables - Dark Theme (Default) */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #0f1420;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-strong: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --blue-500: #3b82f6;
    --blue-400: #60a5fa;
    --purple-500: #a855f7;
    --purple-400: #c084fc;
    --green-400: #4ade80;
    --green-500: #22c55e;
    --red-400: #f87171;
    --yellow-400: #facc15;
    --orange-500: #f97316;
}

/* Light Theme Variables */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --glass-bg: rgba(0, 0, 0, 0.03);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-strong: rgba(255, 255, 255, 0.9);
    --text-primary: #0f172a;
    --text-secondary: #64748b;
}

[data-theme="light"] body {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f8fafc 100%);
}

[data-theme="light"] .bg-circle-1 {
    background: rgba(59, 130, 246, 0.08);
}

[data-theme="light"] .bg-circle-2 {
    background: rgba(168, 85, 247, 0.08);
}

[data-theme="light"] .bg-circle-3 {
    background: rgba(236, 72, 153, 0.04);
}

[data-theme="light"] .sidebar,
[data-theme="light"] .header,
[data-theme="light"] .top-menubar {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .nav-item {
    color: #64748b;
}

[data-theme="light"] .nav-item:hover {
    color: #0f172a;
    background: rgba(59, 130, 246, 0.1);
}

[data-theme="light"] .nav-item.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(168, 85, 247, 0.15));
    color: #0f172a;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

[data-theme="light"] .stat-card,
[data-theme="light"] .chart-card,
[data-theme="light"] .orders-card,
[data-theme="light"] .machines-card,
[data-theme="light"] .quick-stat-card,
[data-theme="light"] .activity-card {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .stat-card:hover,
[data-theme="light"] .chart-card:hover,
[data-theme="light"] .orders-card:hover,
[data-theme="light"] .machines-card:hover,
[data-theme="light"] .quick-stat-card:hover,
[data-theme="light"] .activity-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .dropdown-menu,
[data-theme="light"] .submenu {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .dropdown-item:hover {
    background: rgba(59, 130, 246, 0.1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
    color: var(--text-primary);
    overflow-x: hidden;
    /* Smooth scroll optimizasyonu */
    scroll-behavior: auto;
    margin: 0;
    padding: 0;
}

/* Scroll performans optimizasyonu */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background Animation */
.background-animation {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    /* Animation disabled for performance */
    opacity: 0.6;
}

.bg-circle-1 {
    top: 25%;
    left: -12%;
    width: 300px;
    height: 300px;
    background: rgba(59, 130, 246, 0.06);
}

.bg-circle-2 {
    bottom: 25%;
    right: -12%;
    width: 300px;
    height: 300px;
    background: rgba(168, 85, 247, 0.06);
}

.bg-circle-3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: rgba(236, 72, 153, 0.04);
}

@keyframes pulseOptimized {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.9;
    }
}

/* ===== SIDEBAR LAYOUT ===== */

/* Dashboard Container */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--glass-strong);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    border-right: 1px solid var(--glass-border);
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    will-change: scroll-position;
    transform: translateZ(0);
}

.sidebar-header {
    margin-bottom: 32px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--blue-500), var(--purple-500));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logo-text h2 {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-primary);
}

.logo-text span {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.15s ease;
    position: relative;
    margin-bottom: 8px;
}

.nav-item:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(168, 85, 247, 0.2));
    color: var(--text-primary);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.active-indicator {
    width: 8px;
    height: 8px;
    background: var(--blue-400);
    border-radius: 50%;
    margin-left: auto;
    animation: pulse 2s ease-in-out infinite;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding-top: 24px;
}

.system-status {
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 16px;
}

.status-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.status-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--green-500), #10b981);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.status-title {
  font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.status-value {
    font-size: 12px;
    color: var(--green-400);
}

.status-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.status-item {
    display: flex;
    justify-content: space-between;
}

.status-item span:last-child {
    color: var(--text-primary);
}

/* ===== TOPBAR LAYOUT ===== */

/* Dashboard Layout */
.dashboard-layout {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Menu Bar */
.top-menubar {
    background: var(--glass-strong);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 32px;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    will-change: transform;
    transform: translateZ(0);
    width: 100%;
    box-sizing: border-box;
}

/* App Logo */
.app-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: bold;
    font-size: 18px;
    color: var(--text-primary);
    white-space: nowrap;
}

/* Menu Navigation */
.menu-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.menu-item {
    position: relative;
}

.menu-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.menu-button:hover {
    background: var(--glass-bg);
    color: var(--text-primary);
}

.menu-button .chevron {
    transition: transform 0.15s ease;
}

.menu-item:hover .menu-button .chevron {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: var(--glass-strong);
    backdrop-filter: blur(0px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.menu-item:hover .dropdown-menu,
.menu-item.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-item.open .menu-button .chevron {
    transform: rotate(180deg);
}

.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.dropdown-item:hover {
    background: rgba(59, 130, 246, 0.15);
}

/* Submenu */
.has-submenu {
    position: relative;
}

.submenu {
    position: absolute;
    top: -8px;
    left: calc(100% + 8px);
    min-width: 200px;
    background: var(--glass-strong);
    backdrop-filter: blur(0px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    pointer-events: none;
}

.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

/* ===== COMMON STYLES ===== */

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: var(--glass-strong);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    border-bottom: 1px solid var(--glass-border);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
    will-change: transform;
    transform: translateZ(0);
    min-height: 72px;
    width: 100%;
    box-sizing: border-box;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.app-title {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--blue-400), var(--purple-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--glass-bg);
    padding: 10px 16px;
    border-radius: 12px;
    min-width: 300px;
}

/* Topbar search width: half of default */
.top-menubar .search-box {
    min-width: 150px;
    max-width: 150px;
}

.search-box svg {
    color: var(--text-secondary);
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 14px;
    flex: 1;
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.header-right,
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.icon-button,
.icon-btn {
    padding: 10px;
    background: var(--glass-bg);
    border: none;
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-button:hover,
.icon-btn:hover {
    background: var(--glass-border);
    color: var(--text-primary);
}

.notification-badge,
.badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.badge {
    width: 16px;
    height: 16px;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    top: 4px;
    right: 4px;
}

.user-menu,
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--glass-bg);
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: auto;
    flex-shrink: 0;
}

/* User dropdown */
.user-menu--dropdown { position: relative; }
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--glass-strong);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
    box-shadow: 0 10px 40px rgba(0,0,0,.2);
    z-index: 1000;
}
.user-menu--dropdown:hover .user-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.user-dropdown-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
}
.user-dropdown-item:hover { background: var(--glass-bg); }
.user-dropdown-logout { color: #ef4444; }

.user-menu:hover,
.user-profile:hover {
    background: var(--glass-border);
}

.user-info {
    text-align: right;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 12px;
    color: var(--text-secondary);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--blue-500), var(--purple-500));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* Content Area */
.content-area,
.dashboard-content {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    width: 100%;
    position: relative;
    z-index: 1;
    display: block;
}

.main-area {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Main element for topbar layout */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--text-secondary);
  font-size: 14px;
}

.breadcrumb span {
    color: var(--text-primary);
}

.breadcrumb span:last-child {
    font-weight: 600;
}

.welcome-section {
    margin-bottom: 24px;
}

.welcome-section h1 {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 8px;
}

.welcome-section p {
    color: var(--text-secondary);
}

/* Quick Stats Grid */
.quick-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.quick-stat-card {
    background: var(--glass-strong);
    backdrop-filter: blur(0px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.quick-stat-card[data-color="blue"] .quick-stat-icon {
    background: linear-gradient(135deg, var(--blue-500), #0ea5e9);
}

.quick-stat-card[data-color="purple"] .quick-stat-icon {
    background: linear-gradient(135deg, var(--purple-500), #ec4899);
}

.quick-stat-card[data-color="green"] .quick-stat-icon {
    background: linear-gradient(135deg, var(--green-500), #10b981);
}

.quick-stat-card[data-color="orange"] .quick-stat-icon {
    background: linear-gradient(135deg, var(--orange-500), var(--yellow-400));
}

.quick-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: white;
}

.quick-stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.quick-stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--text-primary);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--glass-strong);
    backdrop-filter: blur(0px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-change span:first-child {
    font-size: 14px;
    font-weight: 600;
}

.stat-change.positive span:first-child {
    color: var(--green-400);
}

.stat-change.negative span:first-child {
    color: var(--red-400);
}

.change-period {
    font-size: 12px;
    color: var(--text-secondary);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.green {
    background: rgba(34, 197, 94, 0.2);
    color: var(--green-400);
}

.stat-icon.blue {
    background: rgba(59, 130, 246, 0.2);
    color: var(--blue-400);
}

.stat-icon.purple {
    background: rgba(168, 85, 247, 0.2);
    color: var(--purple-400);
}

.stat-icon.orange {
    background: rgba(249, 115, 22, 0.2);
    color: var(--orange-500);
}

/* Charts */
.charts-row,
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.chart-card {
    background: var(--glass-strong);
    backdrop-filter: blur(0px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    transition: box-shadow 0.2s ease;
}

.chart-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.chart-header,
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 24px;
}

.chart-header h2,
.card-header h2,
.card-header h3 {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.chart-header p,
.card-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.card-header svg {
    color: var(--blue-400);
}

.more-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.more-btn:hover {
    background: var(--glass-bg);
    color: var(--text-primary);
}

canvas {
    max-height: 300px;
}

/* Bottom Row */
.bottom-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 24px;
}

.orders-card,
.machines-card {
    background: var(--glass-strong);
    backdrop-filter: blur(0px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    transition: box-shadow 0.2s ease;
}

.orders-card:hover,
.machines-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Orders List */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-item {
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: start;
    transition: all 0.3s ease;
}

.order-item:hover {
    background: var(--glass-border);
}

.order-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.order-info p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.order-amount {
    font-size: 12px;
    color: var(--text-secondary);
}

.order-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.order-status.blue {
    background: rgba(59, 130, 246, 0.2);
    color: var(--blue-400);
}

.order-status.green {
    background: rgba(34, 197, 94, 0.2);
    color: var(--green-400);
}

.order-status.yellow {
    background: rgba(250, 204, 21, 0.2);
    color: var(--yellow-400);
}

/* Machines List */
.machines-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.machine-item {
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 16px;
}

.machine-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.machine-name {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.active {
    background: var(--green-400);
    animation: pulse 2s ease-in-out infinite;
}

.status-dot.inactive {
    background: var(--text-secondary);
}

.machine-output {
    font-size: 12px;
    color: var(--text-secondary);
}

.machine-performance {
    margin-top: 8px;
}

.performance-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 8px;
}

.performance-label span:first-child {
    color: var(--text-secondary);
}

.performance-value {
    color: var(--green-400);
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(75, 85, 99, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green-500), #10b981);
    border-radius: 4px;
    transition: width 1s ease;
}

/* Activity Section */
.activity-section {
    display: grid;
    gap: 24px;
}

.activity-card {
    background: var(--glass-strong);
    backdrop-filter: blur(0px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
}

.view-all {
    color: var(--blue-400);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.view-all:hover {
    color: var(--blue-500);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 12px;
    background: var(--glass-bg);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.activity-item:hover {
    background: var(--glass-border);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon.blue {
    background: rgba(59, 130, 246, 0.2);
    color: var(--blue-400);
}

.activity-icon.green {
    background: rgba(34, 197, 94, 0.2);
    color: var(--green-400);
}

.activity-icon.orange {
    background: rgba(249, 115, 22, 0.2);
    color: var(--orange-500);
}

.activity-icon.purple {
    background: rgba(168, 85, 247, 0.2);
    color: var(--purple-400);
}

.activity-content {
    flex: 1;
}

.activity-content p {
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 4px;
}

.activity-time {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Theme Toggle */
.theme-toggle {
  position: relative;
}

.theme-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.15s ease;
}

.sun-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-90deg) scale(0);
}

.moon-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

[data-theme="light"] .sun-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

[data-theme="light"] .moon-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg) scale(0);
}

.theme-toggle:hover {
    transform: rotate(20deg);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card,
.chart-card,
.orders-card,
.machines-card,
.quick-stat-card,
.activity-card {
    animation: fadeIn 0.5s ease forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

/* Theme Transition */
body,
.sidebar,
.header,
.top-menubar,
.stat-card,
.chart-card,
.orders-card,
.machines-card,
.quick-stat-card,
.nav-item,
.order-item,
.machine-item,
.activity-card {
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.mobile-menu-toggle:hover {
    background: var(--glass-bg);
}

.mobile-menu-toggle svg {
    display: block;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: var(--glass-strong);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1000;
    transition: left 0.25s ease;
    overflow-y: auto;
    padding: 24px;
}

.mobile-sidebar.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.mobile-close-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
}

.mobile-close-btn:hover {
    background: var(--glass-bg);
}

.mobile-sidebar .logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-sidebar .logo-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.mobile-sidebar .logo-text h2 {
    font-size: 18px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.mobile-sidebar .logo-text span {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
}

.mobile-sidebar .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-sidebar .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.mobile-sidebar .nav-item:hover {
    background: var(--glass-bg);
    color: var(--text-primary);
}

.mobile-sidebar .nav-item.active {
    background: var(--glass-bg);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 1400px) {
    .charts-row,
    .bottom-row,
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .app-title {
        font-size: 18px;
    }
    
    .logo-text h2 {
        font-size: 18px;
    }
    
    /* Navbar adjustments for smaller tablets */
    .header {
        padding: 16px 20px;
        min-height: 68px;
    }
    
    .top-menubar {
        padding: 0 20px;
        gap: 24px;
        height: 58px;
    }
    
    .search-box {
        min-width: 160px;
        max-width: 200px;
    }
    
    .app-title {
        font-size: 20px;
        max-width: 250px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .app-logo {
        font-size: 15px;
    }
    
    .app-logo .logo-icon {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 1200px) {
    .dashboard-container {
        flex-direction: column;
    }
    
    .sidebar {
        display: none !important;
    }
    
    .mobile-menu-toggle {
        display: block;
    }

    .top-menubar {
        padding: 0 12px;
        gap: 8px;
        flex-wrap: nowrap;
        height: 56px;
    }
    
    .menu-nav {
        display: none;
    }
    
    .app-logo {
        font-size: 14px;
    }
    
    .app-logo .logo-icon {
        width: 28px;
        height: 28px;
    }
    
    .app-logo span {
        font-size: 14px;
    }
    
    .app-logo span small {
        font-size: 10px;
    }
    
    .header-left {
        flex-direction: row;
        gap: 12px;
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }
    
    .app-title {
        font-size: 16px;
        white-space: nowrap;
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .search-box {
        display: none;
    }
    
    .header-right,
    .header-actions {
        gap: 8px;
        flex-shrink: 0;
    }
    
    .icon-button,
    .icon-btn {
        padding: 8px;
        min-width: 36px;
        height: 36px;
    }
    
    .icon-button svg,
    .icon-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .user-info {
        display: none !important;
    }

    .user-name {
        display: none !important;
    }
    
    .user-menu,
    .user-profile {
        padding: 6px;
        background: transparent;
        gap: 8px;
    }
    
    .content-area,
    .main-area {
        padding: 10px;
    }
    
    .stats-grid,
    .quick-stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stat-card,
    .quick-stat-card {
        padding: 20px;
    }
    
    .welcome-section h1 {
        font-size: 24px;
    }
    
    .chart-card {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 12px 16px;
        min-height: 64px;
    }
    
    .header-left {
        gap: 8px;
        min-width: 0;
        overflow: hidden;
    }
    
    .app-title {
        font-size: 14px;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .search-box {
        display: none !important;
    }
    
    .header-right {
        gap: 6px;
    }
    
    .top-menubar .search-box {
        display: none !important;
    }
    
    .top-menubar .header-actions {
        gap: 6px;
    }
    
    .search-box {
        display: none !important;
    }
    
    .user-info {
        display: none !important;
    }
    
    .user-name {
        display: none !important;
    }
    
    .notification-badge {
        width: 6px;
        height: 6px;
    }
    
    .top-menubar {
        padding: 0 8px;
        gap: 6px;
        height: 52px;
    }
    
    .app-logo {
        font-size: 12px;
    }
    
    .app-logo .logo-icon {
        width: 24px;
        height: 24px;
    }
    
    .app-logo span {
        font-size: 12px;
    }
    
    .app-logo span small {
        font-size: 8px;
    }
    
    .header-actions {
        gap: 6px;
        flex-shrink: 0;
    }
    
    .header-actions .search-box {
        display: none !important;
    }
    
    .header-actions .icon-btn {
        padding: 6px;
        min-width: 36px;
        height: 36px;
        flex-shrink: 0;
    }
    
    .header-actions .icon-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .user-profile {
        min-width: auto;
        background: transparent;
        padding: 4px;
        gap: 6px;
        flex-shrink: 0;
    }
    
    .user-profile .user-avatar {
        margin-right: 0;
        width: 32px;
        height: 32px;
    }
    
    .user-menu {
        min-width: auto;
        background: transparent;
        padding: 4px;
        gap: 6px;
        flex-shrink: 0;
    }
}

@media (max-width: 576px) {
    .header {
        padding: 8px 10px;
        min-height: 52px;
    }
    
    .header-left {
        gap: 4px;
    }
    
    .app-title {
        font-size: 12px;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .search-box {
        display: none !important;
    }
    
    .header-right {
        gap: 4px;
    }
    
    .icon-button,
    .icon-btn {
        padding: 4px;
        min-width: 28px;
        height: 28px;
    }
    
    .icon-button svg,
    .icon-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .user-avatar {
        width: 24px;
        height: 24px;
    }
    
    .top-menubar {
        height: 48px;
        padding: 0 6px;
        gap: 4px;
    }
    
    .top-menubar .search-box {
        display: none !important;
    }
    
    .top-menubar .header-actions {
        gap: 4px;
    }
    
    .app-logo {
        font-size: 11px;
    }
    
    .app-logo .logo-icon {
        width: 20px;
        height: 20px;
    }
    
    .app-logo span {
        font-size: 11px;
    }
    
    .app-logo span small {
        display: none;
    }
    
    .icon-button,
    .icon-btn {
        padding: 4px;
        min-width: 32px;
        height: 32px;
    }
    
    .icon-button svg,
    .icon-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .user-menu,
    .user-profile {
        min-width: auto;
        background: transparent;
        padding: 2px;
        gap: 4px;
        flex-shrink: 0;
    }
    
    .user-avatar {
        width: 28px;
        height: 28px;
    }
    
    .header-right {
        gap: 4px;
        flex-shrink: 0;
    }
    
    .header-actions {
        gap: 4px;
        flex-shrink: 0;
    }
    
    .header-actions .search-box {
        display: none !important;
    }
    
    .content-area,
    .main-area {
        padding: 10px;
    }
    
    .welcome-section {
        margin-bottom: 20px;
    }
    
    .welcome-section h1 {
        font-size: 20px;
    }
    
    .welcome-section p {
        font-size: 14px;
    }
    
    .stats-grid,
    .quick-stats-grid {
        gap: 12px;
    }
    
    .stat-card,
    .quick-stat-card {
        padding: 16px;
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon,
    .quick-stat-icon {
        width: 48px;
        height: 48px;
        margin: 0 auto 12px;
    }
    
    .stat-value,
    .quick-stat-value {
        font-size: 24px;
    }
    
    .chart-card {
        padding: 16px;
    }
    
    .chart-container,
    canvas {
        max-height: 200px !important;
    }
    
    .breadcrumb {
        font-size: 12px;
        margin-bottom: 16px;
    }
    
    .order-item,
    .machine-item,
    .activity-item {
        padding: 12px;
    }
    
    .bottom-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 6px 8px;
        min-height: 48px;
    }
    
    .app-title {
        font-size: 11px;
        max-width: 60px;
    }
    
    .header-left {
        gap: 2px;
    }
    
    .header-right {
        gap: 2px;
    }
    
    .icon-button,
    .icon-btn {
        padding: 2px;
        min-width: 24px;
        height: 24px;
    }
    
    .icon-button svg,
    .icon-btn svg {
        width: 12px;
        height: 12px;
    }
    
    .user-avatar {
        width: 20px;
        height: 20px;
    }
    
    .user-menu,
    .user-profile {
        padding: 1px;
        gap: 2px;
    }
    
    .top-menubar {
        padding: 0 4px;
        gap: 2px;
        height: 44px;
    }
    
    .top-menubar .search-box {
        display: none !important;
    }
    
    .top-menubar .header-actions {
        gap: 2px;
    }
    
    .top-menubar .icon-btn {
        padding: 2px;
        min-width: 20px;
        height: 20px;
    }
    
    .top-menubar .icon-btn svg {
        width: 10px;
        height: 10px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* User Session Info Styles */
.user-session-info {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass-bg);
    margin-bottom: 0.5rem;
}

.user-session-info small {
    display: block;
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.user-session-info small:last-child {
    margin-bottom: 0;
}

.user-profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-left: 0.5rem;
}

.user-profile-info .user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    line-height: 1.2;
}

.user-profile-info .user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.2;
}

/* Sidebar Navigation Group Styles */
.sidebar-nav .nav-group {
    margin: 0.25rem 0;
}

.sidebar-nav .nav-parent {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    gap: 0.75rem;
}

.sidebar-nav .nav-parent:hover {
    background: var(--glass-bg);
    color: var(--text-primary);
}

.sidebar-nav .nav-parent svg:first-child {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.sidebar-nav .nav-parent span {
    flex: 1;
    text-align: left;
}

.sidebar-nav .nav-arrow {
    flex-shrink: 0;
    transition: transform 0.2s ease;
    width: 16px;
    height: 16px;
    margin-left: auto;
}

.sidebar-nav .nav-group.open .nav-arrow {
    transform: rotate(180deg);
}

.sidebar-nav .nav-children {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    margin: 0.25rem 0 0 0;
}

.sidebar-nav .nav-group.open .nav-children {
    max-height: 600px;
    padding: 0.25rem 0;
}

.sidebar-nav .nav-subparent.open .nav-subchildren {
    max-height: 500px;
    padding: 0.25rem 0;
}

.sidebar-nav .nav-child {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border-radius: 6px;
    margin: 0.125rem 0.5rem;
    gap: 0.5rem;
}

.sidebar-nav .nav-child:hover {
    background: var(--glass-border);
    color: var(--text-primary);
}

/* Alt menü stilleri (Kartela Modüller, Kartela Raporlar) */
.sidebar-nav .nav-subparent {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.sidebar-nav .nav-subchildren {
    margin-left: 1rem;
    padding-left: 0.5rem;
    border-left: 2px solid var(--glass-border);
}

.sidebar-nav .nav-subchildren .nav-child {
    padding-left: 3rem;
}

/* Dropdown header ve divider */
.dropdown-header {
    padding: 8px 12px;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.dropdown-header:first-child {
    margin-top: 0;
}

.dropdown-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 8px 0;
}

.sidebar-nav .nav-child svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.sidebar-nav .nav-child:hover svg {
    opacity: 1;
}

/* Dynamic Content Loading Styles */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--glass-border);
    border-top: 4px solid var(--blue-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-container p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.error-icon {
    color: #dc2626;
    margin-bottom: 1rem;
}

.error-container h2 {
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.error-container p {
    color: var(--text-secondary);
    margin: 0 0 2rem 0;
    font-size: 0.875rem;
}