* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: white;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #2d3748;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover {
    color: #667eea;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s;
    transform: translateX(-50%);
}

.nav-links a:hover::after {
    width: 100%;
}

.btn {
    padding: 0.7rem 1.8rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #2d3748;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4rem 2rem;
    margin: 2rem 0;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.2);
    color: white;
}

.hero h1 {
    font-size: 2.8rem;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.hero p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.95);
    margin-bottom: 1rem;
}

/* Search Bar */
.search-bar {
    margin: 2rem 0;
    text-align: center;
}

.search-bar form {
    display: inline-flex;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    border: 2px solid #e2e8f0;
}

.search-bar input {
    border: none;
    padding: 1.2rem 2rem;
    font-size: 1rem;
    width: 400px;
    outline: none;
    color: #2d3748;
}

.search-bar input::placeholder {
    color: #a0aec0;
}

.search-bar button {
    padding: 1.2rem 2.5rem;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.search-bar button:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3e8a 100%);
}

/* Products Grid */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border: 1px solid #e2e8f0;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.product-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-info {
    padding: 1.5rem;
}

.product-category {
    color: #667eea;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    letter-spacing: 0.5px;
}

.product-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.product-description {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.product-price {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.product-stock {
    color: #28a745;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

/* Product Detail Page */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: white;
    padding: 3rem;
    border-radius: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    margin: 2rem 0;
    border: 1px solid #e2e8f0;
}

.product-detail-image {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #f8f9fa;
}

.product-detail-image img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.product-detail-image:hover img {
    transform: scale(1.05);
}

.product-detail-info {
    display: flex;
    flex-direction: column;
}

.product-detail-info h1 {
    color: #2d3748;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.3;
}

.product-detail-info h3 {
    color: #2d3748;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

.product-detail-info > div:nth-child(3) {
    font-size: 2.5rem !important;
    font-weight: 900 !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Footer */
footer {
    background: white;
    padding: 3rem 0;
    margin-top: 4rem;
    text-align: center;
    color: #718096;
    border-top: 1px solid #e2e8f0;
}

.alert {
    padding: 1.2rem;
    border-radius: 15px;
    margin: 1.5rem 0;
    text-align: center;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

/* Login Page */
.login-container {
    background: white;
    padding: 3rem;
    border-radius: 25px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 450px;
    margin: 5rem auto;
    border: 1px solid #e2e8f0;
}

.login-container .logo {
    text-align: center;
    font-size: 2.2rem;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2d3748;
    font-weight: 600;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 0.9rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #2d3748;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.back-link {
    text-align: center;
    margin-top: 1.5rem;
}

.back-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.back-link a:hover {
    color: #5568d3;
}

.info-box {
    background: linear-gradient(135deg, #e7f3ff 0%, #f0e7ff 100%);
    padding: 1.2rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #667eea;
}

.info-box p {
    margin: 0.5rem 0;
    color: #2d3748;
    font-size: 0.9rem;
}

/* Dashboard */
.dashboard {
    display: flex;
    min-height: 100vh;
    background: #f8f9fa;
}

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 4px 0 15px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 0 1.5rem;
    margin-bottom: 2rem;
}

.sidebar-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin: 0.5rem 0;
}

.sidebar-menu a {
    display: block;
    padding: 1rem 1.5rem;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255,255,255,0.2);
    border-left: 4px solid white;
    padding-left: calc(1.5rem - 4px);
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
}

.top-bar {
    background: white;
    padding: 1.8rem;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e2e8f0;
}

.top-bar h1 {
    color: #2d3748;
    font-weight: 800;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    border-color: #667eea;
}

.stat-card h3 {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
}

.card h2 {
    margin-bottom: 1.8rem;
    color: #2d3748;
    font-weight: 800;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1.2rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background: #f8f9fa;
    font-weight: 700;
    color: #2d3748;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

tr:hover {
    background: #f8f9fa;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-buttons .btn {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
}

.product-img-small {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .search-bar input {
        width: 250px;
    }
    
    .products {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem;
    }
    
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 0.8rem;
    }
}