/* assets/css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

:root {
    --primary: #6c5ce7;
    --primary-light: #a29bfe;
    --secondary: #00cec9;
    --danger: #e74c3c;
    --warning: #fdcb6e;
    --success: #00b894;
    --dark: #2d3436;
    --light: #f9f9f9;
    --gray: #dfe6e9;
    --sidebar-width: 260px;
    --header-height: 70px;
    --transition-speed: 0.3s;
}

body {
    background-color: #f5f7fb;
    color: var(--dark);
    overflow-x: hidden;
}

.container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary) 0%, #5a4fcf 100%);
    color: white;
    position: fixed;
    height: 100vh;
    transition: transform var(--transition-speed) ease;
    z-index: 1000;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 25px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-weight: 700;
    font-size: 1.8rem;
    margin-left: 10px;
    background: linear-gradient(90deg, #fff 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-item {
    padding: 15px 25px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    color: white;
    text-decoration: none;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    padding-left: 30px;
}

.menu-item.active {
    background-color: rgba(255, 255, 255, 0.15);
    border-left: 4px solid var(--warning);
}

.menu-item i {
    font-size: 1.2rem;
    margin-right: 15px;
    width: 24px;
    text-align: center;
}

.menu-item span {
    font-weight: 500;
    font-size: 0.95rem;
}

.menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s ease;
}

.menu-item:hover::before {
    left: 100%;
}

.menu-section-title {
    padding: 15px 25px 8px 25px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition-speed) ease;
}

/* Header Styles */
.header {
    height: var(--header-height);
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
}

.menu-toggle {
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
    margin-right: 20px;
    display: none;
}

.header-right {
    display: flex;
    align-items: center;
}

.user-profile {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    margin-right: 10px;
}

/* Page Content Styles */
.page-content {
    padding: 25px;
}

.page-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--dark);
    display: flex;
    align-items: center;
}

.page-title i {
    margin-right: 15px;
    color: var(--primary);
}

/* Dashboard Stats */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
}

.stat-card.users::before {
    background-color: var(--primary);
}

.stat-card.sales::before {
    background-color: var(--success);
}

.stat-card.orders::before {
    background-color: var(--warning);
}

.stat-card.revenue::before {
    background-color: var(--secondary);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-right: 20px;
    color: white;
}

.stat-icon.users {
    background: linear-gradient(45deg, var(--primary), var(--primary-light));
}

.stat-icon.sales {
    background: linear-gradient(45deg, var(--success), #00d4a7);
}

.stat-icon.orders {
    background: linear-gradient(45deg, var(--warning), #ff9f43);
}

.stat-icon.revenue {
    background: linear-gradient(45deg, var(--secondary), #00e5e5);
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-info p {
    color: #777;
    font-size: 0.9rem;
}

/* Tables */
.table-container {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.table-title {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--dark);
}

.table-title i {
    color: var(--primary);
    margin-right: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead th {
    background-color: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--dark);
    border-bottom: 2px solid var(--gray);
}

table tbody td {
    padding: 15px;
    border-bottom: 1px solid var(--gray);
}

table tbody tr:hover {
    background-color: #f8f9fa;
}

.status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status.active {
    background-color: rgba(0, 184, 148, 0.1);
    color: var(--success);
}

.status.pending {
    background-color: rgba(253, 203, 110, 0.1);
    color: var(--warning);
}

.status.inactive {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--danger);
}

/* Login Styles */
.login-container {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    position: relative;
    overflow: hidden;
}

.login-box {
    background-color: white;
    border-radius: 15px;
    padding: 50px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 450px;
    z-index: 10;
    position: relative;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    font-size: 2.2rem;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.login-header p {
    color: #777;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--gray);
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c5ce7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 35px;
}

.btn {
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 15px rgba(108, 92, 231, 0.3);
}

.btn-danger {
    background: linear-gradient(90deg, var(--danger) 0%, #c0392b 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 15px rgba(231, 76, 60, 0.3);
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    color: #777;
}

/* Forms */
.form-container {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.form-col {
    flex: 1;
    min-width: 250px;
    padding: 0 10px;
    margin-bottom: 20px;
}

.btn-submit {
    background: linear-gradient(90deg, var(--success) 0%, #00d4a7 100%);
    color: white;
    padding: 12px 30px;
    min-width: 150px;
}

textarea.form-control {
    resize: vertical;
    font-family: 'Poppins', sans-serif;
}

/* Chart Container */
.chart-container {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.chart-placeholder {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    color: #777;
    font-size: 1.1rem;
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .header {
        padding: 0 15px;
    }
    
    .page-content {
        padding: 15px;
    }
    
    .table-container, .form-container, .chart-container {
        padding: 20px;
    }

    .login-box {
        padding: 30px 20px;
    }

    .form-row {
        margin: 0;
    }

    .form-col {
        min-width: 100%;
        padding: 0;
        margin-bottom: 20px;
    }
}

/* Page Transitions */
.page {
    display: none;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page.active {
    display: block;
}

/* Floating Animation for Icons */
.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Colorful Background Animation */
.color-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.05;
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--success), var(--warning));
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
