/* Reset and Base Styles */


/* Dropdown container */


/* Pagination Buttons Style */


/* Collapsible Panel */

.calculator-panel {
    position: fixed;
    bottom: -400px;
    /* hidden initially */
    right: 20px;
    width: 320px;
    height: 400px;
    background: #fff;
    border: 2px solid #ccc;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
    transition: bottom 0.4s ease-in-out;
    overflow: hidden;
    z-index: 9999;
}


/* Header */

.calculator-header {
    background: #444;
    color: white;
    padding: 10px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


/* Close button */

.close-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
}


/* iFrame Calculator */

.calculator-iframe {
    width: 100%;
    height: calc(100% - 40px);
    border: none;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo img {
    border-radius: 6px;
    /* optional */
    object-fit: contain;
}


/* Base button style */

.nav-btn {
    padding: 4px 10px;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #f5f5f5;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon img {
    border-radius: 8px;
    /* optional: makes corners rounded */
    object-fit: contain;
}


/* Edit button specific */

.nav-btn.edit-btn {
    border-color: #28a745;
    color: #28a745;
}

.nav-btn.edit-btn:hover {
    background-color: #28a745;
    color: #fff;
    text-decoration: underline;
    transform: scale(1.05);
}


/* Delete button specific */

.nav-btn.delete-btn {
    border-color: #dc3545;
    color: #dc3545;
}

.nav-btn.delete-btn:hover {
    background-color: #dc3545;
    color: #fff;
    text-decoration: underline;
    transform: scale(1.05);
}


/* Optional general hover (for other nav-btns) */

.search-container {
    margin-bottom: 15px;
}

.search-container input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.record-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    background: #f9f9f9;
}

.actions {
    margin-top: 8px;
}

.actions button {
    margin-right: 6px;
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.edit-btn {
    background-color: #4CAF50;
    color: white;
}

.delete-btn {
    background-color: #f44336;
    color: white;
}

.pagination .nav-btn {
    display: inline-block;
    margin: 0 4px;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    background: transparent;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.pagination .nav-btn:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
}

.pagination .nav-btn.active {
    background: #22c55e;
    color: white;
}

.dropdown {
    position: relative;
}


/* Dropdown trigger */

.dropdown>a {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    color: #374151;
    display: block;
}


/* Hover effect for main dropdown button */

.dropdown>a:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
}


/* Main nav */

.nav ul {
    list-style: none;
    /* hide bullets */
    display: flex;
    /* horizontal layout */
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.nav ul li {
    position: relative;
    /* needed for dropdown positioning */
    list-style: none;
    /* just in case */
}


/* Dropdown menu */

.dropdown-menu {
    list-style: none;
    /* hide bullets in dropdown */
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    padding: 0.5rem 0;
    z-index: 100;
    flex-direction: column;
    /* vertical items */
}


/* Dropdown menu */

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    min-width: 200px;
    padding: 0.5rem 0;
    z-index: 100;
}


/* Show dropdown on hover */

.dropdown:hover .dropdown-menu {
    display: block;
}


/* Dropdown items */

.dropdown-menu li a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 6px;
}


/* Hover effect for dropdown items */

.dropdown-menu li a:hover {
    background: #f3f4f6;
    transform: translateX(5px);
}


/* Active dropdown item */

.dropdown-menu li a.active {
    background: #22c55e;
    color: white;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f0f9f0 0%, #fff5e6 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


/* Header Styles */

.header {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-bottom: 4px solid #22c55e;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 12px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.logo-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1f2937;
    margin: 0;
}

.logo-text p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.nav,
.dropdown {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-btn,
.calculator-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    color: #374151;
}

.nav-btn:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
}

.nav-btn.active {
    background: #22c55e;
    color: white;
}

.calculator-btn {
    background: #3b82f6;
    color: white;
}

.calculator-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
}


/* Main Content */

.main-content {
    margin-right: 0;
    transition: margin-right 0.3s ease;
}

.main-content.calculator-open {
    margin-right: 350px;
}

.page {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}


/* --- New Responsive Management UI --- */

.management-se c tion {
    display: block;
    /* Default for mobile */
}

.section-co n tent {
    display: flex;
    flex-direction: column;
    gap: 30px;
}


/* One-by-one (Stacked) Form Styling */

.form-container {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0 .0 8);
    border-top: 4px solid var(--primary-color);
}

.form-container h2 {
    margin-top: 0;
    text-align: center;
    color: va r(--dark-color);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}


/* Data Display Styling */

.data-container h2 {
    margin-top: 0;
}

.search-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.search-form {
    display: flex;
}

.search-form input {
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 8px 0 0 8px;
    min-width: 200px;
}

.search-form button {
    padding: 10px 15px;
    border: none;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    border-radius: 0 8px 8px 0;
}


/* Responsive Card Grid */

.data-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* One column for mobile */
    gap: 20px;
}

.data-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid var(--primary-color);
}


/* --- New Table and Pagination UI --- */


/* Wrapper for responsive scrolling on mobile */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    /* Ensures columns don't get too squished */
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.data-table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.data-table tbody tr:nth-child(even) {
    background-color: #fdfdfd;
}

