/* Admin Layout (Stockly Style) */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-body);
}

/* SIDEBAR */
.sidebar {
    width: 250px;
    background-color: var(--bg-surface);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    box-shadow: 2px 0 10px rgba(0,0,0,0.02);
    z-index: var(--z-sidebar);
}

.sidebar-header {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.sidebar-menu {
    list-style: none;
    flex: 1;
}

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    font-weight: 500;
    border-radius: var(--border-radius-md);
    border: 1px solid transparent;
}

.sidebar-menu a i {
    font-size: 1.125rem;
    width: 20px;
    text-align: center;
}

.sidebar-menu a:hover {
    background-color: rgba(0,0,0,0.02);
}

.sidebar-menu a.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: rgba(30, 58, 138, 0.05); /* Rất nhạt */
}

.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.content-body {
    padding: 2rem 3rem;
    flex: 1;
    overflow-y: auto;
}

/* BREADCRUMB & HEADER */
.page-header {
    margin-bottom: 2rem;
}

.breadcrumb {
    font-size: var(--font-size-sm, 0.889rem);
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.page-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.page-title-row h1 {
    font-size: 2rem;
    font-weight: 700;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 0.25rem;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* TOOLBAR & SUMMARY */
.toolbar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.summary-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.summary-stats span strong {
    color: var(--text-main);
    font-weight: 600;
}

/* DATA TABLE */
.table-wrapper {
    background-color: var(--bg-surface);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    overflow-x: auto;
    width: 100%;
}

.table-custom {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table-custom thead {
    background-color: #F8F9FA;
    border-bottom: 1px solid var(--border-color);
}

.table-custom th {
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.table-custom td {
    padding: 1rem 1.5rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    font-size: 1rem;
    color: var(--text-main);
}

.table-custom tbody tr {
    transition: background-color 0.2s ease;
}

.table-custom tbody tr:hover {
    background-color: #F9FAFB;
}

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

/* PRODUCT GRID */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background-color: var(--bg-surface);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
    transition: var(--transition);
}

.product-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.product-image-wrap {
    height: 160px;
    background-color: #F8F9FA;
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.product-image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.product-info {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-sku {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.product-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.stat-value {
    font-size: 1rem;
    font-weight: 600;
    text-align: right;
}

.product-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    text-align: center;
}

.btn-link {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 1rem;
    background: none;
    border: none;
    cursor: pointer;
}
.btn-link:hover {
    text-decoration: underline;
}
