/* Google Fonts, Modern Renk Paleti ve Reset */
:root {
    --primary-color: #3b82f6;
    /* Canlı Mavi */
    --primary-hover: #2563eb;
    --secondary-color: #8b5cf6;
    /* Mor Vurgu */
    --bg-dark: #0f172a;
    /* Slate 900 */
    --bg-panel: #1e293b;
    /* Slate 800 */
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-light: #f8fafc;
    /* Slate 50 */
    --text-gray: #94a3b8;
    /* Slate 400 */
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --border: #334155;
}

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

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--bg-dark);
    background-image: radial-gradient(circle at 50% 50%, #1e293b 0%, #0f172a 100%);
    font-family: 'Inter', sans-serif;
    color: var(--text-light);
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1200px;
    background-color: var(--bg-panel);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    animation: fadeIn 0.5s ease-in-out;
}

/* Login Page Styles */
.login-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
    animation: slideUp 0.5s ease-out;
}

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

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

.login-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-card h2 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.login-card p {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
    font-size: 0.9rem;
    transition: color 0.3s;
}

.form-control {
    width: 100%;
    padding: 12px 12px 12px 50px !important;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-control:focus+i {
    color: var(--primary-color);
}

.btn-login {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), #2563eb);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.error-msg {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    border: 1px solid rgba(239, 68, 68, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Main App Styles */

header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    /* For logout button positioning */
}

h1 {
    font-size: 2rem;
    background-clip: text;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-gray);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    background: rgba(30, 41, 59, 0.5);
    /* Updated to match theme */
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-gray);
}

input[type="number"],
input[type="text"] {
    padding: 10px;
    background-color: #333;
    border: 1px solid #444;
    color: #fff;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Label Selection Styles */
.label-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    background: #333;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #444;
    max-height: 200px;
    overflow-y: auto;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-light);
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
}

.checkbox-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

.no-labels {
    color: var(--text-gray);
    font-style: italic;
    grid-column: 1 / -1;
    text-align: center;
    padding: 10px;
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-success {
    background: var(--success);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-warning {
    background: var(--warning);
    color: #121212;
    /* Dark text for contrast on yellow/orange */
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

button:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

button:active {
    transform: translateY(0);
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(30, 41, 59, 0.5);
    /* Updated to match theme */
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background-color: rgba(15, 23, 42, 0.8);
    color: var(--text-gray);
    font-weight: 600;
    font-size: 0.9rem;
}

td {
    font-size: 0.95rem;
}

tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-update {
    background-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.badge-skip {
    background-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.badge-loss {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid #ef4444;
}

.price-change {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.old-price {
    text-decoration: line-through;
    color: var(--text-gray);
    font-size: 0.85rem;
}

.new-price {
    color: var(--success);
    font-weight: bold;
}

footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-gray);
    font-size: 0.8rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.hidden {
    display: none;
}

#statusMsg {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
    display: none;
}