﻿/* ===== Layout Shared ===== */
.backgroundimage {
    background-image: linear-gradient(180deg, #166a6e 0%, #3a0647 70%);
}

/* ===== Shell ===== */
.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Topbar */
.topbar {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    color: #fff;
    background-image: linear-gradient(180deg, #166a6e 0%, #3a0647 70%);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-title {
    font-weight: 700;
    white-space: nowrap;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Buttons */
.icon-button {
    background: #0c5c82;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    transition: transform .15s, background-color .15s;
    font-size: 1.05rem;
    position: relative;
}

    .icon-button:hover {
        transform: scale(1.05);
        background: #1a8fbf;
    }

.badge-dot {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #dc3545;
    color: #fff;
    border-radius: 12px;
    padding: .15em .45em;
    font-size: .75em;
}

/* ===== Layout with sidebar ===== */
.layout-body {
    flex: 1;
    display: flex;
    min-height: calc(100vh - 56px);
    background: #f6f7fb;
}

.sidebar {
    width: 280px;
    background: #111827;
    color: #fff;
    overflow: auto;
    transition: transform .2s ease;
    border-left: 1px solid rgba(255,255,255,.08);
}

    /* RTL-friendly: sidebar on right */
    .sidebar.rtl {
        border-left: none;
        border-right: 1px solid rgba(255,255,255,.08);
    }

.content {
    flex: 1;
    padding: 16px;
    overflow: auto;
}

/* Overlay (mobile) */
.sidebar-overlay {
    display: none;
}

@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        top: 56px;
        bottom: 0;
        z-index: 1040;
        transform: translateX(110%);
    }

        .sidebar.open {
            transform: translateX(0%);
        }

    .sidebar-overlay {
        display: block;
        position: fixed;
        top: 56px;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(0,0,0,.35);
        z-index: 1030;
    }
}

/* Desktop: show/hide by width */
@media (min-width: 993px) {
    .sidebar.closed {
        width: 0;
        overflow: hidden;
    }
}

/* ===== NavMenu styling ===== */
.navmenu-header {
    padding: 14px 14px 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-weight: 700;
}

.nav-section {
    margin: 12px 12px 6px;
    font-size: 12px;
    opacity: .75;
}

.sidebar .nav-link {
    color: rgba(255,255,255,.88);
    padding: 10px 12px;
    margin: 3px 10px;
    border-radius: 10px;
}

    .sidebar .nav-link:hover {
        background: rgba(255,255,255,.08);
        color: #fff;
    }

    .sidebar .nav-link.active {
        background: rgba(255,255,255,.12);
        color: #fff;
    }

/* Tables */
.table {
    min-width: max-content;
}

.table-responsive {
    overflow-x: auto;
}
