html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f1f5f9;
}

.app-container {
    display: flex;
    width: 100%;
    height: 100vh;
}

.sidebar {
    width: 250px; 
    flex-shrink: 0;
    
}


.main-content {
    flex-grow: 1;
    min-width: 0;
    height: 100%;
    padding: 24px;
    box-sizing: border-box;
    overflow-y: auto; 
}

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

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.btn-primary {
    background: #2563eb;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

.product-card-link,
.product-card-link:visited,
.product-card-link:hover,
.product-card-link:active,
.product-card-link:focus {
    text-decoration: none;
    color: inherit;
    display: block;
}

.products-container {
    width: 100%;
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid rgba(203, 213, 225, 0.3);
    box-sizing: border-box;
}

.products-grid-large {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    align-items: stretch;
    justify-items: stretch; 
}

.product-card-large {
    background: #f8fafc;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.product-card-large:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 35px rgba(0,0,0,0.12);
    border-color: #2563eb;
}

.product-card-large img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.product-info-large {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-info-large h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.description {
    font-size: 14px;
    margin-bottom: 16px;
    color: #475569;
}

.price {
    font-size: 24px;
    font-weight: 800;
    color: #10b981;
    margin-bottom: 16px;
}

.product-stats {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
}

.product-actions {
    margin-top: 16px;
    display: flex;
    gap: 12px;
}

.btn-edit,
.btn-delete {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    color: white;
}

.btn-edit {
    background: #2563eb;
}

.btn-delete {
    background: #ef4444;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px;
}

.sidebar-logo {
    font-size: 24px;
    font-weight: 800;
    margin: 0;
}

.user-card-top {
    position: relative;
    background: #f8fafc;
    padding: 10px 16px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: all .2s ease;
}

.user-card-top:hover {
    background: #eef2f7;
}

.user-card-name {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.user-dropdown {
    position: absolute;
    right: 0;
    top: 48px;
    background: white;
    border-radius: 12px;
    padding: 8px 0;
    width: 150px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    display: none;
    z-index: 9999;
}

.user-dropdown a {
    display: block;
    padding: 12px 16px;
    font-size: 14px;
    color: #334155;
    text-decoration: none;
}

.user-dropdown a:hover {
    background: #f1f5f9;
}

.user-card-top:hover .user-dropdown {
    display: block;
}

form {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.form-group label {
    margin-bottom: 6px;
    font-weight: 600;
    color: #333333;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    transition: border 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007BFF;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.error-list, .error {
    color: #d9534f;
    font-size: 13px;
    margin-top: 5px;
}

button.btn-primary {
    background-color: #007BFF;
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

button.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

button:disabled {
    background-color: #a6c8ff;
    cursor: not-allowed;
}


.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    padding: 20px;
    box-sizing: border-box;
    background-color: #f9f9f9;
    border-radius: 12px;
}

.filter-group {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
}

.filter-group label {
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.filter-group input {
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    transition: border 0.3s, box-shadow 0.3s;
}

.filter-group input:focus {
    outline: none;
    border-color: #007BFF;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

.filter-form .btn-primary {
    align-self: flex-end;
    background-color: #007BFF;
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.filter-form .btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.confirm-card {
    background: #fff;
    padding: 2.5rem 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    max-width: 460px;
    margin: 4rem auto;
    text-align: center;
    animation: fadeIn 0.35s ease-out;
}

.confirm-card h2 {
    margin-bottom: 1.8rem;
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
}

.confirm-card form {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
}

.btn-delete, 
.btn-cancel {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-delete {
    background: #e53935;
    color: #fff;
}

.btn-delete:hover {
    background: #c62828;
    transform: translateY(-2px);
}

.btn-cancel {
    background: #e0e0e0;
    color: #333;
}

.btn-cancel:hover {
    background: #bdbdbd;
    transform: translateY(-2px);
}

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

.confirm-card {
    background: #fff;
    padding: 2.5rem 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    max-width: 460px;
    margin: 4rem auto;
    text-align: center;
    animation: fadeIn 0.35s ease-out;
}

.confirm-card h2 {
    margin-bottom: 1.8rem;
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
}

.confirm-card form {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
}

.btn-delete, 
.btn-cancel {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-delete {
    background: #e53935;
    color: #fff;
}

.btn-delete:hover {
    background: #c62828;
    transform: translateY(-2px);
}

.btn-cancel {
    background: #e0e0e0;
    color: #333;
}

.btn-cancel:hover {
    background: #bdbdbd;
    transform: translateY(-2px);
}

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



@media (max-width: 768px) {
    .filter-form {
        flex-direction: column;
    }

    .filter-form .btn-primary {
        width: 100%;
    }
}


@media (max-width: 640px) {
    form {
        padding: 20px;
        margin: 20px;
    }
}



@media (max-width: 768px) {
    .main-content {
        padding: 16px;
    }

    .products-container {
        padding: 20px;
    }

    .products-grid-large {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-card-large img {
        height: 180px;
    }
}