:root {
    --bg-color: #0d1117;
    --card-bg: rgba(22, 27, 34, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --primary: #58a6ff;
    --secondary: #161b22;
    --text-main: #f0f6fc;
    --text-dim: #8b949e;

    /* Priority Colors */
    --p-high: #ff7b72;
    --p-medium: #d29922;
    --p-low: #3fb950;

    /* Dinamik Renk İçin */
    --accent-gradient: linear-gradient(135deg, var(--primary), rgba(255, 255, 255, 0.5));
    --card-gradient: linear-gradient(145deg, rgba(33, 38, 45, 0.4), rgba(13, 17, 23, 0.8));

    /* Layout */
    --container-max: 900px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: #0d1117;
    background: radial-gradient(circle at top right, #1a2a44 0%, #0d1117 100%);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Kasan arka plan efektleri temizlendi */
.background-blobs, .stars {
    display: none !important;
}

.blob {
    position: absolute;
    border-radius: 50%;
    will-change: transform;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: #1e3a8a;
    top: -100px;
    left: -100px;
    /* Animasyon basitleştirildi */
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: #4c1d95;
    bottom: -150px;
    right: -150px;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: #064e3b;
    top: 40%;
    right: 20%;
}

@keyframes move {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 100px) scale(1.2);
    }
}

/* Dinamik Arka Plan ve Yıldızlar */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
    opacity: 0.3;
    will-change: transform, opacity;
    background-image:
        radial-gradient(2px 2px at 20px 30px, #eee, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 40px 70px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 50px 160px, #ddd, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 130px 80px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 160px 120px, #ddd, rgba(0, 0, 0, 0));
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: none; /* Yıldız animasyonu kapatıldı */
}

@keyframes twinkle {
    0% {
        opacity: 0.2;
        transform: translateY(0);
    }

    100% {
        opacity: 0.6;
        transform: translateY(-5px);
    }
}

/* Renk Seçici Kutusu Özelleştirmesi */
.color-picker-wrapper {
    position: relative;
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.color-picker-wrapper:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px var(--primary);
    border-color: var(--primary);
}

.color-picker-wrapper input[type="color"] {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 200%;
    height: 200%;
    opacity: 0;
    cursor: pointer;
}

.color-picker-wrapper i {
    z-index: 10;
    pointer-events: none;
}


.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header Update */
.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.subtitle {
    color: var(--text-dim);
    font-size: 1.1rem;
    margin-top: 5px;
    margin-bottom: 30px;
    text-align: left;
}

/* Modal and Interactive States */
.hidden {
    display: none !important;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Empty State override: modal doesn't cover screen */
.modal-overlay.is-inline {
    position: relative;
    width: auto;
    height: auto;
    background: transparent;
    backdrop-filter: none;
    padding: 0;
    display: block;
}

.modal-overlay.is-popup .input-section {
    width: 100%;
    max-width: 600px;
    margin: 0;
    animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.modal-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    color: var(--text-main);
}

.close-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-dim);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-btn:hover {
    background: rgba(255, 123, 114, 0.2);
    color: var(--p-high);
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.input-section {
    padding: 35px;
    margin-bottom: 40px;
    border: 1px solid rgba(88, 166, 255, 0.2);
}

/* UI Elements */
.glass {
    background: rgba(22, 27, 34, 0.98); 
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    /* Performans için gölge ve blur optimize edildi */
}

.input-section {
    padding: 30px;
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.input-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-left: 5px;
}

input[type="text"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="email"] {
    background: rgba(13, 17, 23, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px 18px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(88, 166, 255, 0.15);
    background: rgba(13, 17, 23, 0.8);
}

/* Form Layout Classes */
.input-row {
    display: flex;
    gap: 20px;
}

.flex-1 {
    flex: 1;
}

.flex-2 {
    flex: 2;
}

.align-end {
    align-items: flex-end;
}

.input-with-button {
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-helper-btn {
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid rgba(88, 166, 255, 0.3);
    color: var(--primary);
    padding: 13px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.search-helper-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(88, 166, 255, 0.2);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    color: var(--text-dim);
}

.input-with-icon input {
    padding-left: 45px;
}

/* Priority & Buttons */
.priority-selector {
    display: flex;
    gap: 10px;
    background: rgba(13, 17, 23, 0.6);
    padding: 6px;
    border-radius: 14px;
    border: 1px solid var(--glass-border);
    width: fit-content;
}

.priority-selector input[type="radio"] {
    display: none;
}

.p-btn {
    padding: 10px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-dim);
    text-align: center;
    border: 1px solid transparent;
}

.priority-selector input:checked+.p-btn.low {
    background: rgba(63, 185, 80, 0.15);
    color: var(--p-low);
    border-color: rgba(63, 185, 80, 0.4);
    box-shadow: 0 4px 12px rgba(63, 185, 80, 0.1);
}

.priority-selector input:checked+.p-btn.medium {
    background: rgba(210, 153, 34, 0.15);
    color: var(--p-medium);
    border-color: rgba(210, 153, 34, 0.4);
    box-shadow: 0 4px 12px rgba(210, 153, 34, 0.1);
}

.priority-selector input:checked+.p-btn.high {
    background: rgba(255, 123, 114, 0.15);
    color: var(--p-high);
    border-color: rgba(255, 123, 114, 0.4);
    box-shadow: 0 4px 12px rgba(255, 123, 114, 0.1);
}

.primary-btn {
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px 30px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 20px;
    height: 52px;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(88, 166, 255, 0.4);
}

/* List Controls Update */
.list-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 20px;
}

.stat-card {
    padding: 15px 25px;
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 1000;
    font-family: 'Outfit', sans-serif;
    color: var(--primary);
}

.actions-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.backup-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.backup-btn:hover {
    background: rgba(88, 166, 255, 0.1);
    color: var(--primary);
    border-color: var(--primary);
}

.filter-group {
    display: flex;
    gap: 8px;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-dim);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Grid Layout Update */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
}

.item-card {
    position: relative;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 100px;
    height: auto;
    transition: all 0.3s ease;
}

.item-card-top {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.item-card:hover {
    background: rgba(33, 38, 45, 0.9);
    transform: translateY(-5px);
}

.item-image-container {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    position: relative;
    transition: border 0.3s ease;
}

.item-image-container.drag-over {
    border: 2px dashed var(--primary);
}

.item-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.item-card:hover .item-image-container img {
    transform: scale(1.1);
}

.item-priority-indicator {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    border-radius: 0 4px 4px 0;
}

.priority-high-bg {
    background-color: var(--p-high);
}

.priority-medium-bg {
    background-color: var(--p-medium);
}

.priority-low-bg {
    background-color: var(--p-low);
}

.item-main {
    flex: 1;
    min-width: 0; /* Yazıların taşmasını ve butonları itmesini önler */
}

.item-name {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-main); /* Fixed: Changed from undefined --text-pure to --text-main */
    /* Satır sınırlaması kaldırıldı, isimler tam görünecek */
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
    min-width: 0;
}

.item-name a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s;
}

