:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --glass: rgba(255, 255, 255, 0.95);
    --text-main: #1f2937;
    --text-muted: #6b7280;
}

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

body {
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    text-align: center;
}

.login-card h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.login-card p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-primary {
    width: 100%;
    background: var(--primary);
    color: white;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* Mobile optimizations */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }
}

/* Dashboard & Common UI */
.container {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    padding: 0 15px;
}

.header {
    background: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    margin-bottom: 25px;
    border-radius: 15px;
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-success { background: #10b981; color: white; }
.btn-success:hover { background: #059669; }
.btn-warning { background: #f59e0b; color: white; }
.btn-warning:hover { background: #d97706; }
.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-outline { border: 1px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: white; }

.card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

.card-info {
    flex: 1;
}

.card-info h3 { 
    font-size: 1.1rem; 
    color: var(--text-main); 
    margin-bottom: 5px; 
    line-height: 1.3;
}
.card-info p { font-size: 0.85rem; color: var(--text-muted); }

.price-tag {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.action-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* --- RESPONSIVE FIXES --- */
@media (max-width: 640px) {
    body { padding: 10px; }
    
    .header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .header .action-bar {
        width: 100%;
        justify-content: center;
    }
    
    .header .btn {
        flex: 1;
        text-align: center;
    }

    .card {
        flex-direction: column;
        align-items: stretch;
    }
    
    .card-info {
        border-bottom: 1px solid #f3f4f6;
        padding-bottom: 10px;
        margin-bottom: 5px;
    }

    .price-tag {
        font-size: 1.4rem;
        margin-bottom: 15px;
        text-align: left !important;
    }

    .card > div:last-child {
        text-align: left !important;
    }

    .card .action-bar {
        justify-content: flex-start !important;
        width: 100%;
    }
    
    .card .btn {
        flex: 1 1 calc(50% - 8px);
        text-align: center;
        font-size: 0.85rem !important;
        padding: 12px 8px !important;
    }
}

/* Responsive Grid for Form Items */
.teklif-row {
    background: #f9fafb;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 10px;
    position: relative;
    border: 1px solid #e5e7eb;
}

.grid-cols {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1.5fr;
    gap: 15px;
}

@media (max-width: 768px) {
    .grid-cols {
        grid-template-columns: 1fr 1fr;
    }
    .grid-cols > div:first-child {
        grid-column: span 2;
    }
}
