:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --border-light: rgba(255,255,255,0.05);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dashboard-container {
    width: 100%;
    max-width: 1200px;
}

.header-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.add-product-form {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr auto;
    gap: 1rem;
}

input, select, button {
    padding: 0.8rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    background: #0f172a;
    color: white;
    outline: none;
    font-size: 0.95rem;
}

button {
    background: var(--primary);
    font-weight: 600;
    cursor: pointer;
    border-radius: 0.75rem;
}

button:hover { background: var(--primary-hover); }

/* Arama Çubuğu */
.search-bar {
    margin-bottom: 2rem;
    width: 100%;
}

.search-bar input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    font-size: 1.1rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.search-bar input:focus { border-color: var(--primary); }

/* Tablo Yapısı */
.table-responsive {
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    margin-top: 1rem;
}

th {
    background: rgba(255,255,255,0.03);
    text-align: left;
    padding: 1.2rem 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
}

td {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.category-pill {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.stock-text { color: var(--primary); font-weight: bold; }

.delete-link {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    text-decoration: none;
}

.delete-link:hover { background: #ef4444; color: white; }

/* MOBİL GÖRÜNÜM (Ferah Kart Yapısı) */
@media screen and (max-width: 800px) {
    .add-product-form { grid-template-columns: 1fr; }
    
    table, thead, tbody, th, td, tr {
        display: block;
    }
    
    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    tr {
        margin-bottom: 1.5rem;
        border: 1px solid var(--border);
        border-radius: 1.2rem;
        background: var(--bg-card);
        padding: 0.5rem;
    }
    
    td {
        border: none;
        border-bottom: 1px solid var(--border-light);
        padding: 1rem !important;
        display: flex;
        flex-direction: column; /* İçeriği alt alta alır */
        align-items: flex-start;
        text-align: left !important;
    }
    
    td:last-child { border-bottom: none; }
    
    td:before {
        content: attr(data-label);
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
        color: var(--text-muted);
        margin-bottom: 0.5rem;
    }

    .delete-link {
        width: 100%;
        height: 45px;
        font-size: 1rem;
    }
}

.auth-container {
    margin-top: 10vh;
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 400px;
    text-align: center;
    border: 1px solid var(--border);
}