.item-name a:hover {
    color: var(--primary);
}

.item-price {
    font-size: 1rem;
    color: var(--text-dim);
    font-weight: 500;
}

.item-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0; /* Butonların sıkışıp kaybolmasını önler */
}

.edit-btn {
    background: rgba(88, 166, 255, 0.1);
    border: none;
    color: var(--primary);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.edit-btn:hover {
    background: var(--primary);
    color: #fff;
}

.delete-btn {
    background: rgba(255, 123, 114, 0.1);
    border: none;
    color: var(--p-high);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.delete-btn:hover {
    background: var(--p-high);
    color: #fff;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px;
    color: var(--text-dim);
}

.empty-state i {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
}

.toast {
    padding: 16px 24px;
    background: rgba(22, 27, 34, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInLeft 0.3s ease forwards;
    min-width: 250px;
}

.toast-success i {
    color: var(--p-low);
}

.toast-error i {
    color: var(--p-high);
}

.toast-info i {
    color: var(--primary);
}

@keyframes slideInLeft {
    from {
        transform: translateX(120%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Custom Confirm Modal Refined */
.confirm-card {
    width: 90%;
    max-width: 380px;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    background: rgba(22, 27, 34, 0.95);
    border: 1px solid rgba(255, 123, 114, 0.3);
    animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.confirm-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 123, 114, 0.15);
    color: var(--p-high);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    box-shadow: 0 0 20px rgba(255, 123, 114, 0.1);
}

.confirm-icon i {
    width: 32px;
    height: 32px;
}

#confirm-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

#confirm-message {
    font-size: 0.95rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin: 0 0 10px 0;
    text-align: center;
}

.confirm-actions {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 15px;
}

.confirm-actions .p-btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 0.9rem;
    height: auto;
    justify-content: center;
}

#confirm-ok {
    background: var(--p-high);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 123, 114, 0.3);
}

#confirm-ok:hover {
    transform: translateY(-2px);
    background: #ff8e85;
}

#confirm-cancel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
}

#confirm-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Generic Icon Fallback */
.no-image-placeholder {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    color: var(--text-dim);
}

.no-image-placeholder i {
    width: 32px;
    height: 32px;
    opacity: 0.4;
}

/* Purchased Item Styles */
.item-purchased {
    opacity: 0.6;
    background: rgba(13, 17, 23, 0.4) !important;
}

.item-purchased .item-name {
    text-decoration: line-through;
    color: var(--text-dim);
}

.item-purchased img {
    filter: grayscale(100%);
    opacity: 0.7;
}

.check-btn {
    background: rgba(63, 185, 80, 0.1);
    border: none;
    color: var(--p-low);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.check-btn:hover {
    background: var(--p-low);
    color: #fff;
}

/* Responsive */
@media (max-width: 600px) {
    .input-row {
        flex-direction: column;
        gap: 0;
    }

    .logo-text {
        font-size: 2.2rem;
    }

    .list-controls {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }

    .item-card {
        padding: 15px;
    }
}

/* Dashboard Styles */
#admin-user-list tr:hover {
    background: rgba(255,255,255,0.02);
}

#admin-user-list td {
    border-bottom: 1px solid var(--surface-border);
    font-size: 0.95rem;
}

#admin-user-search:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

/* Global Search Input Style */
#global-search {
    transition: all 0.3s ease;
}

#global-search:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.1);
}