:root {
    /* 60% - Temel (Nötr) Renk - Arka planlar, kartlar, büyük boşluklar */
    --bg-primary: #2a2d3e;        /* Ana arka plan - koyu gri */
    --bg-secondary: #313351;      /* Kartlar, paneller */
    --bg-tertiary: #3a3d5c;       /* Hover durumları */
    
    /* 30% - Birincil (Marka) Renk - Başlıklar, menüler, logo */
    --primary-color: #1e3a8a;     /* Koyu lacivert - marka rengi */
    --primary-hover: #1e40af;     /* Hover durumu */
    --primary-light: #2563eb;     /* Açık varyant */
    --primary-dark: #172554;      /* Koyu varyant */
    
    /* 10% - Vurgu (Aksiyon) Rengi - CTA butonlar, linkler, uyarılar */
    --accent-color: #f59e0b;      /* Canlı turuncu - aksiyon rengi */
    --accent-hover: #d97706;      /* Hover durumu */
    --accent-light: #fbbf24;      /* Açık varyant */
    --accent-aqua: #06b6d4;       /* Alternatif aqua mavi */
    
    /* Durum Renkleri */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #06b6d4;
    
    /* Metin Renkleri */
    --text-primary: #f3f4f6;      /* Ana metin - açık */
    --text-secondary: #d1d5db;    /* İkincil metin */
    --text-muted: #9ca3af;        /* Soluk metin */
    --text-on-primary: #ffffff;   /* Birincil renk üzerinde */
    --text-on-accent: #ffffff;    /* Vurgu rengi üzerinde */
    
    /* Kenarlık ve Gölgeler */
    --border-color: #4a4d6b;
    --border-light: #3a3d5c;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    
    /* Layout */
    --header-height: 64px;
    --sidebar-width: 260px;
    
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#app {
    height: 100%;
}

/* Placeholder Styles */
input::placeholder,
textarea::placeholder,
select::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
    color: var(--text-muted);
    opacity: 1;
}

input::-moz-placeholder,
textarea::-moz-placeholder {
    color: var(--text-muted);
    opacity: 1;
}

input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
    color: var(--text-muted);
    opacity: 1;
}

input:focus::placeholder,
textarea:focus::placeholder {
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Layout */
.app-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 1.5rem;
    max-width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.menu-toggle:hover {
    color: var(--primary-color);
}

.app-brand {
    display: flex;
    align-items: center;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.25rem;
}

.brand-icon {
    font-size: 1.75rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-size: 1.25rem;
}

.btn-icon:hover {
    background: var(--bg-tertiary);
}

.app-body {
    display: flex;
    margin-top: var(--header-height);
    height: calc(100% - var(--header-height));
}

.app-sidebar {
    position: fixed;
    left: 0;
    top: var(--header-height);
    width: var(--sidebar-width);
    height: calc(100% - var(--header-height));
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    transition: width 0.3s ease, transform 0.3s ease;
    z-index: 900;
}

.sidebar-open {
    width: var(--sidebar-width);
}

.sidebar-closed {
    width: 70px;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

.sidebar-toggle-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-primary);
    transition: var(--transition);
    border-radius: var(--border-radius);
}

.sidebar-toggle-btn:hover {
    background: var(--bg-secondary);
}

.toggle-icon {
    display: block;
}

.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--header-height));
    transition: margin-left 0.3s ease;
}

.main-expanded {
    margin-left: var(--sidebar-width);
}

.main-collapsed {
    margin-left: 70px;
}

.main-content {
    flex: 1;
    padding: 2rem;
}

.app-footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    margin-top: auto;
}

.footer-content {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.sidebar-overlay {
    display: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--text-on-accent);
    border-color: var(--accent-color);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-secondary {
    background: var(--primary-color);
    color: var(--text-on-primary);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-outline {
    background: transparent;
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-outline:hover {
    background: var(--accent-color);
    color: var(--text-on-accent);
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-icon {
    font-size: 1.125rem;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    white-space: nowrap;
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
    background: rgba(6, 182, 212, 0.2);
    color: #06b6d4;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Alerts */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-icon {
    font-size: 1.25rem;
}

.alert-content strong {
    font-weight: 600;
}

/* Loading */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    gap: 1rem;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Utilities */
.text-muted {
    color: var(--text-muted);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .app-sidebar.sidebar-closed {
        width: 60px;
    }
    
    .main-collapsed {
        margin-left: 60px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .app-sidebar {
        position: fixed;
        transform: translateX(-100%);
        width: 260px;
        z-index: 1000;
    }
    
    .app-sidebar.sidebar-open {
        transform: translateX(0);
    }
    
    .app-sidebar.sidebar-closed {
        transform: translateX(-100%);
    }
    
    .app-main {
        margin-left: 0 !important;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .brand-name {
        font-size: 1rem;
    }
    
    .header-container {
        padding: 0 1rem;
    }
    
    .app-brand {
        flex: 1;
    }
    
    .header-actions {
        gap: 0.25rem;
    }
    
    .btn-icon {
        padding: 0.375rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .brand-name {
        display: none;
    }
    
    .app-header {
        height: 56px;
    }
    
    :root {
        --header-height: 56px;
    }
    
    .main-content {
        padding: 0.75rem;
    }
    
    .app-footer {
        padding: 1rem;
    }
}

/* Loading Progress */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--primary-color);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

#blazor-error-ui {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    bottom: 0;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.4);
    display: none;
    left: 0;
    padding: 0.75rem 1.5rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    border-top: 2px solid var(--error-color);
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 0.75rem;
}

#blazor-error-ui .reload {
    color: var(--accent-color);
    text-decoration: underline;
}


/* Empty Layout (Login/Register) */
.empty-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
}


/* Utility Classes */
.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }
    
    .desktop-only {
        display: none;
    }
}

/* Touch Friendly */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .btn-icon,
    .nav-item,
    .btn-icon-action {
        min-height: 44px;
        min-width: 44px;
    }
}
