@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Poppins:wght@300;400;600;700&display=swap');

:root {
    /* Very Bright Pink Vibrant Theme */
    --primary: #FF007F; /* Very Bright Pink - Main Vibrant Pink */
    --primary-light: #FF4DA6; /* Lighter Very Bright Pink */
    --primary-dark: #CC0066; /* Darker Very Bright Pink */
    --background: #1a1a1a; /* Deep Charcoal Background */
    --surface: #2c2c2c; /* Slightly lighter dark surface for cards/elements */
    --text-primary: #ecf0f1; /* Light text on dark background */
    --text-secondary: #bdc3c7; /* Muted text */
    --border-color: #3f3f3f; /* Darker subtle borders */
    --shadow-light: rgba(0, 0, 0, 0.2);
    --shadow-medium: rgba(0, 0, 0, 0.4);
    --rounded-xl: 20px;
    --rounded-lg: 14px;
    --rounded-md: 12px;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

html, body {
    height: 100%;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: var(--primary);
}

ul {
    list-style: none;
}

/* Layout */
.wrapper {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex-grow: 1;
    margin-left: 280px; /* Adjust for sidebar width */
    padding: 30px;
}

/* Sidebar */
.sidebar {
    width: 280px;
    min-width: 280px; /* Fixed width */
    background: linear-gradient(135deg, #222222, #111111); /* Darker gradient for sidebar */
    color: white;
    padding: 30px 20px;
    position: fixed;
    height: 100%;
    top: 0;
    left: 0;
    box-shadow: 5px 0 20px var(--shadow-medium);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    border-top-right-radius: var(--rounded-xl);
    border-bottom-right-radius: var(--rounded-xl);
    border-right: 1px solid var(--border-color); /* Subtle border */
}

.sidebar .logo {
    text-align: center;
    margin-bottom: 40px;
    font-family: var(--font-heading);
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-light); /* Highlight logo with primary color */
}

.sidebar nav ul {
    flex-grow: 1;
}

.sidebar nav ul li {
    margin-bottom: 10px;
}

.sidebar nav ul li a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--text-secondary); /* Muted text for inactive items */
    font-size: 1.05em;
    border-radius: var(--rounded-md);
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.sidebar nav ul li a i {
    margin-right: 15px;
    font-size: 1.2em;
}

.sidebar nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.08); /* Subtle hover for dark theme */
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: var(--primary-light); /* Light up on hover */
}

.sidebar nav ul li a.active {
    background: linear-gradient(90deg, var(--primary), var(--primary-dark)); /* Vibrant pink gradient for active */
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(255, 0, 127, 0.4); /* Vibrant pink shadow */
}

/* Header */
.dashboard-header {
    background: linear-gradient(90deg, var(--primary), var(--primary-dark)); /* Vibrant pink gradient header */
    color: white;
    padding: 25px 30px;
    border-radius: var(--rounded-lg);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 20px var(--shadow-medium);
}

.dashboard-header h1 {
    font-family: var(--font-heading);
    font-size: 2.2em;
    font-weight: 700;
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-info .avatar {
    width: 40px;
    height: 40px;
    background-color: var(--surface);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    color: var(--primary);
    margin-left: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Cards */
.card {
    background-color: var(--surface);
    border-radius: var(--rounded-lg);
    box-shadow: 0 4px 20px var(--shadow-light);
    padding: 25px;
    margin-bottom: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color); /* Subtle card border */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px var(--shadow-medium);
}

.card h2 {
    font-family: var(--font-heading);
    color: var(--primary-light); /* Vibrant accent for headings */
    font-size: 1.6em;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

/* Dashboard Summary Cards */
.dashboard-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.summary-card {
    display: flex;
    align-items: center;
    background-color: var(--surface);
    padding: 25px;
    border-radius: var(--rounded-lg);
    box-shadow: 0 4px 20px var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color); /* Subtle card border */
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px var(--shadow-medium);
}

.summary-card .icon-wrapper {
    background: linear-gradient(45deg, var(--primary-light), var(--primary)); /* Vibrant pink gradient for icon */
    color: white;
    width: 60px;
    height: 60px;
    border-radius: var(--rounded-md);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2em;
    margin-right: 20px;
    box-shadow: 0 4px 15px rgba(255, 0, 127, 0.4); /* Vibrant pink shadow */
}

.summary-card .details h3 {
    font-family: var(--font-heading);
    color: var(--text-secondary);
    font-size: 1.1em;
    margin-bottom: 5px;
}

.summary-card .details p {
    font-family: var(--font-heading);
    font-size: 2.2em;
    font-weight: 700;
    color: var(--primary-light); /* Vibrant color for numbers */
}

/* Forms */
.form-group {
    margin-bottom: 25px; /* Increased spacing */
}

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

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--rounded-md);
    font-family: var(--font-body);
    font-size: 1em;
    color: var(--text-primary);
    background-color: #3a3a3a; /* Darker input background */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="date"]:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 0, 127, 0.3); /* Vibrant pink focus glow */
    outline: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, var(--primary), var(--primary-dark)); /* Vibrant pink gradient */
    color: white;
    padding: 12px 25px;
    border-radius: var(--rounded-md);
    border: none;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease, background 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 0, 127, 0.4); /* Vibrant pink shadow */
}

.btn:hover {
    background: linear-gradient(45deg, var(--primary-dark), var(--primary)); /* Reverse gradient on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 127, 0.5);
}

.btn-secondary {
    background: #555555; /* Darker secondary */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    background: #666666;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-danger {
    background-color: #c0392b; /* Darker red */
    box-shadow: 0 4px 15px rgba(192, 57, 43, 0.4);
}