.data-table tbody tr:hover {
    background-color: #f1f1f1;
}

.data-table .no-results {
    text-align: center;
    color: #777;
    padding: 20px;
}


/* Pagination Styles */

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    flex-wrap: wrap;
    gap: 15px;
}


/* --- Animated Icon Selector --- */

.product-selector {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.selector-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    background-color: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.selector-icon {
    font-size: 3.5rem;
    line-height: 1;
}

.selector-label {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 10px;
}


/* --- Animation and Active State --- */

.selector-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.selector-card.active {
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.2);
    transform: translateY(-8px);
}

.selector-card.active .selector-label {
    color: var(--primary-color);
}

.page-info {
    color: #555;
    font-size: 0.9rem;
}

.pagination-links {
    display: flex;
    gap: 10px;
}

.pagination-btn {
    display: inline-block;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--primary-color);
    background-color: #fff;
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    transition: all 0.2s ease-in-out;
}

.pagination-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.data-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.data-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.data-card-icon {
    font-size: 1.8rem;
}

.data-card-header h3 {
    margin: 0;
    flex-grow: 1;
}

.data-card-body {
    padding: 15px;
}

.data-card-body p {
    margin: 0 0 10px;
    color: #444;
}

.data-card-body p:last-child {
    margin-bottom: 0;
}

.no-results {
    text-align: center;
    padding: 20px;
    color: #777;
}


/* Animations */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-animated {
    animation: fadeInUp 0.5s ease-out forwards;
}


/* --- Responsive Layout for Desktop --- */

@media (min-width: 768px) {
    .data-grid {
        grid-template-columns: repeat(2, 1fr);
        /* Two columns for tablets */
    }
}

@media (min-width: 1200px) {
    .section-content {
        flex-direction: row;
        align-items: flex-start;
    }
    .form-container {
        flex: 0 0 400px;
        /* Fixed width for the form */
    }
    .data-container {
        flex: 1;
    }
    .data-grid {
        grid-template-columns: repeat(2, 1fr);
        /* Two columns for desktop data */
    }
}


/* Hero Section */

.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.text-green {
    color: #22c55e;
}

.text-orange {
    color: #f97316;
}

.hero p {
    font-size: 1.25rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}


/* Buttons */

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #22c55e;
    color: white;
}

.btn-primary:hover {
    background: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #22c55e;
    border: 2px solid #22c55e;
}

.btn-secondary:hover {
    background: #22c55e;
    color: white;
    transform: translateY(-2px);
}

.btn-white {
    background: white;
    color: #22c55e;
}

.btn-white:hover {
    background: #f9fafb;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline:hover {
    background: white;
    color: #22c55e;
    transform: translateY(-2px);
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.full-width {
    width: 100%;
}


/* Stock Section */

.stock-section {
    margin: 4rem 0;
}

.stock-section h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 2rem;
}

.stock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.stock-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.stock-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.stock-card-header {
    height: 4px;
}

