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

:root {
    --primary-color: #ff6600; /* Primary Orange */
    --primary-hover: #e65c00;
    --text-dark: #1e293b; /* Dark Blue */
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --white: #ffffff;
    --sidebar-width: 250px;
    --header-height: 70px;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
}

/* ==========================================================================
   Login Page Styles
   ========================================================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
}

.login-card {
    width: 100%;
    max-width: 450px;
    padding: 40px;
    text-align: center;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.login-logo img {
    height: 40px;
}

.login-logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 30px;
}

.form-group {
    text-align: left;
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-dark);
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
}

.checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

.checkbox-wrap input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 12px;
    width: 100%;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.signup-link {
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.signup-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

/* ==========================================================================
   Dashboard Layout Styles
   ========================================================================== */
.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--white);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 20px;
}

.sidebar-logo img {
    height: 24px;
}

.sidebar-menu {
    padding: 20px 0;
    list-style: none;
}

.sidebar-title {
    padding: 10px 20px;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 1px;
}

.sidebar-item {
    margin-bottom: 5px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
}

.sidebar-link i {
    width: 20px;
    font-size: 16px;
    margin-right: 15px;
    text-align: center;
}

.sidebar-link:hover {
    color: var(--primary-color);
    background-color: rgba(255, 102, 0, 0.05);
}

.sidebar-link.active {
    color: var(--white);
    background-color: var(--primary-color);
    border-radius: 0 25px 25px 0;
    margin-right: 20px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

/* Header */
.top-header {
    height: var(--header-height);
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 999;
}

.header-search {
    display: flex;
    align-items: center;
    background-color: var(--bg-light);
    border-radius: 8px;
    padding: 8px 15px;
    width: 300px;
}

.header-search i {
    color: var(--text-muted);
    margin-right: 10px;
}

.header-search input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 14px;
}

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

.header-icon {
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s;
}

.header-icon:hover {
    color: var(--primary-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Content Area */
.content-area {
    padding: 30px;
}

.page-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--text-dark);
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 13.5px;
    margin-bottom: 15px;
}

/* Cards Grid (Dashboard stats) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--white);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.stat-icon.orange { background-color: rgba(255, 102, 0, 0.1); color: var(--primary-color); }
.stat-icon.blue { background-color: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.stat-icon.green { background-color: rgba(16, 185, 129, 0.1); color: var(--success); }
.stat-icon.purple { background-color: rgba(139, 92, 246, 0.1); color: #8b5cf6; }

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.stat-trend {
    font-size: 13px;
    font-weight: 500;
}
.trend-up { color: var(--success); }
.trend-down { color: var(--danger); }

/* Tables */
.card-box {
    background-color: var(--white);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    margin-bottom: 30px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 13px;
    text-transform: uppercase;
}

table td {
    font-size: 14px;
}

.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.badge-active { background-color: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge-inactive { background-color: rgba(239, 68, 68, 0.1); color: var(--danger); }
.badge-pending { background-color: rgba(245, 158, 11, 0.1); color: var(--warning); }

/* Buttons & Utils */
.btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* Winstamp Grid (Products) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.product-item {
    background-color: var(--white);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: transform 0.2s;
    text-align: center;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.product-img {
    height: 160px;
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-img i {
    font-size: 60px;
    color: var(--primary-color);
    opacity: 0.8;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-price {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
}

.product-details {
    padding: 15px;
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 5px;
}

.product-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 15px;
    min-height: 40px;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 995;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.active {
    display: block;
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
        box-shadow: 0 0 20px rgba(0,0,0,0.15);
    }
    .main-content {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .card-box {
        padding: 15px;
    }
    .top-header {
        padding: 0 15px;
    }
    .page-title {
        font-size: 20px;
    }
    .login-card {
        padding: 20px;
    }
}