/* --- Dashboard & modal styles --- */
.erim-wrap { max-width:1200px;margin:24px auto;padding:20px;box-sizing:border-box; position:relative;}
.erim-grid { display:flex; gap:24px; align-items:flex-start; }
.erim-sidebar { width:72px; background:#b51515; border-radius:12px; padding:16px 8px; display:flex;flex-direction:column; gap:18px; align-items:center; }
.erim-sidebar a { display:block;width:44px;height:44px;border-radius:10px;background:rgba(255,255,255,0.06); color:#fff; text-align:center; line-height:44px; text-decoration:none; }
.erim-sidebar a:hover{color:#fff;}
.erim-main { flex:1;width:100% }
.erim-topcards { display:flex; gap:18px; margin-bottom:0; flex-wrap:wrap; }
.erim-card { background:#fff;padding:18px;border-radius:12px; box-shadow:0 6px 20px rgba(0,0,0,0.04); flex:1; min-width:200px; }
.erim-card h4 { margin:0 0 8px; font-size:16px; color:#9d0000; }
.erim-card .big { font-size:28px; font-weight:800; color:#222; margin-top:6px; }
.erim-profile-row { display:flex; gap:18px; margin-bottom:18px; align-items:stretch; }
.erim-profile-card { background:#fff;padding:18px;border-radius:12px; width:380px; box-shadow:0 6px 20px rgba(0,0,0,0.04); position:relative; }
.erim-profile-card img { display:block; }
.erim-profile-card .name { font-size:18px;font-weight:700; color:#9d0000; }
.erim-profile-card .meta { color:#666; margin-top:6px; }
.erim-actions { display:flex; gap:10px; margin-top:12px; }
.erim-actions a.button, .erim-actions button { display:inline-block;padding:8px 12px;border-radius:8px;text-decoration:none;color:#fff;background:#b51515;border:none;cursor:pointer; }
.erim-section { background:#fff;padding:16px;border-radius:12px; box-shadow:0 6px 20px rgba(0,0,0,0.04); margin-bottom:18px; }
.erp-table { width:100%; border-collapse:collapse; }
.erp-table th, .erp-table td { text-align:left;padding:10px;border-bottom:1px solid #f0f0f0; }
.erp-node { background:#f6fbfb;border-radius:10px;padding:10px;margin-bottom:10px; }
.logout-top { position:absolute; right:16px; top:12px; }
@media (max-width:900px){ .erim-grid{flex-direction:column;} .erim-sidebar{width:56px;flex-direction:row;justify-content:center;padding:10px;} .erim-profile-card{width:100%;} }

/* Edit Profile modal */
.ep-modal{display:none;position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,0.45);z-index:99999;opacity:0;transition:opacity .25s ease;}
.ep-modal.show{display:block;opacity:1;}
.ep-modal-content{background:#fff;width:420px;max-width:95%;margin:6% auto;padding:18px;border-radius:10px;position:relative;box-shadow:0 8px 30px rgba(0,0,0,0.2);transform:translateY(10px);transition:transform .28s ease;}
.ep-modal.show .ep-modal-content{transform:translateY(0);}
.ep-close{position:absolute;right:12px;top:8px;font-size:22px;cursor:pointer;line-height: 28px;}
.ep-modal label{display:block;margin-top:8px;font-weight:600;color:#333;}
.ep-modal input[type="email"], .ep-modal input[type="text"]{width:100%;padding:8px;margin-top:6px;border:1px solid #ddd;border-radius:6px;box-sizing:border-box;}
.ep-photo-preview{width:96px;height:96px;border-radius:8px;object-fit:cover;border:1px solid #e6e6e6;margin-top:8px;display:block;}
.ep-controls{display:flex;gap:8px;align-items:center;margin-top:10px;}
.ep-btn { padding:8px 10px;border-radius:6px;border:none;cursor:pointer;background:#b51515;color:#fff; }
.ep-btn.secondary { background:#f0f0f0;color:#333; }

/* Toasts */
.erim-toast { position: fixed; right: 20px; bottom: 20px; background: #0a9ea2; color: #fff; padding: 12px 18px; border-radius: 8px; font-size: 14px; opacity: 0; transform: translateY(20px); transition: all 0.4s ease; z-index: 999999; box-shadow: 0 4px 18px rgba(0,0,0,0.2); }
.erim-toast.show { opacity: 1; transform: translateY(0); }
.erim-toast.error { background: #b51515; }
.erim-spinner { display:inline-block;width:16px;height:16px;border:2px solid rgba(255,255,255,0.3);border-top-color:#fff;border-radius:50%;animation:erim-spin .8s linear infinite;vertical-align:middle;margin-left:8px; }
@keyframes erim-spin { to { transform: rotate(360deg); } }
/* Sidebar parent item */
.erim-sidebar .sidebar-item {
    position: relative; /* Needed for absolute positioning of submenu */
    margin-bottom: 8px;
}

/* Main link styling */
.erim-sidebar .sidebar-item > a {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    text-decoration: none;
    color: #fff;
    border-radius: 4px;
	justify-content: center;
}

.erim-sidebar .sidebar-item > a:hover {
    background-color: #f0f0f0;
	    color: #b51515;
}

/* Submenu container */
.erim-sidebar .sidebar-submenu {
    display: none;       /* Hide by default */
    position: absolute;  /* Position relative to parent */
    top: 0;              /* Align with parent */
    left: 100%;          /* Show to the right */
    background: #fff;
    border: 1px solid #ddd;
    min-width: 180px;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Show submenu on hover of parent */
.erim-sidebar .sidebar-item:hover .sidebar-submenu {
    display: block;
}

/* Submenu item links */
.erim-sidebar .sidebar-submenu .submenu-item {
    display: block;
    padding: 6px 12px;
    text-decoration: none;
    color: #333;
    white-space: nowrap;
    width: auto;
    height: auto;
}

.erim-sidebar .sidebar-submenu .submenu-item:hover {
    background-color: #f0f0f0;
}
.erim-sidebar-nav ul,.erim-sidebar-nav li {
    list-style: none;
    padding: 0;
}
.erim-sidebar .sidebar-submenu a {
    color: #000;
}
#apus-breadscrumb{display:none}

/* required LIB STYLES */
/* .Treant se automatski dodaje na svaki chart conatiner */
.Treant {
    position: relative;
    overflow: hidden; 
}
.Treant > .node,
.Treant > .pseudo { position: absolute; display: block; visibility: hidden; }
.Treant.Treant-loaded .node,
.Treant.Treant-loaded .pseudo { visibility: visible; }
.Treant > .pseudo { width: 0; height: 0; border: none; padding: 0; }
.Treant .collapse-switch { width: 3px; height: 3px; display: block; border: 1px solid black; position: absolute; top: 1px; right: 1px; cursor: pointer; }
.Treant .collapsed .collapse-switch { background-color: #868DEE; }
.Treant > .node img {	border: none; float: left;border: 1px solid #b92323; }
.Treant.Treant-loaded .node {
    padding: 20px 15px;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    border-radius: 5px;
    background-color: #ffffff;
    border: 1px solid #f5f5f5;
    width: auto; 
    color: #000;
    box-shadow: 0px 0px 10px #dfdfdf;margin-bottom: 30px;
}
p#erp_referral_code_field .optional {
    display: none;
}
.treant .node {
        padding: 10px;
        background: #fff;
        border-radius: 10px;
        border: 1px solid #ccc;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
        min-width: 240px;
    }
    .node-content {
        display: flex;
        align-items: center;
    }
    .node-content img {
        width: 55px;
        height: 55px;
        border-radius: 50%;
        object-fit: cover;
        margin-right: 10px;
    }
    .node-info { font-size: 13px; line-height: 16px; }
    .node-name { font-weight: bold; font-size: 14px; }
    #treant-wrapper { width: 100%; height: auto; overflow-x: auto;     padding: 0 0 75px 0;}
	.erp-summary-cards {
    display: flex;
    gap: 20px;
    margin: 15px 0 25px 0;
}
.erp-summary-card {
    flex: 1;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 15px;
    color: #fff;
    font-weight: 600;
    text-align: center;
}
.erp-summary-card.hr { background-color: #004c8c; }
.erp-summary-card.tl { background-color: #00695c; }
.erp-summary-card.se { background-color: #5d4037; }
.erp-summary-card.customer { background-color: #6a1b9a; }

p#erp_referral_code_field.woocommerce-validated input.input-text {
    border: 1px solid;
}
.erim-topcards.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.erim-registration label{display:block}
.shref_mt0{margin-top:0}

.sh_wallet_info {
    padding: 10px 15px;
    border: 1px solid #514481;
    background: #efeaff;
    border-radius: 5px;
    margin-bottom: 25px;
}

.sh_wallet_info label {
    cursor: pointer;
}