.stock-card-header.onion {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.stock-card-header.potato {
    background: linear-gradient(90deg, #f59e0b, #f97316);
}

.stock-card-content {
    padding: 2rem;
}

.stock-card-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stock-card-title h3 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1f2937;
}

.stock-status {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.stock-status.in-stock {
    background: #dcfce7;
    color: #166534;
}

.stock-status.limited {
    background: #fef3c7;
    color: #92400e;
}

.stock-status.low {
    background: #fee2e2;
    color: #991b1b;
}

.stock-description {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.stock-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.stock-price {
    font-size: 2rem;
    font-weight: bold;
    color: #22c55e;
}

.stock-unit {
    font-size: 1.25rem;
    color: #6b7280;
}

.stock-quantity {
    text-align: right;
}

.stock-quantity p:first-child {
    font-size: 0.875rem;
    color: #6b7280;
}

.stock-quantity p:last-child {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}


/* Features Section */

.features {
    margin: 4rem 0;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
}

.feature-icon.green {
    background: #dcfce7;
}

.feature-icon.blue {
    background: #dbeafe;
}

.feature-icon.yellow {
    background: #fef3c7;
}

.feature-icon.orange {
    background: #fed7aa;
}

.feature-icon.purple {
    background: #e9d5ff;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: #6b7280;
}


/* Call to Action */

.cta {
    background: linear-gradient(135deg, #22c55e, #f97316);
    color: white;
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    margin: 4rem 0;
}

.cta h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}


/* Admin Login */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.login-card {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-icon {
    width: 5rem;
    height: 5rem;
    background: #fed7aa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2.5rem;
}

.login-header h2 {
    font-size: 2rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #6b7280;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.error-message {
    background: #fee2e2;
    color: #991b1b;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: none;
}

.error-message.show {
    display: block;
}

.success-message {
    background: #dcfce7;
    color: #166534;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: none;
}

.success-message.show {
    display: block;
}

.demo-credentials {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.demo-credentials code {
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}


/* Admin Panel */

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: #1f2937;
}


/* Dashboard Navigation */

.dashboard-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 1rem;
}

.dashboard-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: #6b7280;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.dashboard-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.dashboard-btn.active {
    background: #3b82f6;
    color: white;
}


/* Admin Sections */

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: bold;
    color: #1f2937;
    margin: 0;
}


/* Overview Stats */

.overview-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.overview-stats .stat-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.overview-stats .stat-icon {
    font-size: 3rem;
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 50%;
}

.overview-stats .stat-info h3 {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 0.5rem 0;
}

.overview-stats .stat-info p {
    font-size: 2rem;
    font-weight: bold;
    color: #1f2937;
    margin: 0;
}


/* Items Grid */

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.item-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.item-card-header {
    height: 4px;
}

.item-card-header.onion {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.item-card-header.potato {
    background: linear-gradient(90deg, #f59e0b, #f97316);
}

.item-card-content {
    padding: 2rem;
}

.item-card-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.item-card-title h3 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1f2937;
    margin: 0;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
}

.item-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.item-detail {
    text-align: center;
}

.item-detail h4 {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 0.5rem 0;
}

.item-detail p {
    font-size: 1.25rem;
    font-weight: bold;
    color: #1f2937;
    margin: 0;
}

.item-description {
    color: #6b7280;
    margin-bottom: 1rem;
}


/* Users Grid */

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.user-card {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.user-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.user-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.user-info h3 {
    font-size: 1.25rem;
    font-weight: bold;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
}

.user-info p {
    color: #6b7280;
    margin: 0;
    font-size: 0.875rem;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

.user-details {
    color: #6b7280;
    font-size: 0.875rem;
}

.user-details p {
    margin: 0.25rem 0;
}


/* Modal Styles */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: bold;
    color: #1f2937;
    margin: 0;
}

.modal form {
    padding: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}


/* Button Variants */

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-edit {
    background: #f59e0b;
    color: white;
}

.btn-edit:hover {
    background: #d97706;
}

.btn-delete {
    background: #ef4444;
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}


/* Contact Page */

.contact-header {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 1rem;
}

.contact-header p {
    font-size: 1.25rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.contact-info h2 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-item h3 {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: #6b7280;
    margin: 0;
}

.contact-form-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.contact-form-card {
    padding: 2rem;
}

.contact-form-card h2 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.contact-success {
    text-align: center;
    padding: 2rem;
    display: none;
}

.contact-success.show {
    display: block;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.contact-success h3 {
    font-size: 1.25rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.contact-cta {
    background: linear-gradient(135deg, #22c55e, #f97316);
    color: white;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
}

.contact-cta h2 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.contact-cta p {
    margin-bottom: 0.5rem;
}


/* Calculator Widget */

.calculator-widget {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #3b82f6;
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.calculator-widget.open {
    right: 0;
}

.calculator-header {
    background: #3b82f6;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calculator-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.calculator-display {
    background: #1f2937;
    color: white;
    padding: 1.5rem;
    margin: 1rem;
    border-radius: 12px;
}

.calculator-history {
    font-size: 0.875rem;
    color: #9ca3af;
    height: 1.5rem;
    text-align: right;
}

.calculator-result {
    font-size: 2rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    text-align: right;
    word-break: break-all;
}

.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    padding: 1rem;
}

.calc-btn {
    height: 3rem;
    border: none;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calc-btn:hover {
    transform: scale(1.05);
}

.calc-btn:active {
    transform: scale(0.95);
}

.calc-number {
    background: #f3f4f6;
    color: #1f2937;
}

.calc-number:hover {
    background: #e5e7eb;
}

.calc-operator {
    background: #3b82f6;
    color: white;
}

.calc-operator:hover {
    background: #2563eb;
}

.calc-clear {
    background: #ef4444;
    color: white;
}

.calc-clear:hover {
    background: #dc2626;
}

.calc-equals {
    background: #22c55e;
    color: white;
    grid-row: span 2;
}

.calc-equals:hover {
    background: #16a34a;
}

.calc-zero {
    grid-column: span 2;
}

.calculator-helper {
    padding: 1rem;
    background: #f9fafb;
    margin: 1rem;
    border-radius: 8px;
}

.calculator-helper h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.calculator-helper p {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
}


/* Footer */

.footer {
    background: #1f2937;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo .logo-icon {
    background: #22c55e;
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
}

.footer-logo span {
    font-size: 1.25rem;
    font-weight: 600;
}

.footer p {
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.copyright {
    font-size: 0.875rem;
}


/* Responsive Design */

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .stock-grid {
        grid-template-columns: 1fr;
    }
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .main-content.calculator-open {
        margin-right: 0;
    }
    .calculator-widget {
        width: 100%;
        right: -100%;
    }
    .admin-form {
        grid-template-columns: 1fr;
    }
    .admin-stats {
        grid-template-columns: 1fr;
    }
    .dashboard-nav {
        flex-wrap: wrap;
    }
    .items-grid {
        grid-template-columns: 1fr;
    }
    .users-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    .hero {
        padding: 2rem 0;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    .btn {
        width: 100%;
        max-width: 300px;
    }
}