/* ========= dashboard.css ========= */

.dash-body {
    background: var(--off-white);
    min-height: 100vh;
    display: flex;
}

/* Sidebar */
.dash-sidebar {
    width: 260px;
    background: var(--primary-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    transition: var(--transition);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 24px 20px;
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-close-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

@media (max-width: 1024px) {
    .sidebar-close-btn {
        display: block;
    }
}

.logo-text {
    color: var(--white);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.su-avatar {
    width: 40px;
    height: 40px;
    background: rgba(245, 166, 35, 0.3);
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-head);
    font-weight: 800;
    color: var(--accent-light);
    font-size: 1rem;
    flex-shrink: 0;
}

.su-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--white);
}

.su-role {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: capitalize;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.snav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    transition: var(--transition-fast);
    cursor: pointer;
    border: none;
    background: transparent;
    text-align: left;
    width: 100%;
}

.snav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.snav-link.active {
    background: rgba(245, 166, 35, 0.18);
    color: var(--accent-light);
    font-weight: 700;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Main area */
.dash-main {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Topbar */
.dash-topbar {
    background: var(--white);
    padding: 16px 28px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.dash-page-title {
    font-size: 1.15rem;
    font-weight: 700;
    flex: 1;
}

.sidebar-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
}

.dash-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Tabs */
.dash-tab {
    display: none;
    padding: 32px 28px;
}

.dash-tab.active {
    display: block;
}

.dash-tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.dash-tab-header h3 {
    font-size: 1.2rem;
}

/* Stat Cards */
.stat-overview {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border);
    text-align: center;
    transition: var(--transition);
}

.stat-overview:hover {
    box-shadow: var(--shadow-md);
}

.stat-overview .so-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.stat-overview .so-num {
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-overview .so-label {
    font-size: 0.82rem;
    color: var(--text-light);
}

/* Form layout */
.prop-form {
    max-width: 760px;
    padding: 28px;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

/* Recent list */
.recent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}

.recent-item:last-child {
    border-bottom: none;
}

.ri-img {
    width: 44px;
    height: 36px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.ri-info {
    flex: 1;
    min-width: 0;
}

.ri-title {
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ri-sub {
    font-size: 0.78rem;
    color: var(--text-light);
}

.ri-price {
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

/* Action Buttons */
.action-btn {
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition-fast);
}

.ab-edit {
    background: #e3f2fd;
    color: #1565c0;
}

.ab-edit:hover {
    background: #1565c0;
    color: #fff;
}

.ab-delete {
    background: #fce4ec;
    color: #c62828;
}

.ab-delete:hover {
    background: #c62828;
    color: #fff;
}

.ab-view {
    background: #e8f5e9;
    color: #2e7d32;
}

.ab-view:hover {
    background: #2e7d32;
    color: #fff;
}

/* Form sections */
.form-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-light);
    margin: 20px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 1024px) {
    .dash-sidebar {
        left: -260px;
    }

    .dash-sidebar.open {
        left: 0;
        box-shadow: var(--shadow-xl);
    }

    .dash-main {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .dash-tab {
        padding: 20px 16px;
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .prop-form {
        padding: 20px 16px;
    }
}