/* General Layout */
body {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    background-color: #f3e5f5;
    color: #333;
    padding-top: 60px;
}

.user-layout-container {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 60px);
    background-color: #f3e5f5;
}

.user-main-area {
    display: flex;
    flex-direction: row;
    flex-grow: 1;
    background-color: #f3e5f5;
}

.user-header {
    background-color: #ffffff;
    color: #333;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    box-sizing: border-box;
    height: 60px;
    z-index: 1001;
}

.user-header .header-left,
.user-header .header-center,
.user-header .header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-header .header-logo img {
    max-height: 40px;
    width: auto;
}

.user-header .header-search input[type="text"] {
    padding: 8px 15px;
    border: 1px solid #eee;
    border-radius: 20px;
    font-size: 1em;
    outline: none;
    transition: border-color 0.3s ease;
}

.user-header .header-search input[type="text"]:focus {
    border-color: #ce93d8;
}

.user-header .header-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-header .header-user-info .user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-header .header-user-info .user-name {
    font-weight: bold;
}

.user-header .header-icons i {
    font-size: 1.2em;
    color: #555;
    cursor: pointer;
    transition: color 0.3s ease;
}

.user-header .header-icons i:hover {
    color: #957DAD;
}

.user-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: #333;
    font-size: 1.8em;
    cursor: pointer;
    padding: 5px;
    transition: opacity 0.3s ease;
    z-index: 1002;
}

.user-sidebar-toggle:hover {
    opacity: 0.8;
}

.user-sidebar {
    width: 250px;
    background-color: #ffffff;
    color: #333;
    padding: 20px 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    height: auto;
    overflow-y: auto;
    z-index: 999;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
    transition: left 0.3s ease;
}

.user-sidebar .user-sidebar-header {
     padding: 0 20px 15px 20px;
     margin-bottom: 20px;
     border-bottom: 1px solid #eee;
}

.user-sidebar .user-sidebar-header h2 {
    text-align: center;
    color: #957DAD;
    margin: 0;
    font-size: 1.5em;
}

.user-sidebar .sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    margin-bottom: 15px;
}

.user-sidebar .sidebar-user-info .user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-sidebar .sidebar-user-info .user-name {
    font-weight: bold;
    font-size: 1em;
}

.user-sidebar-menu {
    list-style: none;
    padding: 0 20px;
    margin: 0;
    flex-grow: 1;
}

.user-sidebar-menu .menu-item {
    margin-bottom: 8px;
}

.user-sidebar-menu .menu-item a {
    display: flex;
    align-items: center;
    color: #555;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.user-sidebar-menu .menu-item a i {
    margin-right: 10px;
    color: #D291BC;
    width: 20px;
    text-align: center;
    font-size: 1.1em;
}

.user-sidebar-menu .menu-item a:hover,
.user-sidebar-menu .menu-item a.active {
    background-color: #f3e5f5;
    color: #333;
}
.user-sidebar-menu .menu-item a:hover i,
.user-sidebar-menu .menu-item a.active i {
    color: #957DAD;
}

.user-content {
    flex-grow: 1;
    padding: 20px;
    background-color: #f3e5f5;
    margin: 0;
    margin-left: 250px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
    height: 100%;
    box-sizing: border-box;
    width: auto;
}

.user-content h2 {
    color: #673ab7;
    border-bottom: 2px solid #ce93d8;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 0;
    box-sizing: border-box;
}