.btn-danger:hover {
    background-color: #e74c3c;
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.5);
}

.btn-sm {
    padding: 8px 15px;
    font-size: 0.9em;
    border-radius: var(--rounded-md);
}

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: var(--rounded-md);
    font-weight: 600;
}

.alert-error {
    background-color: #4a1c1c; /* Dark red background */
    color: #e74c3c; /* Fiery red text */
    border: 1px solid #c0392b;
}

.alert-success {
    background-color: #422e38; /* Dark pink background */
    color: var(--primary-light); /* Vibrant pink text */
    border: 1px solid var(--primary-dark);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    background-color: var(--surface);
    border-radius: var(--rounded-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow-light);
    border: 1px solid var(--border-color); /* Subtle table border */
}

table thead tr {
    background-color: #3a3a3a; /* Darker header background */
}

table th, table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary); /* Light text for table content */
}

table th {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--primary-light); /* Vibrant accent for table headers */
    text-transform: uppercase;
    font-size: 0.9em;
}

table tbody tr:last-child td {
    border-bottom: none;
}

table tbody tr:nth-child(even) {
    background-color: #2f2f2f; /* Even row background */
}

table tbody tr:hover {
    background-color: #3a3a3a; /* Hover highlight */
    cursor: pointer;
}

table td .btn {
    margin-right: 5px;
    padding: 8px 12px;
    font-size: 0.85em;
}


/* Specific adjustments */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--background);
    width: 100%; /* Ensure it spans full width */
}

.login-card {
    max-width: 400px;
    width: 90%; /* Responsive width */
    padding: 30px;
    background-color: var(--surface);
    border-radius: var(--rounded-xl);
    box-shadow: 0 8px 30px var(--shadow-medium);
    text-align: center; /* Center text inside card */
    border: 1px solid var(--border-color); /* Add border for definition */
}

.login-card h2 {
    font-family: var(--font-heading);
    font-size: 2em;
    color: var(--primary-light);
    margin-bottom: 25px; /* Adjust spacing */
    font-weight: 700;
}

.login-card .form-group {
    margin-bottom: 20px; /* Consistent spacing for form groups */
}

.login-card .form-group label {
    font-size: 1em; /* Rely on general font-size for labels */
    margin-bottom: 8px; /* Rely on general margin for labels */
}

.login-card input[type="text"],
.login-card input[type="password"] {
    padding: 12px 15px; /* Consistent padding */
    font-size: 1em; /* Consistent font size */
}

.login-card .btn {
    width: 100%;
    margin-top: 20px;
    padding: 12px 25px; /* Consistent button padding */
    font-size: 1em; /* Consistent button font size */
}

.error-message {
    background-color: #4a1c1c; /* Dark red background */
    color: #e74c3c; /* Fiery red text */
    border: 1px solid #c0392b;
    padding: 10px;
    border-radius: var(--rounded-md);
    margin-bottom: 20px; /* Consistent spacing */
    font-size: 0.95em;
    font-weight: 500;
    text-align: center;
}

.product-search-results {
    border: 1px solid var(--border-color);
}
.product-search-results .card {
    box-shadow: none;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
    padding: 10px 15px;
    border-radius: 0;
}
.product-search-results .card:last-child {
    border-bottom: none;
}
.product-search-results .card:hover {
    background-color: #3a3a3a; /* Darker hover for search results */
    transform: none;
    box-shadow: none;
}


/* Responsiveness */
@media (max-width: 1024px) {
    .main-content {
        margin-left: 250px;
        padding: 20px;
    }
    .sidebar {
        width: 250px;
        min-width: 250px;
    }
    .sidebar nav ul li a {
        font-size: 1em;
        padding: 10px 12px;
    }
    .sidebar nav ul li a i {
        margin-right: 12px;
    }
    .dashboard-header h1 {
        font-size: 2em;
    }
    .summary-card .icon-wrapper {
        width: 50px;
        height: 50px;
        font-size: 1.8em;
    }
    .summary-card .details h3 {
        font-family: var(--font-heading);
        color: var(--text-secondary);
        font-size: 1.1em;
        margin-bottom: 5px;
    }
    .summary-card .details p {
        font-family: var(--font-heading);
        font-size: 2.2em;
        font-weight: 700;
    }
}

@media (max-width: 768px) {
    .wrapper {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-radius: 0;
        box-shadow: 0 5px 20px var(--shadow-medium);
        padding: 20px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-right: none;
    }
    .sidebar .logo {
        margin-bottom: 0;
        font-size: 1.5em;
    }
    .sidebar nav {
        display: none; /* Hide nav for mobile, could add a toggle button */
    }
    .main-content {
        margin-left: 0;
        padding: 20px;
        padding-top: 20px;
    }
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }
    .dashboard-header h1 {
        font-size: 1.8em;
        margin-bottom: 15px;
    }
    .user-info {
        width: 100%;
        justify-content: flex-end;
    }
    .dashboard-summary-grid {
        grid-template-columns: 1fr;
    }
    .card {
        padding: 20px;
    }
    .card h2 {
        font-size: 1.4em;
    }
    table th, table td {
        padding: 10px;
        font-size: 0.9em;
    }
    .form-group input, .form-group select {
        padding: 10px 12px;
    }
    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}

/* Utility classes */
.text-center { text-align: center; }
.mt-30 { margin-top: 30px; }
.mb-20 { margin-bottom: 20px; }