/* ===== Base Styles ===== */
body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background-color: #f3f4f6;
}

.wddna-master-wrapper {
    display: flex;
    /* min-height: 100vh; */
    max-width: 100%;
}

/* ===== Toast ===== */
.wddna-toast {
    position: fixed;
    top: 100px;               /* distance from top */
    left: 50%;               /* center horizontally */
    transform: translateX(-50%) translateY(-20px); /* adjust for animation */
    background: #16a34a;
    color: #fff;
    padding: 12px 18px;
    border-radius: 6px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
}

.wddna-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.wddna-toast.error {
    background: #dc2626;
}

/* ===== Sidebar ===== */
.wddna-sidebar {
    width: 280px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    font-family: Arial, sans-serif;
}

.wddna-sidebar .logo {
    text-align: center;
    margin-bottom: 30px;
}

.wddna-sidebar .logo img {
    width: 100%;
    height: auto;
}

.wddna-sidebar .logo .wddna-sidebar-logo-text {
    margin: 0px;
    padding-top: 5px;
    font-size: 18px;
    font-weight: bold;
    overflow-wrap: break-word;
    color: #034AA6;
    text-align: center;
}

.wddna-sidebar .account-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.wddna-sidebar .account-select {
    width: 100%;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.wddna-sidebar .nav-links a {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 5px;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 26px;
}

.wddna-sidebar .nav-links a i {
    width: 25px;
    /* margin-right: 5px; */
}

.wddna-sidebar .nav-links a:hover,
.wddna-sidebar .nav-links .wddna-sidebar-group.active .wddna-sidebar-parent,
.wddna-sidebar .nav-links .wddna-sidebar-group .wddna-sidebar-parent:hover,
.wddna-sidebar .nav-links .wddna-sidebar-group.open .wddna-sidebar-parent,
.wddna-sidebar .nav-links .wddna-sidebar-group.active .wddna-sidebar-parent:hover,
.wddna-sidebar .nav-links a.active {
    background-color: #e6f0ff;
    color: #0044cc;
}

.wddna-sidebar-group {
    margin-bottom: 10px;
}

.wddna-sidebar-parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 10px;
    line-height: 26px;
    border-radius: 4px;
}

.wddna-sidebar-submenu {
    display: none;
    padding-left: 20px;
}

.wddna-sidebar-group.open .wddna-sidebar-submenu {
    display: block;
    padding-top: 5px;
}

.wddna-toggle-icon {
    transition: transform 0.2s ease;
}

.wddna-sidebar-group.open .wddna-toggle-icon {
    transform: rotate(180deg);
}


.wddna-sidebar-group i.fa-wallet {
    width: 25px;
    /* margin-right: 5px; */
}

/* ===== Main Content ===== */
.wddna-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}


/* ===== Topbar ===== */
.wddna-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1e40af;
    color: #fff;
    padding: 20px 30px;
}

.wddna-page-title {
    margin: 0;
    font-size: 20px;
    font-weight: bold;
}
.wddna-mobile-top-row {
    display: none;
}

.wddna-topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wddna-back-btn {
    font-size: 16px;
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.wddna-back-btn:hover {
    color: #fff;
}

/* ===== Profile ===== */
.wddna-profile {
    position: relative;
}

.wddna-profile-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.wddna-profile-trigger img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
}

/* ===== Dropdown ===== */
.wddna-profile-menu {
    position: absolute;
    top: 110%;
    right: 0;
    background: #fff;
    border-radius: 6px;
    min-width: 180px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: none;
    z-index: 999;
    padding: 5px 0;
}

/* Show */
.wddna-profile-menu.wddna-show {
    display: block;
}