.stat-box {
    background: linear-gradient(to right, #ab47bc, #e1bee7);
    color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    font-size: 1.1em;
    min-height: 100px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}
.dashboard-stats .stat-box:nth-child(2) {
     background: linear-gradient(to right, #0288d1, #b3e5fc);
      color: #fff;
}
.dashboard-stats .stat-box:nth-child(3) {
     background: linear-gradient(to right, #558b2f, #ccff90);
      color: #fff;
}

.stat-box .stat-icon {
     font-size: 2em;
     margin-bottom: 10px;
     opacity: 0.8;
     position: absolute;
     top: 15px;
     right: 15px;
     color: rgba(255, 255, 255, 0.5);
}

.stat-box p {
    margin: 0 0 5px 0;
    font-size: 1em;
    opacity: 0.9;
}
.stat-box p:last-child {
    margin-bottom: 0;
    font-size: 1.8em;
    font-weight: bold;
    opacity: 1;
}

.recent-activity-section {
     background-color: #ffffff;
     border-radius: 8px;
     box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
     padding: 20px;
     margin-bottom: 20px;
     box-sizing: border-box;
}

.recent-activity-section h3 {
    color: #957DAD;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.recent-activity-section table {
    margin-top: 15px;
    width: 100%;
    border-collapse: collapse;
}

.recent-activity-section th,
.recent-activity-section td {
    border: 1px solid #eee;
    padding: 10px;
    text-align: left;
}

.recent-activity-section th {
    background-color: #FEC8D8;
    color: #333;
    font-weight: bold;
}

.recent-activity-section tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Profile Page Specific Styles */
.profile-section {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-section h3 {
    color: #957DAD;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    width: 100%;
    text-align: left;
    box-sizing: border-box;
}

.profile-avatar-area {
     display: flex;
     flex-direction: column;
     align-items: center;
     margin-bottom: 20px;
     padding-bottom: 20px;
     border-bottom: 1px solid #eee;
     width: 100%;
     box-sizing: border-box;
}

.profile-page-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid #D291BC;
}

.profile-avatar-area form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.profile-avatar_area label { /* Corrected class name */
    font-weight: bold;
}

.profile-avatar-area input[type="file"] {
    /* Basic styling */
}

.profile-avatar-area button[type="submit"] {
     background: #D291BC;
     color: white;
     padding: 8px 15px;
     border: none;
     border-radius: 4px;
     cursor: pointer;
     transition: background-color 0.3s ease;
}
.profile-avatar-area button[type="submit"]:hover {
     background: #c085ac;
}


.profile-forms {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    width: 100%;
    /* Removed justify-content: center */
    /* Allow forms to align to the start by default flex behavior */
}

.profile-forms .item-form {
    flex: 1 1 300px; /* flex-grow, flex-shrink, flex-basis */
    min-width: 300px;
    padding: 0;
    border: none;
    background-color: transparent;
    box-shadow: none;
}

.profile-forms .item-form h3 {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 15px;
}

.profile-forms hr {
     border: none;
     height: 1px;
     background-color: #eee;
     margin: 20px 0;
     width: 100%;
}


/* Removed other unused sections like stats-traffic-area, stats-card, traffic-card, recent-tickets-section */


/* Item Grids (Existing styles) */
.item-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.item-card {
    border: 1px solid #eee;
    padding: 15px;
    text-align: center;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.item-card img {
    max-width: 100%;
    height: 180px;
    object-fit: cover;
    margin-bottom: 10px;
    border-radius: 4px;
}

.item-card h3 {
    margin-top: 0;
    font-size: 1.3em;
    color: #957DAD;
}

.item-card .description {
    font-size: 0.9em;
    color: #555;
    min-height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 10px;
}

.item-card .price {
    font-size: 1.1em;
    margin-bottom: 15px;
}

.item-card .price .mrp {
    text-decoration: line-through;
    color: #777;
    font-size: 0.9em;
}

.item-card .price .offer-price {
    color: #d9534f;
    font-weight: bold;
}

.item-card .stock {
     font-size: 0.9em;
     color: #555;
     margin-bottom: 10px;
}

.item-card .btn {
    display: inline-block;
    background: #D291BC;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 5px;
}

.item-card .btn:hover {
    background: #c085ac;
}

.item-card form {
     margin-top: 10px;
     display: flex;
     justify-content: center;
     align-items: center;
     gap: 5px;
}

.item-card form input[type="number"] {
    width: 50px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
}

/* Item Detail View (Existing styles) */
.item-detail {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.item-detail .item-image {
    flex-basis: 300px;
    flex-shrink: 0;
}

.item-detail .item-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.item-detail .item-info {
    flex-grow: 1;
}

.item-detail .item-info h3 {
     color: #957DAD;
     margin-top: 0;
     margin-bottom: 10px;
}

.item-detail .item-info .description {
    color: #555;
    margin-bottom: 15px;
}

.item-detail .item-info .price {
     font-size: 1.2em;
     margin-bottom: 15px;
 }

.item-detail .item-info form {
     margin-top: 20px;
}

.item-detail .item-info label {
    font-weight: bold;
    margin-right: 5px;
}

.item-detail .item-info input[type="number"],
.item-detail .item-info input[type="date"],
.item-detail .item-info input[type="time"] {
     padding: 8px;
     border: 1px solid #ccc;
     border-radius: 4px;
     margin-right: 10px;
     margin-bottom: 10px;
}

/* Cart and Checkout (Existing styles) */
.cart-summary, .order-details {
    margin-top: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

.cart-summary h3, .order-details h3 {
    color: #957DAD;
    margin-top: 0;
}

.cart-summary p, .order-details p {
    margin-bottom: 8px;
    font-size: 1.1em;
}

.cart-summary strong, .order-details strong {
    color: #D291BC;
    font-size: 1.3em;
}

.cart-summary .btn {
     margin-top: 15px;
     background: #D291BC;
}
.cart-summary .btn:hover {
     background: #c085ac;
}

/* Order History and Invoice (Existing styles) */
.item-list table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    margin-top: 15px;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.item-list th,
.item-list td {
    border: 1px solid #eee;
    padding: 10px;
    text-align: left;
}

.item-list th {
    background-color: #FEC8D8;
    color: #333;
    font-weight: bold;
}

.item-list tr:nth-child(even) {
    background-color: #f9f9f9;
}

.invoice-box {
    max-width: 800px;
    margin: 20px auto;
    padding: 30px;
    border: 1px solid #eee;
    box-shadow: 0 0 10px rgba(0, 0, 0, .15);
    font-size: 16px;
    line-height: 24px;
    font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;
    color: #555;
    background-color: #fff;
}
.invoice-box table { width: 100%; line-height: inherit; text-align: left; }
.invoice-box table td { padding: 5px; vertical-align: top; }
.invoice-box table tr td:nth_child(even) { text_align: right; }
.invoice_box table tr.heading td { background: #eee; border-bottom: 1px solid #ddd; font_weight: bold; }
.invoice_box table tr.item td{ border_bottom: 1px solid #eee; }
.invoice_box table tr.item.last td { border_bottom: none; }
.invoice_box table tr.total td:nth_child(even) { font_weight: bold; }

.invoice-box .company-details { text-align: right; margin-bottom: 20px;}
.invoice-box .customer-details { margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 15px;}
.invoice-box h2 { text-align: center; margin-bottom: 20px; color: #D291BC;}

.profile-forms {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.profile-forms .item-form {
    flex: 1;
    min-width: 300px;
}


@media (max-width: 768px) {
    body {
         padding-top: 60px;
     }

    .user-layout-container {
         flex-direction: column;
         min-height: calc(100vh - 60px);
     }

    .user-header {
         height: 60px;
         padding: 10px 15px;
         justify-content: space-between;
         position: fixed;
         top: 0;
         left: 0;
         width: 100%;
         box-sizing: border-box;
         z-index: 1001;
     }

     .user-sidebar-toggle {
         display: block;
         order: -1;
     }

     .user-header .header-left {
          gap: 10px;
          flex-grow: 1;
     }
    .user-header .header-center {
         display: none;
    }
    .user-header .header-right {
         gap: 10px;
         flex-shrink: 0;
    }

     .user-main-area {
          flex-direction: column;
     }

     .user-sidebar {
         position: fixed;
         top: 60px;
         left: -250px;
         bottom: 0;
         width: 250px;
         height: auto;
         overflow-y: auto;
         background-color: #ffffff;
         box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
         transition: left 0.3s ease;
         z-index: 999;
     }

    .user-sidebar.sidebar-visible {
        left: 0;
    }

     .user-content {
         margin-left: 0;
         padding: 15px;
         width: auto;
         flex-grow: 1;
     }

    .user-container {
        margin: 10px;
        padding: 15px;
    }

    .user-nav ul {
        flex-direction: column;
        padding: 10px;
        margin: -15px -15px 15px -15px;
    }

    .user-nav ul li {
        display: block;
        margin: 5px 0;
    }

    .item-list-grid {
        grid-template-columns: 1fr;
    }

    .item-detail {
        flex-direction: column;
        gap: 15px;
    }

    .profile-forms {
        flex-direction: column;
        gap: 15px;
    }

    .invoice-box {
        padding: 15px;
    }

     .dashboard-stats {
         grid-template-columns: 1fr;
     }
}