/* Items */
.wddna-profile-item {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.wddna-profile-item:hover {
    background: #f5f5f5;
}

/* Divider */
.wddna-dropdown-divider {
    height: 1px;
    background: #e5e5e5;
    margin: 5px 0;
}

/* Logout */
.wddna-logout-btn {
    width: 100%;
    border: none;
    background: none;
    text-align: left;
    padding: 10px 15px;
    font-size: 14px;
    color: #dc3545;
    cursor: pointer;
}

.wddna-logout-btn:hover {
    background: #f8d7da;
}

/* ===== Banner ===== */
.banner img {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
}

/* ===== Content Wrapper ===== */
.wddna-content-wrapper {
    padding: 20px 30px;
}

/* ===== Sidebar Toggle (Mobile Hamburger) ===== */
.sidebar-toggle {
    /* position: fixed;
    top: 10px;
    left: 10px;
    z-index: 200;
    background: #1e40af;
    color: #fff;
    border: none;
    padding: 10px 15px;
    font-size: 20px;
    border-radius: 5px;
    cursor: pointer; */
    display: none; /* shown only on mobile */
}

.sidebar-close-floating,
.wddna-sidebar-overlay {
    display: none;
}


/* ===== Responsive: Tablet (768px) ===== */
@media (max-width: 768px) {
    /* .wddna-master-wrapper {
        flex-direction: column;
    } */

    .wddna-profile.wddna-desktop-profile{
        display: none;
    }

    /* .wddna-profile-menu{
        right: -20px!important;
    } */

    .wddna-master-wrapper {
        flex-direction: row;
        /* height: 100vh;
        overflow: hidden; */
    }

    .wddna-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        background: #fff;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        padding: 15px;
    }
    .wddna-sidebar.active {
        transform: translateX(0);
    }

    /* Overlay */
    .wddna-sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.35);
        backdrop-filter: blur(4px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
    }

    .wddna-page-title {
        font-size: 18px;
        margin: 0;
        /* flex: 1; */
        width: auto;
    }

    .wddna-sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }


    /* Close button */
    .sidebar-close-floating {
        position: fixed;
        top: 20px;
        right: 20px;
        width: 46px;
        height: 46px;
        border: none;
        border-radius: 12px;
        background: #FF5B5B;
        color: #fff;
        font-size: 20px;
        cursor: pointer;
        z-index: 1100;
        display: flex;
        align-items: center;
        justify-content: center;

        opacity: 0;
        visibility: hidden;
        transform: scale(0.8);
        transition: all 0.3s ease;
    }

    .sidebar-close-floating.active {
        opacity: 1;
        visibility: visible;
        transform: scale(1);
    }

    /* .wddna-sidebar {
        width: 100%;
        padding: 15px;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        background: #fff;
        box-shadow: 2px 0 5px rgba(0,0,0,0.2);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 150;
    } */


    /* .sidebar-toggle {
        display: block;
    } */

    .sidebar-toggle {
        background: #1e40af;
        color: #fff;
        border: none;
        height: 42px;
        border-radius: 8px;
        font-size: 20px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0px;
    }
    .wddna-mobile-profile {
        font-size: 14px;
        font-weight: 600;
        color: #fff;
        cursor: pointer;
    }


    .wddna-sidebar .nav-links {
        width: 100%;
        /* display: flex;
        flex-wrap: wrap;
        gap: 5px; */
    }

    /* .wddna-sidebar .nav-links a {
        flex: 1 1 calc(50% - 10px);
        text-align: center;
        margin-bottom: 10px;
        padding: 10px 5px;
    } */

    .wddna-sidebar .nav-links a {
        flex: 1 1 100%;
        text-align: left;
    }

    /* .wddna-main-content {
        flex: 1;
        margin-left: 0;
    } */

    .wddna-main-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        /* height: 100vh;
        overflow: hidden; */
    }

    /* .wddna-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 15px 20px;

        display: flex;
        justify-content: space-between;
        align-items: center;
        background-color: #1e40af;
        color: #fff;
        padding: 20px 30px;
        z-index: 100;
    } */

    /* .wddna-topbar {
        position: sticky;
        top: 0;
        z-index: 100;
        flex-shrink: 0;
        padding: 15px 20px 15px 65px;
    } */

     .wddna-topbar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 15px 20px;
    }


    .wddna-mobile-top-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .wddna-topbar-left {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
    }

    .wddna-content-wrapper {
        flex: 1;
        overflow-y: auto;
        /* -webkit-overflow-scrolling: touch; */
        padding: 20px 20px;
        margin-bottom: 20px;
    }

    .wddna-topbar .welcome-text {
        font-size: 18px;
    }
}

/* ===== Responsive: Mobile (375px) ===== */
@media (max-width: 425px) {
    /* .wddna-master-wrapper {
        flex-direction: column;
    } */

    /* .wddna-sidebar {
        width: 100%;
        padding: 10px;
    } */

     .wddna-sidebar {
        width: 260px;
        padding: 12px;
    }

    .wddna-sidebar .logo img {
        width: 80%;
        margin: 0 auto;
    }

    .wddna-sidebar .nav-links a {
        flex: 1 1 100%;
        font-size: 14px;
        padding: 10px;
    }

    /* .wddna-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;

        padding: 10px 15px;
    } */

    .wddna-topbar {
        padding: 12px 15px;
    }

    

    .wddna-page-title {
        font-size: 16px;
    }

    .wddna-topbar .welcome-text {
        font-size: 16px;
    }

    /* .wddna-content-wrapper {
        padding: 15px 10px;
    } */

    .wddna-content-wrapper {
        padding: 12px;
    }

    /* Profile dropdown full width on mobile */
    .wddna-topbar .profile-menu {
        right: 0;
        left: 0;
        min-width: 120px;
    }

    .wddna-profile-menu.wddna-show{
        min-width: 120px;
    }

    .wddna-profile-menu.wddna-show .wddna-logout-btn {
        padding: 5px 15px;
    }
}